hanchenye-llvm-project/lld/ELF
Alexander Richardson 6b367faa45 [ELF] Make overlapping output sections an error
Summary:
While trying to make a linker script behave the same way with lld as it did
with bfd, I discovered that lld currently doesn't diagnose overlapping
output sections. I was getting very strange runtime failures which I
tracked down to overlapping sections in the resulting binary. When linking
with ld.bfd overlapping output sections are an error unless
--noinhibit-exec is passed and I believe lld should behave the same way
here to avoid surprising crashes at runtime.

The patch also uncovered an errors in the tests: arm-thumb-interwork-thunk
was creating a binary where .got.plt was placed at an address overlapping
with .got.

Reviewers: ruiu, grimar, rafael

Reviewed By: ruiu

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

llvm-svn: 323856
2018-01-31 09:22:44 +00:00
..
Arch [ELF][MIPS] Rename function to be consistent with other names. NFC 2018-01-29 14:00:51 +00:00
AArch64ErrataFix.cpp [ELF] Make --fix-cortex-a53-843419 work on big endian hosts 2018-01-23 19:26:52 +00:00
AArch64ErrataFix.h [ELF] Fix buildbot warning error. 2017-12-15 10:47:44 +00:00
Bits.h Move bit operations to a new file, ELF/Bits.h. 2017-10-26 21:37:17 +00:00
CMakeLists.txt [ELF] Implement scanner for Cortex-A53 Erratum 843419 2017-12-05 15:59:05 +00:00
Config.h [ELF] Make overlapping output sections an error 2018-01-31 09:22:44 +00:00
Driver.cpp [LLD] Use Rela on PowerPC too 2018-01-31 02:03:55 +00:00
Driver.h [ELF] Fall back to search dirs for linker scripts specified with -T 2017-11-20 15:43:20 +00:00
DriverUtils.cpp Remove redundant local variables. 2017-12-11 23:19:11 +00:00
EhFrame.cpp De-template EhReader. NFC. 2017-10-27 03:14:09 +00:00
EhFrame.h De-template EhReader. NFC. 2017-10-27 03:14:09 +00:00
Filesystem.cpp Don't use llvm/Config/config.h. 2017-11-17 21:40:38 +00:00
Filesystem.h Add a missing #include. 2017-11-17 08:17:21 +00:00
GdbIndex.cpp Remove some includes from InputFiles.h. 2017-12-09 16:56:18 +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 Rename --icf-data and add a corresponding flag for functions. 2018-01-10 01:37:36 +00:00
ICF.h [ELF] - Apply clang-format. NFC. 2017-07-18 11:55:35 +00:00
InputFiles.cpp [DWARFv5] Re-enable dumping a line table with no CU. 2018-01-29 20:57:43 +00:00
InputFiles.h Detemplate reportDuplicate. 2017-12-23 17:21:39 +00:00
InputSection.cpp Move function to the file where it is used. 2018-01-30 16:24:04 +00:00
InputSection.h Move function to the file where it is used. 2018-01-30 16:24:04 +00:00
LTO.cpp Pass CPU string to LTO pipeline. 2018-01-30 18:18:59 +00:00
LTO.h Move new lld's code to Common subdirectory. 2017-10-02 21:00:41 +00:00
LinkerScript.cpp Sort orphan section if --symbol-ordering-file is given. 2018-01-30 16:20:08 +00:00
LinkerScript.h Run dos2unix in a few files. NFC. 2018-01-30 17:24:28 +00:00
MapFile.cpp Remove some includes from InputFiles.h. 2017-12-09 16:56:18 +00:00
MapFile.h Pass symbol attributes instead of ElfSym to Shared symbol ctor. 2017-10-28 20:15:56 +00:00
MarkLive.cpp Use dyn_cast instead of dyn_cast_or_null. 2017-12-20 20:46:08 +00:00
Options.td Correct typo in help text 2018-01-10 12:55:14 +00:00
OutputSections.cpp Sort orphan section if --symbol-ordering-file is given. 2018-01-30 16:20:08 +00:00
OutputSections.h Sort orphan section if --symbol-ordering-file is given. 2018-01-30 16:20:08 +00:00
README.md
Relocations.cpp [ELF] Make overlapping output sections an error 2018-01-31 09:22:44 +00:00
Relocations.h Rename Body -> Sym. 2017-11-04 00:31:04 +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 Remove MemRegionOffset. NFC. 2018-01-25 02:18:00 +00:00
ScriptParser.h [ELF] Support expressions with -defsym option 2017-11-04 02:03:58 +00:00
Strings.cpp Factor out common code to Common/Strings.cpp. 2017-11-28 02:15:26 +00:00
Strings.h Factor out common code to Common/Strings.cpp. 2017-11-28 02:15:26 +00:00
SymbolTable.cpp [ELF] - Do not forget file name when reporting duplicate symbol error for absolute symbols. 2018-01-31 08:32:35 +00:00
SymbolTable.h [ELF] - Remove dead declaration. NFC. 2018-01-30 11:03:27 +00:00
Symbols.cpp Define isUndefWeak inline. 2017-12-21 22:26:44 +00:00
Symbols.h Inline foot gun into only valid use. 2018-01-16 19:28:28 +00:00
SyntheticSections.cpp Use 4 as the alignment of .eh_frame_hdr. 2018-01-23 05:23:23 +00:00
SyntheticSections.h Do not pass an argument that can be easily inferred from other argument. 2018-01-12 22:29:29 +00:00
Target.cpp Use dyn_cast instead of dyn_cast_or_null. 2017-12-20 20:46:08 +00:00
Target.h Use references instead of pointers. NFC. 2017-12-19 23:59:35 +00:00
Thunks.cpp Use references instead of pointers. NFC. 2017-12-19 23:59:35 +00:00
Thunks.h ELF: Merge DefinedRegular and Defined. 2017-11-06 04:35:31 +00:00
Writer.cpp [ELF] Make overlapping output sections an error 2018-01-31 09:22:44 +00:00
Writer.h Put the header in the first PT_LOAD even if that PT_LOAD has a LMAExpr. 2018-01-29 03:44:44 +00:00

README.md

See docs/NewLLD.rst