forked from OSchip/llvm-project
8544b40b6e
Prior to this change build with `-shared/-pie` and using TLS (but without -shared-memory) would hit this assert: "Currenly only a single data segment is supported in PIC mode" This is because we were not including TLS data when merging data segments. However, when we build without shared-memory (i.e. without threads) we effectively lower away TLS into a normal active data segment.. so we were ending up with two active data segments: the merged data, and the lowered TLS data. To fix this problem we can instead avoid combining data segments at all when running in shared memory mode (because in this case all segment initialization is passive). And then in non-shared memory mode we know that TLS has been lowered and therefore we can can and should combine all segments. So with this new behavior we have two different modes: 1. With shared memory / mutli-threaded: Never combine data segments since it is not necessary. (All data segments as passive already). 2. Wihout shared memory / single-threaded: Combine *all* data segments since we treat TLS as normal data. (We end up with a single active data segment). Differential Revision: https://reviews.llvm.org/D102937 |
||
---|---|---|
.. | ||
COFF | ||
Common | ||
ELF | ||
MachO | ||
MinGW | ||
cmake/modules | ||
docs | ||
include/lld | ||
lib | ||
test | ||
tools/lld | ||
unittests | ||
utils | ||
wasm | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
LICENSE.TXT | ||
README.md |
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
.