Implicit Linker Scripts - 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

56
LOADADDR(
section
Return the absolute LMA of the named
be different if the
Output Section LMA).
MAX(
,
)
exp1
exp2
Returns the maximum of
MIN(
,
)
exp1
exp2
Returns the minimum of
NEXT(
)
exp
Return the next unallocated address that is a multiple of
to
ALIGN(
)
exp
output file, the two functions are equivalent.
SIZEOF(
)
section
Return the size in bytes of the named
has not been allocated when this is evaluated, the linker will report an error. In the following
example,
symbol_1
SECTIONS{ ...
.output {
.start = . ;
...
.end = . ;
}
symbol_1 = .end - .start ;
symbol_2 = SIZEOF(.output);
... }
SIZEOF_HEADERS
sizeof_headers
Return the size in bytes of the output file's headers. This is information which appears at the start
of the output file. You can use this number when setting the start address of the first section, if
you choose, to facilitate paging.
When producing an ELF output file, if the linker script uses the
tion, the linker must compute the number of program headers before it has determined all the
section addresses and sizes. If the linker later discovers that it needs additional program headers,
it will report an error
must avoid using the
forcing the linker to use additional program headers, or you must define the program headers
yourself using the

4.11. Implicit Linker Scripts

If you specify a linker input file which the linker can not recognize as an object file or an archive file,
it will try to read the file as a linker script. If the file can not be parsed as a linker script, the linker will
report an error.
An implicit linker script will not replace the default linker script.
)
attribute is used in the output section definition (refer to Section 4.6.8.2
AT
and
exp1
exp2
and
exp1
exp2
; unless you use the
and
symbol_2
not enough room for program headers
SIZEOF_HEADERS
command (refer to Section 4.8 PHDRS Command).
PHDRS
. This is normally the same as
section
.
.
command to define discontinuous memory for the
MEMORY
, if that section has been allocated. If the section
section
are assigned identical values:
function, or you must rework your linker script to avoid
Chapter 4. Linker Scripts
ADDR
. This function is closely related
exp
SIZEOF_HEADERS
. To avoid this error, you
, but it may
builtin func-

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents