objdump是一个很有用的命令,可以查看可执行文件的反汇编结果。
今天查阅了点资料,特记录如下:
Sections:
Idx Name Size VMA LMA File off Algn
0 .rom_vectors 000001e0 802b0000 802b0000 00000080 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .init 00000000 802b01e0 802b01e0 0079b324 2**0
CONTENTS
2 .text 005417c0 802b01e0 802b01e0 00000260 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
3 .fini 00000000 807f19a0 807f19a0 0079b324 2**0
CONTENTS
4 .rodata 0015c830 807f19a0 807f19a0 00541a20 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rodata1 00000000 8094e1d0 8094e1d0 0079b324 2**0
……………………
各个段的名字大小虚拟地址,加载地址 对齐方式
SYMBOL TABLE:
802b0000 l d .rom_vectors 00000000 .rom_vectors
802b01e0 l d .init 00000000 .init
802b01e0 l d .text 00000000 .text
807f19a0 l d .fini 00000000 .fini
807f19a0 l d .rodata 00000000 .rodata
8094e1d0 l d .rodata1 00000000 .rodata1
8094e1d0 l d .data 00000000 .data
80a492a0 l d .data1 00000000 .data1
80a492a0 l d .eh_frame_hdr 00000000 .eh_frame_hdr
80a492a8 l d .eh_frame 00000000 .eh_frame
80a4aa2c l d .gcc_except_table 00000000 .gcc_except_table
80a4abd4 l d .ctors 00000000 .ctors
80a4ac2c l d .dtors 00000000 .dtors
80a4ac6c l d .devtab 00000000 .devtab
80a4b080 l d .got 00000000 .got
80a4b080 l d .dynamic 00000000 .dynamic
80a4b080 l d .sdata 00000000 .sdata
80a4b2a8 l d .lit8 00000000 .lit8
80a4b2a8 l d .lit4 00000000 .lit4
80a4b2a8 l d .sbss 00000000 .sbss
80a4b300 l d .bss 00000000 .bss
00000000 l d .comment 00000000 .comment
00000000 l d .debug_aranges 00000000 .debug_aranges
00000000 l d .debug_pubnames 00000000 .debug_pubnames
00000000 l d .debug_info 00000000 .debug_info
符号表:地址
l g u (local (l), global (g), unique global (u), neither global nor local (a space) or both global and local (!))
w c I i F f o ( weak (w) ,constructor (C), warning (W),reference to another symbol (I),debugging symbol (d),dynamic symbol (D),function (F),file (f))
参考一下文件
http://www.sourceware.org/binutils/docs/binutils/objdump.html