[PATCH] D33873: [llvm-readobj] Accept (and ignore) --wide (-W) command-line switch
Roland McGrath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 3 17:01:44 PDT 2017
mcgrathr updated this revision to Diff 101341.
mcgrathr added a comment.
One line from this one got dropped into the llvm-readelf patch.
Repository:
rL LLVM
https://reviews.llvm.org/D33873
Files:
test/tools/llvm-readobj/gnu-sections.test
tools/llvm-readobj/llvm-readobj.cpp
Index: tools/llvm-readobj/llvm-readobj.cpp
===================================================================
--- tools/llvm-readobj/llvm-readobj.cpp
+++ tools/llvm-readobj/llvm-readobj.cpp
@@ -50,6 +50,13 @@
cl::desc("<input object files>"),
cl::ZeroOrMore);
+ // -wide, -W
+ cl::opt<bool> WideOutput("wide",
+ cl::desc("Ignored for compatibility with GNU readelf"));
+ cl::alias WideOutputShort("W",
+ cl::desc("Alias for --wide"),
+ cl::aliasopt(WideOutput));
+
// -file-headers, -h
cl::opt<bool> FileHeaders("file-headers",
cl::desc("Display file headers "));
@@ -537,6 +544,8 @@
// Register the target printer for --version.
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
+ opts::WideOutput.setHiddenFlag(cl::Hidden);
+
cl::ParseCommandLineOptions(argc, argv, "LLVM Object Reader\n");
// Default to stdin if no filename is specified.
Index: test/tools/llvm-readobj/gnu-sections.test
===================================================================
--- test/tools/llvm-readobj/gnu-sections.test
+++ test/tools/llvm-readobj/gnu-sections.test
@@ -2,6 +2,12 @@
RUN: | FileCheck %s -check-prefix ELF32
RUN: llvm-readobj -S %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
RUN: | FileCheck %s -check-prefix ELF64
+RUN: llvm-readobj --wide --sections \
+RUN: %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
+RUN: | FileCheck %s -check-prefix ELF64
+RUN: llvm-readobj -W --sections \
+RUN: %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
+RUN: | FileCheck %s -check-prefix ELF64
ELF32: Section Headers:
ELF32-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33873.101341.patch
Type: text/x-patch
Size: 1731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170604/7f44ef3b/attachment.bin>
More information about the llvm-commits
mailing list