<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 - --compress-debug-sections causes loss of symbols and invalid relocations"
href="https://bugs.llvm.org/show_bug.cgi?id=40818">40818</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>--compress-debug-sections causes loss of symbols and invalid relocations
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>llvm-objcopy
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jh7370.2008@my.bristol.ac.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>alexander.v.shaposhnikov@gmail.com, jake.h.ehrlich@gmail.com, jh7370.2008@my.bristol.ac.uk, llvm-bugs@lists.llvm.org, rupprecht@google.com
</td>
</tr></table>
<p>
<div>
<pre>It's entirely reasonable to have a relocation targeting a section symbol in the
debug sections. However, I just discovered that if you run
--compress-debug-sections on an ELF containing such a reference, it succeeds,
but the symbols are lost. This can potentially lead to relocations with invalid
or incorrect symbol references.
This bug is blocking me landing <a href="https://reviews.llvm.org/D58510">https://reviews.llvm.org/D58510</a>, because one of
the tests updated in that change references such a symbol, whereas before it
was (probably unintentionally) not referencing any symbol at all.
I also think it essentially renders --compress-debug-sections useless in any
real case.</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>