Kenwood HP 9000 Personal Computer User Manual


 
298 Appendix A
Using Mapfiles
Changing Mapfiles with -k filename and +nodefaultmap
Changing Mapfiles with -k filename and
+nodefaultmap
The +nodefaultmap option used with -k option prevents the linker
from concatenating the default memory map to the map provided by
filename. If you specify +nodefaultmap, the linker does not append the
default mapfile to your mapfile. If you do not specify +nodefaultmap
with -k, the linker appends the default to the output file.
Mapfile Example: Using -k mapfile and
+nodefaultmap
cat mapfile
text = LOAD ?RX V0x1000;
text : .rodata;
text : .PARISC.milli;
text : .dynamic;
text : .dynsym;
text : .dynstr;
text : .hash;
text : $PROGBITS ?AX;
text : .PARISC.unwind;
text : $UNWIND;
data = LOAD ?RW V0x4000000040001000;
data : .opd;
data : .plt;
data : .dlt;
data : .data;
data : $PROGBITS ?AW!S;
data : .sdata;
data : $PROGBITS ?AWS;
data : .sbss;
data : $NOBITS ?AWS;
data : .bss;
data : $NOBITS ?AW!S;
note = NOTE;
note : $NOTE;
ld main.o +nomapfile -k mapfile -lc
elfdump -h -S a.out
a.out:
*** Section Header ***
Index TypeVaddr Offset Size Name
1 DYNM 00000000000011c8 00000000000001c8 00000120 .dynamic
2 DYNS 00000000000012e8 00000000000002e8 00000270 .dynsym
3 STRT 0000000000001558 0000000000000558 00000113 .dynstr
4 HASH 0000000000001670 0000000000000670 000000a4 .hash