<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - Allow linking against shared objects without section headers"
href="https://bugs.llvm.org/show_bug.cgi?id=41058">bug 41058</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>i@maskray.me
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>WONTFIX
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - Allow linking against shared objects without section headers"
href="https://bugs.llvm.org/show_bug.cgi?id=41058#c13">Comment # 13</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - Allow linking against shared objects without section headers"
href="https://bugs.llvm.org/show_bug.cgi?id=41058">bug 41058</a>
from <span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span></b>
<pre><a href="show_bug.cgi?id=41058#c11">Comment #11</a> seems to include most information about how to reconstruct linking
view from execution view for linkable shared objects :)
I'll just make a complement:
Find the number of dynamic symbols with DT_HASH (--hash-style=gnu) is trivial.
With DT_GNU_HASH, it is a bit tricky but still doable:
find the chain with the largest symbol index, then linearly probe the bucket
started with this index until an odd hash value is found.
The last index plus 1 is the number of dynamic symbols.
Recently binutils discusses a similar topic:
<a href="https://sourceware.org/pipermail/binutils/2020-March/110103.html">https://sourceware.org/pipermail/binutils/2020-March/110103.html</a>
RFC: [PATCH] ELF: Don't require section header on ELF objects
* Many people agree that without a section header table, a shared object will
be a runtime only object.
<a href="https://sourceware.org/pipermail/binutils/2020-March/110144.html">https://sourceware.org/pipermail/binutils/2020-March/110144.html</a>
* They will add --strip-sections to readelf (it was originally different... I
requested a name change because of eu-strip/llvm-objcopy's --strip-sections:) )
* readelf will learn how to dump symbols in the absence of a section header
table. llvm-readobj has a similar feature request
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - Allow linking against shared objects without section headers"
href="show_bug.cgi?id=41058">https://bugs.llvm.org/show_bug.cgi?id=41058</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>