llvm-6502/lib
Kristof Beyls 78c4ef5120 Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers cannot handle yet.
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).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231227 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-04 09:12:08 +00:00
..
Analysis Move TargetLibraryInfo data from two files into one common .def file. 2015-03-03 23:41:58 +00:00
AsmParser Workaround MSVC not providing implicit move members 2015-03-04 02:07:51 +00:00
Bitcode Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
CodeGen [DAGCombine] Fix a bug in a BUILD_VECTOR combine 2015-03-04 07:27:39 +00:00
DebugInfo [llvm-pdbdump] Display full enum definitions. 2015-03-04 06:09:53 +00:00
ExecutionEngine Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Fuzzer [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing). 2015-03-03 23:27:02 +00:00
IR Remove 'llvm.x86.avx2.vbroadcasti128' intrinsic. 2015-03-04 00:13:25 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker Restore LLVMLinkModules C API until it is properly deprecated. 2015-03-02 18:59:38 +00:00
LTO [LTO API] fix memory leakage introduced at r230290. 2015-02-25 21:20:53 +00:00
MC [MC][Target] Implement support for R_X86_64_SIZE{32,64}. 2015-03-04 06:49:39 +00:00
Object Use read{16,32,64}{le,be}() instead of *reinterpret_cast<u{little,big}{16,32,64}_t>(). 2015-03-02 21:19:12 +00:00
Option Remove explicit no-op dtor in favor of the implicit dtor so as not to disable/deprecate the copy operations. 2015-03-03 19:53:02 +00:00
ProfileData Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Support Make Triple::getOSVersion make sense for Android. 2015-03-03 18:23:51 +00:00
TableGen Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Target Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers cannot handle yet. 2015-03-04 09:12:08 +00:00
Transforms [RewriteStatepointsForGC] Fix a relocation bug w.r.t values defined by invoke instructions 2015-03-04 00:13:52 +00:00
CMakeLists.txt Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset. 2015-01-29 16:58:29 +00:00
LLVMBuild.txt
Makefile Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00