llvm-project/llvm/test/tools/llvm-readobj/ELF
Jayson Yan 1f35d7b5de [llvm-readobj] Add JSONScopedPrinter to llvm-readelf
Adds JSONScopedPrinter to llvm-readelf. It includes an empty
JSONELFDumper class which will be used to override any LLVMELFDumper
methods which utilize startLine() which JSONScopedPrinter cannot
provide.

This introduces a change where calls to llvm-readelf with non-ELF object
files that specify --elf-output-style=GNU will now print file summary
information where it previously didn't.

Fixes previous Windows test failure which occured due to JSON escaping
of '\' by not relying on LIT substitution.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D114225
2021-12-10 23:34:27 +00:00
..
AArch64
ARM [ARM] Implement PAC return address signing mechanism for PACBTI-M 2021-12-07 10:15:19 +00:00
Inputs [llvm-readelf/obj][test] - Stop using precompiled binary in mips-plt.test 2020-10-09 11:48:49 +03:00
MSP430 [llvm-readobj] Support dumping of MSP430 ELF attributes 2021-09-28 00:56:11 +03:00
RISCV [llvm-objdump/llvm-readobj/obj2yaml/yaml2obj] Support STO_RISCV_VARIANT_CC and DT_RISCV_VARIANT_CC 2021-09-29 16:56:52 -07:00
aarch64-symbols-stother.test [llvm-readobj/elf] - AArch64: Handle AARCH64_VARIANT_PCS for GNUStyle 2020-12-17 11:09:53 -03:00
addrsig.test [llvm-readelf] - Implement --addrsig option. 2020-10-07 16:45:30 +03:00
all.test [yaml2obj/obj2yaml] - Improve dumping/creating of ELF versioning sections. 2021-01-21 10:36:48 +03:00
amdgpu-elf-headers.test [AMDGPU] Add gfx1035 target 2021-06-24 14:32:41 -04:00
avr-elf-headers.test [yaml2obj/obj2yaml/llvm-readobj] Support printing and parsing AVR-specific e_flags 2021-04-15 15:54:28 +02:00
basic.test
bb-addr-map.test [llvm-readobj] Print function names with `--bb-addr-map`. 2021-06-01 18:40:42 -07:00
broken-dynamic-reloc.test [yaml2obj, obj2yaml] - Implement section header table as a special Chunk. 2021-01-25 13:08:08 +03:00
call-graph-profile.test [LLD] Adding support for RELA for CG Profile. 2021-07-13 13:56:30 -07:00
check-output-order.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
demangle.test [test] Avoid llvm-readelf/llvm-readobj one-dash long options and deprecated aliases (e.g. --file-headers) 2021-07-15 10:26:21 -07:00
dependent-libraries.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
dyn-symbols-size-from-hash-table.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
dyn-symbols.test [libObject,llvm-readelf/obj] - Don't use @@ when printing versions of undefined symbols. 2021-01-26 12:05:59 +03:00
dynamic-empty.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
dynamic-malformed.test [llvm-readelf/obj] - Handle out-of-order PT_LOADs better. 2020-12-16 12:59:32 +03:00
dynamic-no-pt-dynamic.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
dynamic-not-in-pt-dynamic.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
dynamic-reloc-no-section-headers.test [yaml2obj, obj2yaml] - Implement section header table as a special Chunk. 2021-01-25 13:08:08 +03:00
dynamic-reloc.test [llvm-readobj] - For SHT_REL relocations, don't display an addend. 2020-12-14 12:03:00 +03:00
dynamic-table-dtnull.s [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
dynamic-tags-machine-specific.test [llvm-objdump/llvm-readobj/obj2yaml/yaml2obj] Support STO_RISCV_VARIANT_CC and DT_RISCV_VARIANT_CC 2021-09-29 16:56:52 -07:00
dynamic-tags.test [llvm-readobj] Display DT_RELRSZ/DT_RELRENT as " (bytes)" 2021-11-05 10:02:49 -07:00
file-header-abi-version.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
file-header-format.test [llvm-readobj][test] - Test "Format" values. 2020-08-28 11:31:25 +03:00
file-header-machine-types.test [Object] Fix e_machine description for EM_CR16 and add EM_MICROBLAZE 2021-05-02 19:25:39 -07:00
file-header-os-abi.test [llvm-readobj/elf][test] - Add testing for EM_* specific OS/ABI values. 2020-08-26 14:41:16 +03:00
file-headers.test [yaml2obj, obj2yaml] - Implement section header table as a special Chunk. 2021-01-25 13:08:08 +03:00
file-name.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
file-summary-json.test [llvm-readobj] Add JSONScopedPrinter to llvm-readelf 2021-12-10 23:34:27 +00:00
file-types.test [llvm-readobj] - Dump the ELF file type better. 2020-12-23 11:13:19 +03:00
gnu-file-headers.test
gnu-note-size.test [llvm-readelf] Print raw ELF note contents if we can't parse it 2021-02-09 16:59:22 +00:00
gnu-notes.test [llvm-readelf] Print raw ELF note contents if we can't parse it 2021-02-09 16:59:22 +00:00
gnu-section-mapping-no-phdrs.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
gnu-section-mapping.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
gnu-sections.test [yaml2obj/obj2yaml/llvm-readobj] Support SHF_GNU_RETAIN 2021-02-02 09:19:53 -08:00
gnuhash.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
grouped.test [llvm-readobj] Switch command line parsing from llvm::cl to OptTable 2021-07-12 10:14:42 -07:00
groups.test [test] Avoid llvm-readelf/llvm-readobj one-dash long options and deprecated aliases (e.g. --file-headers) 2021-07-15 10:26:21 -07:00
hash-histogram.test [llvm-readelf] - Report unique warnings when dumping hash symbols/histogram. 2020-12-03 14:05:04 +03:00
hash-symbols.test [NFC][llvm] Inclusive language: reword uses of sanity test and check 2021-11-25 07:21:42 -05:00
hash-table.test [yaml2obj, obj2yaml] - Implement section header table as a special Chunk. 2021-01-25 13:08:08 +03:00
headers.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
hex-dump-multi.s
hex-dump.test [NFC][llvm] Inclusive language: reword uses of sanity test and check 2021-11-25 07:21:42 -05:00
hidden-versym.test [yaml2obj/obj2yaml] - Improve dumping/creating of ELF versioning sections. 2021-01-21 10:36:48 +03:00
invalid-shstrndx.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
linker-options.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
loadname.test [llvm-readelf/obj] - Lowercase the warning message reported. 2020-12-02 13:09:47 +03:00
machine-specific-section-types.test
malformed-pt-dynamic.test [yaml2obj, obj2yaml] - Implement section header table as a special Chunk. 2021-01-25 13:08:08 +03:00
many-sections.s [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
many-sections2.s
mips-abiflags.test
mips-got.test [llvm-readelf/obj] - Add support of multiple SHT_SYMTAB_SHNDX sections. 2021-01-13 11:36:43 +03:00
mips-options-sec.test
mips-plt.test [llvm-readelf/obj] - Add support of multiple SHT_SYMTAB_SHNDX sections. 2021-01-13 11:36:43 +03:00
mips-reginfo.test
mips-symbols-stother.test
needed-libs.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
no-action.test
no-phdrs.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
no-relocs.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
no-shdrs.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
non-dynamic-in-pt-dynamic.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
note-amd-invalid-v2.test Reland "AMDGPU/llvm-readobj: Add missing tests for note parsing/displaying" 2021-05-02 22:56:17 -04:00
note-amd-invalid-v3.test Reland "AMDGPU/llvm-readobj: Add missing tests for note parsing/displaying" 2021-05-02 22:56:17 -04:00
note-amd-valid-v2.test AMDGPU: XFAIL LLVM::note-amd-valid-v2.test for big endian 2021-05-03 09:45:19 -04:00
note-amd-valid-v3.s Reland "AMDGPU/llvm-readobj: Add missing tests for note parsing/displaying" 2021-05-02 22:56:17 -04:00
note-amd.s AMDGPU: Add target id and code object v4 support 2021-03-24 11:54:05 -04:00
note-amdgpu-invalid.s [llvm-readelf] Print raw ELF note contents if we can't parse it 2021-02-09 16:59:22 +00:00
note-amdgpu.test [llvm-readelf] Print raw ELF note contents if we can't parse it 2021-02-09 16:59:22 +00:00
note-core-ntfile-bad.test [llvm-readelf/obj] - Index phdrs and relocations from 0 when reporting warnings. 2021-01-11 15:13:54 +03:00
note-core-ntfile.test [llvm-readobj] Print empty line between note sections in GNU mode 2021-02-09 16:59:21 +00:00
note-core.test [llvm-readobj] Print empty line between note sections in GNU mode 2021-02-09 16:59:21 +00:00
note-freebsd-core.test [llvm-readobj] Add support for decoding FreeBSD ELF notes 2021-02-09 16:59:22 +00:00
note-freebsd.test [llvm-readobj] Add support for decoding FreeBSD ELF notes 2021-02-09 16:59:22 +00:00
note-generic.s [llvm-readobj] Print empty line between note sections in GNU mode 2021-02-09 16:59:21 +00:00
note-gnu-property.s [llvm-readobj] Remove legacy GNU_PROPERTY_X86_ISA_1_{NEEDED,USED} and dump new GNU_PROPERTY_X86_ISA_1_{NEEDED,USED} 2021-03-19 14:35:22 -07:00
note-gnu-property2.s
note-llvmompoffload.test [openmp][ELF] Recognize LLVM OpenMP offload specific notes 2021-08-12 13:47:48 -07:00
note-netbsd-core.test [llvm-readobj] Add support for machine-independent NetBSD ELF core notes. 2021-12-02 12:10:17 +01:00
note-openbsd-core.test [llvm-readobj] Add support for reading OpenBSD ELF core notes. 2021-11-02 10:18:54 +01:00
note-unknown.s [llvm-readobj] Print empty line between note sections in GNU mode 2021-02-09 16:59:21 +00:00
output-style.test [llvm-readobj] Add JSONScopedPrinter to llvm-readelf 2021-12-10 23:34:27 +00:00
packed-relocs-empty.s
packed-relocs-errors.s Use DataExtractor to decode SLEB128 in android_relas. 2021-01-28 01:35:18 -08:00
packed-relocs.test [test] Avoid llvm-readelf/llvm-readobj one-dash long options and deprecated aliases (e.g. --file-headers) 2021-07-15 10:26:21 -07:00
pretty-print.test [llvm-readobj] Add JSONScopedPrinter to llvm-readelf 2021-12-10 23:34:27 +00:00
program-headers.test [llvm-readobj] - Report unique warnings in printProgramHeaders. 2020-12-04 13:35:44 +03:00
reloc-addends.test [llvm-readobj] - For SHT_REL relocations, don't display an addend. 2020-12-14 12:03:00 +03:00
reloc-negative-addend-no-sym.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
reloc-no-sym.test
reloc-symbol-with-versioning.test [yaml2obj/obj2yaml] - Improve dumping/creating of ELF versioning sections. 2021-01-21 10:36:48 +03:00
reloc-types-elf-aarch64.test
reloc-types-elf-amdgpu.test [AMDGPU] Handle s_branch to another section. 2021-07-13 12:17:47 +01:00
reloc-types-elf-arm.test
reloc-types-elf-i386.test
reloc-types-elf-lanai.test
reloc-types-elf-mips.test
reloc-types-elf-mips64.test
reloc-types-elf-ppc64.test
reloc-types-elf-x64.test
reloc-zero-name-or-value.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
relocation-errors.test [llvm-readelf/obj] - Index phdrs and relocations from 0 when reporting warnings. 2021-01-11 15:13:54 +03:00
relocations.test [llvm-readelf/obj] - Index phdrs and relocations from 0 when reporting warnings. 2021-01-11 15:13:54 +03:00
relr-relocs.test [libObject, llvm-readobj] - Reimplement `ELFFile<ELFT>::getEntry`. 2020-12-18 16:52:27 +03:00
section-arch-flags.test
section-details.test [llvm-readelf] - Implement --section-details option. 2020-10-27 13:29:39 +03:00
section-flags-os-proc.test [yaml2obj/obj2yaml/llvm-readobj] Support SHF_GNU_RETAIN 2021-02-02 09:19:53 -08:00
section-flags.test [yaml2obj/obj2yaml/llvm-readobj] Support SHF_GNU_RETAIN 2021-02-02 09:19:53 -08:00
section-symbols.test [llvm-readelf/obj] - Add support of multiple SHT_SYMTAB_SHNDX sections. 2021-01-13 11:36:43 +03:00
section-types.test [yaml2obj/obj2yaml] - Improve dumping/creating of ELF versioning sections. 2021-01-21 10:36:48 +03:00
sections-ext.test [llvm-readobj] - Don`t crash when --section-symbols is requested for an object w/o .symtab. 2020-08-26 14:13:05 +03:00
sections-no-section-header-string-table.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
sections.test [llvm-readobj] Make -s and -t match llvm-readelf 2021-06-29 11:56:26 -07:00
stack-sizes.test [llvm-readobj] Display multiple function names for stack size entries 2021-07-26 14:49:53 +01:00
stackmap.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
string-dump-multi.s
string-dump.test [llvm-readobj] Switch command line parsing from llvm::cl to OptTable 2021-07-12 10:14:42 -07:00
symbol-64bit.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
symbol-binding.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
symbol-shndx.test [llvm-readelf/obj] - Add support of multiple SHT_SYMTAB_SHNDX sections. 2021-01-13 11:36:43 +03:00
symbol-types.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
symbol-visibility.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00
symbols.test [llvm-readobj] Make -s and -t match llvm-readelf 2021-06-29 11:56:26 -07:00
symtab-shndx.test [yaml2obj, obj2yaml] - Implement section header table as a special Chunk. 2021-01-25 13:08:08 +03:00
thin-archive-paths.test [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00
unwind.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
verdef-invalid.test [yaml2obj/obj2yaml] - Improve dumping/creating of ELF versioning sections. 2021-01-21 10:36:48 +03:00
verneed-flags.yaml [yaml2obj/obj2yaml] - Improve dumping/creating of ELF versioning sections. 2021-01-21 10:36:48 +03:00
verneed-invalid.test [yaml2obj/obj2yaml] - Improve dumping/creating of ELF versioning sections. 2021-01-21 10:36:48 +03:00
versioninfo.test [libObject,llvm-readelf/obj] - Don't use @@ when printing versions of undefined symbols. 2021-01-26 12:05:59 +03:00
versym-invalid.test [yaml2obj/obj2yaml] - Improve dumping/creating of ELF versioning sections. 2021-01-21 10:36:48 +03:00
wrong-shstrtab-type.test [yaml2obj] - Make the 'Machine' key optional. 2020-08-20 11:40:51 +03:00