http://sourceware.org/bugzilla/show_bug.cgi?id=12879
Summary: gold doesn't like .symver name,name@VERS
Product: binutils
Version: 2.22 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gold
AssignedTo: [email protected]
ReportedBy: [email protected]
gold gives a multiple definition error when the same object file defines both
foo and foo@... symbols, even with same value. BFD ld accepts this usage.
It would perhaps be reasonable to complain if foo and foo@... did not match.
magilla 100 % head ver.s ver.v
==> ver.s <==
.globl foo
foo:
.symver foo,foo@VERS1
==> ver.v <==
VERS1 {
global:
foo;
};
magilla 101 % gcc -c ver.s
magilla 102 % ./gold/ld-new -shared -o ver.so ver.o --version-script=ver.v
./gold/ld-new: error: ver.o: multiple definition of 'foo'
./gold/ld-new: ver.o: previous definition here
[Exit 1]
magilla 103 % ./ld/ld-new -shared -o ver.so ver.o --version-script=ver.v
magilla 104 % eu-readelf -s ver.o ver.so
ver.o:
Symbol table [ 5] '.symtab' contains 6 entries:
4 local symbols String table: [ 6] '.strtab'
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UNDEF
1: 0000000000000000 0 SECTION LOCAL DEFAULT 1
2: 0000000000000000 0 SECTION LOCAL DEFAULT 2
3: 0000000000000000 0 SECTION LOCAL DEFAULT 3
4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 foo
5: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 foo@VERS1
ver.so:
Symbol table [ 2] '.dynsym' contains 6 entries:
1 local symbol String table: [ 3] '.dynstr'
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UNDEF
1: 0000000000000000 0 OBJECT GLOBAL DEFAULT ABS VERS1@@VERS1
2: 00000000002002f8 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
3: 0000000000000218 0 NOTYPE GLOBAL DEFAULT 5 foo@VERS1
4: 00000000002002f8 0 NOTYPE GLOBAL DEFAULT ABS _edata
5: 00000000002002f8 0 NOTYPE GLOBAL DEFAULT ABS _end
Symbol table [ 8] '.symtab' contains 14 entries:
9 local symbols String table: [ 9] '.strtab'
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UNDEF
1: 00000000000000e8 0 SECTION LOCAL DEFAULT 1
2: 0000000000000118 0 SECTION LOCAL DEFAULT 2
3: 00000000000001a8 0 SECTION LOCAL DEFAULT 3
4: 00000000000001d2 0 SECTION LOCAL DEFAULT 4
5: 00000000000001e0 0 SECTION LOCAL DEFAULT 5
6: 0000000000200218 0 SECTION LOCAL DEFAULT 6
7: 0000000000200218 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC
8: 0000000000000000 0 OBJECT LOCAL DEFAULT ABS
_GLOBAL_OFFSET_TABLE_
9: 0000000000000000 0 OBJECT GLOBAL DEFAULT ABS VERS1
10: 00000000002002f8 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
11: 0000000000000218 0 NOTYPE GLOBAL DEFAULT 5 foo@VERS1
12: 00000000002002f8 0 NOTYPE GLOBAL DEFAULT ABS _edata
13: 00000000002002f8 0 NOTYPE GLOBAL DEFAULT ABS _end
magilla 105 %
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils