LLVM 19.0.0git
Macros | Functions
MachOWriter.cpp File Reference
#include "MachOWriter.h"
#include "MachOLayoutBuilder.h"
#include "MachOObject.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Object/MachO.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SHA256.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 NListType >
void writeNListEntry (const SymbolEntry &SE, bool IsLittleEndian, char *&Out, uint32_t Nstrx)
 
static uint64_t getSegmentFileOffset (const LoadCommand &TextSegmentLoadCommand)
 
static uint64_t getSegmentFileSize (const LoadCommand &TextSegmentLoadCommand)
 

Macro Definition Documentation

◆ HANDLE_LOAD_COMMAND

#define HANDLE_LOAD_COMMAND (   LCName,
  LCValue,
  LCStruct 
)
Value:
case MachO::LCName: \
assert(sizeof(MachO::LCStruct) + LC.Payload.size() == \
MLC.load_command_data.cmdsize); \
if (IsLittleEndian != sys::IsLittleEndianHost) \
MachO::swapStruct(MLC.LCStruct##_data); \
memcpy(Begin, &MLC.LCStruct##_data, sizeof(MachO::LCStruct)); \
Begin += sizeof(MachO::LCStruct); \
if (!LC.Payload.empty()) \
memcpy(Begin, LC.Payload.data(), LC.Payload.size()); \
Begin += LC.Payload.size(); \
break;
static const bool IsLittleEndianHost
Definition: SwapByteOrder.h:29

Function Documentation

◆ getSegmentFileOffset()

static uint64_t getSegmentFileOffset ( const LoadCommand TextSegmentLoadCommand)
static

◆ getSegmentFileSize()

static uint64_t getSegmentFileSize ( const LoadCommand TextSegmentLoadCommand)
static

◆ writeNListEntry()

template<typename NListType >
void writeNListEntry ( const SymbolEntry SE,
bool  IsLittleEndian,
char *&  Out,
uint32_t  Nstrx 
)