LLVM  15.0.0git
Classes | Typedefs | Enumerations | Functions | Variables
llvm::object Namespace Reference

Classes

class  AbstractArchiveMemberHeader
 
class  Archive
 
class  ArchiveMemberHeader
 
class  BaseRelocRef
 
class  BasicSymbolRef
 This is a value type class that represents a single symbol in the list of symbols in the object file. More...
 
struct  BBAddrMap
 
class  BigArchive
 
class  BigArchiveMemberHeader
 
struct  BigArMemHdrType
 
class  Binary
 
class  BinaryError
 Base class for all errors indicating malformed binary files. More...
 
class  BindRebaseSegInfo
 
struct  CFileLanguageIdAndTypeIdType
 
struct  ChainedFixupTarget
 ChainedFixupTarget holds all the information about an external symbol necessary to bind this binary to that symbol. More...
 
struct  coff_aux_bf_and_ef_symbol
 
struct  coff_aux_clr_token
 
struct  coff_aux_function_definition
 
struct  coff_aux_section_definition
 
struct  coff_aux_weak_external
 
struct  coff_base_reloc_block_entry
 
struct  coff_base_reloc_block_header
 
struct  coff_bigobj_file_header
 
struct  coff_file_header
 
struct  coff_import_directory_table_entry
 
struct  coff_import_header
 
struct  coff_load_config_code_integrity
 
struct  coff_load_configuration32
 32-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY32) More...
 
struct  coff_load_configuration64
 64-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY64) More...
 
struct  coff_relocation
 
struct  coff_resource_data_entry
 
struct  coff_resource_dir_entry
 
struct  coff_resource_dir_table
 
struct  coff_runtime_function_x64
 
struct  coff_section
 
struct  coff_symbol
 
struct  coff_symbol_generic
 
struct  coff_tls_directory
 
class  COFFImportFile
 
struct  COFFModuleDefinition
 
class  COFFObjectFile
 
struct  COFFShortExport
 
class  COFFSymbolRef
 
class  CommonArchiveMemberHeader
 
class  content_iterator
 
struct  data_directory
 
union  DataRefImpl
 
struct  DataRegion
 
struct  debug_directory
 
struct  debug_h_header
 
class  Decompressor
 Decompressor helps to handle decompression of compressed sections. More...
 
struct  delay_import_directory_table_entry
 
class  DelayImportDirectoryEntryRef
 
class  DiceRef
 DiceRef - This is a value type class that represents a single data in code entry in the table in a Mach-O object file. More...
 
struct  dos_header
 The DOS compatible header at the front of all PE/COFF executables. More...
 
class  DXContainer
 
struct  Elf_CGProfile_Impl
 
struct  Elf_Chdr_Impl
 
struct  Elf_Chdr_Impl< ELFType< TargetEndianness, false > >
 
struct  Elf_Chdr_Impl< ELFType< TargetEndianness, true > >
 
struct  Elf_Dyn_Base
 Elf_Dyn_Base: This structure matches the form of entries in the dynamic table section (.dynamic) look like. More...
 
struct  Elf_Dyn_Base< ELFType< TargetEndianness, false > >
 
struct  Elf_Dyn_Base< ELFType< TargetEndianness, true > >
 
struct  Elf_Dyn_Impl
 Elf_Dyn_Impl: This inherits from Elf_Dyn_Base, adding getters. More...
 
struct  Elf_Ehdr_Impl
 
struct  Elf_GnuHash_Impl
 
struct  Elf_Hash_Impl
 
struct  Elf_Mips_ABIFlags
 
struct  Elf_Mips_Options
 
struct  Elf_Mips_RegInfo
 
struct  Elf_Mips_RegInfo< ELFType< TargetEndianness, false > >
 
struct  Elf_Mips_RegInfo< ELFType< TargetEndianness, true > >
 
struct  Elf_Nhdr_Impl
 Note header. More...
 
class  Elf_Note_Impl
 An ELF note. More...
 
class  Elf_Note_Iterator_Impl
 
struct  Elf_Phdr_Impl
 
struct  Elf_Phdr_Impl< ELFType< TargetEndianness, false > >
 
struct  Elf_Phdr_Impl< ELFType< TargetEndianness, true > >
 
struct  Elf_Rel_Impl
 
struct  Elf_Rel_Impl< ELFType< TargetEndianness, false >, false >
 
struct  Elf_Rel_Impl< ELFType< TargetEndianness, false >, true >
 
struct  Elf_Rel_Impl< ELFType< TargetEndianness, true >, false >
 
struct  Elf_Rel_Impl< ELFType< TargetEndianness, true >, true >
 
class  elf_relocation_iterator
 
class  elf_section_iterator
 
struct  Elf_Shdr_Base
 
struct  Elf_Shdr_Base< ELFType< TargetEndianness, false > >
 
struct  Elf_Shdr_Base< ELFType< TargetEndianness, true > >
 
struct  Elf_Shdr_Impl
 
struct  Elf_Sym_Base
 
struct  Elf_Sym_Base< ELFType< TargetEndianness, false > >
 
struct  Elf_Sym_Base< ELFType< TargetEndianness, true > >
 
struct  Elf_Sym_Impl
 
class  elf_symbol_iterator
 
struct  Elf_Verdaux_Impl
 Elf_Verdaux: This is the structure of auxiliary data in the SHT_GNU_verdef section (.gnu.version_d). More...
 
struct  Elf_Verdef_Impl
 Elf_Verdef: This is the structure of entries in the SHT_GNU_verdef section (.gnu.version_d). More...
 
struct  Elf_Vernaux_Impl
 Elf_Vernaux: This is the structure of auxiliary data in SHT_GNU_verneed section (.gnu.version_r). More...
 
struct  Elf_Verneed_Impl
 Elf_Verneed: This is the structure of entries in the SHT_GNU_verneed section (.gnu.version_r). More...
 
struct  Elf_Versym_Impl
 Elf_Versym: This is the structure of entries in the SHT_GNU_versym section (.gnu.version). More...
 
class  ELFFile
 
class  ELFObjectFile
 
class  ELFObjectFileBase
 
class  ELFRelocationRef
 
class  ELFSectionRef
 
class  ELFSymbolRef
 
struct  ELFType
 
class  EmptyResError
 
union  export_address_table_entry
 
struct  export_directory_table_entry
 
class  ExportDirectoryEntryRef
 
class  ExportEntry
 ExportEntry encapsulates the current-state-of-the-walk used when doing a non-recursive walk of the trie data structure. More...
 
struct  FpoData
 
class  GenericBinaryError
 Generic binary error. More...
 
struct  import_lookup_table_entry
 
class  ImportDirectoryEntryRef
 
class  ImportedSymbolRef
 
class  IRObjectFile
 
struct  IRSymtabFile
 The contents of a bitcode file and its irsymtab. More...
 
class  Lexer
 
struct  LoaderSectionHeader32
 
struct  LoaderSectionHeader64
 
class  MachOAbstractFixupEntry
 MachOAbstractFixupEntry is an abstract class representing a fixup in a MH_DYLDLINK file. More...
 
class  MachOBindEntry
 MachOBindEntry encapsulates the current state in the decompression of binding opcodes. More...
 
class  MachOChainedFixupEntry
 
class  MachOObjectFile
 
class  MachORebaseEntry
 MachORebaseEntry encapsulates the current state in the decompression of rebasing opcodes. More...
 
class  MachOUniversalBinary
 
class  MinidumpFile
 A class providing access to the contents of a minidump file. More...
 
class  ObjectFile
 This class is the base class for all object file types. More...
 
class  OffloadBinary
 A simple binary serialization of an offloading file. More...
 
class  OwningBinary
 
class  Parser
 
struct  pe32_header
 The 32-bit PE header that follows the COFF header. More...
 
struct  pe32plus_header
 The 64-bit PE header that follows the COFF header. More...
 
class  RelocationRef
 This is a value type class that represents a single relocation in the list of relocations in the object file. More...
 
class  ResourceEntryRef
 
class  ResourceSectionRef
 
struct  SectionedAddress
 
class  SectionRef
 This is a value type class that represents a single section in the list of sections in the object file. More...
 
class  SectionStrippedError
 
class  Slice
 
struct  StringTableOffset
 
class  symbol_iterator
 
class  SymbolicFile
 
class  SymbolRef
 This is a value type class that represents a single symbol in the list of symbols in the object file. More...
 
struct  SymEntry
 
class  TapiFile
 
class  TapiUniversal
 
class  TBVectorExt
 
struct  Token
 
struct  UnixArMemHdrType
 
struct  VerdAux
 
struct  VerDef
 
struct  VernAux
 
struct  VerNeed
 
struct  VersionEntry
 
class  WasmObjectFile
 
struct  WasmSection
 
class  WasmSectionOrderChecker
 
struct  WasmSegment
 
class  WasmSymbol
 
class  WindowsResource
 
class  WindowsResourceCOFFWriter
 
class  WindowsResourceParser
 
struct  WinResHeaderPrefix
 
struct  WinResHeaderSuffix
 
struct  WinResIDs
 
struct  XCOFFAuxiliaryHeader
 
struct  XCOFFAuxiliaryHeader32
 
struct  XCOFFAuxiliaryHeader64
 
struct  XCOFFBlockAuxEnt32
 
struct  XCOFFBlockAuxEnt64
 
struct  XCOFFCsectAuxEnt32
 
struct  XCOFFCsectAuxEnt64
 
class  XCOFFCsectAuxRef
 
struct  XCOFFExceptionAuxEnt
 
struct  XCOFFFileAuxEnt
 
struct  XCOFFFileHeader32
 
struct  XCOFFFileHeader64
 
struct  XCOFFFunctionAuxEnt32
 
struct  XCOFFFunctionAuxEnt64
 
class  XCOFFObjectFile
 
struct  XCOFFRelocation
 
struct  XCOFFRelocation32
 
struct  XCOFFRelocation64
 
struct  XCOFFSectAuxEntForDWARF32
 
struct  XCOFFSectAuxEntForDWARF64
 
struct  XCOFFSectAuxEntForStat
 
struct  XCOFFSectionHeader
 
struct  XCOFFSectionHeader32
 
struct  XCOFFSectionHeader64
 
struct  XCOFFStringTable
 
struct  XCOFFSymbolEntry32
 
struct  XCOFFSymbolEntry64
 
class  XCOFFSymbolRef
 
class  XCOFFTracebackTable
 This class provides methods to extract traceback table data from a buffer. More...
 

Typedefs

using import_directory_iterator = content_iterator< ImportDirectoryEntryRef >
 
using delay_import_directory_iterator = content_iterator< DelayImportDirectoryEntryRef >
 
using export_directory_iterator = content_iterator< ExportDirectoryEntryRef >
 
using imported_symbol_iterator = content_iterator< ImportedSymbolRef >
 
using base_reloc_iterator = content_iterator< BaseRelocRef >
 
using import_lookup_table_entry32 = import_lookup_table_entry< support::little32_t >
 
using import_lookup_table_entry64 = import_lookup_table_entry< support::little64_t >
 
using export_name_pointer_table_entry = support::ulittle32_t
 
using export_ordinal_table_entry = support::ulittle16_t
 
using coff_symbol16 = coff_symbol< support::ulittle16_t >
 
using coff_symbol32 = coff_symbol< support::ulittle32_t >
 
using coff_tls_directory32 = coff_tls_directory< support::little32_t >
 
using coff_tls_directory64 = coff_tls_directory< support::little64_t >
 
using ELF32LEFile = ELFFile< ELF32LE >
 
using ELF64LEFile = ELFFile< ELF64LE >
 
using ELF32BEFile = ELFFile< ELF32BE >
 
using ELF64BEFile = ELFFile< ELF64BE >
 
using ELF32LEObjectFile = ELFObjectFile< ELF32LE >
 
using ELF64LEObjectFile = ELFObjectFile< ELF64LE >
 
using ELF32BEObjectFile = ELFObjectFile< ELF32BE >
 
using ELF64BEObjectFile = ELFObjectFile< ELF64BE >
 
using ELF32LE = ELFType< support::little, false >
 
using ELF32BE = ELFType< support::big, false >
 
using ELF64LE = ELFType< support::little, true >
 
using ELF64BE = ELFType< support::big, true >
 
using dice_iterator = content_iterator< DiceRef >
 
using export_iterator = content_iterator< ExportEntry >
 
using rebase_iterator = content_iterator< MachORebaseEntry >
 
using bind_iterator = content_iterator< MachOBindEntry >
 
using fixup_iterator = content_iterator< MachOChainedFixupEntry >
 
using section_iterator = content_iterator< SectionRef >
 
using relocation_iterator = content_iterator< RelocationRef >
 
using SupportsRelocation = bool(*)(uint64_t)
 
using RelocationResolver = uint64_t(*)(uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend)
 
using basic_symbol_iterator = content_iterator< BasicSymbolRef >
 

Enumerations

enum  coff_guard_flags : uint32_t {
  coff_guard_flags::CFInstrumented = 0x00000100, coff_guard_flags::HasFidTable = 0x00000400, coff_guard_flags::ProtectDelayLoadIAT = 0x00001000, coff_guard_flags::DelayLoadIATSection = 0x00002000,
  coff_guard_flags::HasLongJmpTable = 0x00010000, coff_guard_flags::HasEHContTable = 0x00400000, coff_guard_flags::FidTableHasFlags = 0x10000000
}
 Bits in control flow guard flags as we understand them. More...
 
enum  frame_type : uint16_t { frame_type::Fpo = 0, frame_type::Trap = 1, frame_type::Tss = 2, frame_type::NonFpo = 3 }
 
enum  PPCInstrMasks : uint64_t {
  PADDI_R12_NO_DISP = 0x0610000039800000, ADDIS_R12_TO_R2_NO_DISP = 0x3D820000, ADDI_R12_TO_R2_NO_DISP = 0x39820000, ADDI_R12_TO_R12_NO_DISP = 0x398C0000,
  PLD_R12_NO_DISP = 0x04100000E5800000, MTCTR_R12 = 0x7D8903A6, BCTR = 0x4E800420
}
 
enum  object_error {
  object_error::arch_not_found = 1, object_error::invalid_file_type, object_error::parse_failed, object_error::unexpected_eof,
  object_error::string_table_non_null_end, object_error::invalid_section_index, object_error::bitcode_section_not_found, object_error::invalid_symbol_index,
  object_error::section_stripped
}
 
enum  OffloadKind : uint16_t {
  OFK_None = 0, OFK_OpenMP, OFK_Cuda, OFK_HIP,
  OFK_LAST
}
 The producer of the associated offloading image. More...
 
enum  ImageKind : uint16_t {
  IMG_None = 0, IMG_Object, IMG_Bitcode, IMG_Cubin,
  IMG_Fatbinary, IMG_PTX, IMG_LAST
}
 The type of contents the offloading image contains. More...
 
enum  Kind {
  Unknown, Eof, Identifier, Comma,
  Equal, EqualEqual, KwBase, KwConstant,
  KwData, KwExports, KwHeapsize, KwLibrary,
  KwName, KwNoname, KwPrivate, KwStacksize,
  KwVersion
}
 

Functions

Expected< std::unique_ptr< Binary > > createBinary (MemoryBufferRef Source, LLVMContext *Context=nullptr, bool InitContent=true)
 Create a Binary from Source, autodetecting the file type. More...
 
Expected< OwningBinary< Binary > > createBinary (StringRef Path, LLVMContext *Context=nullptr, bool InitContent=true)
 
Error writeImportLibrary (StringRef ImportName, StringRef Path, ArrayRef< COFFShortExport > Exports, COFF::MachineTypes Machine, bool MinGW)
 
Expected< COFFModuleDefinitionparseCOFFModuleDefinition (MemoryBufferRef MB, COFF::MachineTypes Machine, bool MingwDef=false)
 
StringRef getELFRelocationTypeName (uint32_t Machine, uint32_t Type)
 
uint32_t getELFRelativeRelocationType (uint32_t Machine)
 
StringRef getELFSectionTypeName (uint32_t Machine, uint32_t Type)
 
std::pair< unsigned char, unsigned char > getElfArchType (StringRef Object)
 
template<class ELFT >
std::string getSecIndexForError (const ELFFile< ELFT > &Obj, const typename ELFT::Shdr &Sec)
 
template<class ELFT >
static std::string describe (const ELFFile< ELFT > &Obj, const typename ELFT::Shdr &Sec)
 
template<class ELFT >
std::string getPhdrIndexForError (const ELFFile< ELFT > &Obj, const typename ELFT::Phdr &Phdr)
 
static Error defaultWarningHandler (const Twine &Msg)
 
template<class ELFT >
Expected< const typename ELFT::Shdr * > getSection (typename ELFT::ShdrRange Sections, uint32_t Index)
 
template<class ELFT >
Expected< uint32_tgetExtendedSymbolTableIndex (const typename ELFT::Sym &Sym, unsigned SymIndex, DataRegion< typename ELFT::Word > ShndxTable)
 
template<class ELFT >
static Expected< uint64_tgetDynSymtabSizeFromGnuHash (const typename ELFT::GnuHash &Table, const void *BufEnd)
 This function finds the number of dynamic symbols using a GNU hash table. More...
 
unsigned hashSysV (StringRef SymbolName)
 This function returns the hash value for a symbol in the .dynsym section Name of the API remains consistent as specified in the libelf REF : http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#hash. More...
 
const std::error_categoryobject_category ()
 
std::error_code make_error_code (object_error e)
 
Error isNotObjectErrorInvalidFileType (llvm::Error Err)
 isNotObjectErrorInvalidFileType() is used when looping through the children of an archive after calling getAsBinary() on the child and it returns an llvm::Error. More...
 
Error createError (const Twine &Err)
 
Expected< IRSymtabFilereadIRSymtab (MemoryBufferRef MBRef)
 Reads a bitcode file, creating its irsymtab if necessary. More...
 
Error writeUniversalBinary (ArrayRef< Slice > Slices, StringRef OutputFileName)
 
Error writeUniversalBinaryToStream (ArrayRef< Slice > Slices, raw_ostream &Out)
 
bool operator< (const SectionedAddress &LHS, const SectionedAddress &RHS)
 
bool operator== (const SectionedAddress &LHS, const SectionedAddress &RHS)
 
raw_ostreamoperator<< (raw_ostream &OS, const SectionedAddress &Addr)
 
ImageKind getImageKind (StringRef Name)
 Convert a string Name to an image kind. More...
 
StringRef getImageKindName (ImageKind Name)
 Convert an image kind to its string representation. More...
 
OffloadKind getOffloadKind (StringRef Name)
 Convert a string Name to an offload kind. More...
 
StringRef getOffloadKindName (OffloadKind Name)
 Convert an offload kind to its string representation. More...
 
std::pair< SupportsRelocation, RelocationResolvergetRelocationResolver (const ObjectFile &Obj)
 
uint64_t resolveRelocation (RelocationResolver Resolver, const RelocationRef &R, uint64_t S, uint64_t LocData)
 
template<typename OStream >
OStream & operator<< (OStream &OS, const DataRefImpl &D)
 
bool operator== (const DataRefImpl &a, const DataRefImpl &b)
 
bool operator!= (const DataRefImpl &a, const DataRefImpl &b)
 
bool operator< (const DataRefImpl &a, const DataRefImpl &b)
 
int compareAddress (const SymEntry *A, const SymEntry *B)
 
std::vector< std::pair< SymbolRef, uint64_t > > computeSymbolSizes (const ObjectFile &O)
 
Expected< std::unique_ptr< MemoryBuffer > > writeWindowsResourceCOFF (llvm::COFF::MachineTypes MachineType, const WindowsResourceParser &Parser, uint32_t TimeDateStamp)
 
void printResourceTypeName (uint16_t TypeID, raw_ostream &OS)
 
bool doesXCOFFTracebackTableBegin (ArrayRef< uint8_t > Bytes)
 
static bool is32bit (MachineTypes Machine)
 
static uint16_t getImgRelRelocation (MachineTypes Machine)
 
template<class T >
static void append (std::vector< uint8_t > &B, const T &Data)
 
static void writeStringTable (std::vector< uint8_t > &B, ArrayRef< const std::string > Strings)
 
static ImportNameType getNameType (StringRef Sym, StringRef ExtName, MachineTypes Machine, bool MinGW)
 
static Expected< std::string > replace (StringRef S, StringRef From, StringRef To)
 
static bool isDecorated (StringRef Sym, bool MingwDef)
 
static int64_t getELFAddend (RelocationRef R)
 
static bool supportsX86_64 (uint64_t Type)
 
static uint64_t resolveX86_64 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend)
 
static bool supportsAArch64 (uint64_t Type)
 
static uint64_t resolveAArch64 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsBPF (uint64_t Type)
 
static uint64_t resolveBPF (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t)
 
static bool supportsMips64 (uint64_t Type)
 
static uint64_t resolveMips64 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsMSP430 (uint64_t Type)
 
static uint64_t resolveMSP430 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsPPC64 (uint64_t Type)
 
static uint64_t resolvePPC64 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsSystemZ (uint64_t Type)
 
static uint64_t resolveSystemZ (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsSparc64 (uint64_t Type)
 
static uint64_t resolveSparc64 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsAmdgpu (uint64_t Type)
 
static uint64_t resolveAmdgpu (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsX86 (uint64_t Type)
 
static uint64_t resolveX86 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t)
 
static bool supportsPPC32 (uint64_t Type)
 
static uint64_t resolvePPC32 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsARM (uint64_t Type)
 
static uint64_t resolveARM (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend)
 
static bool supportsAVR (uint64_t Type)
 
static uint64_t resolveAVR (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsLanai (uint64_t Type)
 
static uint64_t resolveLanai (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsMips32 (uint64_t Type)
 
static uint64_t resolveMips32 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t)
 
static bool supportsSparc32 (uint64_t Type)
 
static uint64_t resolveSparc32 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend)
 
static bool supportsHexagon (uint64_t Type)
 
static uint64_t resolveHexagon (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t, int64_t Addend)
 
static bool supportsRISCV (uint64_t Type)
 
static uint64_t resolveRISCV (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend)
 
static bool supportsCSKY (uint64_t Type)
 
static uint64_t resolveCSKY (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend)
 
static bool supportsCOFFX86 (uint64_t Type)
 
static uint64_t resolveCOFFX86 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t)
 
static bool supportsCOFFX86_64 (uint64_t Type)
 
static uint64_t resolveCOFFX86_64 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t)
 
static bool supportsCOFFARM (uint64_t Type)
 
static uint64_t resolveCOFFARM (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t)
 
static bool supportsCOFFARM64 (uint64_t Type)
 
static uint64_t resolveCOFFARM64 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t)
 
static bool supportsMachOX86_64 (uint64_t Type)
 
static uint64_t resolveMachOX86_64 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t)
 
static bool supportsWasm32 (uint64_t Type)
 
static bool supportsWasm64 (uint64_t Type)
 
static uint64_t resolveWasm32 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t)
 
static uint64_t resolveWasm64 (uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend)
 
static Error readStringOrId (BinaryStreamReader &Reader, uint16_t &ID, ArrayRef< UTF16 > &Str, bool &IsString)
 
static bool convertUTF16LEToUTF8String (ArrayRef< UTF16 > Src, std::string &Out)
 
static std::string makeDuplicateResourceError (const ResourceEntryRef &Entry, StringRef File1, StringRef File2)
 
static void printStringOrID (const WindowsResourceParser::StringOrID &S, raw_string_ostream &OS, bool IsType, bool IsID)
 
static std::string makeDuplicateResourceError (const std::vector< WindowsResourceParser::StringOrID > &Context, StringRef File1, StringRef File2)
 
static void coffnamecpy (char(&Dest)[COFF::NameSize], StringRef Src)
 
template<typename T >
static Expected< const T * > getObject (MemoryBufferRef M, const void *Ptr, const uint64_t Size=sizeof(T))
 
static uintptr_t getWithOffset (uintptr_t Base, ptrdiff_t Offset)
 
template<typename T >
static const T * viewAs (uintptr_t in)
 
static StringRef generateXCOFFFixedNameStringRef (const char *Name)
 
template llvm::Expected< llvm::ArrayRef< llvm::object::XCOFFRelocation64 > > llvm::object::XCOFFObjectFile::relocations< llvm::object::XCOFFSectionHeader64, llvm::object::XCOFFRelocation64 > (llvm::object::XCOFFSectionHeader64 const &) const
 
template llvm::Expected< llvm::ArrayRef< llvm::object::XCOFFRelocation32 > > llvm::object::XCOFFObjectFile::relocations< llvm::object::XCOFFSectionHeader32, llvm::object::XCOFFRelocation32 > (llvm::object::XCOFFSectionHeader32 const &) const
 

Variables

const char ArchiveMagic [] = "!<arch>\n"
 
const char ThinArchiveMagic [] = "!<thin>\n"
 
const char BigArchiveMagic [] = "<bigaf>\n"
 
constexpr int NumElfSymbolTypes = 16
 
const llvm::EnumEntry< unsigned > ElfSymbolTypes [NumElfSymbolTypes]
 
const size_t WIN_RES_MAGIC_SIZE = 16
 
const size_t WIN_RES_NULL_ENTRY_SIZE = 16
 
const uint32_t WIN_RES_HEADER_ALIGNMENT = 4
 
const uint32_t WIN_RES_DATA_ALIGNMENT = 4
 
const uint16_t WIN_RES_PURE_MOVEABLE = 0x0030
 
static const std::string NullImportDescriptorSymbolName
 
const uint32_t MIN_HEADER_SIZE = 7 * sizeof(uint32_t) + 2 * sizeof(uint16_t)
 
const uint32_t SECTION_ALIGNMENT = sizeof(uint64_t)
 
static const uint8_t FunctionSym = 0x20
 
static const uint16_t NoRelMask = 0x0001
 
static const size_t SymbolAuxTypeOffset = 17
 

Typedef Documentation

◆ base_reloc_iterator

Definition at line 50 of file COFF.h.

◆ basic_symbol_iterator

Definition at line 143 of file SymbolicFile.h.

◆ bind_iterator

Definition at line 261 of file MachO.h.

◆ coff_symbol16

Definition at line 265 of file COFF.h.

◆ coff_symbol32

Definition at line 266 of file COFF.h.

◆ coff_tls_directory32

Definition at line 597 of file COFF.h.

◆ coff_tls_directory64

Definition at line 598 of file COFF.h.

◆ delay_import_directory_iterator

Definition at line 47 of file COFF.h.

◆ dice_iterator

Definition at line 64 of file MachO.h.

◆ ELF32BE

Definition at line 96 of file ELFTypes.h.

◆ ELF32BEFile

Definition at line 396 of file ELF.h.

◆ ELF32BEObjectFile

Definition at line 464 of file ELFObjectFile.h.

◆ ELF32LE

Definition at line 95 of file ELFTypes.h.

◆ ELF32LEFile

Definition at line 394 of file ELF.h.

◆ ELF32LEObjectFile

Definition at line 462 of file ELFObjectFile.h.

◆ ELF64BE

Definition at line 98 of file ELFTypes.h.

◆ ELF64BEFile

Definition at line 397 of file ELF.h.

◆ ELF64BEObjectFile

Definition at line 465 of file ELFObjectFile.h.

◆ ELF64LE

Definition at line 97 of file ELFTypes.h.

◆ ELF64LEFile

Definition at line 395 of file ELF.h.

◆ ELF64LEObjectFile

Definition at line 463 of file ELFObjectFile.h.

◆ export_directory_iterator

Definition at line 48 of file COFF.h.

◆ export_iterator

Definition at line 126 of file MachO.h.

◆ export_name_pointer_table_entry

Definition at line 241 of file COFF.h.

◆ export_ordinal_table_entry

Definition at line 242 of file COFF.h.

◆ fixup_iterator

Definition at line 379 of file MachO.h.

◆ import_directory_iterator

Definition at line 45 of file COFF.h.

◆ import_lookup_table_entry32

Definition at line 206 of file COFF.h.

◆ import_lookup_table_entry64

Definition at line 208 of file COFF.h.

◆ imported_symbol_iterator

Definition at line 49 of file COFF.h.

◆ rebase_iterator

Definition at line 203 of file MachO.h.

◆ relocation_iterator

Definition at line 76 of file ObjectFile.h.

◆ RelocationResolver

using llvm::object::RelocationResolver = typedef uint64_t (*)(uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend)

Definition at line 30 of file RelocationResolver.h.

◆ section_iterator

Definition at line 47 of file ObjectFile.h.

◆ SupportsRelocation

using llvm::object::SupportsRelocation = typedef bool (*)(uint64_t)

Definition at line 27 of file RelocationResolver.h.

Enumeration Type Documentation

◆ coff_guard_flags

Bits in control flow guard flags as we understand them.

Enumerator
CFInstrumented 
HasFidTable 
ProtectDelayLoadIAT 
DelayLoadIATSection 
HasLongJmpTable 
HasEHContTable 
FidTableHasFlags 

Definition at line 601 of file COFF.h.

◆ frame_type

Enumerator
Fpo 
Trap 
Tss 
NonFpo 

Definition at line 611 of file COFF.h.

◆ ImageKind

The type of contents the offloading image contains.

Enumerator
IMG_None 
IMG_Object 
IMG_Bitcode 
IMG_Cubin 
IMG_Fatbinary 
IMG_PTX 
IMG_LAST 

Definition at line 41 of file OffloadBinary.h.

◆ Kind

Enumerator
Unknown 
Eof 
Identifier 
Comma 
Equal 
EqualEqual 
KwBase 
KwConstant 
KwData 
KwExports 
KwHeapsize 
KwLibrary 
KwName 
KwNoname 
KwPrivate 
KwStacksize 
KwVersion 

Definition at line 31 of file COFFModuleDefinition.cpp.

◆ object_error

Enumerator
arch_not_found 
invalid_file_type 
parse_failed 
unexpected_eof 
string_table_non_null_end 
invalid_section_index 
bitcode_section_not_found 
invalid_symbol_index 
section_stripped 

Definition at line 27 of file Error.h.

◆ OffloadKind

The producer of the associated offloading image.

Enumerator
OFK_None 
OFK_OpenMP 
OFK_Cuda 
OFK_HIP 
OFK_LAST 

Definition at line 32 of file OffloadBinary.h.

◆ PPCInstrMasks

Enumerator
PADDI_R12_NO_DISP 
ADDIS_R12_TO_R2_NO_DISP 
ADDI_R12_TO_R2_NO_DISP 
ADDI_R12_TO_R12_NO_DISP 
PLD_R12_NO_DISP 
MTCTR_R12 
BCTR 

Definition at line 84 of file ELF.h.

Function Documentation

◆ append()

template<class T >
static void llvm::object::append ( std::vector< uint8_t > &  B,
const T &  Data 
)
static

Definition at line 64 of file COFFImportFile.cpp.

References B, llvm::Data, memcpy(), S, and T.

◆ coffnamecpy()

static void llvm::object::coffnamecpy ( char(&)  Dest[COFF::NameSize],
StringRef  Src 
)
static

Definition at line 720 of file WindowsResource.cpp.

References assert(), memcpy(), and llvm::COFF::NameSize.

◆ compareAddress()

int llvm::object::compareAddress ( const SymEntry A,
const SymEntry B 
)

Definition at line 21 of file SymbolSize.cpp.

References A, and B.

Referenced by computeSymbolSizes().

◆ computeSymbolSizes()

std::vector< std::pair< SymbolRef, uint64_t > > llvm::object::computeSymbolSizes ( const ObjectFile O)

◆ convertUTF16LEToUTF8String()

static bool llvm::object::convertUTF16LEToUTF8String ( ArrayRef< UTF16 Src,
std::string &  Out 
)
static

◆ createBinary() [1/2]

Expected< std::unique_ptr< Binary > > llvm::object::createBinary ( MemoryBufferRef  Source,
LLVMContext Context = nullptr,
bool  InitContent = true 
)

Create a Binary from Source, autodetecting the file type.

Parameters
SourceThe data to create the Binary from.

Definition at line 45 of file Binary.cpp.

References llvm::file_magic::archive, llvm::file_magic::bitcode, llvm::file_magic::coff_cl_gl_object, llvm::file_magic::coff_import_library, llvm::file_magic::coff_object, Context, llvm::object::MinidumpFile::create(), llvm::object::OffloadBinary::create(), llvm::object::TapiUniversal::create(), llvm::object::MachOUniversalBinary::create(), llvm::object::Archive::create(), llvm::object::SymbolicFile::createSymbolicFile(), llvm::object::WindowsResource::createWindowsResource(), llvm::file_magic::cuda_fatbinary, llvm::file_magic::dxcontainer_object, llvm::file_magic::elf, llvm::file_magic::elf_core, llvm::file_magic::elf_executable, llvm::file_magic::elf_relocatable, llvm::file_magic::elf_shared_object, llvm::errorCodeToError(), llvm::MemoryBufferRef::getBuffer(), llvm::file_magic::goff_object, llvm::identify_magic(), invalid_file_type, llvm_unreachable, llvm::file_magic::macho_bundle, llvm::file_magic::macho_core, llvm::file_magic::macho_dsym_companion, llvm::file_magic::macho_dynamic_linker, llvm::file_magic::macho_dynamically_linked_shared_lib, llvm::file_magic::macho_dynamically_linked_shared_lib_stub, llvm::file_magic::macho_executable, llvm::file_magic::macho_fixed_virtual_memory_shared_lib, llvm::file_magic::macho_kext_bundle, llvm::file_magic::macho_object, llvm::file_magic::macho_preload_executable, llvm::file_magic::macho_universal_binary, llvm::file_magic::minidump, llvm::file_magic::offload_binary, llvm::file_magic::pdb, llvm::file_magic::pecoff_executable, llvm::file_magic::tapi_file, llvm::file_magic::unknown, llvm::file_magic::wasm_object, llvm::file_magic::windows_resource, llvm::file_magic::xcoff_object_32, and llvm::file_magic::xcoff_object_64.

Referenced by llvm::memprof::RawMemProfReader::create(), llvm::coverage::BinaryCoverageReader::create(), createBinary(), llvm::objcopy::macho::executeObjcopyOnMachOUniversalBinary(), llvm::object::Archive::Child::getAsBinary(), getPdbPathFromExe(), LLVMCreateBinary(), llvm::orc::StaticLibraryDefinitionGenerator::Load(), llvm::pdb::InputFile::open(), and llvm::ifs::readELFFile().

◆ createBinary() [2/2]

Expected< OwningBinary< Binary > > llvm::object::createBinary ( StringRef  Path,
LLVMContext Context = nullptr,
bool  InitContent = true 
)

◆ createError()

Error llvm::object::createError ( const Twine Err)
inline

Definition at line 84 of file Error.h.

Referenced by llvm::object::ELFFile< ELFT >::android_relas(), llvm::object::MinidumpFile::create(), llvm::object::ELFFile< ELFT >::create(), llvm::object::ObjectFile::createELFObjectFile(), llvm::object::ELFFile< ELFT >::decodeBBAddrMap(), defaultWarningHandler(), llvm::object::ELFFile< ELFT >::dynamicEntries(), getExtendedSymbolTableIndex(), llvm::object::XCOFFObjectFile::getImportFileTable(), llvm::object::ELFFile< ELFT >::getLinkAsStrtab(), llvm::object::MinidumpFile::getMemoryInfoList(), llvm::object::ELFObjectFile< ELFT >::getRelocationAddend(), getSection(), llvm::object::ELFFile< ELFT >::getSectionContentsAsArray(), llvm::object::ELFFile< ELFT >::getSectionName(), llvm::object::ELFFile< ELFT >::getSectionStringTable(), llvm::object::ELFFile< ELFT >::getSegmentContents(), llvm::object::ELFFile< ELFT >::getSHNDXTable(), llvm::object::MinidumpFile::getString(), llvm::object::ELFFile< ELFT >::getStringTable(), llvm::object::ELFFile< ELFT >::getStringTableForSymtab(), llvm::object::ELFFile< ELFT >::getSymbol(), llvm::object::ELFFile< ELFT >::getSymbolVersionByIndex(), llvm::object::ELFFile< ELFT >::getVersionDefinitions(), llvm::object::ELFFile< ELFT >::getVersionDependencies(), handleCompressedSection(), llvm::object::DataRegion< T >::operator[](), llvm::ifs::populateDynamic(), llvm::object::ELFFile< ELFT >::program_headers(), readBBAddrMapImpl(), readDynsymVersionsImpl(), llvm::object::XCOFFObjectFile::relocations(), llvm::object::ELFFile< ELFT >::sections(), llvm::ifs::terminatedSubstr(), llvm::object::ELFFile< ELFT >::toMappedAddr(), and llvm::StackMapParser< Endianness >::validateHeader().

◆ defaultWarningHandler()

static Error llvm::object::defaultWarningHandler ( const Twine Msg)
inlinestatic

Definition at line 161 of file ELF.h.

References createError(), and llvm::AMDGPU::SendMsg::Msg.

◆ describe()

template<class ELFT >
static std::string llvm::object::describe ( const ELFFile< ELFT > &  Obj,
const typename ELFT::Shdr Sec 
)
static

◆ doesXCOFFTracebackTableBegin()

bool llvm::object::doesXCOFFTracebackTableBegin ( ArrayRef< uint8_t >  Bytes)

◆ generateXCOFFFixedNameStringRef()

static StringRef llvm::object::generateXCOFFFixedNameStringRef ( const char *  Name)
static

◆ getDynSymtabSizeFromGnuHash()

template<class ELFT >
static Expected<uint64_t> llvm::object::getDynSymtabSizeFromGnuHash ( const typename ELFT::GnuHash &  Table,
const void *  BufEnd 
)
static

This function finds the number of dynamic symbols using a GNU hash table.

Parameters
TableThe GNU hash table for .dynsym.

Definition at line 661 of file ELF.h.

References llvm::createStringError(), llvm::max(), and parse_failed.

◆ getELFAddend()

static int64_t llvm::object::getELFAddend ( RelocationRef  R)
static

◆ getElfArchType()

std::pair<unsigned char, unsigned char> llvm::object::getElfArchType ( StringRef  Object)
inline

◆ getELFRelativeRelocationType()

uint32_t llvm::object::getELFRelativeRelocationType ( uint32_t  Machine)

◆ getELFRelocationTypeName()

StringRef llvm::object::getELFRelocationTypeName ( uint32_t  Machine,
uint32_t  Type 
)

◆ getELFSectionTypeName()

StringRef llvm::object::getELFSectionTypeName ( uint32_t  Machine,
uint32_t  Type 
)

◆ getExtendedSymbolTableIndex()

template<class ELFT >
Expected<uint32_t> llvm::object::getExtendedSymbolTableIndex ( const typename ELFT::Sym &  Sym,
unsigned  SymIndex,
DataRegion< typename ELFT::Word >  ShndxTable 
)
inline

◆ getImageKind()

ImageKind llvm::object::getImageKind ( StringRef  Name)

Convert a string Name to an image kind.

Definition at line 134 of file OffloadBinary.cpp.

References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), IMG_Bitcode, IMG_Cubin, IMG_Fatbinary, IMG_None, IMG_Object, and IMG_PTX.

◆ getImageKindName()

StringRef llvm::object::getImageKindName ( ImageKind  Name)

Convert an image kind to its string representation.

Definition at line 144 of file OffloadBinary.cpp.

References IMG_Bitcode, IMG_Cubin, IMG_Fatbinary, IMG_Object, and IMG_PTX.

◆ getImgRelRelocation()

static uint16_t llvm::object::getImgRelRelocation ( MachineTypes  Machine)
static

◆ getNameType()

static ImportNameType llvm::object::getNameType ( StringRef  Sym,
StringRef  ExtName,
MachineTypes  Machine,
bool  MinGW 
)
static

◆ getObject()

template<typename T >
static Expected<const T *> llvm::object::getObject ( MemoryBufferRef  M,
const void *  Ptr,
const uint64_t  Size = sizeof(T) 
)
static

Definition at line 33 of file XCOFFObjectFile.cpp.

References Addr, E, M, move, and T.

Referenced by llvm::object::ImportDirectoryEntryRef::getImportTableEntry(), and getNumberOfRelocations().

◆ getOffloadKind()

OffloadKind llvm::object::getOffloadKind ( StringRef  Name)

Convert a string Name to an offload kind.

Definition at line 113 of file OffloadBinary.cpp.

References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), OFK_Cuda, OFK_HIP, OFK_None, and OFK_OpenMP.

◆ getOffloadKindName()

StringRef llvm::object::getOffloadKindName ( OffloadKind  Name)

Convert an offload kind to its string representation.

Definition at line 121 of file OffloadBinary.cpp.

References OFK_Cuda, OFK_HIP, and OFK_OpenMP.

◆ getPhdrIndexForError()

template<class ELFT >
std::string llvm::object::getPhdrIndexForError ( const ELFFile< ELFT > &  Obj,
const typename ELFT::Phdr &  Phdr 
)

◆ getRelocationResolver()

std::pair< SupportsRelocation, RelocationResolver > llvm::object::getRelocationResolver ( const ObjectFile Obj)

Definition at line 688 of file RelocationResolver.cpp.

References llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::Triple::amdgcn, llvm::Triple::arm, llvm::Triple::armeb, assert(), llvm::Triple::avr, llvm::Triple::bpfeb, llvm::Triple::bpfel, llvm::Triple::csky, llvm::object::ObjectFile::getArch(), llvm::object::ObjectFile::getBytesInAddress(), llvm::Triple::hexagon, llvm::object::Binary::isCOFF(), llvm::object::Binary::isELF(), llvm::object::Binary::isMachO(), llvm::object::Binary::isWasm(), llvm::Triple::lanai, llvm_unreachable, llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::msp430, llvm::Triple::ppc, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::Triple::ppcle, resolveAArch64(), resolveAmdgpu(), resolveARM(), resolveAVR(), resolveBPF(), resolveCOFFARM(), resolveCOFFARM64(), resolveCOFFX86(), resolveCOFFX86_64(), resolveCSKY(), resolveHexagon(), resolveLanai(), resolveMachOX86_64(), resolveMips32(), resolveMips64(), resolveMSP430(), resolvePPC32(), resolvePPC64(), resolveRISCV(), resolveSparc32(), resolveSparc64(), resolveSystemZ(), resolveWasm32(), resolveWasm64(), resolveX86(), resolveX86_64(), llvm::Triple::riscv32, llvm::Triple::riscv64, llvm::Triple::sparc, llvm::Triple::sparcv9, supportsAArch64(), supportsAmdgpu(), supportsARM(), supportsAVR(), supportsBPF(), supportsCOFFARM(), supportsCOFFARM64(), supportsCOFFX86(), supportsCOFFX86_64(), supportsCSKY(), supportsHexagon(), supportsLanai(), supportsMachOX86_64(), supportsMips32(), supportsMips64(), supportsMSP430(), supportsPPC32(), supportsPPC64(), supportsRISCV(), supportsSparc32(), supportsSparc64(), supportsSystemZ(), supportsWasm32(), supportsWasm64(), supportsX86(), supportsX86_64(), llvm::Triple::systemz, llvm::Triple::thumb, llvm::Triple::wasm32, llvm::Triple::wasm64, llvm::Triple::x86, and llvm::Triple::x86_64.

Referenced by loadObj().

◆ getSecIndexForError()

template<class ELFT >
std::string llvm::object::getSecIndexForError ( const ELFFile< ELFT > &  Obj,
const typename ELFT::Shdr Sec 
)

◆ getSection()

template<class ELFT >
Expected<const typename ELFT::Shdr *> llvm::object::getSection ( typename ELFT::ShdrRange  Sections,
uint32_t  Index 
)
inline

◆ getWithOffset()

static uintptr_t llvm::object::getWithOffset ( uintptr_t  Base,
ptrdiff_t  Offset 
)
static

◆ hashSysV()

unsigned llvm::object::hashSysV ( StringRef  SymbolName)
inline

This function returns the hash value for a symbol in the .dynsym section Name of the API remains consistent as specified in the libelf REF : http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#hash.

Definition at line 1185 of file ELF.h.

References g, h, and llvm::AMDGPU::HSAMD::Kernel::Key::SymbolName.

◆ is32bit()

static bool llvm::object::is32bit ( MachineTypes  Machine)
static

◆ isDecorated()

static bool llvm::object::isDecorated ( StringRef  Sym,
bool  MingwDef 
)
static

◆ isNotObjectErrorInvalidFileType()

llvm::Error llvm::object::isNotObjectErrorInvalidFileType ( llvm::Error  Err)

isNotObjectErrorInvalidFileType() is used when looping through the children of an archive after calling getAsBinary() on the child and it returns an llvm::Error.

In the cases we want to loop through the children and ignore the non-objects in the archive this is used to test the error to see if an error() function needs to called on the llvm::Error.

Definition at line 84 of file Error.cpp.

◆ llvm::object::XCOFFObjectFile::relocations< llvm::object::XCOFFSectionHeader32, llvm::object::XCOFFRelocation32 >()

◆ llvm::object::XCOFFObjectFile::relocations< llvm::object::XCOFFSectionHeader64, llvm::object::XCOFFRelocation64 >()

◆ make_error_code()

std::error_code llvm::object::make_error_code ( object_error  e)
inline

◆ makeDuplicateResourceError() [1/2]

static std::string llvm::object::makeDuplicateResourceError ( const ResourceEntryRef Entry,
StringRef  File1,
StringRef  File2 
)
static

Definition at line 179 of file WindowsResource.cpp.

◆ makeDuplicateResourceError() [2/2]

static std::string llvm::object::makeDuplicateResourceError ( const std::vector< WindowsResourceParser::StringOrID > &  Context,
StringRef  File1,
StringRef  File2 
)
static

◆ object_category()

const std::error_category & llvm::object::object_category ( )

Definition at line 80 of file Error.cpp.

References error_category.

Referenced by make_error_code().

◆ operator!=()

bool llvm::object::operator!= ( const DataRefImpl a,
const DataRefImpl b 
)
inline

Definition at line 59 of file SymbolicFile.h.

References b, and operator==().

◆ operator<() [1/2]

bool llvm::object::operator< ( const DataRefImpl a,
const DataRefImpl b 
)
inline

Definition at line 63 of file SymbolicFile.h.

References b, and memcmp.

◆ operator<() [2/2]

bool llvm::object::operator< ( const SectionedAddress LHS,
const SectionedAddress RHS 
)
inline

Definition at line 151 of file ObjectFile.h.

References LHS, and RHS.

◆ operator<<() [1/2]

template<typename OStream >
OStream& llvm::object::operator<< ( OStream &  OS,
const DataRefImpl D 
)

Definition at line 47 of file SymbolicFile.h.

References D, and llvm::format().

◆ operator<<() [2/2]

raw_ostream & llvm::object::operator<< ( raw_ostream OS,
const SectionedAddress Addr 
)

◆ operator==() [1/2]

bool llvm::object::operator== ( const DataRefImpl a,
const DataRefImpl b 
)
inline

Definition at line 53 of file SymbolicFile.h.

References b, and memcmp.

◆ operator==() [2/2]

bool llvm::object::operator== ( const SectionedAddress LHS,
const SectionedAddress RHS 
)
inline

Definition at line 157 of file ObjectFile.h.

References LHS, and RHS.

Referenced by operator!=().

◆ parseCOFFModuleDefinition()

Expected< COFFModuleDefinition > llvm::object::parseCOFFModuleDefinition ( MemoryBufferRef  MB,
COFF::MachineTypes  Machine,
bool  MingwDef = false 
)

◆ printResourceTypeName()

void llvm::object::printResourceTypeName ( uint16_t  TypeID,
raw_ostream OS 
)

Definition at line 141 of file WindowsResource.cpp.

Referenced by printStringOrID().

◆ printStringOrID()

static void llvm::object::printStringOrID ( const WindowsResourceParser::StringOrID S,
raw_string_ostream OS,
bool  IsType,
bool  IsID 
)
static

Definition at line 211 of file WindowsResource.cpp.

References convertUTF16LEToUTF8String(), printResourceTypeName(), and S.

Referenced by makeDuplicateResourceError().

◆ readIRSymtab()

Expected< IRSymtabFile > llvm::object::readIRSymtab ( MemoryBufferRef  MBRef)

Reads a bitcode file, creating its irsymtab if necessary.

Definition at line 136 of file IRObjectFile.cpp.

References F, llvm::getBitcodeFileContents(), move, llvm::irsymtab::readBitcode(), and llvm::Expected< T >::takeError().

Referenced by llvm::lto::InputFile::create().

◆ readStringOrId()

static Error llvm::object::readStringOrId ( BinaryStreamReader Reader,
uint16_t ID,
ArrayRef< UTF16 > &  Str,
bool &  IsString 
)
static

◆ replace()

static Expected<std::string> llvm::object::replace ( StringRef  S,
StringRef  From,
StringRef  To 
)
static

◆ resolveAArch64()

static uint64_t llvm::object::resolveAArch64 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 90 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveAmdgpu()

static uint64_t llvm::object::resolveAmdgpu ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 265 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveARM()

static uint64_t llvm::object::resolveARM ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t  Addend 
)
static

Definition at line 332 of file RelocationResolver.cpp.

References assert(), llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveAVR()

static uint64_t llvm::object::resolveAVR ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 358 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveBPF()

static uint64_t llvm::object::resolveBPF ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t   
)
static

Definition at line 118 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveCOFFARM()

static uint64_t llvm::object::resolveCOFFARM ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t   
)
static

◆ resolveCOFFARM64()

static uint64_t llvm::object::resolveCOFFARM64 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t   
)
static

◆ resolveCOFFX86()

static uint64_t llvm::object::resolveCOFFX86 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t   
)
static

◆ resolveCOFFX86_64()

static uint64_t llvm::object::resolveCOFFX86_64 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t   
)
static

◆ resolveCSKY()

static uint64_t llvm::object::resolveCSKY ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t  Addend 
)
static

Definition at line 500 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveHexagon()

static uint64_t llvm::object::resolveHexagon ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 422 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveLanai()

static uint64_t llvm::object::resolveLanai ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 374 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveMachOX86_64()

static uint64_t llvm::object::resolveMachOX86_64 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t   
)
static

Definition at line 604 of file RelocationResolver.cpp.

References llvm_unreachable, S, and llvm::MachO::X86_64_RELOC_UNSIGNED.

Referenced by getRelocationResolver().

◆ resolveMips32()

static uint64_t llvm::object::resolveMips32 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t   
)
static

Definition at line 391 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveMips64()

static uint64_t llvm::object::resolveMips64 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 142 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveMSP430()

static uint64_t llvm::object::resolveMSP430 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 168 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolvePPC32()

static uint64_t llvm::object::resolvePPC32 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 311 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolvePPC64()

static uint64_t llvm::object::resolvePPC64 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 192 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveRelocation()

uint64_t llvm::object::resolveRelocation ( RelocationResolver  Resolver,
const RelocationRef R,
uint64_t  S,
uint64_t  LocData 
)

◆ resolveRISCV()

static uint64_t llvm::object::resolveRISCV ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t  Addend 
)
static

◆ resolveSparc32()

static uint64_t llvm::object::resolveSparc32 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t  Addend 
)
static

Definition at line 411 of file RelocationResolver.cpp.

References S.

Referenced by getRelocationResolver().

◆ resolveSparc64()

static uint64_t llvm::object::resolveSparc64 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 242 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveSystemZ()

static uint64_t llvm::object::resolveSystemZ ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  ,
int64_t  Addend 
)
static

Definition at line 218 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveWasm32()

static uint64_t llvm::object::resolveWasm32 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t   
)
static

Definition at line 647 of file RelocationResolver.cpp.

References llvm_unreachable.

Referenced by getRelocationResolver(), and resolveWasm64().

◆ resolveWasm64()

static uint64_t llvm::object::resolveWasm64 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t  Addend 
)
static

Definition at line 671 of file RelocationResolver.cpp.

References resolveWasm32(), and S.

Referenced by getRelocationResolver().

◆ resolveX86()

static uint64_t llvm::object::resolveX86 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t   
)
static

Definition at line 287 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ resolveX86_64()

static uint64_t llvm::object::resolveX86_64 ( uint64_t  Type,
uint64_t  Offset,
uint64_t  S,
uint64_t  LocData,
int64_t  Addend 
)
static

Definition at line 57 of file RelocationResolver.cpp.

References llvm_unreachable, and S.

Referenced by getRelocationResolver().

◆ supportsAArch64()

static bool llvm::object::supportsAArch64 ( uint64_t  Type)
static

Definition at line 77 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsAmdgpu()

static bool llvm::object::supportsAmdgpu ( uint64_t  Type)
static

Definition at line 255 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsARM()

static bool llvm::object::supportsARM ( uint64_t  Type)
static

Definition at line 322 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsAVR()

static bool llvm::object::supportsAVR ( uint64_t  Type)
static

Definition at line 348 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsBPF()

static bool llvm::object::supportsBPF ( uint64_t  Type)
static

Definition at line 108 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsCOFFARM()

static bool llvm::object::supportsCOFFARM ( uint64_t  Type)
static

◆ supportsCOFFARM64()

static bool llvm::object::supportsCOFFARM64 ( uint64_t  Type)
static

◆ supportsCOFFX86()

static bool llvm::object::supportsCOFFX86 ( uint64_t  Type)
static

◆ supportsCOFFX86_64()

static bool llvm::object::supportsCOFFX86_64 ( uint64_t  Type)
static

◆ supportsCSKY()

static bool llvm::object::supportsCSKY ( uint64_t  Type)
static

Definition at line 489 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsHexagon()

static bool llvm::object::supportsHexagon ( uint64_t  Type)
static

Definition at line 418 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsLanai()

static bool llvm::object::supportsLanai ( uint64_t  Type)
static

Definition at line 370 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsMachOX86_64()

static bool llvm::object::supportsMachOX86_64 ( uint64_t  Type)
static

Definition at line 600 of file RelocationResolver.cpp.

References llvm::MachO::X86_64_RELOC_UNSIGNED.

Referenced by getRelocationResolver().

◆ supportsMips32()

static bool llvm::object::supportsMips32 ( uint64_t  Type)
static

Definition at line 381 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsMips64()

static bool llvm::object::supportsMips64 ( uint64_t  Type)
static

Definition at line 130 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsMSP430()

static bool llvm::object::supportsMSP430 ( uint64_t  Type)
static

Definition at line 158 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsPPC32()

static bool llvm::object::supportsPPC32 ( uint64_t  Type)
static

Definition at line 301 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsPPC64()

static bool llvm::object::supportsPPC64 ( uint64_t  Type)
static

Definition at line 180 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsRISCV()

static bool llvm::object::supportsRISCV ( uint64_t  Type)
static

◆ supportsSparc32()

static bool llvm::object::supportsSparc32 ( uint64_t  Type)
static

Definition at line 401 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsSparc64()

static bool llvm::object::supportsSparc64 ( uint64_t  Type)
static

Definition at line 230 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsSystemZ()

static bool llvm::object::supportsSystemZ ( uint64_t  Type)
static

Definition at line 208 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsWasm32()

static bool llvm::object::supportsWasm32 ( uint64_t  Type)
static

Definition at line 611 of file RelocationResolver.cpp.

Referenced by getRelocationResolver(), and supportsWasm64().

◆ supportsWasm64()

static bool llvm::object::supportsWasm64 ( uint64_t  Type)
static

Definition at line 633 of file RelocationResolver.cpp.

References supportsWasm32().

Referenced by getRelocationResolver().

◆ supportsX86()

static bool llvm::object::supportsX86 ( uint64_t  Type)
static

Definition at line 276 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ supportsX86_64()

static bool llvm::object::supportsX86_64 ( uint64_t  Type)
static

Definition at line 41 of file RelocationResolver.cpp.

Referenced by getRelocationResolver().

◆ viewAs()

template<typename T >
static const T* llvm::object::viewAs ( uintptr_t  in)
static

Definition at line 46 of file XCOFFObjectFile.cpp.

References in, and T.

◆ writeImportLibrary()

Error llvm::object::writeImportLibrary ( StringRef  ImportName,
StringRef  Path,
ArrayRef< COFFShortExport Exports,
COFF::MachineTypes  Machine,
bool  MinGW 
)

Definition at line 575 of file COFFImportFile.cpp.

Referenced by llvm::dlltoolDriverMain().

◆ writeStringTable()

static void llvm::object::writeStringTable ( std::vector< uint8_t > &  B,
ArrayRef< const std::string >  Strings 
)
static

Definition at line 70 of file COFFImportFile.cpp.

◆ writeUniversalBinary()

Error llvm::object::writeUniversalBinary ( ArrayRef< Slice Slices,
StringRef  OutputFileName 
)

◆ writeUniversalBinaryToStream()

Error llvm::object::writeUniversalBinaryToStream ( ArrayRef< Slice Slices,
raw_ostream Out 
)

◆ writeWindowsResourceCOFF()

Expected< std::unique_ptr< MemoryBuffer > > llvm::object::writeWindowsResourceCOFF ( llvm::COFF::MachineTypes  MachineType,
const WindowsResourceParser Parser,
uint32_t  TimeDateStamp 
)

Variable Documentation

◆ ArchiveMagic

const char llvm::object::ArchiveMagic[] = "!<arch>\n"

Definition at line 36 of file Archive.h.

Referenced by llvm::object::Archive::getArchiveMagicLen().

◆ BigArchiveMagic

const char llvm::object::BigArchiveMagic[] = "<bigaf>\n"

Definition at line 38 of file Archive.h.

Referenced by llvm::object::Archive::getArchiveMagicLen().

◆ ElfSymbolTypes

const EnumEntry< unsigned > llvm::object::ElfSymbolTypes
Initial value:
= {
{"None", "NOTYPE", ELF::STT_NOTYPE},
{"Object", "OBJECT", ELF::STT_OBJECT},
{"Function", "FUNC", ELF::STT_FUNC},
{"Section", "SECTION", ELF::STT_SECTION},
{"File", "FILE", ELF::STT_FILE},
{"Common", "COMMON", ELF::STT_COMMON},
{"TLS", "TLS", ELF::STT_TLS},
{"Unknown", "<unknown>: 7", 7},
{"Unknown", "<unknown>: 8", 8},
{"Unknown", "<unknown>: 9", 9},
{"GNU_IFunc", "IFUNC", ELF::STT_GNU_IFUNC},
{"OS Specific", "<OS specific>: 11", 11},
{"OS Specific", "<OS specific>: 12", 12},
{"Proc Specific", "<processor specific>: 13", 13},
{"Proc Specific", "<processor specific>: 14", 14},
{"Proc Specific", "<processor specific>: 15", 15}
}

Definition at line 38 of file ELFObjectFile.cpp.

Referenced by llvm::object::ELFSymbolRef::getELFTypeName().

◆ FunctionSym

const uint8_t llvm::object::FunctionSym = 0x20
static

Definition at line 26 of file XCOFFObjectFile.cpp.

Referenced by llvm::object::XCOFFSymbolRef::isFunction().

◆ MIN_HEADER_SIZE

const uint32_t llvm::object::MIN_HEADER_SIZE = 7 * sizeof(uint32_t) + 2 * sizeof(uint16_t)

Definition at line 43 of file WindowsResource.cpp.

◆ NoRelMask

const uint16_t llvm::object::NoRelMask = 0x0001
static

◆ NullImportDescriptorSymbolName

const std::string llvm::object::NullImportDescriptorSymbolName
static
Initial value:
=
"__NULL_IMPORT_DESCRIPTOR"

Definition at line 133 of file COFFImportFile.cpp.

◆ NumElfSymbolTypes

constexpr int llvm::object::NumElfSymbolTypes = 16
constexpr

Definition at line 46 of file ELFObjectFile.h.

◆ SECTION_ALIGNMENT

const uint32_t llvm::object::SECTION_ALIGNMENT = sizeof(uint64_t)

Definition at line 47 of file WindowsResource.cpp.

◆ SymbolAuxTypeOffset

const size_t llvm::object::SymbolAuxTypeOffset = 17
static

Definition at line 28 of file XCOFFObjectFile.cpp.

Referenced by llvm::object::XCOFFObjectFile::getSymbolAuxType().

◆ ThinArchiveMagic

const char llvm::object::ThinArchiveMagic[] = "!<thin>\n"

Definition at line 37 of file Archive.h.

Referenced by llvm::object::Archive::getArchiveMagicLen().

◆ WIN_RES_DATA_ALIGNMENT

const uint32_t llvm::object::WIN_RES_DATA_ALIGNMENT = 4

Definition at line 57 of file WindowsResource.h.

◆ WIN_RES_HEADER_ALIGNMENT

const uint32_t llvm::object::WIN_RES_HEADER_ALIGNMENT = 4

Definition at line 56 of file WindowsResource.h.

◆ WIN_RES_MAGIC_SIZE

const size_t llvm::object::WIN_RES_MAGIC_SIZE = 16

◆ WIN_RES_NULL_ENTRY_SIZE

const size_t llvm::object::WIN_RES_NULL_ENTRY_SIZE = 16

◆ WIN_RES_PURE_MOVEABLE

const uint16_t llvm::object::WIN_RES_PURE_MOVEABLE = 0x0030

Definition at line 58 of file WindowsResource.h.

llvm::ELF::STT_FUNC
@ STT_FUNC
Definition: ELF.h:1202
llvm::ELF::STT_GNU_IFUNC
@ STT_GNU_IFUNC
Definition: ELF.h:1207
llvm::ELF::STT_TLS
@ STT_TLS
Definition: ELF.h:1206
llvm::ELF::STT_SECTION
@ STT_SECTION
Definition: ELF.h:1203
llvm::ELF::STT_NOTYPE
@ STT_NOTYPE
Definition: ELF.h:1200
llvm::ELF::STT_OBJECT
@ STT_OBJECT
Definition: ELF.h:1201
llvm::ELF::STT_FILE
@ STT_FILE
Definition: ELF.h:1204
llvm::ELF::STT_COMMON
@ STT_COMMON
Definition: ELF.h:1205