Overlay 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

44
be used to specify the fill pattern; Leading zeros become part of the pattern too. For all other cases,
including extra parentheses or a unary
of the expression. In all cases, the number is big-endian.
You can also change the fill value with a
Section 4.6.5 Output Section Data).
Here is a simple example:
SECTIONS { .text : { *(.text) } =0x90909090 }

4.6.9. Overlay Description

An overlay description provides an easy way to describe sections which are to be loaded as part
of a single memory image but are to be run at the same memory address. At run time, some sort of
overlay manager will copy the overlaid sections in and out of the runtime memory address as required,
perhaps by simply manipulating addressing bits. This approach can be useful, for example, when a
certain region of memory is faster than another.
Overlays are described using the
command, like an output section description. The full syntax of the
SECTIONS
as follows:
OVERLAY [
] : [NOCROSSREFS] [AT (
start
{
secname1
{
output-section-command
output-section-command
...
} [:
...] [=
phdr
secname2
{
output-section-command
output-section-command
...
} [:
...] [=
phdr
...
} [
] [:
region

Everything is optional except
and
above). The section definitions within the
secname2
within the general
SECTIONS
addresses and no memory regions may be defined for sections within an
The sections are all defined with the same starting address. The load addresses of the sections are
arranged such that they are consecutive in memory starting at the load address used for the
as a whole (as with normal section definitions, the load address is optional, and defaults to the start
address; the start address is also optional, and defaults to the current value of the location counter).
If the
NOCROSSREFS
report an error. Since the sections all run at the same address, it normally does not make sense for one
section to refer directly to another. NOCROSSREFS.
For each section within the
__load_start_
secname
__load_stop_
secname
which are not legal within C identifiers are removed. C (or assembler) code may use these
secname
symbols to move the overlaid sections around as necessary.
, the fill pattern is the four least significant bytes of the value
+
OVERLAY
]
fill
]
fill
...] [=
]
phdr
fill
(a keyword), and each section must have a name (
OVERLAY
contruct (refer to Section 4.6 SECTIONS Command), except that no
keyword is used, and there any references among the sections, the linker will
, the linker automatically defines two symbols. The symbol
OVERLAY
is defined as the starting load address of the section. The symbol
is defined as the final load address of the section. Any characters within
command in the output section commands; (refer to
FILL
command. The
OVERLAY
)]
ldaddr
OVERLAY
Chapter 4. Linker Scripts
command is used within a
command is
OVERLAY
secname1
construct are identical to those
.
OVERLAY
OVERLAY

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents