llvm-project/llvm/test/Object
Alvin Wong bb94611d65 [COFF] Check table ptr more thoroughly and ignore empty sections
When loading split debug files for PE/COFF executables (produced with
`objcopy --only-keep-debug`), the tables or directories in such files
may point to data inside sections that may have been stripped.
COFFObjectFile shall detect and gracefully handle this, to allow the
object file be loaded without considering these tables or directories.
This is required for LLDB to load these files for use as debug symbols.

COFFObjectFile shall also check these pointers more carefully to account
for cases in which the section contains less raw data than the size
given by VirtualSize, to prevent going out of bounds.

This commit also changes COFFDump in llvm-objdump to reuse the pointers
that are already range-checked in COFFObjectFile. This fixes a crash
when trying to dump the TLS directory from a stripped file.

Fixes https://github.com/mstorsjo/llvm-mingw/issues/284

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D126898
2022-06-03 18:31:01 +03:00
..
AArch64 Validate chained fixup image formats 2022-02-25 13:04:00 -08:00
AMDGPU [AMDGPU] Add gfx11 subtarget ELF definition 2022-04-29 12:27:17 -04:00
ARM
BPF [llvm-readobj] Display multiple function names for stack size entries 2021-07-26 14:49:53 +01:00
Inputs [COFF] Check table ptr more thoroughly and ignore empty sections 2022-06-03 18:31:01 +03:00
Lanai [llvm-readobj] - For SHT_REL relocations, don't display an addend. 2020-12-14 12:03:00 +03:00
Mips Reland "[lib/Support/YAMLTraits] - Don't print leading zeroes when dumping Hex8/Hex16/Hex32 types." (https://reviews.llvm.org/D90930). 2020-11-18 13:08:46 +03:00
RISCV [RISCV] Add missing e_flag EF_RISCV_TSO 2022-01-07 23:05:29 +08:00
X86 [Verifier] Add verification logic for GlobalIFuncs 2021-10-31 20:00:57 -07:00
ar-create.test [AIX] support write operation of big archive. 2022-05-13 10:40:15 -04:00
ar-error.test
archive-big-extract.test [AIX] Support of Big archive (read) 2022-01-18 12:13:01 -05:00
archive-big-print.test [AIX] Support of Big archive (read) 2022-01-18 12:13:01 -05:00
archive-big-read.test [AIX] Support of Big archive (read) 2022-01-18 12:13:01 -05:00
archive-darwin-duplicates.test
archive-delete.test
archive-error-tmp.txt
archive-extract-dir.test [AIX] support write operation of big archive. 2022-05-13 10:40:15 -04:00
archive-extract.test [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00
archive-format.test [llvm-ar] Enforce one-dash form for long options 2022-01-12 11:33:23 -08:00
archive-long-filenames-no-null-terminator.test
archive-long-index.test [llvm-nm][test] Avoid deprecated alias -M (--print-armap) 2021-08-04 14:25:24 -07:00
archive-malformed-object.test [AIX] support write operation of big archive. 2022-05-13 10:40:15 -04:00
archive-move.test
archive-pad.test
archive-replace-pos.test [AIX] support write operation of big archive. 2022-05-13 10:40:15 -04:00
archive-symtab.test [llvm-ar] Fix for handling thin archive with SYM64 and a test case for it 2021-08-05 10:06:34 -07:00
archive-thin-create.test
archive-thin-paths.test
archive-thin-read.test
archive-toc.test
archive-unknown-filetype.test [AIX] support write operation of big archive. 2022-05-13 10:40:15 -04:00
archive-update.test [AIX] support write operation of big archive. 2022-05-13 10:40:15 -04:00
check_binary_output.ll
coff-archive-short.test
coff-archive.test
coff-dwarf-debug-only.test [COFF] Check table ptr more thoroughly and ignore empty sections 2022-06-03 18:31:01 +03:00
coff-empty-drectve.test
coff-invalid.test
coff-weak-externals.test
directory.ll [AIX] support write operation of big archive. 2022-05-13 10:40:15 -04:00
dllimport-globalref.ll
dllimport.ll
dyn-rel-relocation.test [llvm-readobj] - For SHT_REL relocations, don't display an addend. 2020-12-14 12:03:00 +03:00
dynamic-reloc.test
invalid-alignment.test
invalid.test [Object][test] Fix invalid.test 2022-03-28 01:27:16 -07:00
kext.test
macho-invalid.test [llvm-nm] Tidy up error messages 2021-02-15 13:54:08 +00:00
mangle-ir.ll
multi-module.ll
multiple-sections.yaml [LLD][LLVM] CG Graph profile using relocations 2021-06-24 09:09:33 -07:00
nm-archive.test [llvm-nm][test] Avoid deprecated alias -M (--print-armap) 2021-08-04 14:25:24 -07:00
nm-bitcode.test
nm-darwin-m.test
nm-error.test
nm-irix6.test
nm-pe-image.test
nm-shared-object.test [llvm-nm] Tidy up error messages 2021-02-15 13:54:08 +00:00
nm-tapi-invalids.test [llvm-nm] Tidy up error messages 2021-02-15 13:54:08 +00:00
nm-tapi.test [TextAPI] Add support for arm64_32 2021-04-01 17:19:12 -07:00
nm-trivial-object.test
nm-universal-binary.test [llvm-nm]add helper function to print out the object file name, archive name, architecture name 2022-03-09 14:45:27 -05:00
nm-weak-global-macho.test
obj2yaml.test [yaml2obj/obj2yaml/llvm-readobj] Support printing and parsing AVR-specific e_flags 2021-04-15 15:54:28 +02:00
objc-imageinfo-coff.ll
objc-imageinfo-elf.ll
objc-imageinfo-macho.ll
objc-swift-mixed-imageinfo-macho.ll
objdump-export-list.test
objdump-no-sectionheaders.test
objdump-private-headers.test
objdump-relocations.test
objdump-section-content.test
objdump-sectionheaders.test
objdump-symbol-table.test
pr25877.test
relocation-executable.test
simple-archive.test [llvm-nm][test] Avoid deprecated alias -M (--print-armap) 2021-08-04 14:25:24 -07:00
size-trivial-macho.test
stackmap-dump.test
wasm-bad-data-symbol.yaml [lld][WebAssembly] Allow data symbols to extend past end of segment 2021-05-12 13:43:37 -07:00
wasm-bad-metadata-version.yaml [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
wasm-bad-reloc-type.test [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
wasm-bad-symbol-type.test [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
wasm-duplicate-name.test [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
wasm-invalid-file.yaml [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
wasm-invalid-section-order.test [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
wasm-invalid-start.test [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
wasm-missing-version.test [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
wasm-relocs-and-producers.yaml [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
wasm-string-outside-section.test
yaml2obj-elf-rel-noref.yaml [llvm-readobj] - For SHT_REL relocations, don't display an addend. 2020-12-14 12:03:00 +03:00
yaml2obj-elf-rel.yaml [llvm-readobj] - For SHT_REL relocations, don't display an addend. 2020-12-14 12:03:00 +03:00
yaml2obj-readobj.test