<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 INVALID - .symver foo, foo@v1 is mishandled"
href="https://bugs.llvm.org/show_bug.cgi?id=48820">bug 48820</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;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - .symver foo, foo@v1 is mishandled"
href="https://bugs.llvm.org/show_bug.cgi?id=48820#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - .symver foo, foo@v1 is mishandled"
href="https://bugs.llvm.org/show_bug.cgi?id=48820">bug 48820</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>There is a design flaw in .symver @ design.
In bad.c, `.symver foo, foo@v1` + defined foo cause both foo and foo@v1.
GNU ld has a special rule: if 'foo@v1' is defined, foo is suppressed. The 'foo'
pattern in version node VERS.1 in foo.v does not produce foo or foo@@v1.
In gold, if VERS.1 is empty, .dynsym has both foo and <a href="mailto:foo@VERS.1">foo@VERS.1</a>
If VERS.1 has foo, .dynsym has just <a href="mailto:foo@VERS.1">foo@VERS.1</a>
In LLD, if VERS.1 is empty, .dynsym has both foo and <a href="mailto:foo@VERS.1">foo@VERS.1</a>
If VERS.1 has foo, .dynsym has foo@@VERS.1 and <a href="mailto:foo@VERS.1">foo@VERS.1</a>. This causes the
executable foo reference to be bound to <a href="mailto:foo@VERS.1">foo@VERS.1</a> and fail the test.
I have actually filed a bug against GNU ld:
<a href="https://sourceware.org/bugzilla/show_bug.cgi?id=27210">https://sourceware.org/bugzilla/show_bug.cgi?id=27210</a>
and analyzed that **dropping the special rule from GNU ld will be safe.**
However, there has been no satisfactory answer.
The reaction probably gives a casual reader such a feeling:
"GNU ld has implemented this, and we don't want to drop a so you other linkers
need to follow."
(GNU ld implements version symbols via the intricate indirect symbol mechanism,
so perhaps dropping the rule is difficult.)
In any case I don't think this could cause problem in practice because
non-default versions should use a different symbol name (i.e. use something
like .symver foo_v1, foo@v1 instead of .symver foo, foo@v1) anyway.</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>