[beyes@beyes ELF]$ objdump -h simplesection.o
simplesection.o: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0000004f 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 .data 00000008 00000000 00000000 00000084 2**2
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000004 00000000 00000000 0000008c 2**2
ALLOC
3 .rodata 00000004 00000000 00000000 0000008c 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .comment 0000002e 00000000 00000000 00000090 2**0
CONTENTS, READONLY
5 .note.GNU-stack 00000000 00000000 00000000 000000be 2**0
CONTENTS, READONLY
6 .eh_frame 00000058 00000000 00000000 000000c0 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
[beyes@beyes ELF]$ objdump -s -d simplesection.o
simplesection.o: file format elf32-i386
Contents of section .text:
0000 5589e583 ec188b45 08894424 04c70424 U......E..D$...$
0010 00000000 e8fcffff ffc9c355 89e583e4 ...........U....
0020 f083ec20 c744241c 01000000 8b150400 ... .D$.........
0030 0000a100 00000001 d0034424 1c034424 ..........D$..D$
0040 18890424 e8fcffff ff8b4424 1cc9c3 ...$......D$...
Contents of section .data:
0000 54000000 55000000 T...U...
Contents of section .rodata:
0000 25640a00 %d..
Contents of section .comment:
0000 00474343 3a202847 4e552920 342e362e .GCC: (GNU) 4.6.
0010 30203230 31313036 30332028 52656420 0 20110603 (Red
0020 48617420 342e362e 302d3130 2900 Hat 4.6.0-10).
Contents of section .eh_frame:
0000 14000000 00000000 017a5200 017c0801 .........zR..|..
0010 1b0c0404 88010000 1c000000 1c000000 ................
0020 00000000 1b000000 00410e08 8502420d .........A....B.
0030 0557c50c 04040000 1c000000 3c000000 .W..........<...
0040 1b000000 34000000 00410e08 8502420d ....4....A....B.
0050 0570c50c 04040000 .p......
Disassembly of section .text:
00000000 <func1>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 18 sub $0x18,%esp
6: 8b 45 08 mov 0x8(%ebp),%eax
9: 89 44 24 04 mov %eax,0x4(%esp)
d: c7 04 24 00 00 00 00 movl $0x0,(%esp)
14: e8 fc ff ff ff call 15 <func1+0x15>
19: c9 leave
1a: c3 ret
0000001b <main>:
1b: 55 push %ebp
1c: 89 e5 mov %esp,%ebp
1e: 83 e4 f0 and $0xfffffff0,%esp
21: 83 ec 20 sub $0x20,%esp
24: c7 44 24 1c 01 00 00 movl $0x1,0x1c(%esp)
2b: 00
2c: 8b 15 04 00 00 00 mov 0x4,%edx
32: a1 00 00 00 00 mov 0x0,%eax
37: 01 d0 add %edx,%eax
39: 03 44 24 1c add 0x1c(%esp),%eax
3d: 03 44 24 18 add 0x18(%esp),%eax
41: 89 04 24 mov %eax,(%esp)
44: e8 fc ff ff ff call 45 <main+0x2a>
49: 8b 44 24 1c mov 0x1c(%esp),%eax
4d: c9 leave
4e: c3 ret
$ objdump -t simplesection.o
simplesection.o: file format elf32-i386
SYMBOL TABLE:
00000000 l df *ABS* 00000000 simplesection.c
00000000 l d .text 00000000 .text
00000000 l d .data 00000000 .data
00000000 l d .bss 00000000 .bss
00000000 l d .rodata 00000000 .rodata
00000004 l O .data 00000004 static_var.1220
00000000 l O .bss 00000004 static_var2.1221
00000000 l d .note.GNU-stack 00000000 .note.GNU-stack
00000000 l d .eh_frame 00000000 .eh_frame
00000000 l d .comment 00000000 .comment
00000000 g O .data 00000004 global_init_var
00000004 O *COM* 00000004 global_uninit_var
00000000 g F .text 0000001b func1
00000000 *UND* 00000000 printf
0000001b g F .text 00000034 main
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |