https://sourceware.org/bugzilla/show_bug.cgi?id=22868
Michael Matz <matz at suse dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz at suse dot de --- Comment #1 from Michael Matz <matz at suse dot de> --- The second testsuite fail in llvm has probably the same reason, but just for completeness: visiblity.ll fails. It essentially has a weak and a non-weak definition of the same symbol: one.ll: target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" define weak protected void @foo() { ret void } two.ll: target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" define void @foo() { ret void } But the linked result (with ld.gold): Symbol { Name: foo (44) Value: 0x290 Size: 1 Binding: Weak (0x2) Type: Function (0x2) Other [ (0x3) STV_PROTECTED (0x3) ] Section: .text (0x5) } So the binding is weak. In ELF symbol resolution rules a non-weak definition overrides a weak one, so it should actually be global. (In this case the STV_PROTECTED is correct) ld.bfd gets this right. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils