<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - symbol <symbol> has undefined version <version> errors linking the FreeBSD base system"
href="https://llvm.org/bugs/show_bug.cgi?id=28359">28359</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>symbol <symbol> has undefined version <version> errors linking the FreeBSD base system
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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>emaste@freebsd.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Blocks</th>
<td>23214
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Need to investigate further but submitting now for tracking.
FreeBSD base system build currently fails (when linking
gnu/usr.bin/binutils/as, probably the first target binary) with:
symbol <a href="mailto:shmctl@FBSD_1.0">shmctl@FBSD_1.0</a> has undefined version FBSD_1.0
symbol <a href="mailto:msgctl@FBSD_1.0">msgctl@FBSD_1.0</a> has undefined version FBSD_1.0
symbol swapcontext@@FBSD_1.2 has undefined version FBSD_1.2
... and a couple of dozen more.
The symbols reported here are the backwards compat implementations.
Definition here:
<a href="https://svnweb.freebsd.org/base/head/lib/libc/include/compat.h?revision=298830&view=markup">https://svnweb.freebsd.org/base/head/lib/libc/include/compat.h?revision=298830&view=markup</a>
produces this object:
feynman% readelf -s freebsd7_shmctl.o
Symbol table '.symtab' contains 6 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND .cerror
2: 0000000000000000 17 FUNC GLOBAL DEFAULT 2
__sys_freebsd7_shmctl
3: 0000000000000000 17 FUNC WEAK DEFAULT 2 _freebsd7_shmctl
4: 0000000000000000 17 FUNC WEAK DEFAULT 2 freebsd7_shmctl
5: 0000000000000000 17 FUNC WEAK DEFAULT 2 <a href="mailto:shmctl@FBSD_1.0">shmctl@FBSD_1.0</a>
which ends up with this symbol in the linked .so:
feynman% readelf -s libc.so.7 | grep 'shmctl.*FBSD_1.0'
2033: 0000000000086c30 17 FUNC WEAK DEFAULT 17 <a href="mailto:shmctl@FBSD_1.0">shmctl@FBSD_1.0</a>
but it looks like this symbol ends up with the default FBSDprivate_1.0 symbol
version, not FBSD_1.0:
feynman% readelf -V libc.so.7
...
71c: 5 (FBSD_1.3) 7 (FBSDprivate_1.0) 7 (FBSDprivate_1.0) 7
(FBSDprivate_1.0)
...</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>