[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you provide address, the address of the output section will be set to precisely that. If you provide neither address nor region, then the address of the output section will be set to the current value 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) } |
.text : { *(.text) } |
The address may be an arbitrary expression; 3.10 Expressions in Linker Scripts. For 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) } |
ALIGN
returns the current location counter
aligned upward to the specified value.
Specifying address for a section will change the value of the location counter.