<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - emulation incompatibility warning raised before parsing OUTPUT_FORMAT list"
href="https://bugs.llvm.org/show_bug.cgi?id=39290">39290</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>emulation incompatibility warning raised before parsing OUTPUT_FORMAT list
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>ELF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ndesaulniers@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dima@golovin.in, llozano@chromium.org, llvm-bugs@lists.llvm.org, ruiu@google.com, srhines@google.com
</td>
</tr></table>
<p>
<div>
<pre>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] <a href="https://github.com/ClangBuiltLinux/linux/issues/30">https://github.com/ClangBuiltLinux/linux/issues/30</a>
[1]
<a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/simple-commands.html">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/simple-commands.html</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>