Lines Matching defs:MachOObjectFile

1 //===- MachOObjectFile.cpp - Mach-O object file binding ---------*- C++ -*-===//
10 // This file defines the MachOObjectFile class, which binds the MachOObject
217 T getStruct(const MachOObjectFile *O, const char *P) {
226 getSegmentLoadCommandNumSections(const MachOObjectFile *O,
227 const MachOObjectFile::LoadCommandInfo &L) {
237 getSectionPtr(const MachOObjectFile *O, MachOObjectFile::LoadCommandInfo L,
251 static const char *getPtr(const MachOObjectFile *O, size_t Offset) {
256 getSymbolTableEntryBase(const MachOObjectFile *O, DataRefImpl DRI) {
285 static unsigned getCPUType(const MachOObjectFile *O) {
289 static void printRelocationTargetName(const MachOObjectFile *O,
367 static bool getPlainRelocationPCRel(const MachOObjectFile *O,
375 getScatteredRelocationPCRel(const MachOObjectFile *O,
380 static unsigned getPlainRelocationLength(const MachOObjectFile *O,
392 static unsigned getPlainRelocationType(const MachOObjectFile *O,
403 static uint32_t getSectionFlags(const MachOObjectFile *O,
413 MachOObjectFile::MachOObjectFile(MemoryBuffer *Object,
422 MachOObjectFile::LoadCommandInfo Load = getFirstLoadCommandInfo();
448 error_code MachOObjectFile::getSymbolNext(DataRefImpl Symb,
458 error_code MachOObjectFile::getSymbolName(DataRefImpl Symb,
467 error_code MachOObjectFile::getSymbolAddress(DataRefImpl Symb,
480 MachOObjectFile::getSymbolFileOffset(DataRefImpl Symb,
502 error_code MachOObjectFile::getSymbolAlignment(DataRefImpl DRI,
515 error_code MachOObjectFile::getSymbolSize(DataRefImpl DRI,
561 error_code MachOObjectFile::getSymbolType(DataRefImpl Symb,
585 error_code MachOObjectFile::getSymbolNMTypeChar(DataRefImpl Symb,
611 error_code MachOObjectFile::getSymbolFlags(DataRefImpl DRI,
647 MachOObjectFile::getSymbolSection(DataRefImpl Symb,
663 error_code MachOObjectFile::getSymbolValue(DataRefImpl Symb,
665 report_fatal_error("getSymbolValue unimplemented in MachOObjectFile");
668 error_code MachOObjectFile::getSectionNext(DataRefImpl Sec,
676 MachOObjectFile::getSectionName(DataRefImpl Sec, StringRef &Result) const {
683 MachOObjectFile::getSectionAddress(DataRefImpl Sec, uint64_t &Res) const {
695 MachOObjectFile::getSectionSize(DataRefImpl Sec, uint64_t &Res) const {
708 MachOObjectFile::getSectionContents(DataRefImpl Sec, StringRef &Res) const {
727 MachOObjectFile::getSectionAlignment(DataRefImpl Sec, uint64_t &Res) const {
742 MachOObjectFile::isSectionText(DataRefImpl Sec, bool &Res) const {
748 error_code MachOObjectFile::isSectionData(DataRefImpl DRI, bool &Result) const {
754 error_code MachOObjectFile::isSectionBSS(DataRefImpl DRI, bool &Result) const {
761 MachOObjectFile::isSectionRequiredForExecution(DataRefImpl Sec,
768 error_code MachOObjectFile::isSectionVirtual(DataRefImpl Sec,
776 MachOObjectFile::isSectionZeroInit(DataRefImpl Sec, bool &Res) const {
784 error_code MachOObjectFile::isSectionReadOnlyData(DataRefImpl Sec,
796 MachOObjectFile::sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb,
817 relocation_iterator MachOObjectFile::getSectionRelBegin(DataRefImpl Sec) const {
833 MachOObjectFile::getSectionRelEnd(DataRefImpl Sec) const {
854 error_code MachOObjectFile::getRelocationNext(DataRefImpl Rel,
864 MachOObjectFile::getRelocationAddress(DataRefImpl Rel, uint64_t &Res) const {
865 report_fatal_error("getRelocationAddress not implemented in MachOObjectFile");
868 error_code MachOObjectFile::getRelocationOffset(DataRefImpl Rel,
876 MachOObjectFile::getRelocationSymbol(DataRefImpl Rel) const {
893 error_code MachOObjectFile::getRelocationType(DataRefImpl Rel,
901 MachOObjectFile::getRelocationTypeName(DataRefImpl Rel,
994 MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
1171 MachOObjectFile::getRelocationHidden(DataRefImpl Rel, bool &Result) const {
1198 error_code MachOObjectFile::getLibraryNext(DataRefImpl LibData,
1200 report_fatal_error("Needed libraries unimplemented in MachOObjectFile");
1203 error_code MachOObjectFile::getLibraryPath(DataRefImpl LibData,
1205 report_fatal_error("Needed libraries unimplemented in MachOObjectFile");
1208 symbol_iterator MachOObjectFile::begin_symbols() const {
1218 symbol_iterator MachOObjectFile::end_symbols() const {
1233 symbol_iterator MachOObjectFile::begin_dynamic_symbols() const {
1235 report_fatal_error("Dynamic symbols unimplemented in MachOObjectFile");
1238 symbol_iterator MachOObjectFile::end_dynamic_symbols() const {
1240 report_fatal_error("Dynamic symbols unimplemented in MachOObjectFile");
1243 section_iterator MachOObjectFile::begin_sections() const {
1248 section_iterator MachOObjectFile::end_sections() const {
1254 library_iterator MachOObjectFile::begin_libraries_needed() const {
1256 report_fatal_error("Needed libraries unimplemented in MachOObjectFile");
1259 library_iterator MachOObjectFile::end_libraries_needed() const {
1261 report_fatal_error("Needed libraries unimplemented in MachOObjectFile");
1264 uint8_t MachOObjectFile::getBytesInAddress() const {
1268 StringRef MachOObjectFile::getFileFormatName() const {
1300 Triple::ArchType MachOObjectFile::getArch(uint32_t CPUType) {
1317 unsigned MachOObjectFile::getArch() const {
1321 StringRef MachOObjectFile::getLoadName() const {
1323 report_fatal_error("get_load_name() unimplemented in MachOObjectFile");
1326 relocation_iterator MachOObjectFile::getSectionRelBegin(unsigned Index) const {
1332 relocation_iterator MachOObjectFile::getSectionRelEnd(unsigned Index) const {
1338 dice_iterator MachOObjectFile::begin_dices() const {
1348 dice_iterator MachOObjectFile::end_dices() const {
1360 MachOObjectFile::getSectionFinalSegmentName(DataRefImpl Sec) const {
1366 MachOObjectFile::getSectionRawName(DataRefImpl Sec) const {
1373 MachOObjectFile::getSectionRawFinalSegmentName(DataRefImpl Sec) const {
1380 MachOObjectFile::isRelocationScattered(const macho::RelocationEntry &RE)
1387 unsigned MachOObjectFile::getPlainRelocationSymbolNum(
1394 bool MachOObjectFile::getPlainRelocationExternal(
1401 bool MachOObjectFile::getScatteredRelocationScattered(
1406 uint32_t MachOObjectFile::getScatteredRelocationValue(
1411 unsigned MachOObjectFile::getAnyRelocationAddress(
1419 MachOObjectFile::getAnyRelocationPCRel(const macho::RelocationEntry &RE) const {
1425 unsigned MachOObjectFile::getAnyRelocationLength(
1433 MachOObjectFile::getAnyRelocationType(const macho::RelocationEntry &RE) const {
1440 MachOObjectFile::getRelocationSection(const macho::RelocationEntry &RE) const {
1449 MachOObjectFile::LoadCommandInfo
1450 MachOObjectFile::getFirstLoadCommandInfo() const {
1451 MachOObjectFile::LoadCommandInfo Load;
1459 MachOObjectFile::LoadCommandInfo
1460 MachOObjectFile::getNextLoadCommandInfo(const LoadCommandInfo &L) const {
1461 MachOObjectFile::LoadCommandInfo Next;
1467 macho::Section MachOObjectFile::getSection(DataRefImpl DRI) const {
1471 macho::Section64 MachOObjectFile::getSection64(DataRefImpl DRI) const {
1475 macho::Section MachOObjectFile::getSection(const LoadCommandInfo &L,
1481 macho::Section64 MachOObjectFile::getSection64(const LoadCommandInfo &L,
1488 MachOObjectFile::getSymbolTableEntry(DataRefImpl DRI) const {
1494 MachOObjectFile::getSymbol64TableEntry(DataRefImpl DRI) const {
1499 macho::LinkeditDataLoadCommand MachOObjectFile::getLinkeditDataLoadCommand(
1500 const MachOObjectFile::LoadCommandInfo &L) const {
1505 MachOObjectFile::getSegmentLoadCommand(const LoadCommandInfo &L) const {
1510 MachOObjectFile::getSegment64LoadCommand(const LoadCommandInfo &L) const {
1515 MachOObjectFile::getLinkerOptionsLoadCommand(const LoadCommandInfo &L) const {
1520 MachOObjectFile::getRelocation(DataRefImpl Rel) const {
1526 MachOObjectFile::getDice(DataRefImpl Rel) const {
1531 macho::Header MachOObjectFile::getHeader() const {
1535 macho::Header64Ext MachOObjectFile::getHeader64Ext() const {
1540 macho::IndirectSymbolTableEntry MachOObjectFile::getIndirectSymbolTableEntry(
1549 MachOObjectFile::getDataInCodeTableEntry(uint32_t DataOffset,
1555 macho::SymtabLoadCommand MachOObjectFile::getSymtabLoadCommand() const {
1559 macho::DysymtabLoadCommand MachOObjectFile::getDysymtabLoadCommand() const {
1564 MachOObjectFile::getDataInCodeLoadCommand() const {
1577 StringRef MachOObjectFile::getStringTableData() const {
1582 bool MachOObjectFile::is64Bit() const {
1587 void MachOObjectFile::ReadULEB128s(uint64_t Index,
1604 Ret.reset(new MachOObjectFile(Buffer, false, false, ec));
1606 Ret.reset(new MachOObjectFile(Buffer, true, false, ec));
1608 Ret.reset(new MachOObjectFile(Buffer, false, true, ec));
1610 Ret.reset(new MachOObjectFile(Buffer, true, true, ec));