1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/tools/llvm-objdump
Sid Manning c105d26f97 [llvm-objdump] Fix spurious "The end of the file was unexpectedly encountered" if a SHT_NOBITS sh_offset is larger than the file size
llvm-objdump -D this file:

  int a[100000];
  int main() { return 0; }

Will produce an error: "The end of the file was unexpectedly encountered".

This happens because of a check in Binary.h checkOffset.  (Addr + Size > M.getBufferEnd()).

The sh_offset and sh_size fields can be ignored for SHT_NOBITS sections.
Fix the error by changing ELFObjectFile<ELFT>::getSectionContents to use
the file base for SHT_NOBITS sections.

Reviewed By: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D69192
2019-11-05 11:14:12 -08:00
..
AArch64
AMDGPU
ARM [llvm-objdump] Add the missing ARMv8 subarch detection 2019-08-28 06:37:22 +00:00
Hexagon
Inputs [X86] Print register names in .seh_* directives 2019-08-30 21:23:05 +00:00
Mips [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
PowerPC [llvm-objdump] Use %08 instead of %016 to print leading addresses for 32-bit binaries 2019-06-17 09:59:55 +00:00
WebAssembly
X86 [llvm-objdump] Fix spurious "The end of the file was unexpectedly encountered" if a SHT_NOBITS sh_offset is larger than the file size 2019-11-05 11:14:12 -08:00
all-headers.test [llvm-objdump] Further rearrange llvm-objdump sections for compatability 2019-10-03 22:01:08 +00:00
archive-headers.test
call-absolute-symbol-elf.test
coff-file.test
coff-import-library.test
coff-large-bss.test
coff-many-relocs.test
coff-non-null-terminated-file.test
coff-private-headers.test
common-symbol-elf.test
eh_frame_zero_cie.test
eh_frame-arm64.test
eh_frame-coff.test
eh_frame-mipsel.test
elf-dynamic-section-machine-specific.test [llvm-objdump/llvm-readobj/obj2yaml/yaml2obj] Support DT_PPC_GOT and DT_PPC_OPT 2019-06-05 01:36:48 +00:00
elf-dynamic-section.test
elf-symbol-visibility.test [yaml2obj][obj2yaml] - Use a single "Other" field instead of "Other", "Visibility" and "StOther". 2019-08-30 13:39:22 +00:00
embedded-source.test
file-headers-coff.test [lib/Object] - Remove objdump-file-header.test 2019-08-15 13:39:58 +00:00
file-headers-elf.test [lib/Object] - Remove objdump-file-header.test 2019-08-15 13:39:58 +00:00
file-headers-pe.test
file-headers-unsupported.test
full-contents.test [yaml2obj][obj2yaml] - Do not create a symbol table by default. 2019-10-20 14:47:17 +00:00
help.test [binutils] Add response file option to help and docs 2019-06-21 11:49:20 +00:00
hex-relocation-addr.test
invalid-input.test
lit.local.cfg Add lit.local.cfg to llvm-objdump tests 2019-07-09 17:47:14 +00:00
macho-bad-bind.test
macho-bad-dysymtab.test
macho-bad-ordinal.test
macho-bad-trie.test
macho-bind2.test
macho-bind.test
macho-compact-unwind-i386.test
macho-compact-unwind-x86_64.test
macho-exports-trie.test
macho-lazy-bind.test
macho-LLVM-bundle.test
macho-objc-meta-data.test
macho-rebase.test
macho-sections.test
macho-unwind-info-arm64.test
macho-unwind-info-no-relocs.test
macho-unwind-info-x86_64.test
macho-weak-bind.test
malformed-archives.test [llvm-objdump] - Remove one of report_error functions and improve the error reporting. 2019-08-20 13:19:16 +00:00
malformed-macho.test
malformed-unwind-x86_64.test
non-archive-object.test
openbsd-headers.test [test] - Remove precomiled openbsd-phdrs.elf-x86-64 objects. 2019-08-17 14:23:30 +00:00
option-grouping.test
private-headers-dynamic-section.test
private-headers-no-dynamic-segment.test
private-headers-no-dynamic.test
proc-specific-section-elf.test
relocation-xindex-symbol.test [llvm-objdump] - Add a relocation-xindex-symbol.test test case. 2019-08-14 08:33:26 +00:00
relocations-elf.test [llvm/Object] - Make ELFObjectFile::getRelocatedSection return Expected<section_iterator> 2019-10-21 11:06:38 +00:00
relocations-in-nonreloc.test [test/Object] - Move/rewrite 2 more test cases. 2019-08-20 08:23:57 +00:00
section-filter.test [llvm-objdump] - Remove an outdated "FIXME". NFC. 2019-08-22 09:10:17 +00:00
section-headers.test [llvm-objdump] Adjust spacing and field width for --section-headers 2019-10-14 17:47:17 +00:00
symbol-table-elf.test
verdef-elf.test
verneed-elf.test
verneed-wrong-info.test
warn-missing-section.test [llvm-objdump] Warn if no user specified sections (-j) are not found. 2019-07-02 18:38:17 +00:00
warn-on-out-of-range-start-stop-address.test [llvm-objdump] - Cleanup the error reporting. 2019-08-21 11:07:31 +00:00
wasm-corrupt-section.test
wasm.txt [llvm-objdump] Adjust spacing and field width for --section-headers 2019-10-14 17:47:17 +00:00
win64-unwind-data.test
xcoff-section-headers.test Reland [llvm-objdump] Use a counter for llvm-objdump -h instead of the section index. 2019-10-17 21:55:43 +00:00