Kenwood HP 9000 Personal Computer User Manual


 
Appendix A 309
Using Mapfiles
Internal Map Structure
Internal Map Structure
The linker use a default map structure corresponding to the default
mapfile. When you use the mapfile option with the ld command, the
linker appends the default mapfile to the end of your user-specified
mapfile. (You can override the default mapfile by using the
+nodefaultmap option.)
Placement of Segments in an Executable
As it processes each segment declaration in the mapfile, the linker
compares it with the existing list of segment declarations as follows:
If the segment does not exist already, but another with the same
segment_type exists, the linker adds the segment after all of the
existing segments with the same segment_type.
If no segment with the same segment_type exists, the linker adds the
new segment to the list to maintain the following order based on
segment_type:
LOAD
HP_TLS
•NOTE
NONSEGMENT
If segments of same type already exists, the linker adds the new
segment after the last segment with the same type.
Mapping Input Sections to Segments
As each section mapping directive in a mapfile is read in, the linker
creates a new entrance criteria and appends it to the existing list of
entrance criteria. It applies the entrance criteria in the order in which
they are specified in the mapfile. The linker maps out the input sections
in the same order as their matching entrance criteria.