summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-03-30 20:01:41 +0000
committeremaste <emaste@FreeBSD.org>2015-03-30 20:01:41 +0000
commitede0a12ac6ed0fc8e0adfd93ad39c5eed618684f (patch)
treedfb590bd55dfe8adb435b03ce4bdc138a1090c0c /sys/amd64/amd64
parent16bd101dd1542d18f051c4198e97c5cd44dfd2fa (diff)
downloadFreeBSD-src-ede0a12ac6ed0fc8e0adfd93ad39c5eed618684f.zip
FreeBSD-src-ede0a12ac6ed0fc8e0adfd93ad39c5eed618684f.tar.gz
llvm: Backport upstream r229195 to fix arm64 TLS relocations
As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU linkers ld.bfd and ld.gold currently only support a subset of the whole range of AArch64 ELF TLS relocations. Furthermore, they assume that some of the code sequences to access thread-local variables are produced in a very specific sequence. When the sequence is not as the linker expects, it can silently mis-relaxe/mis-optimize the instructions. Even if that wouldn't be the case, it's good to produce the exact sequence, as that ensures that linkers can perform optimizing relaxations. This patch: * implements support for 16MiB TLS area size instead of 4GiB TLS area size. Ideally clang would grow an -mtls-size option to allow support for both, but that's not part of this patch. * by default doesn't produce local dynamic access patterns, as even modern ld.bfd and ld.gold linkers do not support the associated relocations. An option (-aarch64-elf-ldtls-generation) is added to enable generation of local dynamic code sequence, but is off by default. * makes sure that the exact expected code sequence for local dynamic and general dynamic accesses is produced, by making use of a new pseudo instruction. The patch also removes two (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing AArch64-specific pseudo SDNode instructions that are superseded by the new one (TLSDESC_CALLSEQ). Submitted by: Kristof Beyls Differential Revision: https://reviews.freebsd.org/D2175
Diffstat (limited to 'sys/amd64/amd64')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud