LLVM API Documentation
#include "llvm/Object/MachO.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/StringSwitch.h"#include "llvm/ADT/Triple.h"#include "llvm/Support/DataExtractor.h"#include "llvm/Support/Debug.h"#include "llvm/Support/Format.h"#include "llvm/Support/Host.h"#include "llvm/Support/LEB128.h"#include "llvm/Support/MachO.h"#include "llvm/Support/MemoryBuffer.h"#include "llvm/Support/raw_ostream.h"#include <cctype>#include <cstring>#include <limits>
Go to the source code of this file.
Definition at line 107 of file MachOObjectFile.cpp.
Referenced by llvm::IntervalMapOverlaps< MapA, MapB >::advanceTo(), llvm::MipsTargetLowering::MipsCC::analyzeFormalArguments(), llvm::DOTGraphTraits< SelectionDAG * >::getEdgeTarget(), getGEPInductionOperand(), llvm::IntervalMapOverlaps< MapA, MapB >::IntervalMapOverlaps(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs, SkipDebug, ByOperand, ByInstr, ByBundle >::operator++(), llvm::MachineRegisterInfo::defusechain_instr_iterator< ReturnUses, ReturnDefs, SkipDebug, ByOperand, ByInstr, ByBundle >::operator++(), printRelocationTargetName(), llvm::IntervalMapOverlaps< MapA, MapB >::skipA(), and llvm::IntervalMapOverlaps< MapA, MapB >::skipB().
| static unsigned getCPUType | ( | const MachOObjectFile * | O | ) | [static] |
Definition at line 112 of file MachOObjectFile.cpp.
References llvm::MachO::mach_header::cputype, and llvm::object::MachOObjectFile::getHeader().
Referenced by llvm::object::MachOObjectFile::getFileFormatName(), and llvm::object::MachOObjectFile::isRelocationScattered().
| static uint32_t getPlainRelocationAddress | ( | const MachO::any_relocation_info & | RE | ) | [static] |
Definition at line 183 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word0.
Referenced by llvm::object::MachOObjectFile::getAnyRelocationAddress(), and llvm::object::MachOObjectFile::isRelocationScattered().
| static unsigned getPlainRelocationLength | ( | const MachOObjectFile * | O, |
| const MachO::any_relocation_info & | RE | ||
| ) | [static] |
Definition at line 205 of file MachOObjectFile.cpp.
References llvm::object::Binary::isLittleEndian(), and llvm::MachO::any_relocation_info::r_word1.
Referenced by llvm::object::MachOObjectFile::getAnyRelocationLength().
| static bool getPlainRelocationPCRel | ( | const MachOObjectFile * | O, |
| const MachO::any_relocation_info & | RE | ||
| ) | [static] |
Definition at line 192 of file MachOObjectFile.cpp.
References llvm::object::Binary::isLittleEndian(), and llvm::MachO::any_relocation_info::r_word1.
Referenced by llvm::object::MachOObjectFile::getAnyRelocationPCRel().
| static unsigned getPlainRelocationType | ( | const MachOObjectFile * | O, |
| const MachO::any_relocation_info & | RE | ||
| ) | [static] |
Definition at line 217 of file MachOObjectFile.cpp.
References llvm::object::Binary::isLittleEndian(), and llvm::MachO::any_relocation_info::r_word1.
Referenced by llvm::object::MachOObjectFile::getAnyRelocationType().
| static const char* getPtr | ( | const MachOObjectFile * | O, |
| size_t | Offset | ||
| ) | [static] |
Definition at line 87 of file MachOObjectFile.cpp.
References llvm::StringRef::data(), llvm::object::Binary::getData(), and llvm::StringRef::substr().
Referenced by llvm::object::MachOObjectFile::begin_dices(), llvm::object::MachOObjectFile::end_dices(), llvm::object::MachOObjectFile::getDataInCodeTableEntry(), llvm::object::MachOObjectFile::getDyldInfoBindOpcodes(), llvm::object::MachOObjectFile::getDyldInfoExportsTrie(), llvm::object::MachOObjectFile::getDyldInfoLazyBindOpcodes(), llvm::object::MachOObjectFile::getDyldInfoRebaseOpcodes(), llvm::object::MachOObjectFile::getDyldInfoWeakBindOpcodes(), llvm::object::MachOObjectFile::getFirstLoadCommandInfo(), llvm::object::MachOObjectFile::getHeader(), llvm::object::MachOObjectFile::getHeader64(), llvm::object::MachOObjectFile::getIndirectSymbolTableEntry(), llvm::object::MachOObjectFile::getRelocation(), llvm::object::MachOObjectFile::getRelocationSymbol(), llvm::object::MachOObjectFile::getSymbolByIndex(), and llvm::object::MachOObjectFile::symbol_end_impl().
| static unsigned getScatteredRelocationAddress | ( | const MachO::any_relocation_info & | RE | ) | [static] |
Definition at line 188 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word0.
Referenced by llvm::object::MachOObjectFile::getAnyRelocationAddress().
| static unsigned getScatteredRelocationLength | ( | const MachO::any_relocation_info & | RE | ) | [static] |
Definition at line 213 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word0.
Referenced by llvm::object::MachOObjectFile::getAnyRelocationLength().
| static bool getScatteredRelocationPCRel | ( | const MachOObjectFile * | O, |
| const MachO::any_relocation_info & | RE | ||
| ) | [static] |
Definition at line 200 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word0.
Referenced by llvm::object::MachOObjectFile::getAnyRelocationPCRel().
| static unsigned getScatteredRelocationType | ( | const MachO::any_relocation_info & | RE | ) | [static] |
Definition at line 225 of file MachOObjectFile.cpp.
References llvm::MachO::any_relocation_info::r_word0.
Referenced by llvm::object::MachOObjectFile::getAnyRelocationType().
| static uint32_t getSectionFlags | ( | const MachOObjectFile * | O, |
| DataRefImpl | Sec | ||
| ) | [static] |
Definition at line 229 of file MachOObjectFile.cpp.
References llvm::MachO::section::flags, llvm::MachO::section_64::flags, llvm::object::MachOObjectFile::getSection(), llvm::object::MachOObjectFile::getSection64(), and llvm::object::MachOObjectFile::is64Bit().
Referenced by llvm::object::MachOObjectFile::isSectionBSS(), llvm::object::MachOObjectFile::isSectionData(), llvm::object::MachOObjectFile::isSectionText(), and llvm::object::MachOObjectFile::isSectionZeroInit().
| static const char* getSectionPtr | ( | const MachOObjectFile * | O, |
| MachOObjectFile::LoadCommandInfo | L, | ||
| unsigned | Sec | ||
| ) | [static] |
Definition at line 73 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::is64Bit(), llvm::object::MachOObjectFile::LoadCommandInfo::Ptr, and llvm::COFF::SectionSize.
Referenced by llvm::object::MachOObjectFile::MachOObjectFile().
| static uint32_t getSegmentLoadCommandNumSections | ( | const MachOObjectFile * | O, |
| const MachOObjectFile::LoadCommandInfo & | L | ||
| ) | [static] |
Definition at line 51 of file MachOObjectFile.cpp.
References llvm::object::MachOObjectFile::getSegment64LoadCommand(), llvm::object::MachOObjectFile::getSegmentLoadCommand(), llvm::object::MachOObjectFile::is64Bit(), llvm::MachO::segment_command::nsects, and llvm::MachO::segment_command_64::nsects.
Referenced by llvm::object::MachOObjectFile::MachOObjectFile().
| static T getStruct | ( | const MachOObjectFile * | O, |
| const char * | P | ||
| ) | [static] |
Definition at line 42 of file MachOObjectFile.cpp.
References llvm::object::Binary::isLittleEndian(), llvm::sys::IsLittleEndianHost, llvm::LibFunc::memcpy, and llvm::MachO::swapStruct().
| static MachO::nlist_base getSymbolTableEntryBase | ( | const MachOObjectFile * | O, |
| DataRefImpl | DRI | ||
| ) | [static] |
Definition at line 92 of file MachOObjectFile.cpp.
References llvm::object::DataRefImpl::p, and P.
Referenced by llvm::object::MachOObjectFile::getSymbolAlignment(), llvm::object::MachOObjectFile::getSymbolFlags(), llvm::object::MachOObjectFile::getSymbolName(), llvm::object::MachOObjectFile::getSymbolSection(), llvm::object::MachOObjectFile::getSymbolSize(), and llvm::object::MachOObjectFile::getSymbolType().
| static bool isPageZeroSegment | ( | const MachOObjectFile * | O, |
| const MachOObjectFile::LoadCommandInfo & | L | ||
| ) | [static] |
Definition at line 61 of file MachOObjectFile.cpp.
References llvm::StringRef::equals(), llvm::object::MachOObjectFile::getSegment64LoadCommand(), llvm::object::MachOObjectFile::getSegmentLoadCommand(), llvm::object::MachOObjectFile::is64Bit(), llvm::MachO::segment_command::segname, and llvm::MachO::segment_command_64::segname.
Referenced by llvm::object::MachOObjectFile::MachOObjectFile().
| static StringRef parseSegmentOrSectionName | ( | const char * | P | ) | [static] |
Definition at line 97 of file MachOObjectFile.cpp.
Referenced by llvm::object::MachOObjectFile::getSectionFinalSegmentName(), and llvm::object::MachOObjectFile::getSectionName().
| static void printRelocationTargetName | ( | const MachOObjectFile * | O, |
| const MachO::any_relocation_info & | RE, | ||
| raw_string_ostream & | fmt | ||
| ) | [static] |
Definition at line 116 of file MachOObjectFile.cpp.
References advance(), llvm::format(), llvm::object::SymbolRef::getName(), llvm::object::MachOObjectFile::getPlainRelocationExternal(), llvm::object::MachOObjectFile::getPlainRelocationSymbolNum(), llvm::object::MachOObjectFile::isRelocationScattered(), Name, llvm::report_fatal_error(), llvm::ARMBuildAttrs::Section, llvm::object::MachOObjectFile::section_begin(), llvm::object::ObjectFile::sections(), llvm::ARMBuildAttrs::Symbol, llvm::object::SymbolicFile::symbol_begin(), and llvm::object::ObjectFile::symbols().
Referenced by llvm::object::MachOObjectFile::getRelocationValueString().