summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2016-02-11 04:59:45 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2016-02-11 04:59:45 +0000
commit582c4d2babbb93271485cc4fee837b6b880c7610 (patch)
treedb0afba7c6ed6022d9d5e614011c5eba62188c85 /llvm/test/Object
parent60d82b269cc544ba88389feb4a53210ea65dc204 (diff)
downloadbcm5719-llvm-582c4d2babbb93271485cc4fee837b6b880c7610.tar.gz
bcm5719-llvm-582c4d2babbb93271485cc4fee837b6b880c7610.zip
[readobj] Handle ELF files with no section table or with no program headers.
This adds support for finding the dynamic table and dynamic symbol table via the section table or the program header table. If there's no section table an attempt is made to figure out the length of the dynamic symbol table. llvm-svn: 260488
Diffstat (limited to 'llvm/test/Object')
-rwxr-xr-xllvm/test/Object/Inputs/corrupt-invalid-virtual-addr.elf.x86-64bin1720 -> 0 bytes
-rw-r--r--llvm/test/Object/corrupt.test11
-rw-r--r--llvm/test/Object/invalid.test4
3 files changed, 5 insertions, 10 deletions
diff --git a/llvm/test/Object/Inputs/corrupt-invalid-virtual-addr.elf.x86-64 b/llvm/test/Object/Inputs/corrupt-invalid-virtual-addr.elf.x86-64
deleted file mode 100755
index 58d995933ec..00000000000
--- a/llvm/test/Object/Inputs/corrupt-invalid-virtual-addr.elf.x86-64
+++ /dev/null
Binary files differ
diff --git a/llvm/test/Object/corrupt.test b/llvm/test/Object/corrupt.test
index 0d9aad378f8..005f86fb744 100644
--- a/llvm/test/Object/corrupt.test
+++ b/llvm/test/Object/corrupt.test
@@ -38,24 +38,17 @@ RUN: FileCheck --check-prefix=PHENTSIZE %s
PHENTSIZE: Invalid program header size
-RUN: not llvm-readobj -dynamic-table \
-RUN: %p/Inputs/corrupt-invalid-virtual-addr.elf.x86-64 2>&1 | \
-RUN: FileCheck --check-prefix=VIRTADDR %s
-
-VIRTADDR: Virtual address is not in any segment
-
-
RUN: not llvm-readobj -dyn-relocations \
RUN: %p/Inputs/corrupt-invalid-relocation-size.elf.x86-64 2>&1 | \
RUN: FileCheck --check-prefix=RELOC %s
-RELOC: Invalid relocation entry size
+RELOC: Invalid entity size
RUN: not llvm-readobj -dyn-relocations \
RUN: %p/Inputs/corrupt-invalid-dynamic-table-size.elf.x86-64 2>&1 | \
RUN: FileCheck --check-prefix=DYN-TABLE-SIZE %s
-DYN-TABLE-SIZE: Invalid dynamic table size
+DYN-TABLE-SIZE: Invalid entity size
RUN: not llvm-readobj -dyn-relocations \
diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test
index cc5cd68304c..a32c621cca6 100644
--- a/llvm/test/Object/invalid.test
+++ b/llvm/test/Object/invalid.test
@@ -35,9 +35,11 @@ SECTION-NEXT: AddressAlignment:
SECTION-NEXT: EntrySize: 32
RUN: not llvm-readobj -t %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-SYM-SIZE %s
-RUN: not llvm-readobj --dyn-symbols %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-SYM-SIZE %s
INVALID-SYM-SIZE: Invalid symbol size
+RUN: not llvm-readobj --dyn-symbols %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-DYNSYM-SIZE %s
+INVALID-DYNSYM-SIZE: Invalid entity size
+
RUN: not llvm-readobj -t %p/Inputs/invalid-section-index.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-INDEX %s
INVALID-SECTION-INDEX: Invalid section index
OpenPOWER on IntegriCloud