| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
. always refers to
a location in an output section, it must always appear in an
expression within a SECTIONS command. The . symbol
may appear anywhere that an ordinary symbol is allowed in an
expression, but its assignments have a side effect. Assigning a value
to the . symbol will cause the location counter to be moved.
This may be used to create holes in the output section. The location
counter may never be moved backwards.
SECTIONS
{
output :
{
file1(.text)
. = . + 1000;
file2(.text)
. += 1000;
file3(.text)
} = 0x1234;
}
|
file1 is located at the beginning of the
output section, then there is a 1000 byte gap. Then file2
appears, also with a 1000 byte gap following before file3 is
loaded. The notation `= 0x1234' specifies what data to write in
the gaps (see section 3.4.4 Optional Section Attributes).