[llvm-bugs] [Bug 39290] New: emulation incompatibility warning raised before parsing OUTPUT_FORMAT list

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 14 19:02:26 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=39290

            Bug ID: 39290
           Summary: emulation incompatibility warning raised before
                    parsing OUTPUT_FORMAT list
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: ndesaulniers at google.com
                CC: dima at golovin.in, llozano at chromium.org,
                    llvm-bugs at lists.llvm.org, ruiu at google.com,
                    srhines at google.com

>From the report: [0]

It seems that lld needs an explicit `-m <emulation>`, otherwise will produce
warning when linking the Linux kernel, ex:

ld.lld: error: arch/x86/realmode/rm/header.o is incompatible with elf_x86_64

It seems that the kernel specifies these via `OUTPUT_FORMAT` [1], and bfd and
gold both pick up the emulation mode from those.

We can work around the issue for now in the kernel with an explicit `-m
<emulation>`, but it would be good to delay raising this issue until we have
failed to find an explicit `OUTPUT_FORMAT` as well.


[0] https://github.com/ClangBuiltLinux/linux/issues/30
[1]
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/simple-commands.html

-- 
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/20181015/a3c95fe4/attachment-0001.html>


More information about the llvm-bugs mailing list