summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-07-05 11:28:49 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-07-05 11:28:49 +0000
commitd0921a4696e097c54fa67f573718561dbdbd3103 (patch)
tree08caf3fa2f8d695e1eb9eb66cf78b185c5cf4481 /llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test
parentfdef18b42d02d69ca3a7be9c8c38a83ace51d9ff (diff)
downloadbcm5719-llvm-d0921a4696e097c54fa67f573718561dbdbd3103.tar.gz
bcm5719-llvm-d0921a4696e097c54fa67f573718561dbdbd3103.zip
[Object/ELF.h] - Improve error reporting.
The errors coming from ELF.h are usually not very useful because they are uninformative. This patch is a first step to improve the situation. I tested this patch with a run of check-llvm and found that few messages are untested. In this patch, I did not add more tests but marked all such cases with a "TODO" comment. For all tested messages I extended the error text to provide more details (see test cases changed). Differential revision: https://reviews.llvm.org/D64014 llvm-svn: 365183
Diffstat (limited to 'llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test')
-rw-r--r--llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test b/llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test
index a8302d37d82..b860aa4b3b5 100644
--- a/llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test
+++ b/llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test
@@ -141,7 +141,7 @@ ProgramHeaders:
# RUN: llvm-readobj --dynamic-table %t.bad-strtab 2>&1 >/dev/null | FileCheck %s --check-prefix BAD-STRTAB-ERR
# RUN: llvm-readelf --dynamic-table %t.bad-strtab 2>&1 >/dev/null | FileCheck %s --check-prefix BAD-STRTAB-ERR
-# BAD-STRTAB-ERR: warning: Unable to parse DT_STRTAB: Virtual address is not in any segment
+# BAD-STRTAB-ERR: warning: Unable to parse DT_STRTAB: virtual address is not in any segment: 0x2000000
# RUN: llvm-readobj --dynamic-table --needed-libs %t.bad-strtab | FileCheck %s --check-prefixes=BAD-STRTAB,BAD-STRTAB-LLVM
# RUN: llvm-readelf --dynamic-table --needed-libs %t.bad-strtab | FileCheck %s --check-prefixes=BAD-STRTAB,BAD-STRTAB-GNU
@@ -186,7 +186,8 @@ ProgramHeaders:
# RUN: llvm-readobj --dynamic-table %t.bad-rela 2>&1 | FileCheck %s --check-prefixes=CHECK,BAD-RELA
# RUN: llvm-readelf --dynamic-table %t.bad-rela 2>&1 | FileCheck %s --check-prefixes=CHECK,BAD-RELA-GNU
-# CHECK: warning: Unable to parse DT_RELA: Virtual address is not in any segment
+# CHECK: warning: Unable to parse DT_RELA: virtual address is not in any segment: 0x1000000
+
# BAD-RELA: DynamicSection [ (2 entries)
# BAD-RELA-NEXT: Tag Type Name/Value
# BAD-RELA-NEXT: 0x0000000000000007 RELA 0x1000000
OpenPOWER on IntegriCloud