llvm-project/llvm/test/tools/llvm-readobj
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
..
AArch64 llvm-readobj: Try the DWARF CFI dumper on all machines. 2019-02-28 22:42:55 +00:00
ARM [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
Inputs [Object][XCOFF] Add an XCOFF dumper for llvm-readobj. 2019-05-03 12:57:07 +00:00
all.test [llvm-readelf] Make llvm-readelf more compatible with GNU readelf. 2018-11-12 18:02:38 +00:00
amdgpu-elf-definitions.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
archive.test [llvm-readobj]Fix error messages for bad archive members and add testing for archive handling 2019-02-27 11:07:08 +00:00
arm64-many-epilogs.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
arm64-win-error1.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
arm64-win-error2.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
arm64-win-error3.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
basic.test [llvm-readobj] Reapply: Improve error message for --string-dump 2019-04-15 11:17:48 +00:00
bigobj.test
broken-group.test [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
codeview-inlinees.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-inlining.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-label.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-linetables.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-merging-anon.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-merging-cycle.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-merging-ghash.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-merging-unsorted.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-merging.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-types.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
codeview-vftable.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-arm-baserelocs.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-basereloc.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-const-import.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-debug-directory.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-directives.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-exports-implib.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-exports.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-file-sections-reading.test [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
coff-load-config.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-needed-libs.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-non-null-terminated-file.test [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
coff-resources.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
coff-zero-string-table.test [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
cxx-cli-aux.test [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
demangle.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
dyn-symbols.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
dynamic.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-dtflags.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-dynamic-empty.test [llvm-readobj]Add additional testing for various ELF features 2019-02-27 16:41:59 +00:00
elf-dynamic-malformed.test [llvm-readobj] Reapply: Improve error message for --string-dump 2019-04-15 11:17:48 +00:00
elf-dynamic-no-pt-dynamic.test [llvm-readobj]Add additional testing for various ELF features 2019-02-27 16:41:59 +00:00
elf-dynamic-not-in-pt-dynamic.test [llvm-readelf] - Rework how we parse the .dynamic section. 2019-05-20 15:41:48 +00:00
elf-dynamic-table-dtnull.s [llvm-readobj] - Fix the invalid dumping of the dynamic sections without terminating DT_NULL entry. 2019-02-28 08:15:59 +00:00
elf-dynamic-tags-machine-specific.test [ELF] Fix GCC8 warnings about "fall through", NFCI 2019-03-13 10:38:17 +00:00
elf-dynamic-tags.test [llvm-readobj] Dump DT_USED value as string like GNU readelf does 2019-03-07 14:53:10 +00:00
elf-gnuhash.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-groups.test [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
elf-hash-histogram.test [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
elf-hidden-versym.test [llvm-readobj] - Fix 2 test cases. 2019-04-03 15:11:19 +00:00
elf-invalid-versioning.test [llvm-readobj] - Fix 2 test cases. 2019-04-03 15:11:19 +00:00
elf-linker-options.ll [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-machine-specific-section-types.test [llvm-readobj]Add testing for ELF symbol and section table printing for a wider range of values 2019-02-21 12:47:10 +00:00
elf-malformed-pt-dynamic.test [llvm-readelf] - Rework how we parse the .dynamic section. 2019-05-20 15:41:48 +00:00
elf-no-phdrs.test [llvm-readobj]Add additional testing for various ELF features 2019-02-27 16:41:59 +00:00
elf-no-relocs.test [llvm-readobj]Add additional testing for various ELF features 2019-02-27 16:41:59 +00:00
elf-no-shdrs.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-non-dynamic-in-pt-dynamic.test [llvm-readelf] - Rework how we parse the .dynamic section. 2019-05-20 15:41:48 +00:00
elf-packed-relocs-empty.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-packed-relocs-error1.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-packed-relocs-error2.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-packed-relocs-error3.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-packed-relocs-error4.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-packed-relocs-error5.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-packed-relocs.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-reloc-negative-addend-no-sym.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-reloc-symbol-with-versioning.test [llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests 2019-04-27 16:12:14 +00:00
elf-reloc-zero-name-or-value.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-relr-relocs.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-sec-compressed.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-sec-flags.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
elf-section-types.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-symbol-64bit.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-symbol-binding.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-symbol-shndx.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-symbol-types.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-symbol-visibility.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-types.test [llvm-readobj]Add additional testing for various ELF features 2019-02-27 16:41:59 +00:00
elf-versioninfo.test [llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests 2019-04-27 16:12:14 +00:00
file-headers.test
gnu-file-headers.test [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
gnu-hash-symbols.test [yaml2obj/obj2yaml] - Move `Info` field out from `Section` class. 2019-02-12 09:08:59 +00:00
gnu-note-size.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
gnu-notes.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
gnu-phdrs.test [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
gnu-relocations.test [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
gnu-section-mapping-no-phdrs.test [llvm-readelf]Test a couple of corner-cases for --section-mapping 2019-02-20 17:21:38 +00:00
gnu-section-mapping-no-shdrs.test [llvm-readelf]Test a couple of corner-cases for --section-mapping 2019-02-20 17:21:38 +00:00
gnu-sections.test [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
gnu-symbols.test [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
headers.test [llvm-readelf] Add -e/--headers support to readobj/elf 2018-12-11 16:15:03 +00:00
hexdump.test [llvm-readelf] Allow prefix flags for -p and -x 2019-03-29 16:43:13 +00:00
imports.test
macho-needed-libs.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
macho-universal-x86_64.i386.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
many-sections.s [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
many-sections2.s [llvm-readelf] Correctly dump symbols whose section id is SHN_XINDEX 2019-04-15 11:21:47 +00:00
merged.test [CommandLine] Enable Grouping for short options by default. Part 4 of 5 2019-05-03 18:56:25 +00:00
mips-abiflags.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-got-overlapped.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-got.test [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC 2019-05-01 05:55:22 +00:00
mips-options-sec.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-options.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-plt.test Fix test/tools/llvm-readobj/mips-plt.test 2019-05-01 06:46:34 +00:00
mips-reginfo.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-rld-map-rel.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
mips-st-other.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
note-generic.s [llvm-readobj] Add some generic notes (e.g. NT_VERSION) 2019-03-29 16:48:19 +00:00
note-gnu-property.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
note-gnu-property2.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
note-unknown.s [llvm-readobj] Fix formatting of unknown note types 2019-03-28 23:08:06 +00:00
peplus.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
ppc64-glink.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
print-hex.test [WebAssembly] Update test cases after FixFunctionBitcasts 2018-11-07 01:58:50 +00:00
print-section.test [llvm-readobj] Generic -string-dump option 2018-07-18 18:00:41 +00:00
program-headers.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
readelf-s-alias.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
reloc-types.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
relocations.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
res-resources.test
rpath.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
sections-ext.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
sections.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
string-dump.test [llvm-readobj] Reapply: Improve error message for --string-dump 2019-04-15 11:17:48 +00:00
symbols.test [WebAssembly] Update test output after rL353474. NFC. 2019-02-07 22:33:50 +00:00
thin-archive-paths.test [llvm-readobj] Reapply: Improve error message for --string-dump 2019-04-15 11:17:48 +00:00
thin-archive.test [llvm-readobj] Reapply: Improve error message for --string-dump 2019-04-15 11:17:48 +00:00
unwind-arm64-windows.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
unwind.test [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
wasm-imports.test [WebAssembly] Support EXPLICIT_NAME symbols in llvm-readobj 2019-04-30 19:30:24 +00:00
wasm-invalid.test [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
xcoff-basic.test [Object][XCOFF] Add an XCOFF dumper for llvm-readobj. 2019-05-03 12:57:07 +00:00