HP-UX Linker and Libraries User's Guide

The section, segment, file, and symbol names are case-sensitive.
A string of characters following # and ending at a new-line is considered a comment.
Defining Mapfile Segment Declarations
A segment declaration can create a new segment with a set of attributes or change the attributes
of an existing segment.
segment_name = {segment_attribute_value}* ;
Table 34 Attributes and their values
ValueAttribute
LOAD (default), HP_TLS, NOTE, NONSEGMENT
segment_type
?[R][W][X][l][m][c][g][o]]
segment_flags
Vnumbervirtual_address
Pnumberphysical_address
Anumberalignment
NOTE segments cannot be assigned any segment attribute other than a segment_type.
If you do not specify virtual_address, physical_address and alignment, the linker
calculates these values as it builds the executable. If you specify both a virtual_address
and an alignment for a segment, the virtual_address value takes priority.
An alignment value greater than the file system block size (4K) also specifies the page size.
In that case, the value of the alignment is also the size of the page. The operating system uses
the largest page size available that is not greater than the value of the alignment when mapping
a segment.
The segment_type NONSEGMENT describes sections placed at the end of the executable
file. The linker does not create a program header entry for this segment.
Segment Flags
Segment declarations support the following segment flags:
ActionFlag
ReadableR
WritableW
ExecutableX
The default segment_flags for a LOADable segment is ?RWX.
Segment declarations support the following special flags:
ActionFlag
Enables lazy swap allocation for a segment. This flag is not set by default. The lazy swap is disabled
by default.
l
Sets the "modification" hint for a segment. When this flag is set, it indicates that the program expects
to modify the pages in the segment. If not set, the program does not expect to modify any pages in the
m
segment, even though it may have permission to do so. This flag is not set by default. The modification
hint is off by default.
196 Using Mapfiles