[PATCH] D54124: [llvm-readelf] Make llvm-readelf more compatible with GNU readelf.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 02:43:34 PST 2018


jhenderson added inline comments.


================
Comment at: test/tools/llvm-readobj/readelf-s-alias.test:4-5
+RUN:   | FileCheck %s -check-prefix SEC
+RUN: llvm-readobj --sections %p/Inputs/trivial.obj.elf-i386 \
+RUN:   | FileCheck %s -check-prefix SEC
+
----------------
Since -s should be an alias for --sections, maybe it's worth piping the -s output to a file and then comparing the output against --sections output.

Similar comment below for --symbols.

I assume we have sufficient separate testing for --symbols and --sections, so we can rely on those to show that we dump sections and symbols output correctly with the long-form switches. If we don't, we should add them.


================
Comment at: tools/llvm-readobj/llvm-readobj.cpp:616
+
+  // Names that are less clear and only exposed for compatibility.
+  static cl::alias SectionHeadersAlias("section-headers",
----------------
I don't see any harm in these aliases being applicable for both llvm-readobj and llvm-readelf, if they're hidden.


Repository:
  rL LLVM

https://reviews.llvm.org/D54124





More information about the llvm-commits mailing list