Output Section Name; Output Section Description - Red Hat ENTERPRISE LINUX 3 - USING ID Using Instructions

Using ld, the gnu linker
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING ID:
Table of Contents

Advertisement

36
...
} [
] [AT
region
¨
Most output sections do not use most of the optional section attributes.
The whitespace around
the curly braces are also required. The line breaks and other white space are optional.
Each
output-section-command
a symbol assignment (refer to Section 4.5 Assigning Values to Symbols)
an input section description (refer to Section 4.6.4 Input Section Description)
data values to include directly (refer to Section 4.6.5 Output Section Data)
a special output section keyword (refer to Section 4.6.6 Output Section Keywords)

4.6.2. Output Section Name

The name of the output section is
In formats which only support a limited number of sections, such as
the names supported by the format (
output format supports any number of sections, but with numbers and not names (as is the case for
Oasys), the name should be supplied as a quoted numeric string. A section name may consist of any
sequence of characters, but a name which contains any unusual characters such as commas must be
quoted.
The output section name

4.6.3. Output Section Description

The
is an expression for the VMA (the virtual memory address) of the output section. If you
address
do not provide
address
current value of the location counter.
If you provide
address
neither
nor
address
of the location counter aligned to the alignment requirements of the output section. The alignment
requirement of the output section is the strictest alignment of any input section contained within the
output section.
For example,
.text . : { *(.text) }
and
.text : { *(.text) }
are subtly different. The first will set the address of the
the location counter. The second will set it to the current value of the location counter aligned to the
strictest alignment of a
The
may be an arbitrary expression; refer to Section 4.10 Expressions in Linker Scripts. For
address
example, if you want to align the section on a 0x10 byte boundary, so that the lowest four bits of the
section address are zero, you could do something like this:
.text ALIGN(0x10) : { *(.text) }
] [:
lma_region
phdr
¨
is required, so that the section name is unambiguous. The colon and
section
may be one of the following:
.
section
a.out
is special; refer to Section 4.6.7 Output Section Discarding.
/DISCARD/
, the linker will set it based on
, the address of the output section will be set to precisely that. If you provide
, then the address of the output section will be set to the current value
region
input section.
.text
:
...] [=
phdr
must meet the constraints of your output format.
section
, for example, allows only
region
.text
Chapter 4. Linker Scripts
]
fillexp
, the name must be one of
a.out
,
.text
.data
if present, or otherwise based on the
output section to the current value of
or
). If the
.bss

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 3 - USING ID and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Enterprise linux 3

Table of Contents