diff options
| author | Jordan Rupprecht <rupprecht@google.com> | 2019-08-12 14:05:37 +0000 |
|---|---|---|
| committer | Jordan Rupprecht <rupprecht@google.com> | 2019-08-12 14:05:37 +0000 |
| commit | f927b34a148b27b24f37f062d5a0620b76430ade (patch) | |
| tree | b1f695448bcdb0d9942efa235d69ed2e2f8f53bd /llvm/test/tools | |
| parent | 9a452740ec89f856492841af3f9c616f5be96c7c (diff) | |
| download | bcm5719-llvm-f927b34a148b27b24f37f062d5a0620b76430ade.tar.gz bcm5719-llvm-f927b34a148b27b24f37f062d5a0620b76430ade.zip | |
[llvm-readobj] Downgrade 'PT_DYNAMIC segment offset + size exceeds the size of the file' from an error to a warning
Summary: This allows llvm-readobj to print other useful information for truncated files instead of giving up.
Reviewers: jhenderson, grimar, MaskRay
Reviewed By: jhenderson, grimar, MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66036
llvm-svn: 368576
Diffstat (limited to 'llvm/test/tools')
| -rw-r--r-- | llvm/test/tools/llvm-readobj/elf-malformed-pt-dynamic.test | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/tools/llvm-readobj/elf-malformed-pt-dynamic.test b/llvm/test/tools/llvm-readobj/elf-malformed-pt-dynamic.test index db229b1b259..c234d484712 100644 --- a/llvm/test/tools/llvm-readobj/elf-malformed-pt-dynamic.test +++ b/llvm/test/tools/llvm-readobj/elf-malformed-pt-dynamic.test @@ -1,5 +1,5 @@ # If the offset and/or size fields of the PT_DYNAMIC field become corrupted, -# we should report a sensible error message. +# we should report a sensible message. # Creating such a malformed file is hard. The easiest way to simulate it is to # truncate the file. Note that the section headers must first be stripped or @@ -13,14 +13,14 @@ # within the file. # RUN: cp %t.stripped %t.truncated1 # RUN: %python -c "with open(r'%t.truncated1', 'r+') as f: f.truncate(0x1001)" -# RUN: not llvm-readobj %t.truncated1 --dynamic-table 2>&1 | FileCheck %s +# RUN: llvm-readobj %t.truncated1 --dynamic-table 2>&1 | FileCheck %s # Test case where the offset is too large to be in the file. # RUN: cp %t.stripped %t.truncated2 # RUN: %python -c "with open(r'%t.truncated2', 'r+') as f: f.truncate(0xFFF)" -# RUN: not llvm-readobj %t.truncated2 --dynamic-table 2>&1 | FileCheck %s +# RUN: llvm-readobj %t.truncated2 --dynamic-table 2>&1 | FileCheck %s -# CHECK: error: PT_DYNAMIC segment offset + size exceeds the size of the file +# CHECK: warning: PT_DYNAMIC segment offset + size exceeds the size of the file --- !ELF FileHeader: |

