llvm-project/lld/ELF
Ed Maste 6556aa6848 [ELF] Omit PT_NOTE for SHT_NOTE without SHF_ALLOC
A non-alloc note section should not have a PT_NOTE program header.

Found while linking ghc (Haskell compiler) with lld on FreeBSD.
ghc emits a .debug-ghc-link-info note section (as the name suggests, it
contains link information) as a SHT_NOTE section without SHF_ALLOC set.

For this case ld.bfd does not emit a PT_NOTE segment for the
.debug-ghc-link-info section.  lld previously emitted a PT_NOTE with
p_vaddr = 0 and FreeBSD's rtld segfaulted when trying to parse a note at
address 0.

llvm.org/pr37361

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

llvm-svn: 331973
2018-05-10 11:12:18 +00:00
..
Arch [PPC64] Add lazy symbol resolution stubs. 2018-05-09 02:07:53 +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 [CMake] Fix BUILD_SHARED_LIBS regression due to r331405 2018-05-03 10:03:45 +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 New option -z keep-text-section-prefix to keep text sections with prefixes separate. 2018-05-08 23:19:50 +00:00
Driver.cpp New option -z keep-text-section-prefix to keep text sections with prefixes separate. 2018-05-08 23:19:50 +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 Simplify libtool compatibility hack. 2018-02-07 00:13:01 +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] - Teach LLD to use information from .debug_str for error reporting. 2017-11-17 11:57:47 +00:00
ICF.cpp [lld] fix data race in ELF/ICF.cpp 2018-04-03 17:27:39 +00:00
ICF.h Consistent use of header file for ICF and MarkLive 2018-02-20 22:09:59 +00:00
InputFiles.cpp [ELF] Rework debug line parsing to use llvm::Error and callbacks (LLD-side) 2018-05-10 10:52:21 +00:00
InputFiles.h Added support for ThinLTO plugin options : thinlto-index-only and thinlto-prefix-replace 2018-05-02 21:40:07 +00:00
InputSection.cpp [ELF][MIPS] Fix calculation of GP relative relocations in case of relocatable output 2018-05-08 15:34:06 +00:00
InputSection.h Split merge sections early. 2018-04-27 16:29:57 +00:00
LTO.cpp Add support for LTO plugin option obj-path 2018-05-08 22:37:57 +00:00
LTO.h Update ThinLTO Indexing logic 2018-05-08 20:12:07 +00:00
LinkerScript.cpp Delete unused variable. 2018-04-26 19:21:07 +00:00
LinkerScript.h [ELF] - Eliminate the AssertCommand. 2018-04-25 11:16:31 +00:00
MapFile.cpp Replace SharedSymbols with Defined when creating copy relocations. 2018-04-26 17:58:58 +00:00
MapFile.h Implement --cref. 2018-03-14 20:29:45 +00:00
MarkLive.cpp Split .eh_frame sections in parellel. 2018-04-27 18:17:36 +00:00
MarkLive.h Consistent use of header file for ICF and MarkLive 2018-02-20 22:09:59 +00:00
Options.td [ELF] Clarify help wording for --symbol-ordering-file 2018-04-26 22:25:04 +00:00
OutputSections.cpp [PPC64] Remove support for ELF V1 ABI in LLD 2018-05-04 15:09:49 +00:00
OutputSections.h [PPC64] Remove support for ELF V1 ABI in LLD 2018-05-04 15:09:49 +00:00
README.md Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
Relocations.cpp [PPC64] Remove support for ELF V1 ABI in LLD 2018-05-04 15:09:49 +00:00
Relocations.h [PPC64] Remove support for ELF V1 ABI in LLD 2018-05-04 15:09:49 +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] - Eliminate the AssertCommand. 2018-04-25 11:16:31 +00:00
ScriptParser.h [ELF] Support expressions with -defsym option 2017-11-04 02:03:58 +00:00
SymbolTable.cpp Added support for ThinLTO plugin options : thinlto-index-only and thinlto-prefix-replace 2018-05-02 21:40:07 +00:00
SymbolTable.h Make fetchIfLazy only fetch an object file. NFC. 2018-04-03 18:01:18 +00:00
Symbols.cpp Replace SharedSymbols with Defined when creating copy relocations. 2018-04-26 17:58:58 +00:00
Symbols.h [PPC64] Emit plt call stubs to the text section rather then the plt section. 2018-05-06 19:13:29 +00:00
SyntheticSections.cpp [PPC64] Add lazy symbol resolution stubs. 2018-05-09 02:07:53 +00:00
SyntheticSections.h Don't create a temporary DenseMap for each input .eh_frame. 2018-04-27 20:19:28 +00:00
Target.cpp [ELF] - Teach LLD to hint about -fdebug-types-section. 2018-03-21 09:19:34 +00:00
Target.h [ELF] Fix typo. NFC 2018-04-27 05:50:40 +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] Omit PT_NOTE for SHT_NOTE without SHF_ALLOC 2018-05-10 11:12:18 +00:00
Writer.h Consistent use of header file for ICF and MarkLive 2018-02-20 22:09:59 +00:00

README.md

See docs/NewLLD.rst