6.1.2 Section concatenation

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.

Remark

See "-STARt" for details of -start option.

(1)

Section allocation via the -start option

(a)

Sections in different files with the same name are concatenated and allocated in the order of file input.

 

(b)

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.

 

(c)

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.

 

(d)

The rules for ordering of concatenation for sections with the same name are indicated below, highest priority to lowest.

-

Order in which input files are specified via the input option or on the command line

-

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