llvm-project/lld/test/ELF/invalid
James Henderson a20168d030 [Archive] Don't throw away errors for malformed archive members
When adding an archive member with a problem, e.g. a new bitcode with an
old archiver, containing an unsupported attribute, or an ELF file with a
malformed symbol table, the archiver would throw away the error and
simply add the member to the archive without any symbol entries. This
meant that the resultant archive could be silently unusable when not
using --whole-archive, and result in unexpected undefined symbols.

This change fixes this issue by addressing two FIXMEs and only throwing
away not-an-object errors. However, this meant that some LLD tests which
didn't need symbol tables and were using invalid members deliberately to
test the linker's malformed input handling no longer worked, so this
patch also stops the archiver from looking for symbols in an object if
it doesn't require a symbol table, and updates the tests accordingly.

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

Reviewed by: grimar, rupprecht, MaskRay
2020-10-01 14:03:34 +01:00
..
bad-arm-attributes.s
bad-reloc-target.test
broken-relaxation-x64.test
comdat-broken.test
common-symbol-alignment.test
data-encoding.test [Archive] Don't throw away errors for malformed archive members 2020-10-01 14:03:34 +01:00
dynamic-section-broken.test
eh-frame-hdr-no-out.s
ehframe-broken-relocation.test
entsize.yaml
executable.s
invalid-binding.test
invalid-debug-relocations.test [ELF] Enforce two dashes for Flag options not supported by GNU ld (i.e. no compatibility burden) 2020-05-15 11:07:25 -07:00
invalid-e_shnum.test [LLD][ELF] - Update test after yaml2obj change. NFC. 2020-07-15 13:00:48 +03:00
invalid-elf.test
invalid-file-class.test [Archive] Don't throw away errors for malformed archive members 2020-10-01 14:03:34 +01:00
invalid-relocation-aarch64.test
invalid-relocation-x64.test
invalid-soname.test
linkorder-invalid-sec.test
merge-invalid-size.s
merge-writable.s
merge-zero-size.test
mips-invalid-options-descriptor.test
multiple-relocations-sections.test
non-terminated-string.test
section-alignment.test [LLD][ELF] - Fix section-alignment.test after yaml2obj change. 2020-05-15 12:00:37 +03:00
section-alignment2.s
section-index.test
sht-group-wrong-section.test
sht-group.test
symbol-name.test
symtab-sh-info-dup.test [ELF] Refactor ObjFile<ELFT>::initializeSymbols to enforce the invariant: InputFile::symbols has non null entry 2020-06-19 09:05:37 -07:00
symtab-sh-info.s [ELF] Refactor ObjFile<ELFT>::initializeSymbols to enforce the invariant: InputFile::symbols has non null entry 2020-06-19 09:05:37 -07:00
symtab-symbols.test
tls-symbol.s
undefined-local-symbol-in-dso.test
verdef-no-symtab.test
verneed-shared.test [ELF] Allow misaligned SHT_GNU_verneed 2020-05-26 11:18:19 -07:00
x86-64-tlsdesc-gd.s