[PATCH] D76920: [llvm-readobj] - Improve test of --elf-hash-histogram option.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 01:35:26 PDT 2020
jhenderson added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/ELF/hash-histogram.test:7
+# RUN: llvm-readelf --elf-hash-histogram %t1-32.o | FileCheck %s --check-prefix=HIST
+## Test --histogram and -I aliases.
+# RUN: llvm-readelf --histogram %t1-32.o | FileCheck %s --check-prefix=HIST
----------------
Perhaps add a blank line before this comment.
================
Comment at: llvm/test/tools/llvm-readobj/ELF/hash-histogram.test:20
+# HIST-NEXT: 3 1 ( 33.3%) 100.0%
+# HIST: Histogram for `.gnu.hash' bucket list length (total of 3 buckets)
+# HIST-NEXT: Length Number % of total Coverage
----------------
You probably need to make this HIST-NEXT and/or add HIST-EMPTY before it to show that there are no more lines after the previous table.
================
Comment at: llvm/test/tools/llvm-readobj/ELF/hash-histogram.test:25
+# HIST-NEXT: 2 0 ( 0.0%) 25.0%
+# HIST-NEXT: 3 1 ( 33.3%) 100.0%
----------------
Similarly, adding a HIST-EMPTY at the end here would be wise.
================
Comment at: llvm/test/tools/llvm-readobj/ELF/hash-histogram.test:55-56
+ - Tag: DT_HASH
+## The value of DT_HASH must be equal to the size of the .gnu.hash section.
+ Value: [[DTHASH]]
- Tag: DT_NULL
----------------
Up to you, but you could avoid this macro by setting the AddressAlign property of the .hash section to some size, e.g. 0x100, and then just use that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76920/new/
https://reviews.llvm.org/D76920
More information about the llvm-commits
mailing list