LLVM 22.0.0git
MachOObjcopy.cpp File Reference

Go to the source code of this file.

Typedefs

using SectionPred = std::function<bool(const std::unique_ptr<Section> &Sec)>
using LoadCommandPred = std::function<bool(const LoadCommand &LC)>

Functions

static bool isLoadCommandWithPayloadString (const LoadCommand &LC)
static StringRef getPayloadString (const LoadCommand &LC)
static Error removeSections (const CommonConfig &Config, Object &Obj)
static void markSymbols (const CommonConfig &, Object &Obj)
static void updateAndRemoveSymbols (const CommonConfig &Config, const MachOConfig &MachOConfig, Object &Obj)
template<typename LCType>
static void updateLoadCommandPayloadString (LoadCommand &LC, StringRef S)
static LoadCommand buildRPathLoadCommand (StringRef Path)
static Error processLoadCommands (const MachOConfig &MachOConfig, Object &Obj)
static Error dumpSectionToFile (StringRef SecName, StringRef Filename, StringRef InputFilename, Object &Obj)
static Error addSection (const NewSectionInfo &NewSection, Object &Obj)
static Expected< Section & > findSection (StringRef SecName, Object &O)
static Error updateSection (const NewSectionInfo &NewSection, Object &O)
static Error isValidMachOCannonicalName (StringRef Name)
static Error handleArgs (const CommonConfig &Config, const MachOConfig &MachOConfig, Object &Obj)

Typedef Documentation

◆ LoadCommandPred

Definition at line 33 of file MachOObjcopy.cpp.

◆ SectionPred

using SectionPred = std::function<bool(const std::unique_ptr<Section> &Sec)>

Definition at line 32 of file MachOObjcopy.cpp.

Function Documentation

◆ addSection()

◆ buildRPathLoadCommand()

◆ dumpSectionToFile()

◆ findSection()

◆ getPayloadString()

◆ handleArgs()

◆ isLoadCommandWithPayloadString()

bool isLoadCommandWithPayloadString ( const LoadCommand & LC)
static

◆ isValidMachOCannonicalName()

Error isValidMachOCannonicalName ( StringRef Name)
static

Definition at line 421 of file MachOObjcopy.cpp.

References llvm::createStringError(), llvm::invalid_argument, and llvm::Error::success().

Referenced by handleArgs().

◆ markSymbols()

◆ processLoadCommands()

◆ removeSections()

◆ updateAndRemoveSymbols()

◆ updateLoadCommandPayloadString()

◆ updateSection()