LLVM  3.7.0
Functions
MachOObjectFile.cpp File Reference
#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>
Include dependency graph for MachOObjectFile.cpp:

Go to the source code of this file.

Functions

template<typename T >
static T getStruct (const MachOObjectFile *O, const char *P)
 
template<typename T >
static ErrorOr< TgetStructOrErr (const MachOObjectFile *O, const char *P)
 
static const char * getSectionPtr (const MachOObjectFile *O, MachOObjectFile::LoadCommandInfo L, unsigned Sec)
 
static const char * getPtr (const MachOObjectFile *O, size_t Offset)
 
static MachO::nlist_base getSymbolTableEntryBase (const MachOObjectFile *O, DataRefImpl DRI)
 
static StringRef parseSegmentOrSectionName (const char *P)
 
template<class T >
static void advance (T &it, size_t Val)
 
static unsigned getCPUType (const MachOObjectFile *O)
 
static uint32_t getPlainRelocationAddress (const MachO::any_relocation_info &RE)
 
static unsigned getScatteredRelocationAddress (const MachO::any_relocation_info &RE)
 
static bool getPlainRelocationPCRel (const MachOObjectFile *O, const MachO::any_relocation_info &RE)
 
static bool getScatteredRelocationPCRel (const MachOObjectFile *O, const MachO::any_relocation_info &RE)
 
static unsigned getPlainRelocationLength (const MachOObjectFile *O, const MachO::any_relocation_info &RE)
 
static unsigned getScatteredRelocationLength (const MachO::any_relocation_info &RE)
 
static unsigned getPlainRelocationType (const MachOObjectFile *O, const MachO::any_relocation_info &RE)
 
static uint32_t getSectionFlags (const MachOObjectFile *O, DataRefImpl Sec)
 
static ErrorOr
< MachOObjectFile::LoadCommandInfo
getLoadCommandInfo (const MachOObjectFile *Obj, const char *Ptr)
 
static ErrorOr
< MachOObjectFile::LoadCommandInfo
getFirstLoadCommandInfo (const MachOObjectFile *Obj)
 
static ErrorOr
< MachOObjectFile::LoadCommandInfo
getNextLoadCommandInfo (const MachOObjectFile *Obj, const MachOObjectFile::LoadCommandInfo &L)
 
template<typename T >
static void parseHeader (const MachOObjectFile *Obj, T &Header, std::error_code &EC)
 
template<typename SegmentCmd >
static std::error_code parseSegmentLoadCommand (const MachOObjectFile *Obj, const MachOObjectFile::LoadCommandInfo &Load, SmallVectorImpl< const char * > &Sections, bool &IsPageZeroSegment)
 

Function Documentation

template<class T >
static void advance ( T it,
size_t  Val 
)
static
static unsigned getCPUType ( const MachOObjectFile *  O)
static
static ErrorOr<MachOObjectFile::LoadCommandInfo> getFirstLoadCommandInfo ( const MachOObjectFile *  Obj)
static

Definition at line 178 of file MachOObjectFile.cpp.

References getLoadCommandInfo(), and getPtr().

Referenced by llvm::object::MachOObjectFile::MachOObjectFile().

static ErrorOr<MachOObjectFile::LoadCommandInfo> getLoadCommandInfo ( const MachOObjectFile *  Obj,
const char *  Ptr 
)
static
static ErrorOr<MachOObjectFile::LoadCommandInfo> getNextLoadCommandInfo ( const MachOObjectFile *  Obj,
const MachOObjectFile::LoadCommandInfo L 
)
static
static uint32_t getPlainRelocationAddress ( const MachO::any_relocation_info RE)
static
static unsigned getPlainRelocationLength ( const MachOObjectFile *  O,
const MachO::any_relocation_info RE 
)
static
static bool getPlainRelocationPCRel ( const MachOObjectFile *  O,
const MachO::any_relocation_info RE 
)
static
static unsigned getPlainRelocationType ( const MachOObjectFile *  O,
const MachO::any_relocation_info RE 
)
static
static const char* getPtr ( const MachOObjectFile *  O,
size_t  Offset 
)
static
static unsigned getScatteredRelocationAddress ( const MachO::any_relocation_info RE)
static
static unsigned getScatteredRelocationLength ( const MachO::any_relocation_info RE)
static
static bool getScatteredRelocationPCRel ( const MachOObjectFile *  O,
const MachO::any_relocation_info RE 
)
static
static uint32_t getSectionFlags ( const MachOObjectFile *  O,
DataRefImpl  Sec 
)
static
static const char* getSectionPtr ( const MachOObjectFile *  O,
MachOObjectFile::LoadCommandInfo  L,
unsigned  Sec 
)
static
template<typename T >
static T getStruct ( const MachOObjectFile *  O,
const char *  P 
)
static
template<typename T >
static ErrorOr<T> getStructOrErr ( const MachOObjectFile *  O,
const char *  P 
)
static
static MachO::nlist_base getSymbolTableEntryBase ( const MachOObjectFile *  O,
DataRefImpl  DRI 
)
static
template<typename T >
static void parseHeader ( const MachOObjectFile *  Obj,
T Header,
std::error_code &  EC 
)
static

Definition at line 191 of file MachOObjectFile.cpp.

References getPtr().

Referenced by llvm::object::MachOObjectFile::MachOObjectFile().

template<typename SegmentCmd >
static std::error_code parseSegmentLoadCommand ( const MachOObjectFile *  Obj,
const MachOObjectFile::LoadCommandInfo Load,
SmallVectorImpl< const char * > &  Sections,
bool IsPageZeroSegment 
)
static
static StringRef parseSegmentOrSectionName ( const char *  P)
static