llvm-project/lld/ELF
Fangrui Song 0526c0cd8e [ELF] Implement Local Dynamic style TLSDESC for x86-64
For the Local Dynamic case of TLSDESC, _TLS_MODULE_BASE_ is defined as a
special TLS symbol that makes:

1) Without relaxation: it produces a dynamic TLSDESC relocation that
computes 0. Adding @dtpoff to access a TLS symbol.
2) With LD->LE relaxation: _TLS_MODULE_BASE_@tpoff = 0 (lowest address in
the TLS block). Adding @tpoff to access a TLS symbol.

For 1), this saves dynamic relocations and GOT slots as otherwise
(General Dynamic) we would create an R_X86_64_TLSDESC and reserve two
GOT slots for each symbol.

Add ElfSym::TlsModuleBase and change the signature of getTlsTpOffset()
to special case _TLS_MODULE_BASE_.

Reviewed By: ruiu

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

llvm-svn: 362078
2019-05-30 10:00:20 +00:00
..
Arch [ELF] Implement General Dynamic style TLSDESC for x86-64 2019-05-29 02:03:56 +00:00
AArch64ErrataFix.cpp Use llvm::stable_sort 2019-04-23 02:42:06 +00:00
AArch64ErrataFix.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Fail early if an output file is not writable 2019-03-11 16:30:55 +00:00
CallGraphSort.cpp Use llvm::stable_sort 2019-04-23 02:42:06 +00:00
CallGraphSort.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Config.h [ELF] Implement Dependent Libraries Feature 2019-05-17 03:44:15 +00:00
DWARF.cpp Reland D61583 [ELF] Error on relocations to STT_SECTION symbols if the sections were discarded 2019-05-28 14:34:28 +00:00
DWARF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Driver.cpp ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
Driver.h Move SymbolTable::addCombinedLTOObject() to LinkerDriver. 2019-05-23 09:26:27 +00:00
DriverUtils.cpp [ELF] Implement Dependent Libraries Feature 2019-05-17 03:44:15 +00:00
EhFrame.cpp [ELF][MachO][wasm] Simplify range-style std::find{,_if} with STLExtras.h utilities. NFC 2019-03-29 16:21:16 +00:00
EhFrame.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ICF.cpp ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
ICF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InputFiles.cpp Reland D61583 [ELF] Error on relocations to STT_SECTION symbols if the sections were discarded 2019-05-28 14:34:28 +00:00
InputFiles.h Merge ELFFileBase::{initSymtab,parseHeader} as ELFFileBase:init. NFC. 2019-05-28 05:17:21 +00:00
InputSection.cpp [ELF] Implement Local Dynamic style TLSDESC for x86-64 2019-05-30 10:00:20 +00:00
InputSection.h ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
LTO.cpp Use SymbolTable::insert() to implement --trace. 2019-05-28 06:33:06 +00:00
LTO.h [ELF] Reorder BitcodeFiles.empty() to call thinLTOCreateEmptyIndexFiles() in only one place 2019-05-07 10:40:26 +00:00
LinkerScript.cpp ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
LinkerScript.h [ELF] Deleted unused forward declarations. NFC 2019-05-24 09:25:47 +00:00
MapFile.cpp ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
MapFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MarkLive.cpp ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
MarkLive.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Options.td [ELF] Implement Dependent Libraries Feature 2019-05-17 03:44:15 +00:00
OutputSections.cpp ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
OutputSections.h [LLD][ELF] - Do not remove empty sections referenced in LOADADDR/ADDR commands. 2019-04-26 06:59:30 +00:00
README.md Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
Relocations.cpp ELF: Don't reuse a thunk in a different loadable partition. 2019-05-29 04:06:01 +00:00
Relocations.h ELF: Don't reuse a thunk in a different loadable partition. 2019-05-29 04:06:01 +00:00
ScriptLexer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScriptLexer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScriptParser.cpp [ELF] Full support for -n (--nmagic) and -N (--omagic) via common page 2019-05-13 16:01:26 +00:00
ScriptParser.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SymbolTable.cpp ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
SymbolTable.h Use SymbolTable::insert() to implement --trace. 2019-05-28 06:33:06 +00:00
Symbols.cpp [ELF] Implement Local Dynamic style TLSDESC for x86-64 2019-05-30 10:00:20 +00:00
Symbols.h [ELF] Implement Local Dynamic style TLSDESC for x86-64 2019-05-30 10:00:20 +00:00
SyntheticSections.cpp ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
SyntheticSections.h ELF: Add basic partition data structures and behaviours. 2019-05-29 03:55:20 +00:00
Target.cpp [PPC64] toc-indirect to toc-relative relaxation 2019-05-07 04:26:05 +00:00
Target.h [ELF] Full support for -n (--nmagic) and -N (--omagic) via common page 2019-05-13 16:01:26 +00:00
Thunks.cpp [mips] Remove redundant setup of less-significant bit. NFC 2019-03-13 16:00:35 +00:00
Thunks.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Writer.cpp [ELF] Implement Local Dynamic style TLSDESC for x86-64 2019-05-30 10:00:20 +00:00
Writer.h [ELF] Delete unused forward declarations and unused DynamicReloc::getInputSec(). NFC 2019-03-15 07:16:39 +00:00

README.md

See docs/NewLLD.rst