llvm-project/llvm/test/Object/Inputs
George Rimar 72f821d3de [llvm-readelf] - Rework how we parse the .dynamic section.
This is a result of what I found during my work on https://bugs.llvm.org/show_bug.cgi?id=41679.

Previously LLVM readelf took the information about .dynamic section
from its PT_DYNAMIC segment only. GNU tools have a bit different logic.
They also use the information from the .dynamic section header if it is available.
This patch changes the code to improve the compatibility with the GNU Binutils.

Differential revision: https://reviews.llvm.org/D61937

llvm-svn: 361165
2019-05-20 15:41:48 +00:00
..
COFF [COFF] Gracefully handle empty .drectve sections 2017-05-14 18:34:56 +00:00
ELF
WASM [WebAssembly] Check if the section order is correct 2018-12-15 00:58:12 +00:00
GNU.a
IsNAN.o
MacOSX.a
SVR4.a
absolute.elf-x86-64
archive-long-filenames-no-null-terminator.a Add a test for r331746. 2018-05-09 08:20:14 +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
coff-short-import-code
coff-short-import-data
coff_archive.lib
coff_archive_short.lib
common.coff-i386
corrupt-archive.a
corrupt-invalid-dynamic-table-offset.elf.x86-64
corrupt-invalid-dynamic-table-size.elf.x86-64 [llvm-readelf] - Rework how we parse the .dynamic section. 2019-05-20 15:41:48 +00:00
corrupt-invalid-dynamic-table-too-large.elf.x86-64
corrupt-invalid-phentsize.elf.x86-64
corrupt-invalid-relocation-size.elf.x86-64
corrupt-invalid-strtab.elf.x86-64 Recommit r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is." 2016-10-17 10:58:02 +00:00
corrupt-invalid-virtual-addr.elf.x86-64
corrupt-version.elf-x86_64
corrupt.elf-x86-64
darwin-m-test1.mach0-armv7
darwin-m-test2.macho-i386
darwin-m-test3.macho-x86-64 Limit dyld image suffixes guessed by guessLibraryShortName() 2019-01-24 20:59:44 +00:00
dext-test.elf-mips64r2
dyn-rel.so.elf-mips
dynamic-reloc.so
elf-mip64-reloc.o
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
invalid-bad-rel-type.elf
invalid-bad-section-address.coff
invalid-buffer.elf Make the ELFFile constructor private. 2017-10-10 22:17:49 +00:00
invalid-coff-header-too-small Fix buffer overflow. 2017-10-19 01:25:48 +00:00
invalid-e_shnum.elf Recommit r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is." 2016-10-17 10:58:02 +00:00
invalid-ext-symtab-index.elf-x86-64
invalid-phdr.elf Added phdr upper bound checks to ElfObject. 2017-10-05 20:01:32 +00:00
invalid-rel-sym.elf Add error handling to getEntry. 2016-11-03 18:05:33 +00:00
invalid-reloc.elf-x86-64 [obj2yaml] Produce correct output for invalid relocations. 2017-01-26 23:12:53 +00:00
invalid-relocation-sec-sh_offset.elf-i386
invalid-relocation-sec-sh_offset.elf-x86-64
invalid-section-index.elf
invalid-section-size.elf
invalid-section-size2.elf [Object/ELF] - Do not allow overflow when checking section size/offset. 2016-10-27 11:44:56 +00:00
invalid-sections-num.elf Recommit r285285 - [Object/ELF] - Fixed behavior when SectionHeaderTable->sh_size is too large. 2016-10-31 15:33:00 +00:00
invalid-sh_entsize.elf
invalid-strtab-non-null.elf
invalid-strtab-size.elf
invalid-strtab-type.elf
invalid-strtab-zero-size.elf [Object/ELF] - Do not crash if string table sh_size is equal to zero. 2016-10-27 11:41:57 +00:00
invalid-symbol-table-size.elf
invalid-xindex-size.elf
liblong_filenames.a
libsimple_archive.a
macho-archive-unsorted-x86_64.a
macho-archive-x86_64.a
macho-bad-archive1.a
macho-bad-archive2.a
macho-bitcode-marker-x86_64.o [Object] Fix reading objects created with -fembed-bitcode-marker 2019-03-21 21:01:31 +00:00
macho-bitcode-x86_64.o [Object] Fix reading objects created with -fembed-bitcode-marker 2019-03-21 21:01:31 +00:00
macho-data-in-code.macho-thumbv7
macho-empty-kext-bundle-x86-64
macho-hello-g.macho-x86_64
macho-invalid-bad-symbol-index
macho-invalid-bind-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-codesig-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-codesign-bad-size One more additional error check for invalid Mach-O files for a 2016-10-18 20:24:12 +00:00
macho-invalid-dataincode-bad-size
macho-invalid-dataincode-dataoff-datasize
macho-invalid-dataincode-more-than-one
macho-invalid-dyld-name_offset-toobig
macho-invalid-dyld-name_toobig
macho-invalid-dyld-small
macho-invalid-dyldinfo-bind_off-bind_size
macho-invalid-dyldinfo-export_off-export_size
macho-invalid-dyldinfo-lazy_bind_off-lazy_bind_size
macho-invalid-dyldinfo-more-than-one
macho-invalid-dyldinfo-rebase_off
macho-invalid-dyldinfo-rebase_off-rebase_size
macho-invalid-dyldinfo-small
macho-invalid-dyldinfo-weak_bind_off-weak_bind_size
macho-invalid-dyldinfoonly-bad-size
macho-invalid-dyldinfoonly-bind_off
macho-invalid-dyldinfoonly-export_off
macho-invalid-dyldinfoonly-lazy_bind_off
macho-invalid-dyldinfoonly-weak_bind_off
macho-invalid-dylib-cmdsize-past-eof [MachO] Prevent heap overflow when load command extends past EOF 2017-09-13 13:43:01 +00:00
macho-invalid-dylib-id-more-than-one
macho-invalid-dylib-name_offset-toobig
macho-invalid-dylib-name_offset-toosmall
macho-invalid-dylib-name_toobig
macho-invalid-dylib-no-id
macho-invalid-dylib-small
macho-invalid-dylib-wrong-filetype
macho-invalid-dylib_code_sign_drs-bad-size
macho-invalid-dysymtab-bad-size
macho-invalid-dysymtab-extrefsymoff
macho-invalid-dysymtab-extrefsymoff-nextrefsyms
macho-invalid-dysymtab-extreloff
macho-invalid-dysymtab-extreloff-nextrel
macho-invalid-dysymtab-indirectsymoff
macho-invalid-dysymtab-indirectsymoff-nindirectsyms
macho-invalid-dysymtab-locreloff
macho-invalid-dysymtab-locreloff-nlocrel
macho-invalid-dysymtab-modtaboff
macho-invalid-dysymtab-modtaboff-nmodtab
macho-invalid-dysymtab-more-than-one
macho-invalid-dysymtab-small
macho-invalid-dysymtab-tocoff
macho-invalid-dysymtab-tocoff-ntoc
macho-invalid-encrypt-bad-size
macho-invalid-encrypt-cryptoff
macho-invalid-encrypt-more-than-one
macho-invalid-encrypt64-bad-size
macho-invalid-encrypt64-cryptoff-cryptsize
macho-invalid-entry-bad-size
macho-invalid-entry-more-than-one
macho-invalid-export-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-extrefsyms-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-extreloff-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-fat
macho-invalid-fat-arch-badalign Add error checking for Mach-O universal files. 2016-11-28 22:40:50 +00:00
macho-invalid-fat-arch-bigalign Add error checking for Mach-O universal files. 2016-11-28 22:40:50 +00:00
macho-invalid-fat-arch-overlap Add error checking for Mach-O universal files. 2016-11-28 22:40:50 +00:00
macho-invalid-fat-arch-overlapheaders Add error checking for Mach-O universal files. 2016-11-28 22:40:50 +00:00
macho-invalid-fat-arch-size Add error checking for Mach-O universal files. 2016-11-28 22:40:50 +00:00
macho-invalid-fat-arch-twosame Add error checking for Mach-O universal files. 2016-11-28 22:40:50 +00:00
macho-invalid-fat-header Add error checking for Mach-O universal files. 2016-11-28 22:40:50 +00:00
macho-invalid-fat.obj.elf-x86_64
macho-invalid-fat_cputype nother additional error check for an invalid Mach-O file 2016-10-24 21:15:11 +00:00
macho-invalid-function_starts-dataoff
macho-invalid-fvmfile-obsolete Another additional error check for invalid Mach-O files for the 2016-10-27 20:59:10 +00:00
macho-invalid-header
macho-invalid-hints-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-ident-obsolete Another additional error check for invalid Mach-O files for the 2016-10-27 20:59:10 +00:00
macho-invalid-idfvmlib-obsolete Another additional error check for invalid Mach-O files for the 2016-10-27 20:59:10 +00:00
macho-invalid-indirectsyms-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-lazy_bind-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-linkopt-bad-count
macho-invalid-linkopt-bad-size
macho-invalid-linkopthint-dataoff
macho-invalid-linkopthint-small
macho-invalid-loadfvmlib-obsolete Another additional error check for invalid Mach-O files for the 2016-10-27 20:59:10 +00:00
macho-invalid-locreloff-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-modtab-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-no-size-for-sections
macho-invalid-note Add support for the new LC_NOTE load command. 2017-01-19 17:36:31 +00:00
macho-invalid-prebind_cksum-obsolete Another additional error check for invalid Mach-O files for the 2016-10-27 20:59:10 +00:00
macho-invalid-prebound_dylib-obsolete Another additional error check for invalid Mach-O files for the 2016-10-27 20:59:10 +00:00
macho-invalid-prepage-obsolete Another additional error check for invalid Mach-O files for the 2016-10-27 20:59:10 +00:00
macho-invalid-rebase-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-reloc-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-routines-bad-size Next set of additional error checks for invalid Mach-O files for the 2016-10-18 17:54:17 +00:00
macho-invalid-routines64-more-than-one Next set of additional error checks for invalid Mach-O files for the 2016-10-18 17:54:17 +00:00
macho-invalid-rpath-name_offset-toobig
macho-invalid-rpath-name_toobig
macho-invalid-rpath-small
macho-invalid-section-addr
macho-invalid-section-addr-size
macho-invalid-section-index-getSectionRawName
macho-invalid-section-offset
macho-invalid-section-offset-in-headers
macho-invalid-section-offset-size
macho-invalid-section-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-section-reloff
macho-invalid-section-reloff-nrelocs
macho-invalid-section-size-filesize
macho-invalid-segment-fileoff
macho-invalid-segment-filesize
macho-invalid-segment-vmsize
macho-invalid-source-bad-size
macho-invalid-source-more-than-one
macho-invalid-splitinfo-dataoff-datasize
macho-invalid-strtab-overlap More additional error checks for invalid Mach-O files when 2016-10-31 20:29:48 +00:00
macho-invalid-subclient-name_toobig Next set of additional error checks for invalid Mach-O files for the 2016-10-17 22:09:25 +00:00
macho-invalid-subframe-small Next set of additional error checks for invalid Mach-O files for the 2016-10-17 22:09:25 +00:00
macho-invalid-sublibrary-name_offset-toobig Next set of additional error checks for invalid Mach-O files for the 2016-10-17 22:09:25 +00:00
macho-invalid-subumbrella-offset-small Next set of additional error checks for invalid Mach-O files for the 2016-10-17 22:09:25 +00:00
macho-invalid-symbol-name-past-eof
macho-invalid-symseg-obsolete Another additional error check for invalid Mach-O files for the 2016-10-27 20:59:10 +00:00
macho-invalid-symtab-bad-size
macho-invalid-symtab-more-than-one
macho-invalid-symtab-overlap More additional error checks for invalid Mach-O files when 2016-10-31 20:29:48 +00:00
macho-invalid-symtab-small
macho-invalid-symtab-stroff
macho-invalid-symtab-stroff-strsize
macho-invalid-symtab-symoff
macho-invalid-symtab-symoff-nsyms
macho-invalid-thread-count-pastend Next set of additional error checks for invalid Mach-O files for the 2016-10-19 23:44:34 +00:00
macho-invalid-thread-count-wrong Next set of additional error checks for invalid Mach-O files for the 2016-10-19 23:44:34 +00:00
macho-invalid-thread-flavor-unknown Next set of additional error checks for invalid Mach-O files for the 2016-10-19 23:44:34 +00:00
macho-invalid-thread-state-pastend Next set of additional error checks for invalid Mach-O files for the 2016-10-19 23:44:34 +00:00
macho-invalid-thread-unknown-cputype Next set of additional error checks for invalid Mach-O files for the 2016-10-19 23:44:34 +00:00
macho-invalid-toc-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-too-small-load-command
macho-invalid-too-small-segment-load-command
macho-invalid-too-small-segment-load-command.1
macho-invalid-twolevelhints-bad-size Another additional error check for invalid Mach-O files for the 2016-10-20 20:10:30 +00:00
macho-invalid-twolevelhints-more-than-one Another additional error check for invalid Mach-O files for the 2016-10-20 20:10:30 +00:00
macho-invalid-twolevelhints-offset Another additional error check for invalid Mach-O files for the 2016-10-20 20:10:30 +00:00
macho-invalid-twolevelhints-offset-nhints Another additional error check for invalid Mach-O files for the 2016-10-20 20:10:30 +00:00
macho-invalid-unixthread-more-than-one Next set of additional error checks for invalid Mach-O files for the 2016-10-19 23:44:34 +00:00
macho-invalid-uuid-bad-size
macho-invalid-uuid-more-than-one
macho-invalid-vers-more-than-one
macho-invalid-vers-small
macho-invalid-weak_bind-overlap Add the rest of the additional error checks for invalid Mach-O files when 2016-11-02 21:08:39 +00:00
macho-invalid-zero-ncmds
macho-no-exports.dylib
macho-rpath-x86_64
macho-text-data-bss.macho-x86_64
macho-text-sections.macho-x86_64
macho-text.thumb
macho-toc64-archive-x86_64.a
macho-universal-archive-bad1.x86_64.i386
macho-universal-archive-bad2.x86_64.i386
macho-universal-archive.x86_64.i386
macho-universal-bad1.x86_64.i386
macho-universal-bad2.x86_64.i386
macho-universal.x86_64.i386
macho-universal64-archive.x86_64.i386
macho-universal64.x86_64.i386
macho-valid-0-nsyms
macho64-invalid-incomplete-load-command
macho64-invalid-incomplete-load-command.1
macho64-invalid-incomplete-segment-load-command
macho64-invalid-no-size-for-sections
macho64-invalid-too-small-load-command
macho64-invalid-too-small-load-command.1
macho64-invalid-too-small-segment-load-command
main-ret-zero-pe-i386.dll
main-ret-zero-pe-i386.exe
micro-mips.elf-mipsel
mri-crlf.mri
multi-module.ll Object: Make IRObjectFile own multiple modules and enumerate symbols from all modules. 2016-12-13 20:20:17 +00:00
no-section-header-string-table.elf-x86-64
no-section-table.so
no-sections.elf-x86-64
no-start-symbol.elf-x86_64
oddlen
openbsd-phdrs.elf-x86-64 [llvm-readobj] - Teach readobj to print PT_OPENBSD_BOOTDATA header 2016-12-06 17:55:52 +00:00
phdr-note.elf-x86-64 [Object] Fixup permissions of input files. 2017-01-16 23:28:58 +00:00
phdrs.elf-x86-64 [Object] Fixup permissions of input files. 2017-01-16 23:28:58 +00:00
pr25877.lib
program-headers.elf-i386
program-headers.elf-x86-64
program-headers.mips
program-headers.mips64
rel-no-sec-table.elf-x86-64 Recommit r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is." 2016-10-17 10:58:02 +00:00
relocatable-with-section-address.elf-x86-64
relocation-dynamic.elf-i386
relocation-relocatable.elf-i386
relocations.elf-x86-64
sectionGroup.elf.x86-64
shared-object-test.elf-i386
shared-object-test.elf-x86-64
shared.ll
shndx.elf
solaris-nosymbols.yaml Archives require a symbol table on Solaris, even if empty. 2017-03-14 19:57:13 +00:00
stackmap-test.macho-x86-64 [StackMaps] Update llvm-readobj to parse V3 Stackmaps 2019-04-13 03:55:13 +00:00
symtab-only.a
thin-path.a
thin.a
thumb-symbols.elf.arm
trivial-executable-test.macho-x86-64
trivial-label-test.elf-x86-64
trivial-object-test.coff-arm64 [test] Add test files that were missed from SVN r317459 2017-11-06 07:36:17 +00:00
trivial-object-test.coff-armnt [test] Add test files that were missed from SVN r317459 2017-11-06 07:36:17 +00:00
trivial-object-test.coff-i386
trivial-object-test.coff-x86-64
trivial-object-test.elf-avr
trivial-object-test.elf-hexagon
trivial-object-test.elf-i386
trivial-object-test.elf-mips64el
trivial-object-test.elf-mipsel
trivial-object-test.elf-x86-64
trivial-object-test.macho-arm64_32 AArch64: support binutils-like things on arm64_32. 2019-05-14 11:25:44 +00:00
trivial-object-test.macho-i386
trivial-object-test.macho-x86-64
trivial-object-test.wasm [WebAssembly] Store section alignment as a power of 2 2019-01-16 01:34:48 +00:00
trivial-object-test2.elf-x86-64
trivial-object-test2.macho-x86-64
trivial.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
unwind-section.elf-x86-64
very_long_bytecode_file_name.bc
weak-global-symbol.macho-i386
weak.elf-x86-64
xpg4.a