mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[llvm-objdump] support '--syms' as an alias of -t
This adds support for '--syms' as an alias of '-t' for llvm-objdump, fixing PR39406 (https://bugs.llvm.org/show_bug.cgi?id=39406). Patch by Higuoxing (Xing). Differential Revision: https://reviews.llvm.org/D53803 llvm-svn: 345697
This commit is contained in:
parent
503d3817ed
commit
27e5e119e7
47
test/tools/llvm-objdump/symbol-table-elf.test
Normal file
47
test/tools/llvm-objdump/symbol-table-elf.test
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# RUN: yaml2obj %s > %t
|
||||||
|
# RUN: llvm-objdump --syms %t | FileCheck %s
|
||||||
|
# RUN: llvm-objdump -t %t | FileCheck %s
|
||||||
|
|
||||||
|
# CHECK: SYMBOL TABLE:
|
||||||
|
# CHECK-NEXT: 0000000000000000 *UND* 00000000
|
||||||
|
# CHECK-NEXT: 0000000000001004 l F .text 00000000 lfoo
|
||||||
|
# CHECK-NEXT: 0000000000001008 l .text 00000000 lbar
|
||||||
|
# CHECK-NEXT: 0000000000001004 g F .text 00000000 foo
|
||||||
|
# CHECK-NEXT: 0000000000001008 g .text 00000000 bar
|
||||||
|
|
||||||
|
!ELF
|
||||||
|
FileHeader:
|
||||||
|
Class: ELFCLASS64
|
||||||
|
Data: ELFDATA2LSB
|
||||||
|
Type: ET_EXEC
|
||||||
|
Machine: EM_X86_64
|
||||||
|
Sections:
|
||||||
|
- Name: .bss
|
||||||
|
Type: SHT_NOBITS
|
||||||
|
Flags: [ SHF_ALLOC ]
|
||||||
|
AddressAlign: 0x0000000000000010
|
||||||
|
Size: 64
|
||||||
|
- Name: .text
|
||||||
|
Type: SHT_PROGBITS
|
||||||
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||||
|
AddressAlign: 0x0000000000000010
|
||||||
|
Content: "00000000"
|
||||||
|
Symbols:
|
||||||
|
Global:
|
||||||
|
- Name: foo
|
||||||
|
Type: STT_FUNC
|
||||||
|
Section: .text
|
||||||
|
Value: 0x1004
|
||||||
|
- Name: bar
|
||||||
|
Type: STT_OBJECT
|
||||||
|
Section: .text
|
||||||
|
Value: 0x1008
|
||||||
|
Local:
|
||||||
|
- Name: lfoo
|
||||||
|
Type: STT_FUNC
|
||||||
|
Section: .text
|
||||||
|
Value: 0x1004
|
||||||
|
- Name: lbar
|
||||||
|
Type: STT_OBJECT
|
||||||
|
Section: .text
|
||||||
|
Value: 0x1008
|
@ -122,8 +122,9 @@ static cl::alias SectionContentsShort("s",
|
|||||||
cl::desc("Alias for --full-contents"),
|
cl::desc("Alias for --full-contents"),
|
||||||
cl::aliasopt(SectionContents));
|
cl::aliasopt(SectionContents));
|
||||||
|
|
||||||
cl::opt<bool>
|
cl::opt<bool> llvm::SymbolTable("syms", cl::desc("Display the symbol table"));
|
||||||
llvm::SymbolTable("t", cl::desc("Display the symbol table"));
|
static cl::alias SymbolTableShort("t", cl::desc("Alias for --syms"),
|
||||||
|
cl::aliasopt(llvm::SymbolTable));
|
||||||
|
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
llvm::ExportsTrie("exports-trie", cl::desc("Display mach-o exported symbols"));
|
llvm::ExportsTrie("exports-trie", cl::desc("Display mach-o exported symbols"));
|
||||||
|
Loading…
Reference in New Issue
Block a user