It seems that the __i686.get_pc_thunk.bx is definded in section
.gnu.linkonce.t.__i686.get_pc_thunk.bx. Is this true??
When gcc is generating the symbol directly, as is normal, the section in
which it is defined depends on whether the linker supports section
groups or not. If it does not, gcc will use a .gnu.linkonce section as
in the above. If it does, gcc will use a .text. section marked as a
COMDAT section grotup.
En, my system is redhat enterprise version 4. And the gcc core version is
3.4.4.
According your describation, the linker should not support section groups
feature.
But if we want to seek the simble, how to do it? Must I install another new
gcc , and
another kernel???
When using "readelf -l ./libsub.so", I haven't found one section named
like this in
.text segment. So is the section
.gnu.linkonce.t.__i686.get_pc_thunk.bx. got deleted
in linking process? I'm not sure of this, but there is a "linkonce" in
the name of the section.
The section should not get deleted during the link, though in some cases
it may get merged into the .text section. But first you have to find
out what happened to all your symbols.
The symbols in my .so file is listed, show as follows. It seems nothing
abnormal from
there, I think.
Symbol table '.symtab' contains 62 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 000000b4 0 SECTION LOCAL DEFAULT 1
2: 00000160 0 SECTION LOCAL DEFAULT 2
3: 000002e0 0 SECTION LOCAL DEFAULT 3
4: 00000390 0 SECTION LOCAL DEFAULT 4
5: 000003c0 0 SECTION LOCAL DEFAULT 5
6: 000003e0 0 SECTION LOCAL DEFAULT 6
7: 00000410 0 SECTION LOCAL DEFAULT 7
8: 00000420 0 SECTION LOCAL DEFAULT 8
9: 00000438 0 SECTION LOCAL DEFAULT 9
10: 00000468 0 SECTION LOCAL DEFAULT 10
11: 000005a4 0 SECTION LOCAL DEFAULT 11
12: 000005c0 0 SECTION LOCAL DEFAULT 12
13: 000015c4 0 SECTION LOCAL DEFAULT 13
14: 000015cc 0 SECTION LOCAL DEFAULT 14
15: 000015d4 0 SECTION LOCAL DEFAULT 15
16: 000015d8 0 SECTION LOCAL DEFAULT 16
17: 00001698 0 SECTION LOCAL DEFAULT 17
18: 000016a8 0 SECTION LOCAL DEFAULT 18
19: 000016bc 0 SECTION LOCAL DEFAULT 19
20: 000016c4 0 SECTION LOCAL DEFAULT 20
21: 00000000 0 SECTION LOCAL DEFAULT 21
22: 00000000 0 SECTION LOCAL DEFAULT 22
23: 00000000 0 SECTION LOCAL DEFAULT 23
24: 00000000 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: 00000468 0 FUNC LOCAL DEFAULT 10 call_gmon_start
32: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
33: 000015c4 0 OBJECT LOCAL DEFAULT 13 __CTOR_LIST__
34: 000015cc 0 OBJECT LOCAL DEFAULT 14 __DTOR_LIST__
35: 000015d4 0 OBJECT LOCAL DEFAULT 15 __JCR_LIST__
36: 000016c0 0 OBJECT LOCAL DEFAULT 19 p.0
37: 000016c4 1 OBJECT LOCAL DEFAULT 20 completed.1
38: 0000048c 0 FUNC LOCAL DEFAULT 10 __do_global_dtors_aux
39: 000004e8 0 FUNC LOCAL DEFAULT 10 frame_dummy
40: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
41: 000015c8 0 OBJECT LOCAL DEFAULT 13 __CTOR_END__
42: 000015d0 0 OBJECT LOCAL DEFAULT 14 __DTOR_END__
43: 000005c0 0 OBJECT LOCAL DEFAULT 12 __FRAME_END__
44: 000015d4 0 OBJECT LOCAL DEFAULT 15 __JCR_END__
45: 00000574 0 FUNC LOCAL DEFAULT 10 __do_global_ctors_aux
46: 00000000 0 FILE LOCAL DEFAULT ABS sub.c
47: 000016bc 0 OBJECT LOCAL HIDDEN 19 __dso_handle
48: 00000524 50 FUNC GLOBAL DEFAULT 10 sub_func
49: 000015d8 0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
50: 00000000 0 NOTYPE GLOBAL DEFAULT UND gv_inited
51: 00000000 0 NOTYPE GLOBAL DEFAULT UND sum_func
52: 00000420 0 FUNC GLOBAL DEFAULT 8 _init
53: 000016c4 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
54: 000005a4 0 FUNC GLOBAL DEFAULT 11 _fini
55: 00000000 231 FUNC WEAK DEFAULT UND __cxa_finalize@@GLIBC_2.1
56: 00000556 27 FUNC GLOBAL DEFAULT 10 double_gv_inited
57: 000016c4 0 NOTYPE GLOBAL DEFAULT ABS _edata
58: 000016a8 0 OBJECT GLOBAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
59: 000016c8 0 NOTYPE GLOBAL DEFAULT ABS _end
60: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
61: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__