mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Template the MachO types over endianness.
For now they are still only used as little endian. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179147 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -199,7 +199,7 @@ static void emitDOTFile(const char *FileName, const MCFunction &f,
|
||||
Out << "}\n";
|
||||
}
|
||||
|
||||
static void getSectionsAndSymbols(const MachOFormat::Header *Header,
|
||||
static void getSectionsAndSymbols(const MachOObjectFileBase::Header *Header,
|
||||
MachOObjectFileBase *MachOObj,
|
||||
std::vector<SectionRef> &Sections,
|
||||
std::vector<SymbolRef> &Symbols,
|
||||
@ -218,12 +218,13 @@ static void getSectionsAndSymbols(const MachOFormat::Header *Header,
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i != Header->NumLoadCommands; ++i) {
|
||||
const MachOFormat::LoadCommand *Command = MachOObj->getLoadCommandInfo(i);
|
||||
const MachOObjectFileBase::LoadCommand *Command =
|
||||
MachOObj->getLoadCommandInfo(i);
|
||||
if (Command->Type == macho::LCT_FunctionStarts) {
|
||||
// We found a function starts segment, parse the addresses for later
|
||||
// consumption.
|
||||
const MachOFormat::LinkeditDataLoadCommand *LLC =
|
||||
reinterpret_cast<const MachOFormat::LinkeditDataLoadCommand*>(Command);
|
||||
const MachOObjectFileBase::LinkeditDataLoadCommand *LLC =
|
||||
reinterpret_cast<const MachOObjectFileBase::LinkeditDataLoadCommand*>(Command);
|
||||
|
||||
MachOObj->ReadULEB128s(LLC->DataOffset, FoundFns);
|
||||
}
|
||||
@ -269,7 +270,7 @@ void llvm::DisassembleInputMachO(StringRef Filename) {
|
||||
|
||||
outs() << '\n' << Filename << ":\n\n";
|
||||
|
||||
const MachOFormat::Header *Header = MachOOF->getHeader();
|
||||
const MachOObjectFileBase::Header *Header = MachOOF->getHeader();
|
||||
|
||||
std::vector<SectionRef> Sections;
|
||||
std::vector<SymbolRef> Symbols;
|
||||
|
Reference in New Issue
Block a user