<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 - After r307364, some versioned symbols do not appear in .so files"
href="https://bugs.llvm.org/show_bug.cgi?id=33820">33820</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>After r307364, some versioned symbols do not appear in .so files
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>ELF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dimitry@andric.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18806" name="attach_18806" title="Minimized test case for symbol versioning problem">attachment 18806</a> <a href="attachment.cgi?id=18806&action=edit" title="Minimized test case for symbol versioning problem">[details]</a></span>
Minimized test case for symbol versioning problem
As reported on <a href="https://reviews.llvm.org/rL307364">https://reviews.llvm.org/rL307364</a>, after this change I got
errors while linking the FreeBSD base system, similar to:
ld.lld: error: undefined symbol: openat
<span class="quote">>>> referenced by dma-mbox-create.c:175 (/home/dim/src/clang500-import/contrib/dma/dma-mbox-create.c:175)
>>> dma-mbox-create.o:(main)</span >
It turns out openat is a versioned symbol, which appears twice in libc.so.7:
$ readelf -sW /lib/libc.so.7 | grep -w openat
3087: 000000000004e2e0 203 FUNC WEAK DEFAULT 11 <a href="mailto:openat@FBSD_1.1">openat@FBSD_1.1</a>
3088: 000000000004e2e0 203 FUNC WEAK DEFAULT 11 openat@@FBSD_1.2
When doing the link with lld, on aarch64, the openat@@FBSD_1.2 version
disappears, for some reason.
I've attached a minimized test case in a tarball. There is a Makefile in the
extracted directory, which links with both ld.bfd and ld.ldd, and shows the
difference in output.</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>