llvm-project/llvm/test/Object
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
..
AArch64 [obj2yaml] - SHT_DYNAMIC and SHT_REL* sections: stop dumping sh_entsize field when it has the default value. 2020-03-19 17:25:53 +03:00
AMDGPU [Object] Change ELFObjectFile<ELFT>::getFileFormatName() to use BFD names 2020-03-16 07:42:04 -07:00
ARM [test] llvm/test/: change llvm-objdump single-dash long options to double-dash options 2020-03-15 17:46:23 -07:00
Inputs [llvm-readobj] - Refine program headers testing (`-l`, `--program-headers` and `--segment`). 2020-08-11 16:38:11 +03:00
Lanai [lib/ObjectYAML] - Make `ELFYAML::Relocation::Offset` optional. 2020-03-06 13:59:58 +03:00
Mips [Object/yaml2obj/obj2yaml][test] - Split, cleanup and move MIPS abi-flags.yaml test. NFCI. 2020-09-25 12:04:55 +03:00
RISCV [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
X86 [yaml2obj] - Stop using square brackets for unique suffixes. 2020-05-19 12:59:13 +03:00
ar-create.test [llvm-ar] Update error messages and tests as per latest preferred style 2020-06-05 10:37:26 -07:00
ar-error.test
archive-darwin-duplicates.test
archive-delete.test
archive-error-tmp.txt
archive-extract-dir.test
archive-extract.test
archive-format.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
archive-long-filenames-no-null-terminator.test
archive-long-index.test
archive-malformed-object.test [Archive] Don't throw away errors for malformed archive members 2020-10-01 14:03:34 +01:00
archive-move.test
archive-pad.test
archive-replace-pos.test
archive-symtab.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
archive-thin-create.test [llvm-ar] Implement the O modifier: display member offsets inside the archive 2019-10-17 11:34:29 +00:00
archive-thin-paths.test
archive-thin-read.test
archive-toc.test [llvm-ar] Implement the O modifier: display member offsets inside the archive 2019-10-17 11:34:29 +00:00
archive-unknown-filetype.test [Archive] Don't throw away errors for malformed archive members 2020-10-01 14:03:34 +01:00
archive-update.test
check_binary_output.ll
coff-archive-short.test
coff-archive.test
coff-empty-drectve.test
coff-invalid.test Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""" 2020-02-13 10:16:06 -08:00
coff-weak-externals.test
directory.ll
dllimport-globalref.ll
dllimport.ll
dyn-rel-relocation.test
dynamic-reloc.test [llvm-objdump] Print file format in lowercase to match GNU output. 2020-02-12 08:17:01 -08:00
elf-unknown-type.test
invalid-alignment.test [Object] Change ELFObjectFile<ELFT>::getFileFormatName() to use BFD names 2020-03-16 07:42:04 -07:00
invalid.test [llvm-readobj/elf] - Refine the warning about the broken PT_DYNAMIC segment. 2020-08-17 14:57:19 +03:00
kext.test
macho-invalid.test [test] llvm/test/: change llvm-objdump single-dash long options to double-dash options 2020-03-15 17:46:23 -07:00
mangle-ir.ll
multi-module.ll
multiple-sections.yaml [llvm-readobj] set --elf-cg-profile as alias of --cg-profile 2020-06-17 11:24:45 -07:00
nm-archive.test
nm-bitcode.test
nm-darwin-m.test
nm-error.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
nm-irix6.test
nm-pe-image.test
nm-shared-object.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
nm-tapi-invalids.test [llvm][llvm-nm] add TextAPI/MachO support 2020-06-11 18:54:16 -07:00
nm-tapi.test [llvm][llvm-nm] add TextAPI/MachO support 2020-06-11 18:54:16 -07:00
nm-trivial-object.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
nm-universal-binary.test
nm-weak-global-macho.test
obj2yaml.test [obj2yaml] - Fix the issue with dumping empty sections when dumping program headers. 2020-04-22 12:36:00 +03:00
objc-imageinfo-coff.ll
objc-imageinfo-elf.ll
objc-imageinfo-macho.ll
objc-swift-mixed-imageinfo-macho.ll Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode 2020-03-11 13:26:06 -07:00
objdump-export-list.test [test] llvm/test/: change llvm-objdump single-dash long options to double-dash options 2020-03-15 17:46:23 -07:00
objdump-no-sectionheaders.test
objdump-private-headers.test
objdump-relocations.test [test] llvm/test/: change llvm-objdump single-dash long options to double-dash options 2020-03-15 17:46:23 -07:00
objdump-section-content.test [test] llvm/test/: change llvm-objdump single-dash long options to double-dash options 2020-03-15 17:46:23 -07:00
objdump-sectionheaders.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
objdump-symbol-table.test [test] llvm/test/: change llvm-objdump single-dash long options to double-dash options 2020-03-15 17:46:23 -07:00
pr25877.test
relocation-executable.test
simple-archive.test
size-trivial-macho.test
stackmap-dump.test
wasm-bad-metadata-version.yaml
wasm-duplicate-name.test [WebAssembly] Allow multivalue signatures in object files 2019-10-18 20:27:30 +00:00
wasm-invalid-file.yaml Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""" 2020-02-13 10:16:06 -08:00
wasm-invalid-section-order.test
wasm-invalid-start.test
wasm-missing-version.test
wasm-relocs-and-producers.yaml [WebAssembly] Allow multivalue signatures in object files 2019-10-18 20:27:30 +00:00
wasm-string-outside-section.test Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""" 2020-02-13 10:16:06 -08:00
yaml2obj-elf-rel-noref.yaml
yaml2obj-elf-rel.yaml
yaml2obj-readobj.test