llvm-project/lld/test
George Rimar 1136ec64e8 [ELF] - Fix crash relative to SHF_LINK_ORDER sections.
Our code assumes all input sections in an output SHF_LINK_ORDER
section has SHF_LINK_ORDER flag. We do not check that and that can cause a crash.

That happens because we call 
std::stable_sort(Sections.begin(), Sections.end(), compareByFilePosition);, 
where compareByFilePosition predicate does not expect to see
null when calls getLinkOrderDep. 

The same might happen when sections refer to non-regular sections. 
Test cases demonstrate the issues, patch fixes them.

Differential revision: https://reviews.llvm.org/D44193

llvm-svn: 327006
2018-03-08 15:06:58 +00:00
..
COFF [COFF] Make the DOS stub a real DOS program 2018-03-08 14:27:28 +00:00
Driver/Inputs Remove the old ELF linker. 2016-02-28 00:10:58 +00:00
ELF [ELF] - Fix crash relative to SHF_LINK_ORDER sections. 2018-03-08 15:06:58 +00:00
MinGW [MinGW] Fix --{start,end}-group. 2018-03-01 20:38:38 +00:00
Unit [lit] Rename lld and clang lit configs to end in .py 2017-09-21 17:38:13 +00:00
darwin Replace -flavor {gnu,darwin} with ld64.lld or ld.lld. 2018-02-16 21:16:57 +00:00
mach-o [lit] Fix a problem with spaces in the python path by adding quotes around it 2018-02-21 00:03:41 +00:00
wasm [WebAssembly] Honor --allow-undefined even for explicit exports 2018-03-08 01:16:05 +00:00
CMakeLists.txt Add make targets for running all lld tests 2018-02-14 13:28:53 +00:00
lit.cfg.py [ELF] Add llvm-readelf to the lit tool substitutions 2018-02-27 22:01:02 +00:00
lit.site.cfg.py.in [lit] Rename lld and clang lit configs to end in .py 2017-09-21 17:38:13 +00:00