LLVM  6.0.0svn
Classes | Typedefs | Enumerations | Functions | Variables
llvm::object Namespace Reference

Classes

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...
 
class  Binary
 
class  BinaryError
 Base class for all errors indicating malformed binary files. More...
 
class  BindRebaseSegInfo
 
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  content_iterator
 
struct  data_directory
 
union  DataRefImpl
 
struct  debug_directory
 
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...
 
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_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...
 
struct  ELFDataTypeTypedefHelper
 
struct  ELFDataTypeTypedefHelper< ELFType< TargetEndianness, false > >
 ELF 32bit types. More...
 
struct  ELFDataTypeTypedefHelper< ELFType< TargetEndianness, true > >
 ELF 64bit types. More...
 
struct  ELFDataTypeTypedefHelperCommon
 
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
 
class  MachOBindEntry
 MachOBindEntry encapsulates the current state in the decompression of binding opcodes. More...
 
class  MachOObjectFile
 
class  MachORebaseEntry
 MachORebaseEntry encapsulates the current state in the decompression of rebasing opcodes. More...
 
class  MachOUniversalBinary
 
class  ObjectFile
 This class is the base class for all object file types. 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  RelocVisitor
 Base class for object file relocation visitors. More...
 
class  ResourceEntryRef
 
class  ResourceSectionRef
 
class  SectionRef
 This is a value type class that represents a single section in the list of sections in the object file. More...
 
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
 
struct  Token
 
class  WasmObjectFile
 
struct  WasmSection
 
struct  WasmSegment
 
class  WasmSymbol
 
class  WindowsResource
 
class  WindowsResourceCOFFWriter
 
class  WindowsResourceParser
 
struct  WinResHeaderPrefix
 
struct  WinResHeaderSuffix
 
struct  WinResIDs
 

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< ELFType< support::little, false > >
 
using ELF64LEFile = ELFFile< ELFType< support::little, true > >
 
using ELF32BEFile = ELFFile< ELFType< support::big, false > >
 
using ELF64BEFile = ELFFile< ELFType< support::big, true > >
 
using ELF32LEObjectFile = ELFObjectFile< ELFType< support::little, false > >
 
using ELF64LEObjectFile = ELFObjectFile< ELFType< support::little, true > >
 
using ELF32BEObjectFile = ELFObjectFile< ELFType< support::big, false > >
 
using ELF64BEObjectFile = ELFObjectFile< ELFType< support::big, true > >
 
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 section_iterator = content_iterator< SectionRef >
 
using relocation_iterator = content_iterator< RelocationRef >
 
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::FidTableHasFlags = 0x10000000
}
 Bits in control flow guard flags as we understand them. More...
 
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
}
 
enum  Kind {
  Unknown, Eof, Identifier, Comma,
  Equal, KwBase, KwConstant, KwData,
  KwExports, KwHeapsize, KwLibrary, KwName,
  KwNoname, KwPrivate, KwStacksize, KwVersion
}
 

Functions

Expected< std::unique_ptr< Binary > > createBinary (MemoryBufferRef Source, LLVMContext *Context=nullptr)
 Create a Binary from Source, autodetecting the file type. More...
 
Expected< OwningBinary< Binary > > createBinary (StringRef Path)
 
Error writeImportLibrary (StringRef ImportName, StringRef Path, ArrayRef< COFFShortExport > Exports, COFF::MachineTypes Machine, bool MakeWeakAliases)
 
Expected< COFFModuleDefinitionparseCOFFModuleDefinition (MemoryBufferRef MB, COFF::MachineTypes Machine, bool MingwDef=false)
 
StringRef getELFRelocationTypeName (uint32_t Machine, uint32_t Type)
 
StringRef getELFSectionTypeName (uint32_t Machine, uint32_t Type)
 
std::pair< unsigned char, unsigned chargetElfArchType (StringRef Object)
 
static Error createError (StringRef Err)
 
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, const typename ELFT::Sym *FirstSym, ArrayRef< typename ELFT::Word > ShndxTable)
 
template<class ELFT >
Expected< const typename ELFT::Sym * > getSymbol (typename ELFT::SymRange Symbols, uint32_t Index)
 
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...
 
Expected< IRSymtabFilereadIRSymtab (MemoryBufferRef MBRef)
 Reads a bitcode file, creating its irsymtab if necessary. More...
 
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)
 
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)
 
static Expected< std::string > replace (StringRef S, StringRef From, StringRef To)
 
static bool isDecorated (StringRef Sym, bool MingwDef)
 
static Error createError (const Twine &Err)
 
static Error readStringOrId (BinaryStreamReader &Reader, uint16_t &ID, ArrayRef< UTF16 > &Str, bool &IsString)
 
static std::time_t getTime ()
 

Variables

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)
 

Typedef Documentation

◆ base_reloc_iterator

Definition at line 51 of file COFF.h.

◆ basic_symbol_iterator

Definition at line 139 of file SymbolicFile.h.

◆ bind_iterator

Definition at line 263 of file MachO.h.

◆ coff_symbol16

Definition at line 266 of file COFF.h.

◆ coff_symbol32

Definition at line 267 of file COFF.h.

◆ coff_tls_directory32

Definition at line 561 of file COFF.h.

◆ coff_tls_directory64

Definition at line 562 of file COFF.h.

◆ delay_import_directory_iterator

Definition at line 48 of file COFF.h.

◆ dice_iterator

Definition at line 64 of file MachO.h.

◆ ELF32BE

Definition at line 86 of file ELFTypes.h.

◆ ELF32BEFile

Definition at line 182 of file ELF.h.

◆ ELF32BEObjectFile

Definition at line 409 of file ELFObjectFile.h.

◆ ELF32LE

Definition at line 85 of file ELFTypes.h.

◆ ELF32LEFile

Definition at line 180 of file ELF.h.

◆ ELF32LEObjectFile

Definition at line 407 of file ELFObjectFile.h.

◆ ELF64BE

Definition at line 88 of file ELFTypes.h.

◆ ELF64BEFile

Definition at line 183 of file ELF.h.

◆ ELF64BEObjectFile

Definition at line 410 of file ELFObjectFile.h.

◆ ELF64LE

Definition at line 87 of file ELFTypes.h.

◆ ELF64LEFile

Definition at line 181 of file ELF.h.

◆ ELF64LEObjectFile

Definition at line 408 of file ELFObjectFile.h.

◆ export_directory_iterator

Definition at line 49 of file COFF.h.

◆ export_iterator

Definition at line 126 of file MachO.h.

◆ export_name_pointer_table_entry

Definition at line 242 of file COFF.h.

◆ export_ordinal_table_entry

Definition at line 243 of file COFF.h.

◆ import_directory_iterator

Definition at line 46 of file COFF.h.

◆ import_lookup_table_entry32

Definition at line 207 of file COFF.h.

◆ import_lookup_table_entry64

Definition at line 209 of file COFF.h.

◆ imported_symbol_iterator

Definition at line 50 of file COFF.h.

◆ rebase_iterator

Definition at line 205 of file MachO.h.

◆ relocation_iterator

Definition at line 76 of file ObjectFile.h.

◆ section_iterator

Definition at line 47 of file ObjectFile.h.

Enumeration Type Documentation

◆ coff_guard_flags

Bits in control flow guard flags as we understand them.

Enumerator
CFInstrumented 
HasFidTable 
ProtectDelayLoadIAT 
DelayLoadIATSection 
HasLongJmpTable 
FidTableHasFlags 

Definition at line 565 of file COFF.h.

◆ Kind

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

Definition at line 34 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 

Definition at line 28 of file Error.h.

Function Documentation

◆ append()

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

Definition at line 63 of file COFFImportFile.cpp.

◆ compareAddress()

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

◆ computeSymbolSizes()

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

◆ createBinary() [1/2]

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

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, llvm::object::MachOUniversalBinary::create(), llvm::object::Archive::create(), llvm::object::SymbolicFile::createSymbolicFile(), llvm::object::WindowsResource::createWindowsResource(), 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::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::pecoff_executable, llvm::file_magic::unknown, llvm::file_magic::wasm_object, and llvm::file_magic::windows_resource.

Referenced by llvm::object::Binary::checkOffset(), createBinary(), llvm::symbolize::LLVMSymbolizer::flush(), llvm::object::Archive::Child::getAsBinary(), and loadBinaryFormat().

◆ createBinary() [2/2]

Expected< OwningBinary< Binary > > llvm::object::createBinary ( StringRef  Path)

◆ createError() [1/2]

static Error llvm::object::createError ( StringRef  Err)
inlinestatic

◆ createError() [2/2]

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

Definition at line 83 of file COFFModuleDefinition.cpp.

References llvm::Twine::str().

Referenced by llvm::object::Parser::parse().

◆ getElfArchType()

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

◆ getELFRelocationTypeName()

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

Definition at line 23 of file ELF.cpp.

References llvm::ELF::EM_386, llvm::ELF::EM_AARCH64, llvm::ELF::EM_AMDGPU, llvm::ELF::EM_ARC_COMPACT, llvm::ELF::EM_ARC_COMPACT2, llvm::ELF::EM_ARM, llvm::ELF::EM_AVR, llvm::ELF::EM_BPF, llvm::ELF::EM_HEXAGON, llvm::ELF::EM_IAMCU, llvm::ELF::EM_LANAI, llvm::ELF::EM_MIPS, llvm::ELF::EM_MIPS_RS3_LE, llvm::ELF::EM_PPC, llvm::ELF::EM_PPC64, llvm::ELF::EM_RISCV, llvm::ELF::EM_S390, llvm::ELF::EM_SPARC, llvm::ELF::EM_SPARC32PLUS, llvm::ELF::EM_SPARCV9, llvm::ELF::EM_WEBASSEMBLY, llvm::ELF::EM_X86_64, getELFSectionTypeName(), Machine, llvm::ELF::SHT_ANDROID_REL, llvm::ELF::SHT_ANDROID_RELA, llvm::ELF::SHT_ARM_ATTRIBUTES, llvm::ELF::SHT_ARM_DEBUGOVERLAY, llvm::ELF::SHT_ARM_EXIDX, llvm::ELF::SHT_ARM_OVERLAYSECTION, llvm::ELF::SHT_ARM_PREEMPTMAP, llvm::ELF::SHT_DYNAMIC, llvm::ELF::SHT_DYNSYM, llvm::ELF::SHT_FINI_ARRAY, llvm::ELF::SHT_GNU_ATTRIBUTES, llvm::ELF::SHT_GNU_HASH, llvm::ELF::SHT_GNU_verdef, llvm::ELF::SHT_GNU_verneed, llvm::ELF::SHT_GNU_versym, llvm::ELF::SHT_GROUP, llvm::ELF::SHT_HASH, llvm::ELF::SHT_HEX_ORDERED, llvm::ELF::SHT_INIT_ARRAY, llvm::ELF::SHT_LLVM_ODRTAB, llvm::ELF::SHT_MIPS_ABIFLAGS, llvm::ELF::SHT_MIPS_DWARF, llvm::ELF::SHT_MIPS_OPTIONS, llvm::ELF::SHT_MIPS_REGINFO, llvm::ELF::SHT_NOBITS, llvm::ELF::SHT_NOTE, llvm::ELF::SHT_NULL, llvm::ELF::SHT_PREINIT_ARRAY, llvm::ELF::SHT_PROGBITS, llvm::ELF::SHT_REL, llvm::ELF::SHT_RELA, llvm::ELF::SHT_SHLIB, llvm::ELF::SHT_STRTAB, llvm::ELF::SHT_SYMTAB, llvm::ELF::SHT_SYMTAB_SHNDX, llvm::ELF::SHT_X86_64_UNWIND, and STRINGIFY_ENUM_CASE.

Referenced by llvm::object::ELFFile< ELFT >::getRelocationTypeName(), and llvm::object::ELFObjectFile< ELFT >::getRelocationTypeName().

◆ 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,
const typename ELFT::Sym *  FirstSym,
ArrayRef< typename ELFT::Word >  ShndxTable 
)
inline

Definition at line 195 of file ELF.h.

References assert(), createError(), llvm::ELF::SHN_XINDEX, and llvm::ArrayRef< T >::size().

◆ getImgRelRelocation()

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

◆ getNameType()

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

◆ getSection()

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

Definition at line 187 of file ELF.h.

References createError().

Referenced by llvm::object::MachOObjectFile::BindRebaseAddress(), llvm::object::COFFObjectFile::getDOSHeader(), llvm::object::ELFObjectFile< ELFT >::getRelocatedSection(), llvm::object::MachOObjectFile::getRelocation(), llvm::object::ELFObjectFile< ELFT >::getSectionAddress(), llvm::object::MachOObjectFile::getSectionAddress(), llvm::object::ELFObjectFile< ELFT >::getSectionAlignment(), llvm::object::MachOObjectFile::getSectionAlignment(), llvm::object::ELFObjectFile< ELFT >::getSectionContents(), llvm::object::MachOObjectFile::getSectionContents(), llvm::object::ELFObjectFile< ELFT >::getSectionFlags(), llvm::object::ELFObjectFile< ELFT >::getSectionIndex(), llvm::object::ELFObjectFile< ELFT >::getSectionName(), llvm::object::ELFObjectFile< ELFT >::getSectionOffset(), llvm::object::ELFObjectFile< ELFT >::getSectionSize(), llvm::object::MachOObjectFile::getSectionSize(), llvm::object::ELFObjectFile< ELFT >::getSectionType(), llvm::GlobalValue::hasSection(), llvm::object::ELFObjectFile< ELFT >::isSectionBSS(), llvm::object::ELFObjectFile< ELFT >::isSectionCompressed(), llvm::object::ELFObjectFile< ELFT >::isSectionData(), llvm::object::MachOObjectFile::isSectionStripped(), llvm::object::ELFObjectFile< ELFT >::isSectionText(), llvm::object::ELFObjectFile< ELFT >::isSectionVirtual(), LLVMGetSection(), LLVMMoveToContainingSection(), llvm::object::ELFObjectFile< ELFT >::moveSectionNext(), and llvm::object::SymbolRef::SymbolRef().

◆ getSymbol()

template<class ELFT >
Expected<const typename ELFT::Sym *> llvm::object::getSymbol ( typename ELFT::SymRange  Symbols,
uint32_t  Index 
)
inline

Definition at line 249 of file ELF.h.

References createError().

Referenced by llvm::RuntimeDyldCheckerImpl::checkAllRulesInBuffer(), createPPCMCAsmInfo(), duplicateCPV(), llvm::MipsTargetELFStreamer::emitAssignment(), llvm::InstrEmitter::EmitDbgValue(), EmitHiLo(), llvm::object::COFFObjectFile::getAuxSymbol(), llvm::object::ELFObjectFile< ELFT >::getCommonSymbolSizeImpl(), llvm::object::COFFObjectFile::getSymbol(), llvm::object::ELFObjectFile< ELFT >::getSymbolAddress(), llvm::object::ELFObjectFile< ELFT >::getSymbolAlignment(), llvm::object::ELFObjectFile< ELFT >::getSymbolELFType(), llvm::object::ELFObjectFile< ELFT >::getSymbolFlags(), llvm::object::ELFObjectFile< ELFT >::getSymbolName(), llvm::object::ELFObjectFile< ELFT >::getSymbolOther(), llvm::object::ELFObjectFile< ELFT >::getSymbolSection(), llvm::object::ELFObjectFile< ELFT >::getSymbolType(), llvm::object::ELFObjectFile< ELFT >::getSymbolValueImpl(), llvm::MCParserUtils::isSymbolUsedInExpression(), LLVMGetRelocationSymbol(), llvm::MSP430TargetLowering::LowerExternalSymbol(), LowerINSERT_SUBVECTOR(), llvm::RuntimeDyld::MemoryManager::notifyObjectLoaded(), llvm::MIPrinter::print(), llvm::NVPTXInstPrinter::printProtoIdent(), llvm::MachineBasicBlock::setNumber(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, false >, false >::setType(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, true >, false >::setType(), llvm::ELF::Elf32_Rel::setType(), llvm::ELF::Elf32_Rela::setType(), llvm::ELF::Elf64_Rel::setType(), llvm::ELF::Elf64_Rela::setType(), stripRegisterPrefix(), llvm::TargetMachine::targetSchedulesPostRAScheduling(), VerifySDNode(), and llvm::MCStreamer::visitUsedExpr().

◆ getTime()

static std::time_t llvm::object::getTime ( )
static

Definition at line 420 of file WindowsResource.cpp.

References llvm::isUInt< 32 >().

Referenced by llvm::object::WindowsResourceCOFFWriter::write().

◆ 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 523 of file ELF.h.

References C.

◆ 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 80 of file Error.cpp.

References llvm::lltok::Error, llvm::handleErrors(), invalid_file_type, and llvm::Error::success().

Referenced by llvm::object::GenericBinaryError::getMessage().

◆ make_error_code()

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

◆ object_category()

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

Definition at line 76 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 operator==().

◆ operator<()

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

Definition at line 63 of file SymbolicFile.h.

References memcmp.

Referenced by llvm::symbolize::SymbolizableObjectFile::create().

◆ operator<<()

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

◆ operator==()

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

◆ parseCOFFModuleDefinition()

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

Definition at line 353 of file COFFModuleDefinition.cpp.

References llvm::MemoryBufferRef::getBuffer(), and Machine.

Referenced by llvm::dlltoolDriverMain().

◆ readIRSymtab()

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

◆ 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

◆ writeImportLibrary()

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

Definition at line 561 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 69 of file COFFImportFile.cpp.

References llvm::support::endian::write32le().

◆ writeWindowsResourceCOFF()

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

Variable Documentation

◆ MIN_HEADER_SIZE

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

Definition at line 33 of file WindowsResource.cpp.

◆ NullImportDescriptorSymbolName

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

Definition at line 124 of file COFFImportFile.cpp.

◆ SECTION_ALIGNMENT

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

Definition at line 37 of file WindowsResource.cpp.

◆ WIN_RES_DATA_ALIGNMENT

const uint32_t llvm::object::WIN_RES_DATA_ALIGNMENT = 4

Definition at line 53 of file WindowsResource.h.

Referenced by readStringOrId().

◆ WIN_RES_HEADER_ALIGNMENT

const uint32_t llvm::object::WIN_RES_HEADER_ALIGNMENT = 4

Definition at line 52 of file WindowsResource.h.

Referenced by readStringOrId().

◆ 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 54 of file WindowsResource.h.