. (location counter)

Denotes the current output location.

Remarks

The period always refers to a location in a sections segment, so is valid only in a sections-section definition. Within such a definition, ' .' may appear anywhere a symbol is valid.

Assigning a new, greater value to ' .' causes the location counter to advance. But it is not possible to decrease the location-counter value, so it is not possible to assign a new, lesser value to ' .' You can use this effect to create empty space in an output section, as the Listing: Moving the Location Counter example does.

Example

The code of the following listing moves the location counter to a position 0x10000 bytes past the symbol __start.

Listing: Moving the Location Counter
..data :
{

     *.(data)

     *.(bss)

     *.(COMMON)

     __start = .;

     . = __start + 0x10000;

     __end = .;

} > DATA