LLVM 20.0.0git
|
#include "MachOReader.h"
#include "MachOObject.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Object/MachO.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/SystemZ/zOSSupport.h"
#include <memory>
#include "llvm/BinaryFormat/MachO.def"
Go to the source code of this file.
Macros | |
#define | HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) |
Functions | |
template<typename SectionType > | |
static Section | constructSectionCommon (const SectionType &Sec, uint32_t Index) |
Section | constructSection (const MachO::section &Sec, uint32_t Index) |
Section | constructSection (const MachO::section_64 &Sec, uint32_t Index) |
template<typename SectionType , typename SegmentType > | |
static Expected< std::vector< std::unique_ptr< Section > > > | extractSections (const object::MachOObjectFile::LoadCommandInfo &LoadCmd, const object::MachOObjectFile &MachOObj, uint32_t &NextSectionIndex) |
template<typename nlist_t > | |
SymbolEntry | constructSymbolEntry (StringRef StrTable, const nlist_t &nlist) |
#define HANDLE_LOAD_COMMAND | ( | LCName, | |
LCValue, | |||
LCStruct | |||
) |
Section constructSection | ( | const MachO::section & | Sec, |
uint32_t | Index | ||
) |
Definition at line 50 of file MachOReader.cpp.
References constructSectionCommon().
Referenced by extractSections().
Section constructSection | ( | const MachO::section_64 & | Sec, |
uint32_t | Index | ||
) |
Definition at line 54 of file MachOReader.cpp.
References constructSectionCommon(), llvm::MachO::section_64::reserved3, and llvm::objcopy::macho::Section::Reserved3.
|
static |
Definition at line 32 of file MachOReader.cpp.
References llvm::objcopy::macho::Section::Addr, llvm::objcopy::macho::Section::Align, llvm::objcopy::macho::Section::Flags, llvm::objcopy::macho::Section::Index, llvm::objcopy::macho::Section::NReloc, llvm::objcopy::macho::Section::OriginalOffset, llvm::objcopy::macho::Section::RelOff, llvm::objcopy::macho::Section::Reserved1, llvm::objcopy::macho::Section::Reserved2, llvm::objcopy::macho::Section::Reserved3, and llvm::objcopy::macho::Section::Size.
Referenced by constructSection().
SymbolEntry constructSymbolEntry | ( | StringRef | StrTable, |
const nlist_t & | nlist | ||
) |
Definition at line 222 of file MachOReader.cpp.
References assert(), llvm::StringRef::data(), llvm::objcopy::macho::SymbolEntry::n_desc, llvm::objcopy::macho::SymbolEntry::n_sect, llvm::objcopy::macho::SymbolEntry::n_type, llvm::objcopy::macho::SymbolEntry::n_value, llvm::objcopy::macho::SymbolEntry::Name, llvm::StringRef::size(), and llvm::StringRef::str().
|
static |
Definition at line 61 of file MachOReader.cpp.
References llvm::MachO::ARM64_RELOC_ADDEND, assert(), llvm::object::MachOObjectFile::LoadCommandInfo::C, llvm::MachO::load_command::cmdsize, constructSection(), llvm::objcopy::macho::Section::Content, llvm::MachO::CPU_TYPE_ARM64, llvm::MachO::mach_header::cputype, llvm::Data, End, llvm::object::MachOObjectFile::getAnyRelocationType(), llvm::object::MachOObjectFile::getHeader(), llvm::object::MachOObjectFile::getPlainRelocationExternal(), llvm::object::MachOObjectFile::getRelocation(), llvm::object::MachOObjectFile::getSection(), llvm::object::MachOObjectFile::getSectionContents(), llvm::object::Binary::isLittleEndian(), llvm::sys::IsLittleEndianHost, llvm::object::MachOObjectFile::isRelocationScattered(), llvm::objcopy::macho::Section::NReloc, llvm::object::MachOObjectFile::LoadCommandInfo::Ptr, llvm::objcopy::macho::Section::Relocations, llvm::object::MachOObjectFile::section_rel_begin(), llvm::object::MachOObjectFile::section_rel_end(), llvm::MachO::swapStruct(), and llvm::Expected< T >::takeError().