[llvm-bugs] [Bug 31261] New: LLD fails to link an obj using versioned symbols
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Dec 4 21:39:17 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=31261
Bug ID: 31261
Summary: LLD fails to link an obj using versioned symbols
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
LLD fails to handle a .symver hack done in gRPC.
https://chromium.googlesource.com/external/github.com/grpc/grpc/+/master/src/core/lib/support/wrap_memcpy.c
Here is a repro case:
----
$ cat > failcase.s <<EOF
.text
memcpy at GLIBC_2.2.5 = memcpy
.globl main
.p2align 4, 0x90
.type main, at function
main:
callq» memcpy
retq
EOF
$ clang -fuse-ld=lld failcase.s
symbol memcpy at GLIBC_2.2.5 has undefined version GLIBC_2.2.5
----
Or, in C.
----
$ cat > failcase.c <<EOF
__asm__(".symver memcpy,memcpy at GLIBC_2.2.5");
void* memcpy(void* dest, const void* src, unsigned long size);
void* foo(void* dest, const void* src, unsigned long size) {
return memcpy(dest, src, size);
}
int main(int argc, const char** argv) {
return 0;
}
EOF
$ clang -fuse-ld=lld failcase.c
symbol memcpy at GLIBC_2.2.5 has undefined version GLIBC_2.2.5
----
--
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/20161205/28c677ba/attachment-0001.html>
More information about the llvm-bugs
mailing list