Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Linker and Libraries User's Guide: HP 9000 Computers > Appendix A Using Mapfiles

Changing Mapfiles with -k filename and +nodefaultmap

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

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 	Type	Vaddr	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
5 PBIT 0000000000001718 0000000000000718 00000044 .text
6 PBIT 000000000000175c 000000000000075c 00000018 .interp
7 RELA 0000000000001778 0000000000000778 00000000 .rela.HP.init
8 RELA 0000000000001778 0000000000000778 00000000 .rela.init
9 RELA 0000000000001778 0000000000000778 00000000 .rela.fini
10 RELA 0000000000001778 0000000000000778 00000000 .rela.opd
11 RELA 0000000000001778 0000000000000778 00000018 .rela.plt
12 RELA 0000000000001790 0000000000000790 00000000 .rela.dlt
13 UNWI 0000000000001790 0000000000000790 00000010 .PARISC.unwind
14 PBIT 4000000040001000 0000000000001000 00000020 .opd
15 PBIT 4000000040001020 0000000000001020 00000010 .plt
16 PBIT 4000000040001030 0000000000001030 00000000 .dlt
17 PBIT 4000000040001030 0000000000001030 00000000 .data
18 PBIT 4000000040001030 0000000000001030 00000000 .HP.init
19 PBIT 4000000040001030 0000000000001030 00000000 .preinit
20 PBIT 4000000040001030 0000000000001030 00000000 .init
21 PBIT 4000000040001030 0000000000001030 00000000 .fini
22 PBIT 4000000040001030 0000000000001030 00000008 .sdata
23 NOBI 4000000040001038 0000000000001038 00000008 .bss
24 NOBI 0000000000000000 0000000000001038 00000000 .tbss
25 STRT 0000000000000000 0000000000001038 000001b2 .strtab
26 SYMT 0000000000000000 00000000000011ec 000004b0 .symtab
27 STRT 0000000000000000 000000000000169c 000000de .shstrtab
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.