The optimizing linker (hereafter abbreviated "rlink") concatenates identical sections in the input relocatable files, and allocates them to the address specified by the -start option.
Sections in different files with the same name are concatenated and allocated in the order of file input. |
Sections with the same name but different alignments are concatenated after alignment adjustment. The alignment is adjusted to that of the section with the largest alignment. |
If sections with the same name include both absolute-address format and relative-address format, then the sections with relative-address format are concatenated after the sections with absolute-address format. |
The rules for ordering of concatenation for sections with the same name are indicated below, highest priority to lowest. |
Order in which user libraries are specified via the library option and order of modules input in the library |
Order in which system libraries are specified via the library option and order of modules input in the library |
Order in which environment variable (HLNK_LIBRARY1 to 3) libraries are specified and order of modules input in the library |