Index: llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
===================================================================
--- llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
+++ llvm/trunk/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
Index: llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
===================================================================
--- llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
+++ llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
@@ -50,6 +50,13 @@
cl::desc(""),
cl::ZeroOrMore);
+ // -wide, -W
+ cl::opt 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 FileHeaders("file-headers",
cl::desc("Display file headers "));
@@ -544,6 +551,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.