llvm.org GIT mirror llvm / efdf7c0
[llvm-readobj] Accept -S as an alias for --sections In GNU readelf, the short option for --sections is upper-case -S. Note that GNU uses lower-case -s to mean --symbols, while LLVM uses -s to mean --sections and -t to mean --symbols (-t has yet a different meaning in GNU). So command-line uses with -S can now be compatible, but uses with -s or -t are still incompatible. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D33872 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308392 91177308-0d34-0410-b5e6-96231b3b80d8 Petr Hosek 3 years ago
2 changed file(s) with 6 addition(s) and 2 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
2 RUN: llvm-readobj -s %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
2 RUN: llvm-readobj -S %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
33 RUN: | FileCheck %s -check-prefix ELF64
55 ELF32: Section Headers:
5656 cl::desc("Alias for --file-headers"),
5757 cl::aliasopt(FileHeaders));
59 // -sections, -s
59 // -sections, -s, -S
60 // Note: In GNU readelf, -s means --symbols!
6061 cl::opt Sections("sections",
6162 cl::desc("Display all sections."));
6263 cl::alias SectionsShort("s",
64 cl::desc("Alias for --sections"),
65 cl::aliasopt(Sections));
66 cl::alias SectionsShortUpper("S",
6367 cl::desc("Alias for --sections"),
6468 cl::aliasopt(Sections));