304 Appendix A
Using Mapfiles
Defining Mapfile Segment Declarations
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}* ;
The segment attributes and their valid values are as follows:
• 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 no 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:
Attribute Value
segment_type LOAD (default), HP_TLS, NOTE, NONSEGMENT
segment_flags ?[R][W][X][s][l][m][c][k][g][o]
virtual_address Vnumber
physical_address Pnumber
alignment Anumber