llvm-project/lld
Ryan Prichard d7d2369c09 [ARM][AArch64] Increase TLS alignment to reserve space for Android's TCB
ARM and AArch64 use TLS variant 1, where the first two words after the
thread pointer are reserved for the TCB, followed by the executable's TLS
segment. Both the thread pointer and the TLS segment are aligned to at
least the TLS segment's alignment.

Android/Bionic historically has not supported ELF TLS, and it has
allocated memory after the thread pointer for several Bionic TLS slots
(currently 9 but soon only 8). At least one of these allocations
(TLS_SLOT_STACK_GUARD == 5) is widespread throughout Android/AArch64
binaries and can't be changed.

To reconcile this disagreement about TLS memory layout, set the minimum
alignment for executable TLS segments to 8 words on ARM/AArch64, which
reserves at least 8 words of memory after the TP (2 for the ABI-specified
TCB and 6 for alignment padding). For simplicity, and because lld doesn't
know when it's targeting Android, increase the alignment regardless of
operating system.

Differential Revision: https://reviews.llvm.org/D53906

llvm-svn: 350681
2019-01-09 00:09:59 +00:00
..
COFF [CodeView] More appropriate name and type for a Microsoft precompiled headers parameter. NFC 2019-01-07 13:53:16 +00:00
Common Set MAttrs in LTO mode 2018-11-01 20:02:49 +00:00
ELF [ARM][AArch64] Increase TLS alignment to reserve space for Android's TCB 2019-01-09 00:09:59 +00:00
MinGW [MinGW] Expand comment for MinGW driver. NFC. 2019-01-05 10:43:59 +00:00
cmake/modules [CMake] Properly conditionalize installation of lld libraries 2018-03-09 13:09:36 +00:00
docs [docs] Add a known limitation to the comment about lld supporting GCC/MinGW object files. NFC. 2019-01-05 10:44:03 +00:00
include/lld [WebAssembly] Add support for the event section 2018-12-08 06:17:43 +00:00
lib Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00
test [ARM][AArch64] Increase TLS alignment to reserve space for Android's TCB 2019-01-09 00:09:59 +00:00
tools/lld Fix typo in error message. NFC. 2018-09-13 15:37:13 +00:00
unittests [Darwin] Use errorHandler from liblldCommon 2018-06-12 02:34:04 +00:00
utils Add a script to run various benchmarks and send the result to lnt. 2017-11-14 16:40:30 +00:00
wasm [WebAssembly] Instruction renaming 2019-01-08 06:25:55 +00:00
.arcconfig [lld] Set up .arcconfig to point to new Diffusion LLD repository 2017-12-06 20:56:23 +00:00
.clang-format
.gitignore
CMakeLists.txt [WebAssembly] Initial wasm linker implementation 2017-11-17 18:14:09 +00:00
CODE_OWNERS.TXT [WebAssembly] Initial wasm linker implementation 2017-11-17 18:14:09 +00:00
LICENSE.TXT Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
README.md Note that the test .tar.xz has been updated. 2017-12-22 19:37:32 +00:00

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.