[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Difficulties when using script-version file for exporting functions
From: |
Alan Modra |
Subject: |
Re: Difficulties when using script-version file for exporting functions with binutils 2.19.1 |
Date: |
Thu, 12 Mar 2009 00:46:48 +1030 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
On Wed, Mar 11, 2009 at 01:14:59PM +0100, Juan Renau wrote:
> When using the 2.16 ld I can export these functions by adding them
> into the global section of the version file.
Are you sure about this claim? My 2.16.1 x86 binutils does not allow
a hidden visibility symbol to be made global by a version script.
Perhaps you changed compilers as well?
$ readelf -s A.o
Symbol table '.symtab' contains 10 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 FILE LOCAL DEFAULT ABS A.cpp
2: 00000000 0 SECTION LOCAL DEFAULT 1
3: 00000000 0 SECTION LOCAL DEFAULT 2
4: 00000000 0 SECTION LOCAL DEFAULT 3
5: 00000000 0 SECTION LOCAL DEFAULT 5
6: 00000000 0 SECTION LOCAL DEFAULT 4
7: 00000000 10 FUNC GLOBAL HIDDEN 1 f
8: 00000000 0 NOTYPE GLOBAL DEFAULT UND __gxx_personality_v0
9: 0000000a 10 FUNC GLOBAL DEFAULT 1 g
$ readelf -s libA.so
Symbol table '.dynsym' contains 20 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 000003f0 0 SECTION LOCAL DEFAULT 8
2: 00000450 0 SECTION LOCAL DEFAULT 10
3: 00000534 0 SECTION LOCAL DEFAULT 11
4: 00000550 0 SECTION LOCAL DEFAULT 12
5: 00001554 0 SECTION LOCAL DEFAULT 13
6: 0000155c 0 SECTION LOCAL DEFAULT 14
7: 00001564 0 SECTION LOCAL DEFAULT 15
8: 00001660 0 SECTION LOCAL DEFAULT 19
9: 00001668 0 SECTION LOCAL DEFAULT 20
10: 00001568 0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
11: 000003f0 0 FUNC GLOBAL DEFAULT 8 _init
12: 00001668 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
13: 00000534 0 FUNC GLOBAL DEFAULT 11 _fini
14: 00000000 245 FUNC WEAK DEFAULT UND address@hidden (2)
15: 00001668 0 NOTYPE GLOBAL DEFAULT ABS _edata
16: 0000166c 0 NOTYPE GLOBAL DEFAULT ABS _end
17: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
18: 00000000 1048 FUNC GLOBAL DEFAULT UND address@hidden (3)
19: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
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: 00000150 0 SECTION LOCAL DEFAULT 2
3: 00000290 0 SECTION LOCAL DEFAULT 3
4: 0000034e 0 SECTION LOCAL DEFAULT 4
5: 00000378 0 SECTION LOCAL DEFAULT 5
6: 000003b8 0 SECTION LOCAL DEFAULT 6
7: 000003e0 0 SECTION LOCAL DEFAULT 7
8: 000003f0 0 SECTION LOCAL DEFAULT 8
9: 00000420 0 SECTION LOCAL DEFAULT 9
10: 00000450 0 SECTION LOCAL DEFAULT 10
11: 00000534 0 SECTION LOCAL DEFAULT 11
12: 00000550 0 SECTION LOCAL DEFAULT 12
13: 00001554 0 SECTION LOCAL DEFAULT 13
14: 0000155c 0 SECTION LOCAL DEFAULT 14
15: 00001564 0 SECTION LOCAL DEFAULT 15
16: 00001568 0 SECTION LOCAL DEFAULT 16
17: 00001640 0 SECTION LOCAL DEFAULT 17
18: 0000164c 0 SECTION LOCAL DEFAULT 18
19: 00001660 0 SECTION LOCAL DEFAULT 19
20: 00001668 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 FILE LOCAL DEFAULT ABS initfini.c
31: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
32: 00001554 0 OBJECT LOCAL DEFAULT 13 __CTOR_LIST__
33: 0000155c 0 OBJECT LOCAL DEFAULT 14 __DTOR_LIST__
34: 00001564 0 OBJECT LOCAL DEFAULT 15 __JCR_LIST__
35: 00000450 0 FUNC LOCAL DEFAULT 10 __do_global_dtors_aux
36: 00001668 1 OBJECT LOCAL DEFAULT 20 completed.5843
37: 00001664 0 OBJECT LOCAL DEFAULT 19 p.5841
38: 000004b0 0 FUNC LOCAL DEFAULT 10 frame_dummy
39: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
40: 00001558 0 OBJECT LOCAL DEFAULT 13 __CTOR_END__
41: 00001560 0 OBJECT LOCAL DEFAULT 14 __DTOR_END__
42: 00000550 0 OBJECT LOCAL DEFAULT 12 __FRAME_END__
43: 00001564 0 OBJECT LOCAL DEFAULT 15 __JCR_END__
44: 00000500 0 FUNC LOCAL DEFAULT 10 __do_global_ctors_aux
45: 00000000 0 FILE LOCAL DEFAULT ABS initfini.c
46: 00000000 0 FILE LOCAL DEFAULT ABS A.cpp
47: 000004ec 10 FUNC LOCAL HIDDEN 10 f
48: 000004f6 10 FUNC LOCAL DEFAULT 10 g
49: 00001660 0 OBJECT LOCAL HIDDEN 19 __dso_handle
50: 000004e7 0 FUNC LOCAL HIDDEN 10 __i686.get_pc_thunk.bx
51: 0000164c 0 OBJECT LOCAL HIDDEN ABS _GLOBAL_OFFSET_TABLE_
52: 00001568 0 OBJECT GLOBAL DEFAULT ABS _DYNAMIC
53: 000003f0 0 FUNC GLOBAL DEFAULT 8 _init
54: 00001668 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
55: 00000534 0 FUNC GLOBAL DEFAULT 11 _fini
56: 00000000 245 FUNC WEAK DEFAULT UND __cxa_finalize@@GLIBC_2.1
57: 00001668 0 NOTYPE GLOBAL DEFAULT ABS _edata
58: 0000166c 0 NOTYPE GLOBAL DEFAULT ABS _end
59: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
60: 00000000 1048 FUNC GLOBAL DEFAULT UND __gxx_personality_v0@@CXX
61: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
$
--
Alan Modra
Australia Development Lab, IBM