Assembler Internal Sections; Sub-Sections - Red Hat ENTERPRISE LINUX 4 - USING AS Using Manual

Gnu assembler
Hide thumbs Also See for ENTERPRISE LINUX 4 - USING AS:
Table of Contents

Advertisement

Chapter 5. Sections and Relocation
undefined section
This "section" is a catch-all for address references to objects not in the preceding sections.
An idealized example of three relocatable sections follows. The example uses the traditional section
names
and
.text
.data
partial program # 1:
partial program # 2:
linked program:
addresses:

5.3. Assembler Internal Sections

These sections are meant only for the internal use of
really need to know about these sections for most purposes; but they can be mentioned in
messages, so it might be helpful to have an idea of their meanings to
to permit the value of every expression in your assembly language program to be a section-relative
address.
ASSEMBLER-INTERNAL-LOGIC-ERROR!
An internal assembler logic error has been found. This means there is a bug in the assembler.
expr section
The assembler stores complex expression internally as combinations of symbols. When it needs
to represent an expression as a symbol, it puts it in the expr section.

5.4. Sub-Sections

Assembled bytes conventionally fall into two sections: text and data. You may have separate groups of
data in named sections that you want to end up near to each other in the object file, even though they
are not contiguous in the assembler source.
each section, there can be numbered subsections with values from 0 to 8192. Objects assembled into
the same subsection go into the object file together with other objects in the same subsection. For
example, a compiler might want to store constants in the text section, but might not want to have
them interspersed with the program being assembled. In this case, the compiler could issue a
before each section of code being output, and a
0
output.
Subsections are optional. If you do not use subsections, everything goes in subsection number zero.
. Memory addresses are on the horizontal axis.
+-----+----+--+
|ttttt|dddd|00|
+-----+----+--+
text
data bss
seg.
seg. seg.
+---+---+---+
|TTT|DDD|000|
+---+---+---+
+--+---+-----+--+----+---+-----+~~
|
|TTT|ttttt|
+--+---+-----+--+----+---+-----+~~
0 ...
as
|dddd|DDD|00000|
. They have no meaning at run-time. You do not
as
allows you to use subsections for this purpose. Within
before each group of constants being
.text 1
warning
as
. These sections are used
as
33
.text

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 4

Table of Contents