Lines Matching defs:MachOObjectFile

1 //===- MachOObjectFile.cpp - Mach-O object file binding ---------*- C++ -*-===//
10 // This file defines the MachOObjectFile class, which binds the MachOObject
239 T getStruct(const MachOObjectFile *O, const char *P) {
248 getSegmentLoadCommandNumSections(const MachOObjectFile *O,
249 const MachOObjectFile::LoadCommandInfo &L) {
259 getSectionPtr(const MachOObjectFile *O, MachOObjectFile::LoadCommandInfo L,
273 static const char *getPtr(const MachOObjectFile *O, size_t Offset) {
278 getSymbolTableEntryBase(const MachOObjectFile *O, DataRefImpl DRI) {
298 static unsigned getCPUType(const MachOObjectFile *O) {
302 static void printRelocationTargetName(const MachOObjectFile *O,
378 static bool getPlainRelocationPCRel(const MachOObjectFile *O,
386 getScatteredRelocationPCRel(const MachOObjectFile *O,
391 static unsigned getPlainRelocationLength(const MachOObjectFile *O,
403 static unsigned getPlainRelocationType(const MachOObjectFile *O,
415 static uint32_t getSectionFlags(const MachOObjectFile *O,
425 MachOObjectFile::MachOObjectFile(std::unique_ptr<MemoryBuffer> Object,
435 MachOObjectFile::LoadCommandInfo Load = getFirstLoadCommandInfo();
467 void MachOObjectFile::moveSymbolNext(DataRefImpl &Symb) const {
474 std::error_code MachOObjectFile::getSymbolName(DataRefImpl Symb,
485 std::error_code MachOObjectFile::getIndirectName(DataRefImpl Symb,
507 std::error_code MachOObjectFile::getSymbolAddress(DataRefImpl Symb,
527 std::error_code MachOObjectFile::getSymbolAlignment(DataRefImpl DRI,
539 std::error_code MachOObjectFile::getSymbolSize(DataRefImpl DRI,
588 std::error_code MachOObjectFile::getSymbolType(DataRefImpl Symb,
612 uint32_t MachOObjectFile::getSymbolFlags(DataRefImpl DRI) const {
648 std::error_code MachOObjectFile::getSymbolSection(DataRefImpl Symb,
664 void MachOObjectFile::moveSectionNext(DataRefImpl &Sec) const {
668 std::error_code MachOObjectFile::getSectionName(DataRefImpl Sec,
675 std::error_code MachOObjectFile::getSectionAddress(DataRefImpl Sec,
687 std::error_code MachOObjectFile::getSectionSize(DataRefImpl Sec,
700 std::error_code MachOObjectFile::getSectionContents(DataRefImpl Sec,
719 std::error_code MachOObjectFile::getSectionAlignment(DataRefImpl Sec,
734 std::error_code MachOObjectFile::isSectionText(DataRefImpl Sec,
741 std::error_code MachOObjectFile::isSectionData(DataRefImpl Sec,
751 std::error_code MachOObjectFile::isSectionBSS(DataRefImpl Sec,
762 MachOObjectFile::isSectionRequiredForExecution(DataRefImpl Sec,
769 std::error_code MachOObjectFile::isSectionVirtual(DataRefImpl Sec,
776 std::error_code MachOObjectFile::isSectionZeroInit(DataRefImpl Sec,
785 std::error_code MachOObjectFile::isSectionReadOnlyData(DataRefImpl Sec,
796 std::error_code MachOObjectFile::sectionContainsSymbol(DataRefImpl Sec,
818 relocation_iterator MachOObjectFile::section_rel_begin(DataRefImpl Sec) const {
826 MachOObjectFile::section_rel_end(DataRefImpl Sec) const {
842 void MachOObjectFile::moveRelocationNext(DataRefImpl &Rel) const {
846 std::error_code MachOObjectFile::getRelocationAddress(DataRefImpl Rel,
859 std::error_code MachOObjectFile::getRelocationOffset(DataRefImpl Rel,
869 MachOObjectFile::getRelocationSymbol(DataRefImpl Rel) const {
889 std::error_code MachOObjectFile::getRelocationType(DataRefImpl Rel,
897 MachOObjectFile::getRelocationTypeName(DataRefImpl Rel,
1010 MachOObjectFile::getRelocationValueString(DataRefImpl Rel,
1185 std::error_code MachOObjectFile::getRelocationHidden(DataRefImpl Rel,
1213 std::error_code MachOObjectFile::getLibraryNext(DataRefImpl LibData,
1215 report_fatal_error("Needed libraries unimplemented in MachOObjectFile");
1218 std::error_code MachOObjectFile::getLibraryPath(DataRefImpl LibData,
1220 report_fatal_error("Needed libraries unimplemented in MachOObjectFile");
1251 StringRef MachOObjectFile::guessLibraryShortName(StringRef Name,
1370 std::error_code MachOObjectFile::getLibraryShortNameByIndex(unsigned Index,
1406 basic_symbol_iterator MachOObjectFile::symbol_begin_impl() const {
1410 basic_symbol_iterator MachOObjectFile::symbol_end_impl() const {
1425 basic_symbol_iterator MachOObjectFile::getSymbolByIndex(unsigned Index) const {
1439 section_iterator MachOObjectFile::section_begin() const {
1444 section_iterator MachOObjectFile::section_end() const {
1450 library_iterator MachOObjectFile::needed_library_begin() const {
1452 report_fatal_error("Needed libraries unimplemented in MachOObjectFile");
1455 library_iterator MachOObjectFile::needed_library_end() const {
1457 report_fatal_error("Needed libraries unimplemented in MachOObjectFile");
1460 uint8_t MachOObjectFile::getBytesInAddress() const {
1464 StringRef MachOObjectFile::getFileFormatName() const {
1498 Triple::ArchType MachOObjectFile::getArch(uint32_t CPUType) {
1517 Triple MachOObjectFile::getArch(uint32_t CPUType, uint32_t CPUSubType) {
1582 Triple MachOObjectFile::getHostArch() {
1586 Triple MachOObjectFile::getArch(StringRef ArchFlag) {
1619 unsigned MachOObjectFile::getArch() const {
1623 StringRef MachOObjectFile::getLoadName() const {
1625 report_fatal_error("get_load_name() unimplemented in MachOObjectFile");
1628 relocation_iterator MachOObjectFile::section_rel_begin(unsigned Index) const {
1634 relocation_iterator MachOObjectFile::section_rel_end(unsigned Index) const {
1640 dice_iterator MachOObjectFile::begin_dices() const {
1650 dice_iterator MachOObjectFile::end_dices() const {
1662 MachOObjectFile::getSectionFinalSegmentName(DataRefImpl Sec) const {
1668 MachOObjectFile::getSectionRawName(DataRefImpl Sec) const {
1675 MachOObjectFile::getSectionRawFinalSegmentName(DataRefImpl Sec) const {
1682 MachOObjectFile::isRelocationScattered(const MachO::any_relocation_info &RE)
1689 unsigned MachOObjectFile::getPlainRelocationSymbolNum(
1696 bool MachOObjectFile::getPlainRelocationExternal(
1703 bool MachOObjectFile::getScatteredRelocationScattered(
1708 uint32_t MachOObjectFile::getScatteredRelocationValue(
1713 unsigned MachOObjectFile::getAnyRelocationAddress(
1720 unsigned MachOObjectFile::getAnyRelocationPCRel(
1727 unsigned MachOObjectFile::getAnyRelocationLength(
1735 MachOObjectFile::getAnyRelocationType(
1743 MachOObjectFile::getRelocationSection(
1753 MachOObjectFile::LoadCommandInfo
1754 MachOObjectFile::getFirstLoadCommandInfo() const {
1755 MachOObjectFile::LoadCommandInfo Load;
1764 MachOObjectFile::LoadCommandInfo
1765 MachOObjectFile::getNextLoadCommandInfo(const LoadCommandInfo &L) const {
1766 MachOObjectFile::LoadCommandInfo Next;
1772 MachO::section MachOObjectFile::getSection(DataRefImpl DRI) const {
1776 MachO::section_64 MachOObjectFile::getSection64(DataRefImpl DRI) const {
1780 MachO::section MachOObjectFile::getSection(const LoadCommandInfo &L,
1786 MachO::section_64 MachOObjectFile::getSection64(const LoadCommandInfo &L,
1793 MachOObjectFile::getSymbolTableEntry(DataRefImpl DRI) const {
1799 MachOObjectFile::getSymbol64TableEntry(DataRefImpl DRI) const {
1805 MachOObjectFile::getLinkeditDataLoadCommand(const LoadCommandInfo &L) const {
1810 MachOObjectFile::getSegmentLoadCommand(const LoadCommandInfo &L) const {
1815 MachOObjectFile::getSegment64LoadCommand(const LoadCommandInfo &L) const {
1820 MachOObjectFile::getLinkerOptionsLoadCommand(const LoadCommandInfo &L) const {
1825 MachOObjectFile::getVersionMinLoadCommand(const LoadCommandInfo &L) const {
1830 MachOObjectFile::getDylibIDLoadCommand(const LoadCommandInfo &L) const {
1836 MachOObjectFile::getRelocation(DataRefImpl Rel) const {
1855 MachOObjectFile::getDice(DataRefImpl Rel) const {
1860 MachO::mach_header MachOObjectFile::getHeader() const {
1864 MachO::mach_header_64 MachOObjectFile::getHeader64() const {
1868 uint32_t MachOObjectFile::getIndirectSymbolTableEntry(
1876 MachOObjectFile::getDataInCodeTableEntry(uint32_t DataOffset,
1882 MachO::symtab_command MachOObjectFile::getSymtabLoadCommand() const {
1886 MachO::dysymtab_command MachOObjectFile::getDysymtabLoadCommand() const {
1891 MachOObjectFile::getDataInCodeLoadCommand() const {
1904 StringRef MachOObjectFile::getStringTableData() const {
1909 bool MachOObjectFile::is64Bit() const {
1914 void MachOObjectFile::ReadULEB128s(uint64_t Index,
1926 const char *MachOObjectFile::getSectionPointer(DataRefImpl Rel) const {
1934 std::unique_ptr<MachOObjectFile> Ret;
1936 Ret.reset(new MachOObjectFile(std::move(Buffer), false, false, EC));
1938 Ret.reset(new MachOObjectFile(std::move(Buffer), true, false, EC));
1940 Ret.reset(new MachOObjectFile(std::move(Buffer), false, true, EC));
1942 Ret.reset(new MachOObjectFile(std::move(Buffer), true, true, EC));