https://bugs.llvm.org/show_bug.cgi?id=42446
Bug ID: 42446
Summary: lld can't handle gcc LTO files
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
lld tends to works well with clang LTO files and gcc non-LTO files these days,
but can't it can't handle gcc LTO:
$ cat test.c
#include <stdio.h>
int main(int argc, char **argv) {
puts("test");
}
$ clang -fuse-ld=lld -flto test.c && echo good
good
$ gcc -fuse-ld=bfd -flto test.c && echo good
good
$ gcc -fuse-ld=lld test.c && echo good
good
$ gcc -fuse-ld=lld -flto test.c && echo good
ld.lld: error: undefined symbol: main
>>> referenced by start.S:110 (../sysdeps/x86_64/start.S:110)
>>>
>>> /usr/lib64/gcc/x86_64-openmandriva-linux-gnu/9.1.1/../../../../lib64/crt1.o:(_start)
collect2: error: ld returned 1 exit status
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs