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

Attribute

Value

segment_type

LOAD (default), HP_TLS, NOTE, NONSEGMENT

 

 

segment_flags

?[R][W][X][l][m][c][g][o]]

 

 

virtual_address

Vnumber

 

 

physical_address

Pnumber

 

 

alignment

Anumber

 

 

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:

Flag

Action

 

 

R

Readable

 

 

W

Writable

 

 

X

Executable

 

 

The default segment_flags for a LOADable segment is ?RWX.

Segment declarations support the following special flags:

Flag

Action

lEnables lazy swap allocation for a segment. This flag is not set by default. The lazy swap is disabled by default.

mSets 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 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