summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-05-24 11:12:50 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-05-24 11:12:50 +0000
commitf835fcf412c92eac20bf2110e13c49fc86d0c55c (patch)
tree8d7807c5fee4950b50ec16d22b233cb51d0b4716 /llvm/test/tools/llvm-readobj
parentb7f2a2b4c0ec40e17371c5b15d4e92b39b196c5c (diff)
downloadbcm5719-llvm-f835fcf412c92eac20bf2110e13c49fc86d0c55c.tar.gz
bcm5719-llvm-f835fcf412c92eac20bf2110e13c49fc86d0c55c.zip
[llvm-readelf] - Allow dumping of the .dynamic section even if there is no PT_DYNAMIC header.
It is now possible after D61937 was landed and was discussed in it's review comments. It is not consistent with GNU, which does not output .dynamic section content in this case for no visible reason. Differential revision: https://reviews.llvm.org/D62179 llvm-svn: 361630
Diffstat (limited to 'llvm/test/tools/llvm-readobj')
-rw-r--r--llvm/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test15
1 files changed, 11 insertions, 4 deletions
diff --git a/llvm/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test b/llvm/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test
index 3ef293714a8..5a03d04ab4d 100644
--- a/llvm/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test
+++ b/llvm/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test
@@ -1,16 +1,23 @@
-# Show that no dumping occurs if there is no PT_DYNAMIC header.
+## Show that dumping occurs even if there is no PT_DYNAMIC header.
+## This is inconsistent with the GNU behavior, but seems to be more reasonable.
# RUN: yaml2obj %s -o %t.no-phdr
# RUN: llvm-readobj --dynamic-table %t.no-phdr | FileCheck %s --check-prefix=LLVM
-# RUN: llvm-readelf --dynamic-table %t.no-phdr | FileCheck %s --check-prefix=GNU --allow-empty
+# RUN: llvm-readelf --dynamic-table %t.no-phdr | FileCheck %s --check-prefix=GNU
# LLVM: File: {{.*}}.no-phdr
# LLVM-NEXT: Format: ELF64-x86-64
# LLVM-NEXT: Arch: x86_64
# LLVM-NEXT: AddressSize: 64bit
# LLVM-NEXT: LoadName:{{ *}}
-# LLVM-NOT: {{.}}
+# LLVM-NEXT: DynamicSection [ (1 entries)
+# LLVM-NEXT: Tag Type Name/Value
+# LLVM-NEXT: 0x0000000000000000 NULL 0x0
+# LLVM-NEXT: ]
-# GNU-NOT: {{.}}
+# GNU: DynamicSection [ (1 entries)
+# GNU-NEXT: Tag Type Name/Value
+# GNU-NEXT: 0x0000000000000000 NULL 0x0
+# GNU-NEXT: ]
--- !ELF
FileHeader:
OpenPOWER on IntegriCloud