Changeset View
Changeset View
Standalone View
Standalone View
contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp
Show First 20 Lines • Show All 2,081 Lines • ▼ Show 20 Lines | if (Absolute) { | ||||
StringRef SegmentName = MachO->getSectionFinalSegmentName(DR); | StringRef SegmentName = MachO->getSectionFinalSegmentName(DR); | ||||
outs() << SegmentName << ","; | outs() << SegmentName << ","; | ||||
} | } | ||||
StringRef SectionName; | StringRef SectionName; | ||||
error(Section->getName(SectionName)); | error(Section->getName(SectionName)); | ||||
outs() << SectionName; | outs() << SectionName; | ||||
} | } | ||||
outs() << '\t'; | |||||
if (Common || isa<ELFObjectFileBase>(O)) { | if (Common || isa<ELFObjectFileBase>(O)) { | ||||
uint64_t Val = | uint64_t Val = | ||||
Common ? Symbol.getAlignment() : ELFSymbolRef(Symbol).getSize(); | Common ? Symbol.getAlignment() : ELFSymbolRef(Symbol).getSize(); | ||||
outs() << format("\t %08" PRIx64 " ", Val); | outs() << format("\t%08" PRIx64, Val); | ||||
} | } | ||||
if (Hidden) | if (isa<ELFObjectFileBase>(O)) { | ||||
uint8_t Other = ELFSymbolRef(Symbol).getOther(); | |||||
switch (Other) { | |||||
case ELF::STV_DEFAULT: | |||||
break; | |||||
case ELF::STV_INTERNAL: | |||||
outs() << " .internal"; | |||||
break; | |||||
case ELF::STV_HIDDEN: | |||||
outs() << ".hidden "; | outs() << " .hidden"; | ||||
break; | |||||
case ELF::STV_PROTECTED: | |||||
outs() << " .protected"; | |||||
break; | |||||
default: | |||||
outs() << format(" 0x%02x", Other); | |||||
break; | |||||
} | |||||
} else if (Hidden) { | |||||
outs() << " .hidden"; | |||||
} | |||||
if (Demangle) | if (Demangle) | ||||
outs() << demangle(Name) << '\n'; | outs() << ' ' << demangle(Name) << '\n'; | ||||
else | else | ||||
outs() << Name << '\n'; | outs() << ' ' << Name << '\n'; | ||||
} | } | ||||
} | } | ||||
static void printUnwindInfo(const ObjectFile *O) { | static void printUnwindInfo(const ObjectFile *O) { | ||||
outs() << "Unwind info:\n\n"; | outs() << "Unwind info:\n\n"; | ||||
if (const COFFObjectFile *Coff = dyn_cast<COFFObjectFile>(O)) | if (const COFFObjectFile *Coff = dyn_cast<COFFObjectFile>(O)) | ||||
printCOFFUnwindInfo(Coff); | printCOFFUnwindInfo(Coff); | ||||
▲ Show 20 Lines • Show All 417 Lines • Show Last 20 Lines |