<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 - Corrupt DWARF created when linking with ld.lld"
href="https://bugs.llvm.org/show_bug.cgi?id=40532">40532</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Corrupt DWARF created when linking with ld.lld
</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>normal
</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>jonasschievink@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org
</td>
</tr></table>
<p>
<div>
<pre>Linking two object files together (created by rustc and gcc) results in an
output with corrupt debug info.
Running `objdump --dwarf-check -g <output>` on the linker output reports this
warning a few times:
objdump: Warning: Corrupt unit length (0x0) found in section .debug_info
When run on the object files before linking, no warning is issued. The
dwarf-validate tool of the gimli library agrees with this
(<a href="https://github.com/gimli-rs/gimli">https://github.com/gimli-rs/gimli</a>).
I've attached the output of LLD with --reproduce.
For more info, refer to
<a href="https://github.com/jonas-schievink/lldbug/releases/tag/lldrepro-min">https://github.com/jonas-schievink/lldbug/releases/tag/lldrepro-min</a> (but
lldrepro-min should already contain everything if I understood it correctly).
LLD version: LLD 7.0.1</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>