llvm-project/lld/ELF
James Henderson b427d4eced [ELF] Don't create empty output section for unreferenced PROVIDEs
LLD removes empty output sections otherwise specified in the linker
script. Prior to this change however, if section descriptions included
ANY kind of symbol assignment, then the consequent output section would
not be removed, even if the assignment was marked with PROVIDE and not
actually triggered (i.e. the symbol was never referenced). This change
modifies the isDiscarable function to ignore such directives when
determining whether a section should be discarded, in keeping with
bfd's behaviour. Symbol assignments that do result in a symbol
definition will continue to result in a kept section (this is not
actually the same as bfd's behaviour, but it is simpler, and probably
makes more sense).

Reviewed By: grimar

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

llvm-svn: 336184
2018-07-03 09:23:25 +00:00
..
Arch [PPC64] Add support for R_PPC64_GOT_DTPREL16* relocations 2018-06-27 13:55:41 +00:00
AArch64ErrataFix.cpp Add a SectionBase::getVA helper. NFC. 2018-03-24 00:35:11 +00:00
AArch64ErrataFix.h Consistent (non) use of empty lines in include blocks 2018-02-20 21:53:18 +00:00
Bits.h Move bit operations to a new file, ELF/Bits.h. 2017-10-26 21:37:17 +00:00
CMakeLists.txt Add Hexagon Support 2018-06-13 18:45:25 +00:00
CallGraphSort.cpp [ELF] - Never use std::sort. 2018-04-24 09:55:39 +00:00
CallGraphSort.h [ELF] Add profile guided section layout 2018-04-17 23:30:05 +00:00
Config.h [ELF] Support -z initfirst 2018-06-20 02:06:01 +00:00
Driver.cpp Make -z option check more strict. 2018-06-27 07:56:23 +00:00
Driver.h Remove "--full-shutdown" and instead use an environment variable LLD_IN_TEST. 2018-02-16 23:41:48 +00:00
DriverUtils.cpp Handle --plugin-opt= options as alias options. 2018-05-22 02:53:11 +00:00
EhFrame.cpp [ELF] Simplify read32. NFC 2018-03-30 23:13:00 +00:00
EhFrame.h De-template EhReader. NFC. 2017-10-27 03:14:09 +00:00
Filesystem.cpp s/LLVM_ON_WIN32/_WIN32/, lld 2018-04-10 13:15:21 +00:00
Filesystem.h Add a missing #include. 2017-11-17 08:17:21 +00:00
GdbIndex.cpp s/uncompress/decompress/g. 2018-02-12 21:56:14 +00:00
GdbIndex.h [ELF] - Remove dead code. NFC. 2018-07-02 11:10:08 +00:00
ICF.cpp Revert r335460 "[ELF] - ICF: Remove dead code. NFC." 2018-06-25 13:46:39 +00:00
ICF.h Consistent use of header file for ICF and MarkLive 2018-02-20 22:09:59 +00:00
InputFiles.cpp Remove a dead variable. 2018-06-09 00:54:18 +00:00
InputFiles.h [ELF][MIPS] Multi-GOT implementation 2018-06-11 07:24:31 +00:00
InputSection.cpp [PPC64] Add support for R_PPC64_GOT_DTPREL16* relocations 2018-06-27 13:55:41 +00:00
InputSection.h ELF: Do not ICF two sections with different output sections. 2018-05-23 01:58:43 +00:00
LTO.cpp [ThinLTO/lld] Document constant bool ModuleSummaryIndex parameter (NFC) 2018-06-06 22:22:13 +00:00
LTO.h Improve error message for -thinlto-object-suffix-replace and simplify code. 2018-05-17 18:27:12 +00:00
LinkerScript.cpp [ELF] Don't create empty output section for unreferenced PROVIDEs 2018-07-03 09:23:25 +00:00
LinkerScript.h [ELF] - Eliminate the AssertCommand. 2018-04-25 11:16:31 +00:00
MapFile.cpp [ELF] - Change dyn_cast to cast. NFC. 2018-07-02 08:26:20 +00:00
MapFile.h Implement --cref. 2018-03-14 20:29:45 +00:00
MarkLive.cpp [ELF] Pass callables by function_ref 2018-06-16 12:11:34 +00:00
MarkLive.h Consistent use of header file for ICF and MarkLive 2018-02-20 22:09:59 +00:00
Options.td [ELF][MIPS] Multi-GOT implementation 2018-06-11 07:24:31 +00:00
OutputSections.cpp [ELF] Pass callables by function_ref 2018-06-16 12:11:34 +00:00
OutputSections.h [ELF] - Implement linker script OVERLAYs. 2018-06-27 08:08:12 +00:00
README.md Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
Relocations.cpp [PPC64] Add support for R_PPC64_GOT_DTPREL16* relocations 2018-06-27 13:55:41 +00:00
Relocations.h [PPC64] Add support for R_PPC64_GOT_DTPREL16* relocations 2018-06-27 13:55:41 +00:00
ScriptLexer.cpp Simplify script lexer. 2017-12-26 10:13:10 +00:00
ScriptLexer.h Move new lld's code to Common subdirectory. 2017-10-02 21:00:41 +00:00
ScriptParser.cpp [ELF] - Implement linker script OVERLAYs. 2018-06-27 08:08:12 +00:00
ScriptParser.h [ELF] Support expressions with -defsym option 2017-11-04 02:03:58 +00:00
SymbolTable.cpp [ELF] - Replace llvm::find_if with the loop. NFC. 2018-06-25 09:30:39 +00:00
SymbolTable.h Make fetchIfLazy only fetch an object file. NFC. 2018-04-03 18:01:18 +00:00
Symbols.cpp [ELF] Do not error for missing version when symbol has local version. 2018-05-14 10:13:56 +00:00
Symbols.h [ELF][MIPS] Multi-GOT implementation 2018-06-11 07:24:31 +00:00
SyntheticSections.cpp [PPC64] Add support for R_PPC64_GOT_DTPREL16* relocations 2018-06-27 13:55:41 +00:00
SyntheticSections.h [ELF] Pass a pointer to InputFile to the getRelocTargetVA to escape dereferencing of nullptr. NFC 2018-06-11 08:37:19 +00:00
Target.cpp [ELF] - Cleanup error reporting code and cover with the test. NFC. 2018-07-02 14:13:11 +00:00
Target.h Add Hexagon Support 2018-06-13 18:45:25 +00:00
Thunks.cpp ELF Thunks: fix build error: missing 'overrides' 2018-05-06 19:50:04 +00:00
Thunks.h ELF: Allow thunks to change size. NFCI. 2018-03-29 22:32:13 +00:00
Writer.cpp [ELF] - Eliminate dead code from shouldKeepInSymtab. NFC. 2018-06-29 13:34:05 +00:00
Writer.h ELF: Do not ICF two sections with different output sections. 2018-05-23 01:58:43 +00:00

README.md

See docs/NewLLD.rst