重定位节 “.rel.plt” 位于偏移量 0x2bc 含有 4 个条目:
Offset Info Type Sym.Value Sym. Name
0804968c 00000107 R_386_JUMP_SLOT 00000000 scanf
08049690 00000207 R_386_JUMP_SLOT 00000000 __libc_start_main
08049694 00000307 R_386_JUMP_SLOT 00000000 printf
08049698 00000607 R_386_JUMP_SLOT 00000000 __gmon_start__
There are no unwind sections in this file.
Symbol table '.dynsym' contains 7 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 65 FUNC GLOBAL DEFAULT UND scanf@GLIBC_2.0 (2)
2: 00000000 415 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.0 (2)
3: 00000000 57 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.0 (2)
4: 0804858c 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used
5: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
6: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
Symbol table '.symtab' contains 87 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 08048134 0 SECTION LOCAL DEFAULT 1
2: 08048148 0 SECTION LOCAL DEFAULT 2
3: 08048168 0 SECTION LOCAL DEFAULT 3
4: 08048180 0 SECTION LOCAL DEFAULT 4
5: 080481b0 0 SECTION LOCAL DEFAULT 5
6: 08048220 0 SECTION LOCAL DEFAULT 6
7: 08048286 0 SECTION LOCAL DEFAULT 7
8: 08048294 0 SECTION LOCAL DEFAULT 8
9: 080482b4 0 SECTION LOCAL DEFAULT 9
10: 080482bc 0 SECTION LOCAL DEFAULT 10
11: 080482dc 0 SECTION LOCAL DEFAULT 11
12: 080482f4 0 SECTION LOCAL DEFAULT 12
13: 08048350 0 SECTION LOCAL DEFAULT 13
14: 0804856c 0 SECTION LOCAL DEFAULT 14
15: 08048588 0 SECTION LOCAL DEFAULT 15
16: 0804859c 0 SECTION LOCAL DEFAULT 16
17: 080495a0 0 SECTION LOCAL DEFAULT 17
18: 080495a8 0 SECTION LOCAL DEFAULT 18
19: 080495b0 0 SECTION LOCAL DEFAULT 19
20: 080495b4 0 SECTION LOCAL DEFAULT 20
21: 0804967c 0 SECTION LOCAL DEFAULT 21
22: 08049680 0 SECTION LOCAL DEFAULT 22
23: 0804969c 0 SECTION LOCAL DEFAULT 23
24: 080496a8 0 SECTION LOCAL DEFAULT 24
25: 00000000 0 SECTION LOCAL DEFAULT 25
26: 00000000 0 SECTION LOCAL DEFAULT 26
27: 00000000 0 SECTION LOCAL DEFAULT 27
28: 00000000 0 SECTION LOCAL DEFAULT 28
29: 00000000 0 SECTION LOCAL DEFAULT 29
30: 00000000 0 SECTION LOCAL DEFAULT 30
31: 00000000 0 SECTION LOCAL DEFAULT 31
32: 00000000 0 SECTION LOCAL DEFAULT 32
33: 00000000 0 SECTION LOCAL DEFAULT 33
34: 00000000 0 SECTION LOCAL DEFAULT 34
35: 00000000 0 FILE LOCAL DEFAULT ABS abi-note.S
36: 00000000 0 FILE LOCAL DEFAULT ABS suse-note.S
37: 00000000 0 FILE LOCAL DEFAULT ABS ../sysdeps/i386/elf/start
38: 00000000 0 FILE LOCAL DEFAULT ABS init.c
39: 00000000 0 FILE LOCAL DEFAULT ABS initfini.c
40: 00000000 0 FILE LOCAL DEFAULT ABS /usr/src/packages/BUILD/g
41: 08048374 0 FUNC LOCAL DEFAULT 13 call_gmon_start
42: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
43: 080495a0 0 OBJECT LOCAL DEFAULT 17 __CTOR_LIST__
44: 080495a8 0 OBJECT LOCAL DEFAULT 18 __DTOR_LIST__
45: 080495b0 0 OBJECT LOCAL DEFAULT 19 __JCR_LIST__
46: 080496a8 1 OBJECT LOCAL DEFAULT 24 completed.5751
47: 080496a4 0 OBJECT LOCAL DEFAULT 23 p.5749
48: 080483a0 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux
49: 080483d0 0 FUNC LOCAL DEFAULT 13 frame_dummy
50: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
51: 080495a4 0 OBJECT LOCAL DEFAULT 17 __CTOR_END__
52: 080495ac 0 OBJECT LOCAL DEFAULT 18 __DTOR_END__
53: 0804859c 0 OBJECT LOCAL DEFAULT 16 __FRAME_END__
54: 080495b0 0 OBJECT LOCAL DEFAULT 19 __JCR_END__
55: 08048540 0 FUNC LOCAL DEFAULT 13 __do_global_ctors_aux
56: 00000000 0 FILE LOCAL DEFAULT ABS initfini.c
57: 00000000 0 FILE LOCAL DEFAULT ABS /usr/src/packages/BUILD/g
58: 00000000 0 FILE LOCAL DEFAULT ABS main.c
59: 00000000 0 FILE LOCAL DEFAULT ABS max.c
60: 00000000 0 FILE LOCAL DEFAULT ABS min.c
61: 080495b4 0 OBJECT LOCAL HIDDEN 20 _DYNAMIC
62: 080495a0 0 NOTYPE LOCAL HIDDEN ABS __init_array_end
63: 08049680 0 OBJECT LOCAL HIDDEN 22 _GLOBAL_OFFSET_TABLE_
64: 080495a0 0 NOTYPE LOCAL HIDDEN ABS __init_array_start
65: 08048588 4 OBJECT GLOBAL DEFAULT 15 _fp_hw
66: 080496a0 0 OBJECT GLOBAL HIDDEN 23 __dso_handle
67: 080484d0 5 FUNC GLOBAL DEFAULT 13 __libc_csu_fini
68: 080482dc 0 FUNC GLOBAL DEFAULT 11 _init
69: 00000000 65 FUNC GLOBAL DEFAULT UND scanf@@GLIBC_2.0
70: 08048350 0 FUNC GLOBAL DEFAULT 13 _start
71: 0804846c 43 FUNC GLOBAL DEFAULT 13 max
72: 080484e0 92 FUNC GLOBAL DEFAULT 13 __libc_csu_init
73: 080496a8 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
74: 080483f4 120 FUNC GLOBAL DEFAULT 13 main
75: 00000000 415 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_
76: 0804969c 0 NOTYPE WEAK DEFAULT 23 data_start
77: 08048498 43 FUNC GLOBAL DEFAULT 13 min
78: 00000000 57 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.0
79: 0804856c 0 FUNC GLOBAL DEFAULT 14 _fini
80: 080496a8 0 NOTYPE GLOBAL DEFAULT ABS _edata
81: 0804853c 0 FUNC GLOBAL HIDDEN 13 __i686.get_pc_thunk.bx
82: 080496ac 0 NOTYPE GLOBAL DEFAULT ABS _end
83: 0804858c 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used
84: 0804969c 0 NOTYPE GLOBAL DEFAULT 23 __data_start
85: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
86: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
Histogram for bucket list length (total of 3 buckets):
Length Number % of total Coverage
0 0 ( 0.0%)
1 0 ( 0.0%) 0.0%
2 3 (100.0%) 100.0%
版本符号节“.gnu.version”含有 7 个条目:
地址:0000000008048286 偏移量:0x000286 连接:5 (.dynsym)
000: 0 (*本地*) 2 (GLIBC_2.0) 2 (GLIBC_2.0) 2 (GLIBC_2.0)
004: 1 (*全局*) 0 (*本地*) 0 (*本地*)
Version needs section '.gnu.version_r' contains 1 entries:
地址:0x0000000008048294 Offset: 0x000294 Link to section: 6 (.dynstr)
000000: Version: 1 文件:libc.so.6 计数:1
0x0010: Name: GLIBC_2.0 标志:无 版本:2
注释位于偏移量 0x00000148 长度为 0x00000020:
所有者 数据大小 描述
GNU 0x00000010 NT_VERSION (version)
注释位于偏移量 0x00000168 长度为 0x00000018:
所有者 数据大小 描述
SuSE 0x00000004 未知的注释类型:(0x45537553)
>diff -Nur 1 2 >3.patch>vi 3.patch 1 --- 1 2006-09-08 15:57:29.000000000 +0800
2 +++ 2 2006-09-08 15:57:40.000000000 +0800
3 @@ -10,14 +10,14 @@
4 Version: 0x1
5 入口点地址: 0x8048350
6 程序头起点: 52 (bytes into file)
7 - Start of section headers: 2196 (bytes into file)
8 + Start of section headers: 3392 (bytes into file)
9 标志: 0x0
10 本头的大小: 52 (字节)
11 程序头大小: 32 (字节)
12 程序头数量: 8
13 节头大小: 40 (字节)
14 - 节头数量: 27
15 - 字符串表索引节头: 26
16 + 节头数量: 35
17 + 字符串表索引节头: 32
18
19 节头:
20 [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
21 @@ -47,7 +47,15 @@
22 [23] .data PROGBITS 0804969c 00069c 00000c 00 WA 0 0 4
23 [24] .bss NOBITS 080496a8 0006a8 000004 00 WA 0 0 4
24 [25] .comment PROGBITS 00000000 0006a8 000117 00 0 0 1
25 - [26] .shstrtab STRTAB 00000000 0007bf 0000d2 00 0 0 1
26 + [26] .debug_aranges PROGBITS 00000000 0007c0 000058 00 0 0 8
27 + [27] .debug_pubnames PROGBITS 00000000 000818 000025 00 0 0 1
28 + [28] .debug_info PROGBITS 00000000 00083d 000191 00 0 0 1
29 + [29] .debug_abbrev PROGBITS 00000000 0009ce 000062 00 0 0 1
30 + [30] .debug_line PROGBITS 00000000 000a30 000137 00 0 0 1
31 + [31] .debug_str PROGBITS 00000000 000b67 0000a5 01 MS 0 0 1
32 + [32] .shstrtab STRTAB 00000000 000c0c 000132 00 0 0 1
33 + [33] .symtab SYMTAB 00000000 0012b8 000570 10 34 65 4
34 + [34] .strtab STRTAB 00000000 001828 0002d9 00 0 0 1
35 Key to Flags:
36 W (write), A (alloc), X (execute), M (merge), S (strings)
37 I (info), L (link order), G (group), x (unknown)
38 @@ -124,6 +132,96 @@
39 5: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
40 6: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
41
42 +Symbol table '.symtab' contains 87 entries:
43 + Num: Value Size Type Bind Vis Ndx Name
44 + 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
45 + 1: 08048134 0 SECTION LOCAL DEFAULT 1
46 + 2: 08048148 0 SECTION LOCAL DEFAULT 2
47 + 3: 08048168 0 SECTION LOCAL DEFAULT 3
48 + 4: 08048180 0 SECTION LOCAL DEFAULT 4
49 + 5: 080481b0 0 SECTION LOCAL DEFAULT 5
50 + 6: 08048220 0 SECTION LOCAL DEFAULT 6
51 + 7: 08048286 0 SECTION LOCAL DEFAULT 7
52 + 8: 08048294 0 SECTION LOCAL DEFAULT 8
53 + 9: 080482b4 0 SECTION LOCAL DEFAULT 9
54 + 10: 080482bc 0 SECTION LOCAL DEFAULT 10
55 + 11: 080482dc 0 SECTION LOCAL DEFAULT 11
56 + 12: 080482f4 0 SECTION LOCAL DEFAULT 12
57 + 13: 08048350 0 SECTION LOCAL DEFAULT 13
58 + 14: 0804856c 0 SECTION LOCAL DEFAULT 14
59 + 15: 08048588 0 SECTION LOCAL DEFAULT 15
60 + 16: 0804859c 0 SECTION LOCAL DEFAULT 16
61 + 17: 080495a0 0 SECTION LOCAL DEFAULT 17
62 + 18: 080495a8 0 SECTION LOCAL DEFAULT 18
63 + 19: 080495b0 0 SECTION LOCAL DEFAULT 19
64 + 20: 080495b4 0 SECTION LOCAL DEFAULT 20
65 + 21: 0804967c 0 SECTION LOCAL DEFAULT 21
66 + 22: 08049680 0 SECTION LOCAL DEFAULT 22
67 + 23: 0804969c 0 SECTION LOCAL DEFAULT 23
68 + 24: 080496a8 0 SECTION LOCAL DEFAULT 24
69 + 25: 00000000 0 SECTION LOCAL DEFAULT 25
70 + 26: 00000000 0 SECTION LOCAL DEFAULT 26
71 + 27: 00000000 0 SECTION LOCAL DEFAULT 27
72 + 28: 00000000 0 SECTION LOCAL DEFAULT 28
73 + 29: 00000000 0 SECTION LOCAL DEFAULT 29
74 + 30: 00000000 0 SECTION LOCAL DEFAULT 30
75 + 31: 00000000 0 SECTION LOCAL DEFAULT 31
76 + 32: 00000000 0 SECTION LOCAL DEFAULT 32
77 + 33: 00000000 0 SECTION LOCAL DEFAULT 33
78 + 34: 00000000 0 SECTION LOCAL DEFAULT 34
79 + 35: 00000000 0 FILE LOCAL DEFAULT ABS abi-note.S
80 + 36: 00000000 0 FILE LOCAL DEFAULT ABS suse-note.S
81 + 37: 00000000 0 FILE LOCAL DEFAULT ABS ../sysdeps/i386/elf/start
82 + 38: 00000000 0 FILE LOCAL DEFAULT ABS init.c
83 + 39: 00000000 0 FILE LOCAL DEFAULT ABS initfini.c
84 + 40: 00000000 0 FILE LOCAL DEFAULT ABS /usr/src/packages/BUILD/g
85 + 41: 08048374 0 FUNC LOCAL DEFAULT 13 call_gmon_start
86 + 42: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
87 + 43: 080495a0 0 OBJECT LOCAL DEFAULT 17 __CTOR_LIST__
88 + 44: 080495a8 0 OBJECT LOCAL DEFAULT 18 __DTOR_LIST__
89 + 45: 080495b0 0 OBJECT LOCAL DEFAULT 19 __JCR_LIST__
90 + 46: 080496a8 1 OBJECT LOCAL DEFAULT 24 completed.5751
91 + 47: 080496a4 0 OBJECT LOCAL DEFAULT 23 p.5749
92 + 48: 080483a0 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux
93 + 49: 080483d0 0 FUNC LOCAL DEFAULT 13 frame_dummy
94 + 50: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
95 + 51: 080495a4 0 OBJECT LOCAL DEFAULT 17 __CTOR_END__
96 + 52: 080495ac 0 OBJECT LOCAL DEFAULT 18 __DTOR_END__
97 + 53: 0804859c 0 OBJECT LOCAL DEFAULT 16 __FRAME_END__
98 + 54: 080495b0 0 OBJECT LOCAL DEFAULT 19 __JCR_END__
99 + 55: 08048540 0 FUNC LOCAL DEFAULT 13 __do_global_ctors_aux
100 + 56: 00000000 0 FILE LOCAL DEFAULT ABS initfini.c
101 + 57: 00000000 0 FILE LOCAL DEFAULT ABS /usr/src/packages/BUILD/g
102 + 58: 00000000 0 FILE LOCAL DEFAULT ABS main.c
103 + 59: 00000000 0 FILE LOCAL DEFAULT ABS max.c
104 + 60: 00000000 0 FILE LOCAL DEFAULT ABS min.c
105 + 61: 080495b4 0 OBJECT LOCAL HIDDEN 20 _DYNAMIC
106 + 62: 080495a0 0 NOTYPE LOCAL HIDDEN ABS __init_array_end
107 + 63: 08049680 0 OBJECT LOCAL HIDDEN 22 _GLOBAL_OFFSET_TABLE_
108 + 64: 080495a0 0 NOTYPE LOCAL HIDDEN ABS __init_array_start
109 + 65: 08048588 4 OBJECT GLOBAL DEFAULT 15 _fp_hw
110 + 66: 080496a0 0 OBJECT GLOBAL HIDDEN 23 __dso_handle
111 + 67: 080484d0 5 FUNC GLOBAL DEFAULT 13 __libc_csu_fini
112 + 68: 080482dc 0 FUNC GLOBAL DEFAULT 11 _init
113 + 69: 00000000 65 FUNC GLOBAL DEFAULT UND scanf@@GLIBC_2.0
114 + 70: 08048350 0 FUNC GLOBAL DEFAULT 13 _start
115 + 71: 0804846c 43 FUNC GLOBAL DEFAULT 13 max
116 + 72: 080484e0 92 FUNC GLOBAL DEFAULT 13 __libc_csu_init
117 + 73: 080496a8 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
118 + 74: 080483f4 120 FUNC GLOBAL DEFAULT 13 main
119 + 75: 00000000 415 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_
120 + 76: 0804969c 0 NOTYPE WEAK DEFAULT 23 data_start
121 + 77: 08048498 43 FUNC GLOBAL DEFAULT 13 min
122 + 78: 00000000 57 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.0
123 + 79: 0804856c 0 FUNC GLOBAL DEFAULT 14 _fini
124 + 80: 080496a8 0 NOTYPE GLOBAL DEFAULT ABS _edata
125 + 81: 0804853c 0 FUNC GLOBAL HIDDEN 13 __i686.get_pc_thunk.bx
126 + 82: 080496ac 0 NOTYPE GLOBAL DEFAULT ABS _end
127 + 83: 0804858c 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used
128 + 84: 0804969c 0 NOTYPE GLOBAL DEFAULT 23 __data_start
129 + 85: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
130 + 86: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
131 +
132 Histogram for bucket list length (total of 3 buckets):
133 Length Number % of total Coverage
134 0 0 ( 0.0%)
可见,.symtab与.debug节已经没有了。对于库文件来说,没有.symtab会丢失很多信息,
很可能会导致链接的时候出问题,因此慎用strip。