SPRUIG8J January 2018 – March 2024
The linker has two main functions related to sections. First, the linker uses sections in object files as building blocks; it combines input sections to create output sections in an executable output module. Second, the linker chooses memory addresses for output sections; this is called placement. Two linker directives support these functions:
Subsections let you manipulate the placement of sections with greater precision. You can specify the location of each subsection with the linker's SECTIONS directive. If you do not specify a subsection, the subsection is combined with the other sections with the same base section name. See Section 12.5.5.1.
It is not always necessary to use linker directives. If you do not use them, the linker uses the target processor's default placement algorithm described in Section 12.7. When you do use linker directives, you must specify them in a linker command file.
Refer to the following sections for more information about linker command files and linker directives: