我使用objdump -d a.out
来获取以下内容。我最初假设第一列(例如080482b4
)是字节偏移量,但后来我注意到该文件只有7190字节长!
a.out: file format elf32-i386
Disassembly of section .init:
080482b4 <_init>:
80482b4: 53 push %ebx
80482b5: 83 ec 08 sub $0x8,%esp
80482b8: e8 00 00 00 00 call 80482bd <_init+0x9>
80482bd: 5b pop %ebx
80482be: 81 c3 37 1d 00 00 add $0x1d37,%ebx
80482c4: 8b 83 fc ff ff ff mov -0x4(%ebx),%eax
80482ca: 85 c0 test %eax,%eax
80482cc: 74 05 je 80482d3 <_init+0x1f>
80482ce: e8 3d 00 00 00 call 8048310 <__gmon_start__@plt>
80482d3: e8 e8 00 00 00 call 80483c0 <frame_dummy>
80482d8: e8 b3 01 00 00 call 8048490 <__do_global_ctors_aux>
80482dd: 83 c4 08 add $0x8,%esp
80482e0: 5b pop %ebx
80482e1: c3 ret
答案 0 :(得分:4)
它显示代码在运行映像中的虚拟地址。
(按惯例,code in Linux x86 ELF binaries typically starts at 0x08048000。)