#include "MachOObject.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/SystemZ/zOSSupport.h"
#include <unordered_set>
usingnamespacellvm;
usingnamespacellvm::objcopy::macho;
Section::Section(StringRef SegName, StringRef SectName)
: … { … }
Section::Section(StringRef SegName, StringRef SectName, StringRef Content)
: … { … }
const SymbolEntry *SymbolTable::getSymbolByIndex(uint32_t Index) const { … }
SymbolEntry *SymbolTable::getSymbolByIndex(uint32_t Index) { … }
void SymbolTable::removeSymbols(
function_ref<bool(const std::unique_ptr<SymbolEntry> &)> ToRemove) { … }
void Object::updateLoadCommandIndexes() { … }
Error Object::removeLoadCommands(
function_ref<bool(const LoadCommand &)> ToRemove) { … }
Error Object::removeSections(
function_ref<bool(const std::unique_ptr<Section> &)> ToRemove) { … }
uint64_t Object::nextAvailableSegmentAddress() const { … }
template <typename SegmentType>
static void
constructSegment(SegmentType &Seg, llvm::MachO::LoadCommandType CmdType,
StringRef SegName, uint64_t SegVMAddr, uint64_t SegVMSize) { … }
LoadCommand &Object::addSegment(StringRef SegName, uint64_t SegVMSize) { … }
static StringRef extractSegmentName(const char *SegName) { … }
std::optional<StringRef> LoadCommand::getSegmentName() const { … }
std::optional<uint64_t> LoadCommand::getSegmentVMAddr() const { … }