LLVM  16.0.0git
Namespaces | Classes | Enumerations | Functions
llvm::objcopy Namespace Reference

Namespaces

 coff
 
 elf
 
 macho
 
 wasm
 
 xcoff
 

Classes

struct  COFFConfig
 
struct  CommonConfig
 
struct  ConfigManager
 
struct  ELFConfig
 
struct  MachineInfo
 
struct  MachOConfig
 
class  MultiFormatConfig
 
class  NameMatcher
 
class  NameOrPattern
 
struct  NewSectionInfo
 
struct  NewSymbolInfo
 
struct  SectionFlagsUpdate
 
struct  SectionRename
 
struct  WasmConfig
 
struct  XCOFFConfig
 

Enumerations

enum  FileFormat { FileFormat::Unspecified, FileFormat::ELF, FileFormat::Binary, FileFormat::IHex }
 
enum  SectionFlag {
  SecNone = 0, SecAlloc = 1 << 0, SecLoad = 1 << 1, SecNoload = 1 << 2,
  SecReadonly = 1 << 3, SecDebug = 1 << 4, SecCode = 1 << 5, SecData = 1 << 6,
  SecRom = 1 << 7, SecMerge = 1 << 8, SecStrings = 1 << 9, SecContents = 1 << 10,
  SecShare = 1 << 11, SecExclude = 1 << 12
}
 
enum  DiscardType { DiscardType::None, DiscardType::All, DiscardType::Locals }
 
enum  MatchStyle { MatchStyle::Literal, MatchStyle::Wildcard, MatchStyle::Regex }
 
enum  SymbolFlag {
  SymbolFlag::Global, SymbolFlag::Local, SymbolFlag::Weak, SymbolFlag::Default,
  SymbolFlag::Hidden, SymbolFlag::Protected, SymbolFlag::File, SymbolFlag::Section,
  SymbolFlag::Object, SymbolFlag::Function, SymbolFlag::IndirectFunction, SymbolFlag::Debug,
  SymbolFlag::Constructor, SymbolFlag::Warning, SymbolFlag::Indirect, SymbolFlag::Synthetic,
  SymbolFlag::UniqueObject
}
 

Functions

Error executeObjcopyOnArchive (const MultiFormatConfig &Config, const object::Archive &Ar)
 Applies the transformations described by Config to each member in archive Ar. More...
 
Error executeObjcopyOnBinary (const MultiFormatConfig &Config, object::Binary &In, raw_ostream &Out)
 Applies the transformations described by Config to In and writes the result into Out. More...
 
Expected< std::vector< NewArchiveMember > > createNewArchiveMembers (const MultiFormatConfig &Config, const object::Archive &Ar)
 Applies the transformations described by Config to each member in archive Ar. More...
 
static Error deepWriteArchive (StringRef ArcName, ArrayRef< NewArchiveMember > NewMembers, bool WriteSymtab, object::Archive::Kind Kind, bool Deterministic, bool Thin)
 

Enumeration Type Documentation

◆ DiscardType

Enumerator
None 
All 
Locals 

Definition at line 86 of file CommonConfig.h.

◆ FileFormat

Enumerator
Unspecified 
ELF 
Binary 
IHex 

Definition at line 30 of file CommonConfig.h.

◆ MatchStyle

Enumerator
Literal 
Wildcard 
Regex 

Definition at line 92 of file CommonConfig.h.

◆ SectionFlag

Enumerator
SecNone 
SecAlloc 
SecLoad 
SecNoload 
SecReadonly 
SecDebug 
SecCode 
SecData 
SecRom 
SecMerge 
SecStrings 
SecContents 
SecShare 
SecExclude 

Definition at line 57 of file CommonConfig.h.

◆ SymbolFlag

Enumerator
Global 
Local 
Weak 
Default 
Hidden 
Protected 
File 
Section 
Object 
Function 
IndirectFunction 
Debug 
Constructor 
Warning 
Indirect 
Synthetic 
UniqueObject 

Definition at line 160 of file CommonConfig.h.

Function Documentation

◆ createNewArchiveMembers()

Expected< std::vector< NewArchiveMember > > llvm::objcopy::createNewArchiveMembers ( const MultiFormatConfig Config,
const object::Archive Ar 
)

Applies the transformations described by Config to each member in archive Ar.

Returns
Vector of transformed archive members.

Definition at line 24 of file Archive.cpp.

Referenced by executeObjcopyOnArchive(), and llvm::objcopy::macho::executeObjcopyOnMachOUniversalBinary().

◆ deepWriteArchive()

static Error llvm::objcopy::deepWriteArchive ( StringRef  ArcName,
ArrayRef< NewArchiveMember NewMembers,
bool  WriteSymtab,
object::Archive::Kind  Kind,
bool  Deterministic,
bool  Thin 
)
static

◆ executeObjcopyOnArchive()

Error llvm::objcopy::executeObjcopyOnArchive ( const MultiFormatConfig Config,
const object::Archive Ar 
)

Applies the transformations described by Config to each member in archive Ar.

Writes a result in a file specified by Config.OutputFilename.

Returns
any Error encountered whilst performing the operation.

Definition at line 97 of file Archive.cpp.

References createNewArchiveMembers(), deepWriteArchive(), llvm::objcopy::CommonConfig::DeterministicArchives, llvm::objcopy::MultiFormatConfig::getCommonConfig(), llvm::object::Archive::hasSymbolTable(), llvm::object::Archive::isThin(), llvm::object::Archive::kind(), llvm::objcopy::CommonConfig::OutputFilename, and llvm::Expected< T >::takeError().

◆ executeObjcopyOnBinary()

Error llvm::objcopy::executeObjcopyOnBinary ( const MultiFormatConfig Config,
object::Binary In,
raw_ostream Out 
)