mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 11:51:13 +00:00
[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 llvm-svn: 308392
This commit is contained in:
parent
f510c4f89f
commit
ef25350bba
@ -1,6 +1,6 @@
|
||||
RUN: llvm-readobj -s %p/Inputs/relocs.obj.elf-i386 --elf-output-style=GNU \
|
||||
RUN: | FileCheck %s -check-prefix ELF32
|
||||
RUN: llvm-readobj -s %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
|
||||
RUN: llvm-readobj -S %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
|
||||
RUN: | FileCheck %s -check-prefix ELF64
|
||||
|
||||
ELF32: Section Headers:
|
||||
|
@ -57,12 +57,16 @@ namespace opts {
|
||||
cl::desc("Alias for --file-headers"),
|
||||
cl::aliasopt(FileHeaders));
|
||||
|
||||
// -sections, -s
|
||||
// -sections, -s, -S
|
||||
// Note: In GNU readelf, -s means --symbols!
|
||||
cl::opt<bool> Sections("sections",
|
||||
cl::desc("Display all sections."));
|
||||
cl::alias SectionsShort("s",
|
||||
cl::desc("Alias for --sections"),
|
||||
cl::aliasopt(Sections));
|
||||
cl::alias SectionsShortUpper("S",
|
||||
cl::desc("Alias for --sections"),
|
||||
cl::aliasopt(Sections));
|
||||
|
||||
// -section-relocations, -sr
|
||||
cl::opt<bool> SectionRelocations("section-relocations",
|
||||
|
Loading…
Reference in New Issue
Block a user