Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| lld [2019/01/09 13:51] – VIMAGE issues sorted out EdMaste | lld [2022/02/10 03:13] (current) – Add Category: Project KubilayKocak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | lld, part of the LLVM family of projects, is a high-performance linker for the ELF, COFF, and Mach-O object formats. This page describes the ongoing project to use lld as %%FreeBSD%%' | + | |
| - | ===== In-tree LLD ===== | + | [[https:// |
| - | %%FreeBSD%%-CURRENT contains | + | ===== LLD in Base ===== |
| - | On other architectures, | + | As of 13, lld is now the default system linker on all supported architectures. |
| + | |||
| + | Prior to this, lld was in use on i386, amd64, arm*, aarch64, and riscv64*, with other architectures | ||
| + | |||
| + | To forcibly | ||
| < | < | ||
| Line 15: | Line 18: | ||
| '' | '' | ||
| - | ===== Upstream LLD ===== | + | ====== Historical Issues ====== |
| - | ==== Build upstream lld ==== | + | ===== LLD patches ===== |
| - | < | ||
| - | git clone https:// | ||
| - | cd llvm/tools | ||
| - | git clone https:// | ||
| - | mkdir ../build && cd ../build | ||
| - | cmake -G "Unix Makefiles" | ||
| - | make -j8 | ||
| - | </ | ||
| - | |||
| - | ==== Make lld the default linker ==== | ||
| - | |||
| - | < | ||
| - | cd build/bin | ||
| - | ln -s lld ld | ||
| - | setenv PATH / | ||
| - | setenv LD / | ||
| - | rehash | ||
| - | </ | ||
| - | |||
| - | To check if the changes took effect: | ||
| - | |||
| - | < | ||
| - | davide@rabbit1:/ | ||
| - | OVERVIEW: LLVM Linker | ||
| - | </ | ||
| - | |||
| - | ====== Per-arch status (in HEAD) ====== | ||
| - | |||
| - | ^ Architecture ^ World ^ Kernel ^ Bootstrap linker ^ /usr/bin/ld ^ | ||
| - | | amd64 | OK | OK | lld | lld | | ||
| - | | arm64 | OK | OK | lld | lld | | ||
| - | | i386 | OK | OK | lld | bfd | | ||
| - | | arm | libc fails to link | LLD targets v7l+ | bfd | bfd | | ||
| - | | armv6 | libc fails to link | LLD targets v7l+ | bfd | bfd | | ||
| - | | armv7 | OK | OK | lld | bfd | | ||
| - | | mips64 | Most links, untested | Link fails | bfd | bfd | | ||
| - | | mips | Most links, untested | Link fails | bfd | bfd | | ||
| - | | powerpc64 | libc fails to link | Untested | bfd | bfd | | ||
| - | | powerpc | libc fails to link | Untested | bfd | bfd | | ||
| - | | sparc64 | no support | no support | bfd | bfd | | ||
| - | | riscv | no support | no support | bfd | bfd | | ||
| - | |||
| - | ====== TODO ====== | ||
| - | |||
| - | ===== WIP patches ===== | ||
| - | ==== lld ==== | ||
| * < | * < | ||
| Line 75: | Line 32: | ||
| * < | * < | ||
| - | ==== FreeBSD | + | ===== Ports ===== |
| - | ====== Known Issues ====== | ||
| A %%FreeBSD%% ports exp-run is tracked in [[https:// | A %%FreeBSD%% ports exp-run is tracked in [[https:// | ||
| Line 83: | Line 39: | ||
| * print/gl2ps needs explicit -L/usr/lib [[https:// | * print/gl2ps needs explicit -L/usr/lib [[https:// | ||
| - | ===== Common issues in ports ===== | + | Common issues in ports: |
| - Passing compiler flags, such as '' | - Passing compiler flags, such as '' | ||
| - lld has no built-in search paths ('' | - lld has no built-in search paths ('' | ||
| Line 89: | Line 46: | ||
| - lld does not have a built-in default output target. For the most common use of the linker (linking individual .o objects in to an executable or shared object) lld infers the target from the first object file. However, when the linker is used to convert an arbitrary binary file into an ELF object (via -r -b binary) lld must have the output target specified explicitly with -m. | - lld does not have a built-in default output target. For the most common use of the linker (linking individual .o objects in to an executable or shared object) lld infers the target from the first object file. However, when the linker is used to convert an arbitrary binary file into an ELF object (via -r -b binary) lld must have the output target specified explicitly with -m. | ||
| - | ====== | + | ====== |
| * Rui Ueyama' | * Rui Ueyama' | ||
| * [[http:// | * [[http:// | ||
| * [[https:// | * [[https:// | ||
| + | |||
| + | ---- | ||
| + | |||
| + | {{tag> | ||
| + | {{tag> | ||