[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/22868] Gold does not select proper symbol visibility when used
From: |
matz at suse dot de |
Subject: |
[Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin |
Date: |
Mon, 05 Mar 2018 21:29:19 +0000 |
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 gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin,
matz at suse dot de <=
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, shea at shealevy dot com, 2018/03/19
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, ccoutant at gmail dot com, 2018/03/22
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, matz at suse dot de, 2018/03/22
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, ccoutant at gmail dot com, 2018/03/22
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, georgerim at gmail dot com, 2018/03/23
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, georgerim at gmail dot com, 2018/03/23
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, ccoutant at gmail dot com, 2018/03/23
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, nickc at redhat dot com, 2018/03/26
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, georgerim at gmail dot com, 2018/03/26
- [Bug gold/22868] Gold does not select proper symbol visibility when used with LLVM gold-plugin, cvs-commit at gcc dot gnu.org, 2018/03/26