Symbol table '.symtab' contains 75 entries:
Num: Value Size Type Bind Vis Ndx Name
。。。。。。
67: 00000000 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.0
68: 0804a014 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
69: 080483c4 10 FUNC GLOBAL DEFAULT 13 test
70: 0804a01c 0 NOTYPE GLOBAL DEFAULT ABS _end
71: 0804a014 0 NOTYPE GLOBAL DEFAULT ABS _edata
72: 0804848a 0 FUNC GLOBAL HIDDEN 13 __i686.get_pc_thunk.bx
73: 080483ce 69 FUNC GLOBAL DEFAULT 13 main
74: 08048298 0 FUNC GLOBAL DEFAULT 11 _init
---------------------------------------------------
@linuxidc:~/桌面$ objdump -d a.out 反汇编
a.out: file format elf32-i386
...
080482f8 <printf@plt>:
80482f8: ff 25 08 a0 04 08 jmp *0x804a008
80482fe: 68 10 00 00 00 push $0x10
8048303: e9 c0 ff ff ff jmp 80482c8 <_init+0x30>
Disassembly of section .text:
080483ce <main>:
80483ce: 8d 4c 24 04 lea 0x4(%esp),%ecx
80483d2: 83 e4 f0 and $0xfffffff0,%esp
80483d5: ff 71 fc pushl -0x4(%ecx)
80483d8: 55 push %ebp
80483d9: 89 e5 mov %esp,%ebp
80483db: 51 push %ecx
80483dc: 83 ec 24 sub $0x24,%esp
80483df: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80483e6: 8b 45 f4 mov -0xc(%ebp),%eax
80483e9: 89 45 f8 mov %eax,-0x8(%ebp)
80483ec: 83 7d f8 00 cmpl $0x0,-0x8(%ebp)
80483f0: 74 13 je 8048405 <main+0x37>
80483f2: 8b 45 f8 mov -0x8(%ebp),%eax
80483f5: 89 44 24 04 mov %eax,0x4(%esp)
80483f9: c7 04 24 e0 84 04 08 movl $0x80484e0,(%esp)
8048400: e8 f3 fe ff ff call 80482f8 <printf@plt>
8048405: b8 00 00 00 00 mov $0x0,%eax
804840a: 83 c4 24 add $0x24,%esp
804840d: 59 pop %ecx
804840e: 5d pop %ebp
804840f: 8d 61 fc lea -0x4(%ecx),%esp
8048412: c3 ret
8048413: 90 nop
8048414: 90 nop
8048415: 90 nop
8048416: 90 nop
8048417: 90 nop
8048418: 90 nop
8048419: 90 nop
804841a: 90 nop
804841b: 90 nop
804841c: 90 nop
804841d: 90 nop
804841e: 90 nop
804841f: 90 nop
======================================================
关于ELF格式的链接 可以看
1. Intel平台下Linux中 ELF文件动态链接的加载、解析及实例分析): 加载
IBM developerWorks 中国网站 王瑞川 (jeppeterone@163.com)
2. Linkers and Loaders
=======================================
2009-05-06 widebright 补充
上面两个命令都是 gnu binutils工具附带的,可能比较有帮助的还有addr2line 可以根据 你出错的堆栈地址找到对应的代码的行数吧。
GNU Binutils
The GNU Binutils are a collection of binary tools. The main ones are:
ld - the GNU linker.
as - the GNU assembler.
But they also include: