[llvm-readobj] Dump MachO indirect symbols.

Example output:

File: <stdin>
Format: Mach-O 32-bit i386
Arch: i386
AddressSize: 32bit
Indirect Symbols {

Number: 3
Symbols [
  Entry {
    Entry Index: 0
    Symbol Index: 0x4
  }
  Entry {
    Entry Index: 1
    Symbol Index: 0x0
  }
  Entry {
    Entry Index: 2
    Symbol Index: 0x1
  }
]
}

Differential Revision:	http://reviews.llvm.org/D12570

llvm-svn: 246789
This commit is contained in:
Davide Italiano
2015-09-03 18:10:28 +00:00
parent 7772978ccf
commit 4410b22cea
3 changed files with 25 additions and 0 deletions

View File

@@ -187,6 +187,11 @@ namespace opts {
MachODataInCode("macho-data-in-code",
cl::desc("Display MachO Data in Code command"));
// -macho-indirect-symbols
cl::opt<bool>
MachOIndirectSymbols("macho-indirect-symbols",
cl::desc("Display MachO indirect symbols"));
// -macho-segment
cl::opt<bool>
MachOSegment("macho-segment",
@@ -336,6 +341,8 @@ static void dumpObject(const ObjectFile *Obj) {
if (Obj->isMachO()) {
if (opts::MachODataInCode)
Dumper->printMachODataInCode();
if (opts::MachOIndirectSymbols)
Dumper->printMachOIndirectSymbols();
if (opts::MachOSegment)
Dumper->printMachOSegment();
if (opts::MachOVersionMin)