llvm-project/lld/test/ELF/invalid/Inputs
Shoaib Meenai 6883d882f1 [ELF] Fix crash on invalid undefined local symbols
r320770 made LLD handle invalid DSOs where local symbols were found in
the global part of the symbol table. Unfortunately, it didn't handle the
case where those local symbols were also undefined, and r326242 exposed
an assertion failure in that case. Just warn on that case instead of
crashing, by moving the local binding check before the undefined symbol
addition.

The input file for the test is crafted by hand, since I don't know of
any tool that would produce such a broken DSO. I also don't understand
what it even means for a symbol to be undefined but have STB_LOCAL
binding - I don't think that combination makes any sense - but we have
found broken DSOs of this nature that we were linking against. I've
included detailed instructions on how to produce the DSO in the test.

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

llvm-svn: 343745
2018-10-03 23:53:11 +00:00
..
binding.elf
broken-relaxation-x64.elf [ELF] - Use error() instead of fatal() during relaxation of R_X86_64_GOTTPOFF 2016-12-22 11:05:05 +00:00
common-symbol-alignment.elf
common-symbol-alignment2.elf Recommit r283733 "[ELF] - Do not crash if common symbol alignment set to value greater than UINT32_MAX. 2016-10-10 10:31:03 +00:00
data-encoding.a
dynamic-section-sh_size.elf [ELF] - Do not crash on invalid size of dynamic section. 2016-10-07 09:01:04 +00:00
file-class.a
invalid-e_shnum.elf [ELF] - Added testcase relative to D25090. 2016-10-17 11:15:12 +00:00
mips-invalid-options-descriptor.elf [ELF] - Do not hang if broken object has option descriptor in .MIPS.options with size of zero. 2016-10-04 10:23:07 +00:00
multiple-eh-relocs.elf
section-alignment-notpow2.elf [ELF] - Check that section alignment is a power of 2. 2016-10-07 12:27:45 +00:00
section-index.elf
symbol-index.elf [ELF] - Removed "invalid-" prefix from testcase. NFC. 2016-10-04 11:51:38 +00:00
symbol-name-offset.elf
symtab-sh_info.elf
symtab-sh_info2.elf [ELF] - Fixed assert fail when symbol table has zero sh_info value. 2016-10-07 15:16:27 +00:00
symtab-sh_info3.elf [ELF] - Fixed assertion fail when symbol table has invalid sh_info value. 2016-10-11 09:07:14 +00:00
tls-symbol.elf [ELF] - Do not crash if symbol type set to TLS when there is no tls sections. 2016-10-04 08:52:51 +00:00
undefined-local-symbol-in-dso.so [ELF] Fix crash on invalid undefined local symbols 2018-10-03 23:53:11 +00:00