[llvm-bugs] [Bug 42446] New: lld can't handle gcc LTO files

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 29 13:59:52 PDT 2019


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: unassignedbugs at nondot.org
          Reporter: bero at lindev.ch
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190629/59350768/attachment.html>


More information about the llvm-bugs mailing list