[llvm-bugs] [Bug 31476] New: LLD failed to link symbols with "protected" visibility
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 26 23:58:55 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=31476
Bug ID: 31476
Summary: LLD failed to link symbols with "protected" visibility
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: mail+llvm at tzik.jp
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
On ToT LLD, I hit a link error when I try to use protected symbol in a .so from
an elf binary.
Here is a repro:
$ cat > foo.c <<EOF
void foo() {}
EOF
$ clang -shared -fPIC -fvisibility=protected -o libfoo.so foo.c
$ cat > bar.c <<EOF
void foo();
int main() {
foo();
return 0;
}
EOF
$ clang -fuse-ld=lld bar.c libfoo.so
ld.lld: error: bar.c:(function main): cannot preempt symbol 'foo' defined in
libfoo.so
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161227/adf8f029/attachment.html>
More information about the llvm-bugs
mailing list