objdump 输出 - 各列代表什么?
我在目标文件上运行 objdump -r 并得到以下输出。这里的每一列代表什么?我可能错过了它,但文档没有指定。
simple.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <main>:
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
4: 48 83 ec 30 sub $0x30,%rsp
8: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax
f: 00 00
11: 48 89 45 f8 mov %rax,-0x8(%rbp)
15: 31 c0 xor %eax,%eax
17: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%rbp)
1e: eb 64 jmp 84 <main+0x84>
20: 8b 45 d8 mov -0x28(%rbp),%eax
23: 89 c7 mov %eax,%edi
25: e8 00 00 00 00 callq 2a <main+0x2a>
26: R_X86_64_PC32 foo-0x4
2a: 89 45 dc mov %eax,-0x24(%rbp)
2d: 8b 55 dc mov -0x24(%rbp),%edx
30: 48 8d 45 e0 lea -0x20(%rbp),%rax
ETC
I ran objdump -r
on an object file and got the following output. What do each of the columns represent here? I might have missed it, but the documentation doesn't specify.
simple.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <main>:
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
4: 48 83 ec 30 sub $0x30,%rsp
8: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax
f: 00 00
11: 48 89 45 f8 mov %rax,-0x8(%rbp)
15: 31 c0 xor %eax,%eax
17: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%rbp)
1e: eb 64 jmp 84 <main+0x84>
20: 8b 45 d8 mov -0x28(%rbp),%eax
23: 89 c7 mov %eax,%edi
25: e8 00 00 00 00 callq 2a <main+0x2a>
26: R_X86_64_PC32 foo-0x4
2a: 89 45 dc mov %eax,-0x24(%rbp)
2d: 8b 55 dc mov -0x24(%rbp),%edx
30: 48 8d 45 e0 lea -0x20(%rbp),%rax
etc
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是不是不言自明:
偏移量、机器码、对应的汇编代码
Isn't it self explanatory:
Offset, Machine code, Corresponding Assembly code
正如 Peter Cordes 所言,不同操作系统上存在微小差异。
链接:https://stackoverflow.com/a/67618638/575842
As remained by Peter Cordes, there is a tiny difference on different OS.
link : https://stackoverflow.com/a/67618638/575842