llvm.org GIT mirror llvm / 35375a3
[llvm-readobj] Accept (and ignore) --wide (-W) command-line switch 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. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D33873 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308396 91177308-0d34-0410-b5e6-96231b3b80d8 Petr Hosek 2 years ago
2 changed file(s) with 15 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 RUN: llvm-readobj -s %p/Inputs/relocs.obj.elf-i386 --elf-output-style=GNU \
11 RUN: | FileCheck %s -check-prefix ELF32
22 RUN: llvm-readobj -S %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
3 RUN: | FileCheck %s -check-prefix ELF64
4 RUN: llvm-readobj --wide --sections \
5 RUN: %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
6 RUN: | FileCheck %s -check-prefix ELF64
7 RUN: llvm-readobj -W --sections \
8 RUN: %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
39 RUN: | FileCheck %s -check-prefix ELF64
410
511 ELF32: Section Headers:
4848 cl::list InputFilenames(cl::Positional,
4949 cl::desc(""),
5050 cl::ZeroOrMore);
51
52 // -wide, -W
53 cl::opt WideOutput("wide",
54 cl::desc("Ignored for compatibility with GNU readelf"));
55 cl::alias WideOutputShort("W",
56 cl::desc("Alias for --wide"),
57 cl::aliasopt(WideOutput));
5158
5259 // -file-headers, -h
5360 cl::opt FileHeaders("file-headers",
543550 // Register the target printer for --version.
544551 cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
545552
553 opts::WideOutput.setHiddenFlag(cl::Hidden);
554
546555 cl::ParseCommandLineOptions(argc, argv, "LLVM Object Reader\n");
547556
548557 // Default to stdin if no filename is specified.