https://sourceware.org/bugzilla/show_bug.cgi?id=26978
Bug ID: 26978
Summary: Inconsistency for defined foo@v1 and foo@@v1
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: i at maskray dot me
Target Milestone: ---
cat > ./def1.s <<eof
.globl foo
.symver foo, foo@@@v1
foo:
eof
cat > ./def1w.s <<eof
.weak foo
.symver foo, foo@@@v1
foo:
eof
cat > ./hid1.s <<eof
.globl foo_v1
.symver foo_v1, foo@v1
foo_v1:
ret
eof
cat > ./hid1w.s <<eof
.weak foo_v1
.symver foo_v1, foo@v1
foo_v1:
ret
eof
cat > ./ver <<eof
v1 {};
eof
gcc -c *.s
% ld.bfd -shared --version-script=ver def1.o hid1.o
ld.bfd: hid1.o: in function `foo_v1':
(.text+0x0): multiple definition of `foo@@v1'; def1.o:(.text+0x0): first
defined here
% ld.bfd -shared --version-script=ver def1w.o hid1.o
ld.bfd: hid1.o: in function `foo_v1':
(.text+0x0): multiple definition of `foo@v1'
ld.bfd: hid1.o:(*IND*+0x0): multiple definition of `foo'
% ld.bfd -shared --version-script=ver def1.o hid1w.o
% ld.bfd -shared --version-script=ver def1w.o hid1w.o
If weak foo@@v1 + global foo@v1 errors, global foo@@v1 + weak foo@v1 should
error as well.
An alternative design is that weak foo@@v1 + global foo@v1 should not error. Of
the 4 combinations, only global foo@@v1 + global foo@v1 errors.
--
You are receiving this mail because:
You are on the CC list for the bug.