<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 - lld -r does not correctly handle mixed compressed and uncompressed debug info"
href="https://bugs.llvm.org/show_bug.cgi?id=33289">33289</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lld -r does not correctly handle mixed compressed and uncompressed debug info
</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>All
</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>smeenai@fb.com
</td>
</tr>
<tr>
<th>CC</th>
<td>compnerd@compnerd.org, grimar@accesssoftek.com, llvm-bugs@lists.llvm.org, rafael.espindola@gmail.com, ruiu@google.com
</td>
</tr></table>
<p>
<div>
<pre>% cat a.c
int a() { return 0; }
% cat b.c
int b() { return 0; }
% gcc -g -c a.c
% gcc -g -Wa,--compress-debug-sections -c b.c
% ld.lld -r -o c.o a.o b.o
% objdump -j .zdebug_str -s c.o
c.o: file format elf64-x86-64
Contents of section .zdebug_str:
0000 2f746d70 00474e55 20432034 2e382e35 /tmp.GNU C 4.8.5
0010 20323031 35303632 33202852 65642048 20150623 (Red H
0020 61742034 2e382e35 2d313129 202d6d74 at 4.8.5-11) -mt
0030 756e653d 67656e65 72696320 2d6d6172 une=generic -mar
0040 63683d78 38362d36 34202d67 00 ch=x86-64 -g.
lld creates .zdebug_str, etc, but the section is actually uncompressed, which
causes issues down the line when you attempt to link that object file into
something. Both ld.bfd and ld.gold handle this correctly; the output object
file doesn't have any compressed debug info sections.</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>