It places the new output section descriptor after the last output section descriptor associated with that entrance criteria.

5.If no entrance criteria match is found, the linker places the section at the end of the "nonsegment". It does not create a program header entry for the nonsegment.

The following rules apply when the linker adds a new output section descriptor to a list of output section descriptors associated with an entrance criteria:

If an entrance criteria selects both $PROGBITS and $NOBITS sections, the linker enforces an order such that the $PROGBITS sections precede $NOBITS sections.

If an entrance criteria selects both S (short data) and !S (non-short data) sections, the layout of the sections depends on section_type and S flag status. The linker maintains the following order:

$PROGBITS and !S $PROGBITS and S $NOBITS and S $NOBITS and !S

The linker always tries to group all $NOBITS sections at the end of the data segment. If it does not place a $NOBITS section at the end of the data segment because of user-specified mapping directives, the linker converts that section to a $PROGBITS section and zero-fills the section contents. The linker issues a warning message when it converts a $NOBITS section into a $PROGBITS section.

Interaction between User-defined and Default Mapfile Directives

The linker adds the section mapping directives from the default mapfile after the user-specified mapping directives. The following rules apply if the you declare a built-in segment (a segment defined in the default mapfile):

If the segment_type and "segment_flags" differ from the default mapfile declarations, the linker issues a warning and uses the user-specified segment_type and/or segment_flags for that segment.

If your segment declaration does not specify a segment_attribute_value, the linker takes it from the default mapfile's segment declaration.

The linker completely ignores the default mapfile if you use the option +nodefaultmap on the ld command line.

Mapfile Option Error Messages

Fatal Errors

The following conditions can result in a fatal error:

Specifying more than one -koption at the command line

Mapfile cannot be opened or read

The linker finds a syntax error in the mapfile

More than one segment_type, segment_flags, virtual_address, physical_address or alignment value appears on a single declaration line.

More than one section_name, section_type, or section_flags value appears on a single directive line.

A user-defined virtual address causes a segment to overlap the previous segment

200 Using Mapfiles

Page 200
Image 200
HP UX Software Transition Kit (STK) manual Mapfile Option Error Messages, Fatal Errors