<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 FIXED - Undefined symbol in dynamic library on the lld link line causes inaccurate symbol resolution"
href="https://bugs.llvm.org/show_bug.cgi?id=46676">bug 46676</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;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>i@maskray.me
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Undefined symbol in dynamic library on the lld link line causes inaccurate symbol resolution"
href="https://bugs.llvm.org/show_bug.cgi?id=46676#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Undefined symbol in dynamic library on the lld link line causes inaccurate symbol resolution"
href="https://bugs.llvm.org/show_bug.cgi?id=46676">bug 46676</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>Hi Andrew,
I think this is another instance that lack of SHT_GNU_verneed support caused
issues (<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - lld fails to bind versioned symbol references to compat symbols (even without underlinking)"
href="show_bug.cgi?id=44842">https://bugs.llvm.org/show_bug.cgi?id=44842</a> )
libsymbol_wrapper.so has an undefined symbol shadowed@LIB_GOOD_API_1
LLD older than <a href="https://reviews.llvm.org/D80059">https://reviews.llvm.org/D80059</a> treated it as unversioned
shadowed and fetched libbad_symbol.a(bad_symbol.o)
LLD newer than D80059, GNU ld and gold do not fetch
libbad_symbol.a(bad_symbol.o)
% clang -shared -o libsymbol_user.so symbol_user.o libsymbol_wrapper.so
libbad_symbol.a -fuse-ld=gold -Wl,--trace-symbol,shadowed -Wl,-rpath,.
-fuse-ld=lld
libsymbol_wrapper.so: reference to shadowed
libbad_symbol.a(bad_symbol.o): definition of shadowed
% clang -shared -o libsymbol_user.so symbol_user.o libsymbol_wrapper.so
libbad_symbol.a -Wl,-y,shadowed@LIB_GOOD_API_1 -Wl,-rpath,. -fuse-ld=bfd
/usr/bin/ld.bfd: libsymbol_wrapper.so: reference to shadowed@LIB_GOOD_API_1
<a href="https://reviews.llvm.org/rGe32f04cdc95224589f30148599c362ba37bae7b6">https://reviews.llvm.org/rGe32f04cdc95224589f30148599c362ba37bae7b6</a> fixed the
bug. Unfortunately the commit is not in 10.0.1-rc4</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>