<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 --- - FreeBSD: openal-soft-1.17.2 link fail with "error: cannot preempt symbol.." error"
href="https://llvm.org/bugs/show_bug.cgi?id=30960">30960</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>FreeBSD: openal-soft-1.17.2 link fail with "error: cannot preempt symbol.." error
</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>grimar@accesssoftek.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=17573" name="attach_17573" title="CPIO">attachment 17573</a> <a href="attachment.cgi?id=17573&action=edit" title="CPIO">[details]</a></span>
CPIO
When trying to link that port, lld fails with next errors:
/usr/bin/ld: error: cannot preempt symbol alIsExtensionPresent
/usr/bin/ld: error: cannot preempt symbol alcGetCurrentContext
/usr/bin/ld: error: cannot preempt symbol alcGetContextsDevice
/usr/bin/ld: error: cannot preempt symbol alcGetIntegerv
/usr/bin/ld: error: cannot preempt symbol alcGetError
/usr/bin/ld: error: cannot preempt symbol alGenBuffers
/usr/bin/ld: error: cannot preempt symbol alBufferData
/usr/bin/ld: error: cannot preempt symbol alGetError
....<more>
Original reproduce file is attached.
While investigating reduced to:
dso.c:
__attribute__((visibility("protected"))) void foo() {}
main.c:
extern void foo();
int main() { foo(); return 0; }
root@freebsd:~/tests/3openal # clang dso.c -shared -o dso.so
root@freebsd:~/tests/3openal # clang main.c dso.so -o main
/usr/bin/ld: error: cannot preempt symbol foo
clang: error: linker command failed with exit code 1 (use -v to see invocation)</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>