<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 - Don't assume that there is only one SHT_SYMTAB_SHNDX section"
href="https://bugs.llvm.org/show_bug.cgi?id=43991">43991</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Don't assume that there is only one SHT_SYMTAB_SHNDX section
</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-readobj
</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>jh7370.2008@my.bristol.ac.uk, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>llvm-readobj/elf incorrectly assumes taht there is a maximum of one
SHT_SYMTAB_SHNDX section. This section is then used any time the section index
for a symbol needs to be looked up. This is incorrect. The SHT_SYMTAB_SHNDX
sections are paired up with symbol tables via their sh_link fields. In
practice, it's relatively unlikely to see two SHT_SYMTAB_SHNDX sections, but it
matters in the unlikely case of a dynamic object having many sections. In such
a case, there should be two SHT_SYMTAB_SHNDX sections, one for the static
symbol table and the other for the dynamic symbol table, with corresponding
sh_link fields set (the dynamic one is also referenced by the DT_SYMTAB_SHNDX
dynamic tag). Due to their nature, these sections cannot be combined into one.
There are cases in the llvm-readobj code where a dynamic symbol could end up
looking up the section index in the wrong table, so this should be fixed.</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>