[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 16:19:23 PDT 2017
mcgrathr created this revision.
Accept and ignore --wide/-W. In GNU readelf this switch is
necessary to get the output format that's consistent between
32-bit and 64-bit targets. llvm-readobj always produces that
output format.
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 "));
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.101335.patch
Type: text/x-patch
Size: 1408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170603/9cee61e9/attachment.bin>
More information about the llvm-commits
mailing list