objdump一个小bug by alert7 objdump居然看不到.symtab和.strtab section,不知为何! [root@redhat9 root]# objdump -v GNU objdump 2.13.90.0.18 20030206 Copyright 2002 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. 这是redhat9上的默认安装的版本,其他版本不知道有无这个问题。 [root@redhat9 root]# objdump -h ./t ./t: file format elf32-i386 Sections: Idx Name Size VMA LMA File off Algn 0 .interp 00000013 080480f4 080480f4 000000f4 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .note.ABI-tag 00000020 08048108 08048108 00000108 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .hash 00000028 08048128 08048128 00000128 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .dynsym 00000050 08048150 08048150 00000150 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .dynstr 0000004c 080481a0 080481a0 000001a0 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .gnu.version 0000000a 080481ec 080481ec 000001ec 2**1 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .gnu.version_r 00000020 080481f8 080481f8 000001f8 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .rel.dyn 00000008 08048218 08048218 00000218 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .rel.plt 00000010 08048220 08048220 00000220 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 9 .init 00000017 08048230 08048230 00000230 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 10 .plt 00000030 08048248 08048248 00000248 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 11 .text 0000016c 08048278 08048278 00000278 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 12 .fini 0000001b 080483e4 080483e4 000003e4 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 13 .rodata 00000016 08048400 08048400 00000400 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 14 .eh_frame 00000004 08048418 08048418 00000418 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 15 .data 0000000c 0804941c 0804941c 0000041c 2**2 CONTENTS, ALLOC, LOAD, DATA 16 .dynamic 000000c8 08049428 08049428 00000428 2**2 CONTENTS, ALLOC, LOAD, DATA 17 .ctors 00000008 080494f0 080494f0 000004f0 2**2 CONTENTS, ALLOC, LOAD, DATA 18 .dtors 00000008 080494f8 080494f8 000004f8 2**2 CONTENTS, ALLOC, LOAD, DATA 19 .jcr 00000004 08049500 08049500 00000500 2**2 CONTENTS, ALLOC, LOAD, DATA 20 .got 00000018 08049504 08049504 00000504 2**2 CONTENTS, ALLOC, LOAD, DATA 21 .bss 00000004 0804951c 0804951c 0000051c 2**2 ALLOC 22 .comment 00000132 00000000 00000000 0000051c 2**0 CONTENTS, READONLY 23 .debug_aranges 00000078 00000000 00000000 00000650 2**3 CONTENTS, READONLY, DEBUGGING 24 .debug_pubnames 00000025 00000000 00000000 000006c8 2**0 CONTENTS, READONLY, DEBUGGING 25 .debug_info 00000a84 00000000 00000000 000006ed 2**0 CONTENTS, READONLY, DEBUGGING 26 .debug_abbrev 00000138 00000000 00000000 00001171 2**0 CONTENTS, READONLY, DEBUGGING 27 .debug_line 0000027c 00000000 00000000 000012a9 2**0 CONTENTS, READONLY, DEBUGGING 28 .debug_frame 00000014 00000000 00000000 00001528 2**2 CONTENTS, READONLY, DEBUGGING 29 .debug_str 000006ba 00000000 00000000 0000153c 2**0 CONTENTS, READONLY, DEBUGGING [root@redhat9 root]# readelf -S ./t There are 34 section headers, starting at offset 0x1d24: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .interp PROGBITS 080480f4 0000f4 000013 00 A 0 0 1 [ 2] .note.ABI-tag NOTE 08048108 000108 000020 00 A 0 0 4 [ 3] .hash HASH 08048128 000128 000028 04 A 4 0 4 [ 4] .dynsym DYNSYM 08048150 000150 000050 10 A 5 1 4 [ 5] .dynstr STRTAB 080481a0 0001a0 00004c 00 A 0 0 1 [ 6] .gnu.version VERSYM 080481ec 0001ec 00000a 02 A 4 0 2 [ 7] .gnu.version_r VERNEED 080481f8 0001f8 000020 00 A 5 1 4 [ 8] .rel.dyn REL 08048218 000218 000008 08 A 4 0 4 [ 9] .rel.plt REL 08048220 000220 000010 08 A 4 b 4 [10] .init PROGBITS 08048230 000230 000017 00 AX 0 0 4 [11] .plt PROGBITS 08048248 000248 000030 04 AX 0 0 4 [12] .text PROGBITS 08048278 000278 00016c 00 AX 0 0 4 [13] .fini PROGBITS 080483e4 0003e4 00001b 00 AX 0 0 4 [14] .rodata PROGBITS 08048400 000400 000016 00 A 0 0 4 [15] .eh_frame PROGBITS 08048418 000418 000004 00 A 0 0 4 [16] .data PROGBITS 0804941c 00041c 00000c 00 WA 0 0 4 [17] .dynamic DYNAMIC 08049428 000428 0000c8 08 WA 5 0 4 [18] .ctors PROGBITS 080494f0 0004f0 000008 00 WA 0 0 4 [19] .dtors PROGBITS 080494f8 0004f8 000008 00 WA 0 0 4 [20] .jcr PROGBITS 08049500 000500 000004 00 WA 0 0 4 [21] .got PROGBITS 08049504 000504 000018 04 WA 0 0 4 [22] .bss NOBITS 0804951c 00051c 000004 00 WA 0 0 4 [23] .comment PROGBITS 00000000 00051c 000132 00 0 0 1 [24] .debug_aranges PROGBITS 00000000 000650 000078 00 0 0 8 [25] .debug_pubnames PROGBITS 00000000 0006c8 000025 00 0 0 1 [26] .debug_info PROGBITS 00000000 0006ed 000a84 00 0 0 1 [27] .debug_abbrev PROGBITS 00000000 001171 000138 00 0 0 1 [28] .debug_line PROGBITS 00000000 0012a9 00027c 00 0 0 1 [29] .debug_frame PROGBITS 00000000 001528 000014 00 0 0 4 [30] .debug_str PROGBITS 00000000 00153c 0006ba 01 MS 0 0 1 [31] .shstrtab STRTAB 00000000 001bf6 00012b 00 0 0 1 [32] .symtab SYMTAB 00000000 002274 0006c0 10 33 54 4 [33] .strtab STRTAB 00000000 002934 0003ee 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific)