LLVM  16.0.0git
Classes | Functions
llvm::objcopy::coff Namespace Reference

Classes

struct  AuxSymbol
 
class  COFFReader
 
class  COFFWriter
 
struct  Object
 
struct  Relocation
 
struct  Section
 
struct  Symbol
 

Functions

Error executeObjcopyOnBinary (const CommonConfig &Config, const COFFConfig &, object::COFFObjectFile &In, raw_ostream &Out)
 Apply the transformations described by Config and COFFConfig to In and writes the result into Out. More...
 
static bool isDebugSection (const Section &Sec)
 
static uint64_t getNextRVA (const Object &Obj)
 
static Expected< std::vector< uint8_t > > createGnuDebugLinkSectionContents (StringRef File)
 
static void addSection (Object &Obj, StringRef Name, ArrayRef< uint8_t > Contents, uint32_t Characteristics)
 
static Error addGnuDebugLink (Object &Obj, StringRef DebugLinkFile)
 
static uint32_t flagsToCharacteristics (SectionFlag AllFlags, uint32_t OldChar)
 
static Error handleArgs (const CommonConfig &Config, const COFFConfig &COFFConfig, Object &Obj)
 
template<class Symbol1Ty , class Symbol2Ty >
void copySymbol (Symbol1Ty &Dest, const Symbol2Ty &Src)
 
template<class PeHeader1Ty , class PeHeader2Ty >
void copyPeHeader (PeHeader1Ty &Dest, const PeHeader2Ty &Src)
 

Function Documentation

◆ addGnuDebugLink()

static Error llvm::objcopy::coff::addGnuDebugLink ( Object Obj,
StringRef  DebugLinkFile 
)
static

◆ addSection()

static void llvm::objcopy::coff::addSection ( Object Obj,
StringRef  Name,
ArrayRef< uint8_t >  Contents,
uint32_t  Characteristics 
)
static

◆ copyPeHeader()

template<class PeHeader1Ty , class PeHeader2Ty >
void llvm::objcopy::coff::copyPeHeader ( PeHeader1Ty &  Dest,
const PeHeader2Ty &  Src 
)

Definition at line 176 of file COFFObject.h.

◆ copySymbol()

template<class Symbol1Ty , class Symbol2Ty >
void llvm::objcopy::coff::copySymbol ( Symbol1Ty &  Dest,
const Symbol2Ty &  Src 
)

Definition at line 162 of file COFFObject.h.

References memcpy().

◆ createGnuDebugLinkSectionContents()

static Expected<std::vector<uint8_t> > llvm::objcopy::coff::createGnuDebugLinkSectionContents ( StringRef  File)
static

◆ executeObjcopyOnBinary()

Error llvm::objcopy::coff::executeObjcopyOnBinary ( const CommonConfig Config,
const COFFConfig COFFConfig,
object::COFFObjectFile In,
raw_ostream Out 
)

Apply the transformations described by Config and COFFConfig to In and writes the result into Out.

Returns
any Error encountered whilst performing the operation.

Definition at line 292 of file COFFObjcopy.cpp.

References assert(), llvm::objcopy::coff::COFFReader::create(), llvm::createFileError(), E, llvm::Expected< T >::get(), handleArgs(), llvm::tgtok::In, llvm::objcopy::CommonConfig::InputFilename, move, llvm::objcopy::CommonConfig::OutputFilename, llvm::Error::success(), and llvm::Expected< T >::takeError().

Referenced by llvm::objcopy::executeObjcopyOnBinary().

◆ flagsToCharacteristics()

static uint32_t llvm::objcopy::coff::flagsToCharacteristics ( SectionFlag  AllFlags,
uint32_t  OldChar 
)
static

◆ getNextRVA()

static uint64_t llvm::objcopy::coff::getNextRVA ( const Object Obj)
static

◆ handleArgs()

static Error llvm::objcopy::coff::handleArgs ( const CommonConfig Config,
const COFFConfig COFFConfig,
Object Obj 
)
static

◆ isDebugSection()

static bool llvm::objcopy::coff::isDebugSection ( const Section Sec)
static

Definition at line 30 of file COFFObjcopy.cpp.

References llvm::objcopy::coff::Section::Name, and llvm::StringRef::startswith().

Referenced by handleArgs().