forked from OSchip/llvm-project
6883d882f1
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 |
||
---|---|---|
.. | ||
binding.elf | ||
broken-relaxation-x64.elf | ||
common-symbol-alignment.elf | ||
common-symbol-alignment2.elf | ||
data-encoding.a | ||
dynamic-section-sh_size.elf | ||
file-class.a | ||
invalid-e_shnum.elf | ||
mips-invalid-options-descriptor.elf | ||
multiple-eh-relocs.elf | ||
section-alignment-notpow2.elf | ||
section-index.elf | ||
symbol-index.elf | ||
symbol-name-offset.elf | ||
symtab-sh_info.elf | ||
symtab-sh_info2.elf | ||
symtab-sh_info3.elf | ||
tls-symbol.elf | ||
undefined-local-symbol-in-dso.so |