mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-29 16:41:27 +00:00
ed399d508f
binutils 2.36 introduced the new section flag SHF_GNU_RETAIN (for ELFOSABI_GNU & ELFOSABI_FREEBSD) to mark a sections as a GC root. Several LLVM side toolchain folks (including me) were involved in the design process of SHF_GNU_RETAIN and were happy with this proposal. Currently GNU ld only respects SHF_GNU_RETAIN semantics for ELFOSABI_GNU & ELFOSABI_FREEBSD object files (https://sourceware.org/bugzilla/show_bug.cgi?id=27282). GNU ld sets EI_OSABI to ELFOSABI_GNU for relocatable output (https://sourceware.org/bugzilla/show_bug.cgi?id=27091). In practice the single value EI_OSABI is neither a good indicator for object file compatibility, nor a useful mechanism marking used ELF extensions. For input, we respect SHF_GNU_RETAIN semantics even for ELFOSABI_NONE object files. This is compatible with how LLD and GNU ld handle (mildly useful) STT_GNU_IFUNC / (emitted by GCC, considered misfeature by some folks) STB_GNU_UNIQUE input. (As of LLVM 12.0.0, the integrated assembler does not set ELFOSABI_GNU for STT_GNU_IFUNC/STB_GNU_UNIQUE). Arguably STT_GNU_IFUNC/STB_GNU_UNIQUE probably need indicators in object files but SHF_GNU_RETAIN is more likely accepted by more OSABI platforms. For output, we take a step further than GNU ld: we don't promote ELFOSABI_NONE to ELFOSABI_GNU for all output. Differential Revision: https://reviews.llvm.org/D95749 |
||
---|---|---|
.. | ||
cmake/modules | ||
COFF | ||
Common | ||
docs | ||
ELF | ||
include/lld | ||
lib | ||
MachO | ||
MinGW | ||
test | ||
tools/lld | ||
unittests | ||
utils | ||
wasm | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
LICENSE.TXT | ||
README.md |
LLVM Linker (lld)
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
Benchmarking
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f
.