[PATCH] D55298: [llvm-readelf] Add -e/--headers support to readobj/elf

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 7 01:18:44 PST 2018


jhenderson added inline comments.


================
Comment at: test/tools/llvm-readobj/headers.test:1
+RUN: llvm-readelf -e %p/Inputs/trivial.obj.elf-i386 | FileCheck %s
+RUN: llvm-readelf --headers %p/Inputs/trivial.obj.elf-i386 | FileCheck %s
----------------
I've been thinking a bit more about the test for this, and I think I have a better suggestion, after all that:

1) Run llvm-readelf with --headers, store the output in a file.
2) Run llvm-readelf with -e, store the output in a file.
3) Run llvm-readelf with --file-headers, --program-headers and --section-headers, store in a different file.
4) Compare the two files from 1) and 2) against the file from 3) using cmp.

That would avoid the need for testing the detailed contents, whilst also providing what we really want, i.e. that --headers produces file, program and section header output. How does that sound?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55298/new/

https://reviews.llvm.org/D55298





More information about the llvm-commits mailing list