llvm-project/lld/test
Fangrui Song a6db64ef4a [ELF] Allow sections after a non-SHF_ALLOC section to be covered by PT_LOAD
GNU ld allows sections after a non-SHF_ALLOC section to be covered by PT_LOAD
(PR37607) and assigns addresses to non-SHF_ALLOC output sections (similar to
SHF_ALLOC NOBITS sections. The location counter is not advanced).

This patch tries to fix PR37607 (remove a special case in
`Writer<ELFT>::createPhdrs`). To make the created PT_LOAD meaningful, we cannot
reset dot to 0 for a middle non-SHF_ALLOC output section. This results in
removal of two special cases in LinkerScript::assignOffsets. Non-SHF_ALLOC
non-orphan sections can have non-zero addresses like in GNU ld.

The zero address rule for non-SHF_ALLOC sections is weakened to apply to orphan
only. This results in a special case in createSection and findOrphanPos, respectively.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D85100
2020-08-06 08:27:15 -07:00
..
COFF [COFF] Port CallGraphSort to COFF from ELF 2020-07-30 15:21:44 -07:00
ELF [ELF] Allow sections after a non-SHF_ALLOC section to be covered by PT_LOAD 2020-08-06 08:27:15 -07:00
MachO [lld-macho] Fix errant search and replace. NFC 2020-08-05 16:59:53 -07:00
MinGW [LLD] [MinGW] Implement the --no-seh flag 2020-07-28 21:08:37 +03:00
Unit Revert "Temporarily revert "build: use `find_package(Python3)` if available"" 2020-04-29 01:38:08 +00:00
darwin [Darwin] Do not error on '-lto_library' option 2018-06-13 18:59:14 +00:00
mach-o ld64.lld: Make janky support for tbd files actually work sometimes 2020-07-02 15:31:21 -04:00
wasm [WebAssembly] 64-bit memory limits 2020-07-06 12:40:45 -07:00
CMakeLists.txt [CMake] Simplify CMake handling for zlib 2020-08-05 16:07:11 -07:00
lit.cfg.py Revert D83834 "Add test utility 'extract'" 2020-07-28 13:26:33 -07:00
lit.site.cfg.py.in [CMake] Simplify CMake handling for zlib 2020-08-05 16:07:11 -07:00