<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 - lld fails to link kernel modules on FreeBSD/i386"
href="https://bugs.llvm.org/show_bug.cgi?id=33422">33422</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lld fails to link kernel modules on FreeBSD/i386
</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>enhancement
</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></table>
<p>
<div>
<pre>Bug created for tracking - reproduction tarball will be added.
While linking the FreeBSD/i386 kernel the linking fails with errors of two
types:
ld -m elf_i386_fbsd -Bshareable -d -warn-common -o 3dfx_linux.ko.full
3dfx_linux.kld
ld: error: can't create dynamic relocation R_386_32 against symbol:
__stack_chk_guard
<span class="quote">>>> defined in 3dfx_linux.kld
>>> referenced by tdfx_linux.c:47 (/scratch/tmp/emaste/freebsd/sys/dev/tdfx/tdfx_linux.c:47)
>>> 3dfx_linux.kld:(linux_ioctl_tdfx)</span >
ld: error: can't create dynamic relocation R_386_PC32 against symbol:
__cap_rights_init
<span class="quote">>>> defined in 3dfx_linux.kld
>>> referenced by tdfx_linux.c:58 (/scratch/tmp/emaste/freebsd/sys/dev/tdfx/tdfx_linux.c:58)
>>> 3dfx_linux.kld:(linux_ioctl_tdfx)</span >
Background: We are attempting to build at least our Tier-1 FreeBSD
architectures (32- and 64-bit x86 and ARM) with LLD. We currently have LLVM
r305145 imported into a test branch and both 64-bit archs successfully build
with LLD, while both 32 bit archs fail.</pre>
</div>
</p>
<div id="referenced">
<hr style="border: 1px dashed #969696">
<b>Referenced Bugs:</b>
<ul>
<li>
[<a class="bz_bug_link
bz_status_NEW "
title="NEW - [META] Using LLD as FreeBSD's system linker"
href="https://bugs.llvm.org/show_bug.cgi?id=23214">Bug 23214</a>] [META] Using LLD as FreeBSD's system linker
</li>
</ul>
</div>
<br>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>