diff options
author | Sam Clegg <sbc@chromium.org> | 2017-05-10 14:18:11 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2017-05-10 14:18:11 +0000 |
commit | 2436e4547cb90ca0491c3108b4b7c619bf17a714 (patch) | |
tree | 941d2731707f28f4e9743f951eb72bac952355c9 /test/Object | |
parent | 102d6ffbefab825a907cd984951f91188624328d (diff) |
[llvm-readobj] Improve errors on invalid binary
The previous code was discarding the error message from
createBinary() by calling errorToErrorCode().
This meant that such error were always reported unhelpfully
as "Invalid data was encountered while parsing the file".
Other tools such as llvm-objdump already produce a more
the error message in this case.
Differential Revision: https://reviews.llvm.org/D32985
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object')
-rw-r--r-- | test/Object/invalid.test | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Object/invalid.test b/test/Object/invalid.test index fc1a77b2c0c..dcbac32f719 100644 --- a/test/Object/invalid.test +++ b/test/Object/invalid.test @@ -53,7 +53,7 @@ INVALID-SYMTAB-SIZE: size is not a multiple of sh_entsize RUN: not llvm-readobj -t %p/Inputs/invalid-xindex-size.elf 2>&1 | FileCheck --check-prefix=INVALID-XINDEX-SIZE %s -INVALID-XINDEX-SIZE: Invalid data was encountered while parsing the file. +INVALID-XINDEX-SIZE: Invalid data was encountered while parsing the file RUN: not llvm-readobj -t %p/Inputs/invalid-e_shnum.elf 2>&1 | FileCheck --check-prefix=INVALID-SH-NUM %s INVALID-SH-NUM: invalid e_phentsize @@ -77,7 +77,7 @@ RUN: FileCheck --check-prefix=INVALID-SECTION-SIZE2 %s INVALID-SECTION-SIZE2: invalid section offset RUN: not llvm-readobj -t %p/Inputs/invalid-sections-num.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-NUM %s -INVALID-SECTION-NUM: Invalid data was encountered while parsing the file. +INVALID-SECTION-NUM: Invalid data was encountered while parsing the file RUN: not llvm-readobj -r %p/Inputs/invalid-rel-sym.elf 2>&1 | FileCheck --check-prefix=INVALID-REL-SYM %s INVALID-REL-SYM: invalid section offset |