234Chapter7 • Miscellaneous Tools
CONTENTS, ALLOC, LOAD, DATA
16 .ctors 00000008 0804950c 0804950c 0000050c 2**2
CONTENTS, ALLOC, LOAD, DATA
17 .dtors 00000008 08049514 08049514 00000514 2**2
CONTENTS, ALLOC, LOAD, DATA
18 .got 00000024 0804951c 0804951c 0000051c 2**2
CONTENTS, ALLOC, LOAD, DATA
19 .dynamic 000000a0 08049540 08049540 00000540 2**2
CONTENTS, ALLOC, LOAD, DATA
20 .sbss 00000000 080495e0 080495e0 000005e0 2**0
CONTENTS
21 .bss 00000018 080495e0 080495e0 000005e0 2**2
ALLOC
22 .stab 00000f9c 00000000 00000000 000005e0 2**2
CONTENTS, READONLY, DEBUGGING
23 .stabstr 00002ec6 00000000 00000000 0000157c 2**0
CONTENTS, READONLY, DEBUGGING
24 .comment 00000144 00000000 00000000 00004442 2**0
CONTENTS, READONLY
25 .note 00000078 00000000 00000000 00004586 2**0
CONTENTS, READONLY
[root@boota]#
7.7.6.3Disassembling a File
Perhaps the major advantage of this utility is its ability to disassemble object files. Usually
the disassembly code is quite long but still you can make sense of it. The following is a segment
of disassembly code from the
a.out
file.
[root@boota]# objdump -d a.out|more
a.out: file format elf32-i386
Disassembly of section .init:
080482e4 <_init>:
80482e4:55 push %ebp
80482e5:89 e5 mov %esp,%ebp
80482e7:83 ec 08 sub $0x8,%esp
80482ea:e8 95 00 00 00 call 8048384
80482ef:90 nop
80482f0:e8 2b 01 00 00 call 8048420
80482f5:e8 86 01 00 00 call 8048480
<__do_global_ctors_aux>
80482fa:c9 leave
80482fb:c3 ret
Disassembly of section .plt:
080482fc <.plt>: