llvm-project/llvm/test/Object/Inputs
Kevin Enderby 42398051d8 Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary
and its clients to use the new llvm::Error model for error handling.

Changed getAsArchive() from ErrorOr<...> to Expected<...> so now all
interfaces there use the new llvm::Error model for return values.

In the two places it had if (!Parent) this is actually a program error so changed
from returning errorCodeToError(object_error::parse_failed) to calling
report_fatal_error() with a message.

In getObjectForArch() added error messages to its two llvm::Error return values
instead of returning errorCodeToError(object_error::arch_not_found) with no
error message.

For the llvm-obdump, llvm-nm and llvm-size clients since the only binary files in
Mach-O Universal Binaries that are supported are Mach-O files or archives with
Mach-O objects, updated their logic to generate an error when a slice contains
something like an ELF binary instead of ignoring it. And added a test case for
that.

The last error stuff to be cleaned up for libObject’s MachOUniversalBinary is
the use of errorOrToExpected(Archive::create(ObjBuffer)) which needs
Archive::create() to be changed from ErrorOr<...> to Expected<...> first,
which I’ll work on next. 

llvm-svn: 274079
2016-06-28 23:16:13 +00:00
..
COFF [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
ELF
GNU.a
IsNAN.o
MacOSX.a
SVR4.a
absolute.elf-x86-64 Add a test for printing absolute symbols in ELF. 2014-02-05 04:36:47 +00:00
archive-test.a-coff-i386
archive-test.a-corrupt-symbol-table
archive-test.a-empty
archive-test.a-gnu-minimal
archive-test.a-gnu-no-symtab
archive-test.a-irix6-mips64el [Object] Support reading 64-bit MIPS ELF archives 2015-02-17 18:54:22 +00:00
coff-short-import-code Re-apply r246276 - Object: Teach llvm-ar to create symbol table for COFF short import files 2015-08-28 07:40:30 +00:00
coff-short-import-data Re-apply r246276 - Object: Teach llvm-ar to create symbol table for COFF short import files 2015-08-28 07:40:30 +00:00
coff_archive.lib
coff_archive_short.lib
common.coff-i386
corrupt-archive.a Fix pr17056. 2014-06-16 16:41:00 +00:00
corrupt-invalid-dynamic-table-offset.elf.x86-64 Add dynamic_table iterators back to ELF.h. 2015-08-07 15:25:20 +00:00
corrupt-invalid-dynamic-table-size.elf.x86-64 Simplify iterating over the dynamic section and report broken ones. 2015-07-20 21:23:29 +00:00
corrupt-invalid-dynamic-table-too-large.elf.x86-64 add missing tests files 2015-08-07 15:35:49 +00:00
corrupt-invalid-phentsize.elf.x86-64 Simplify iterating over program headers and detect corrupt ones. 2015-07-20 13:35:33 +00:00
corrupt-invalid-relocation-size.elf.x86-64 Remove Elf_Rela_Iter and Elf_Rel_Iter. 2015-07-20 20:07:50 +00:00
corrupt-invalid-strtab.elf.x86-64 llvm-readobj: Handle invalid references to the string table. 2015-07-20 03:38:17 +00:00
corrupt-invalid-virtual-addr.elf.x86-64 This reverts commit r260488 and r260489. 2016-02-16 14:17:48 +00:00
corrupt-version.elf-x86_64
corrupt.elf-x86-64
darwin-m-test1.mach0-armv7 Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output. 2014-06-05 21:21:57 +00:00
darwin-m-test2.macho-i386 Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output. 2014-06-05 21:21:57 +00:00
darwin-m-test3.macho-x86-64 Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output. 2014-06-05 21:21:57 +00:00
dext-test.elf-mips64r2
dyn-rel.so.elf-mips [llvm-readobj][ELF] Teach llvm-readobj to show dynamic relocation in REL format 2016-01-16 22:40:09 +00:00
dynamic-reloc.so Add a testcase that would have found the bug in r263971. 2016-03-21 21:09:38 +00:00
elf-mip64-reloc.o Fix handling of ELF::R_MIPS_32 on Mips64. 2015-07-06 12:18:44 +00:00
elf-reloc-no-sym.x86_64
elf-versioning-test.i386
elf-versioning-test.x86_64
elfver.S
elfver.script
evenlen
hello-world.elf-x86-64
hello-world.macho-x86_64 Add "-format darwin" to llvm-size to be like darwin's size(1) -m output, and 2014-06-17 17:54:13 +00:00
invalid-bad-rel-type.elf Improve error handling of getRelocationAddend. 2015-06-19 20:58:43 +00:00
invalid-bad-section-address.coff Check that COFF .obj files have sections with zero virtual address spaces. 2015-07-06 14:26:07 +00:00
invalid-section-index.elf Add a test of an elf file with an invalid section index. 2015-06-30 18:23:07 +00:00
invalid-section-size.elf Remove Elf_Shdr_Iter. Diagnose files with invalid section header sizes. 2015-06-30 19:58:10 +00:00
invalid-sh_entsize.elf Change how readobj stores info about dynamic symbols. 2016-02-17 15:38:21 +00:00
invalid-strtab-non-null.elf Add a testcase for an invalid file. 2015-06-29 14:12:14 +00:00
invalid-strtab-size.elf Factor out the checking of string tables. 2015-06-29 14:39:25 +00:00
invalid-strtab-type.elf Convert an assert that can fail into error checking. 2015-06-29 14:02:24 +00:00
invalid-symbol-table-size.elf Refactor duplicated code and check for invalid symbol table size. 2015-07-23 03:24:22 +00:00
invalid-xindex-size.elf Report an error if a SHT_SYMTAB_SHNDX section has the wrong size. 2015-08-24 21:09:41 +00:00
liblong_filenames.a
libsimple_archive.a
macho-archive-unsorted-x86_64.a Object, support both mach-o archive t.o.c file names 2014-11-12 01:37:45 +00:00
macho-archive-x86_64.a Add "-format darwin" to llvm-size to be like darwin's size(1) -m output, and 2014-06-17 17:54:13 +00:00
macho-bad-archive1.a Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-17 17:10:12 +00:00
macho-bad-archive2.a Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-17 17:10:12 +00:00
macho-data-in-code.macho-thumbv7
macho-empty-kext-bundle-x86-64 Object: Test for reading kext bundles 2015-02-27 18:58:23 +00:00
macho-hello-g.macho-x86_64 Add printing of Mach-O stabs in llvm-nm. 2014-07-17 22:47:16 +00:00
macho-invalid-bad-symbol-index Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho-invalid-fat Change all but the last ErrorOr<...> use for MachOUniversalBinary to Expected<...> to 2016-06-27 21:39:39 +00:00
macho-invalid-fat.obj.elf-x86_64 Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary 2016-06-28 23:16:13 +00:00
macho-invalid-header [Object, MachO] Don't crash on parsing invalid MachO header. 2015-06-04 19:45:22 +00:00
macho-invalid-no-size-for-sections Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho-invalid-section-index-getSectionRawName Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho-invalid-symbol-name-past-eof Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho-invalid-too-small-load-command Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho-invalid-too-small-segment-load-command Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho-invalid-too-small-segment-load-command.1 Clean up the specific error message for a malformed Mach-O files with bad segment 2016-05-05 17:43:35 +00:00
macho-invalid-zero-ncmds Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho-no-exports.dylib [Object] Don't crash on empty export lists. 2014-12-19 02:31:01 +00:00
macho-rpath-x86_64 Add missing test file 2014-12-04 09:20:13 +00:00
macho-text-data-bss.macho-x86_64 Implement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS 2014-05-19 20:36:02 +00:00
macho-text-sections.macho-x86_64
macho-text.thumb
macho-toc64-archive-x86_64.a Add support for Darwin’s static library table of contents with 64-bit offsets to the archive members. 2016-06-17 22:16:06 +00:00
macho-universal-archive-bad1.x86_64.i386 Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-31 20:35:34 +00:00
macho-universal-archive-bad2.x86_64.i386 Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-31 20:35:34 +00:00
macho-universal-archive.x86_64.i386 Teach llvm-nm to know about fat archives (aka MachOUniversal files 2014-05-14 21:18:50 +00:00
macho-universal-bad1.x86_64.i386 Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-31 20:35:34 +00:00
macho-universal-bad2.x86_64.i386 Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-31 20:35:34 +00:00
macho-universal.x86_64.i386
macho-universal64-archive.x86_64.i386 Forgot to svn add one of my test files for the change in r273207. 2016-06-20 22:27:49 +00:00
macho-universal64.x86_64.i386 Add support for Darwin’s 64-bit universal files with 64-bit offsets and sizes for the objects. 2016-06-20 22:16:18 +00:00
macho-valid-0-nsyms Fix the code that leads to the incorrect trigger of the report_fatal_error() 2016-01-22 22:49:55 +00:00
macho64-invalid-incomplete-load-command Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho64-invalid-incomplete-load-command.1 Produce another specific error message for a malformed Mach-O file when a load 2016-05-03 17:16:08 +00:00
macho64-invalid-incomplete-segment-load-command [Object, MachO] Don't crash on incomplete MachO segment load commands. 2015-06-04 22:26:44 +00:00
macho64-invalid-no-size-for-sections Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho64-invalid-too-small-load-command Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
macho64-invalid-too-small-load-command.1 Produce another specific error message for a malformed Mach-O file when a load 2016-05-03 23:13:50 +00:00
macho64-invalid-too-small-segment-load-command Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files. 2015-01-15 22:52:38 +00:00
main-ret-zero-pe-i386.dll [COFF] Return symbol VAs instead of RVAs for PE files 2015-07-31 16:14:22 +00:00
main-ret-zero-pe-i386.exe [COFF] Return symbol VAs instead of RVAs for PE files 2015-07-31 16:14:22 +00:00
micro-mips.elf-mipsel [Object][Mips] Return address of MIPS symbol with cleared microMIPS indicator bit 2014-11-25 05:57:55 +00:00
mri-crlf.mri Add CRLF support to LineIterator. 2014-11-03 14:09:47 +00:00
no-section-header-string-table.elf-x86-64 [Object][ELF] Handle files with no section header string table. 2015-07-21 21:40:33 +00:00
no-section-table.so [Object][ELF] Support dumping hash-tables from files with no section table. 2015-07-09 22:32:24 +00:00
no-sections.elf-x86-64 objdump: Add test for ELF file with no section table 2014-06-30 20:03:02 +00:00
no-start-symbol.elf-x86_64 Disassemble the start of sections even if there is no symbol there. 2015-06-04 15:01:05 +00:00
oddlen
pr25877.lib Handle archives with paths in the names. 2015-12-18 16:07:17 +00:00
program-headers.elf-i386
program-headers.elf-x86-64
program-headers.mips [llvm-readobj] Teach llvm-readobj to print PT_MIPS_ABIFLAGS program header 2015-05-15 15:59:22 +00:00
program-headers.mips64 [ELF][Mips] Fix recognition of MIPS 64-bit arch in the ELFObjectFile:getArch() method. 2014-06-27 11:36:45 +00:00
rel-no-sec-table.elf-x86-64 Support printing relocations in files with no section table. 2015-07-23 09:11:05 +00:00
relocatable-with-section-address.elf-x86-64 Revert "Fix a nomenclature error in llvm-nm." 2014-04-03 00:19:35 +00:00
relocation-dynamic.elf-i386 Implement getRelocationAddress for MachO and ET_REL elf files. 2014-04-03 23:54:35 +00:00
relocation-relocatable.elf-i386 Implement getRelocationAddress for MachO and ET_REL elf files. 2014-04-03 23:54:35 +00:00
relocations.elf-x86-64
sectionGroup.elf.x86-64 [obj2yaml/yaml2obj] Add SHT_GROUP support. 2015-02-21 04:28:26 +00:00
shared-object-test.elf-i386
shared-object-test.elf-x86-64
shared.ll
shndx.elf Add a test showing that objdump (and so ObjectFIle) can handle shndx. 2015-08-10 21:00:15 +00:00
stackmap-test.macho-x86-64 [Stackmap] Pre-assemble the stackmap parser test case. (Fix builders). 2015-06-27 03:49:25 +00:00
symtab-only.a Don't reject an archive with just a symbol table. 2015-07-08 22:27:54 +00:00
thin-path.a Add missing file. 2015-07-13 23:14:26 +00:00
thin.a Start adding thin archive support. 2014-12-16 01:43:41 +00:00
thumb-symbols.elf.arm Only clear the thumb bit from function addresses. 2014-04-03 02:20:43 +00:00
trivial-executable-test.macho-x86-64
trivial-label-test.elf-x86-64 Fix an off-by-one bug in the target independent llvm-objdump. 2014-08-17 16:31:39 +00:00
trivial-object-test.coff-i386
trivial-object-test.coff-x86-64 obj2yaml: Use the correct relocation type for different machine types 2014-04-07 23:12:20 +00:00
trivial-object-test.elf-avr [AVR] Add ELF constants to headers 2015-10-23 06:05:55 +00:00
trivial-object-test.elf-hexagon
trivial-object-test.elf-i386
trivial-object-test.elf-mips64el
trivial-object-test.elf-mipsel [Mips] Support SHT_MIPS_ABIFLAGS section type flag in the llvm-readobj, 2014-07-13 15:28:54 +00:00
trivial-object-test.elf-x86-64
trivial-object-test.macho-i386
trivial-object-test.macho-x86-64
trivial-object-test2.elf-x86-64
trivial-object-test2.macho-x86-64 Add missing file from previous commit. 2015-07-09 15:58:22 +00:00
trivial.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
unwind-section.elf-x86-64 [ELFYAML] Group ELF section type flags to target specific blocks. 2014-07-12 18:25:08 +00:00
very_long_bytecode_file_name.bc
weak-global-symbol.macho-i386
weak.elf-x86-64
xpg4.a