LLVM 20.0.0git
Typedefs | Functions
MachOObjcopy.cpp File Reference
#include "llvm/ObjCopy/MachO/MachOObjcopy.h"
#include "Archive.h"
#include "MachOReader.h"
#include "MachOWriter.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ObjCopy/CommonConfig.h"
#include "llvm/ObjCopy/MachO/MachOConfig.h"
#include "llvm/ObjCopy/MultiFormatConfig.h"
#include "llvm/ObjCopy/ObjCopy.h"
#include "llvm/Object/ArchiveWriter.h"
#include "llvm/Object/MachOUniversal.h"
#include "llvm/Object/MachOUniversalWriter.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SmallVectorMemoryBuffer.h"

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, 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()

static Error addSection ( const NewSectionInfo NewSection,
Object Obj 
)
static

◆ buildRPathLoadCommand()

static LoadCommand buildRPathLoadCommand ( StringRef  Path)
static

◆ dumpSectionToFile()

static Error dumpSectionToFile ( StringRef  SecName,
StringRef  Filename,
Object Obj 
)
static

◆ findSection()

static Expected< Section & > findSection ( StringRef  SecName,
Object O 
)
static

◆ getPayloadString()

static StringRef getPayloadString ( const LoadCommand LC)
static

◆ handleArgs()

static Error handleArgs ( const CommonConfig Config,
const MachOConfig MachOConfig,
Object Obj 
)
static

◆ isLoadCommandWithPayloadString()

static bool isLoadCommandWithPayloadString ( const LoadCommand LC)
static

◆ isValidMachOCannonicalName()

static Error isValidMachOCannonicalName ( StringRef  Name)
static

Definition at line 384 of file MachOObjcopy.cpp.

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

Referenced by handleArgs().

◆ markSymbols()

static void markSymbols ( const CommonConfig ,
Object Obj 
)
static

◆ processLoadCommands()

static Error processLoadCommands ( const MachOConfig MachOConfig,
Object Obj 
)
static

◆ removeSections()

static Error removeSections ( const CommonConfig Config,
Object Obj 
)
static

Definition at line 55 of file MachOObjcopy.cpp.

References Config, and llvm::objcopy::macho::Object::removeSections().

Referenced by handleArgs().

◆ updateAndRemoveSymbols()

static void updateAndRemoveSymbols ( const CommonConfig Config,
const MachOConfig MachOConfig,
Object Obj 
)
static

◆ updateLoadCommandPayloadString()

template<typename LCType >
static void updateLoadCommandPayloadString ( LoadCommand LC,
StringRef  S 
)
static

◆ updateSection()

static Error updateSection ( const NewSectionInfo NewSection,
Object O 
)
static