[llvm-bugs] [Bug 32931] New: ELF LLD fails to handle multiple files in archives with the same name with ThinLTO
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu May 4 13:49:40 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32931
Bug ID: 32931
Summary: ELF LLD fails to handle multiple files in archives
with the same name with ThinLTO
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: peter at pcc.me.uk
CC: llvm-bugs at lists.llvm.org
$ cat 1/foo.c
void f1() {}
$ cat 2/foo.c
void f2() {}
$ clang -flto=thin -c -o 1/foo.o 1/foo.c
$ clang -flto=thin -c -o 2/foo.o 2/foo.c
$ ar cru lib1.a 1/foo.o # (where "ar" does not understand LLVM bitcode)
$ ar cru lib2.a 2/foo.o
$ clang -fuse-ld=lld -Wl,-uf1,-uf2 lib1.a lib2.a
ld.lld: error: Expected at most one ThinLTO module per bitcode file
clang-4.0: error: linker command failed with exit code 1 (use -v to see
invocation)
I think the fix is to make sure that the archive name and file offset is part
of the path that LLD passes through to the LTO API as we do for archive members
with symbol tables.
--
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/20170504/32e19eb1/attachment-0001.html>
More information about the llvm-bugs
mailing list