Starts the LCF sections segment, which defines the contents of target-memory sections. Also defines global symbols to be used in the output file.
SECTIONS { section_spec[, section_spec] }
section_spec
sectionName : [AT (loadAddress)] {contents}
> segmentName
sectionName
Name for the output section, such as mysection. Must start with a period.
AT (loadAddress)
Optional specifier for the load address of the section. The default value is the relocation address.
contents
Statements that assign a value to a symbol or specify section placement, including input sections. Subsections Arithmetic, Comment Operators, Specifying Files and Functions, Alignment, and . (location counter) explain possible contents statements.
segmentName
Predefined memory-segment destination for the contents of the section. The two variants are:
For more information, see the subsection Sections Segment.
The following listing is an example sections-segment definition.
SECTIONS { .text : { _textSegmentStart = .; alpha.obj (.text) . = ALIGN (0x10); beta.obj (.text) _textSegmentEnd = .; } .data : { *(.data) } .bss : { *(.bss) *(COMMON) } }