LLVM 17.0.0git
|
Namespaces | |
namespace | DirectX |
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 |
using llvm::object::base_reloc_iterator = typedef content_iterator<BaseRelocRef> |
using llvm::object::basic_symbol_iterator = typedef content_iterator<BasicSymbolRef> |
Definition at line 143 of file SymbolicFile.h.
using llvm::object::bind_iterator = typedef content_iterator<MachOBindEntry> |
typedef SmallVector<uint8_t, 10> llvm::object::BuildID |
typedef ArrayRef<uint8_t> llvm::object::BuildIDRef |
using llvm::object::coff_symbol16 = typedef coff_symbol<support::ulittle16_t> |
using llvm::object::coff_symbol32 = typedef coff_symbol<support::ulittle32_t> |
using llvm::object::coff_tls_directory32 = typedef coff_tls_directory<support::little32_t> |
using llvm::object::coff_tls_directory64 = typedef coff_tls_directory<support::little64_t> |
using llvm::object::dice_iterator = typedef content_iterator<DiceRef> |
using llvm::object::ELF32BE = typedef ELFType<support::big, false> |
Definition at line 96 of file ELFTypes.h.
using llvm::object::ELF32BEFile = typedef ELFFile<ELF32BE> |
using llvm::object::ELF32BEObjectFile = typedef ELFObjectFile<ELF32BE> |
Definition at line 469 of file ELFObjectFile.h.
using llvm::object::ELF32LE = typedef ELFType<support::little, false> |
Definition at line 95 of file ELFTypes.h.
using llvm::object::ELF32LEFile = typedef ELFFile<ELF32LE> |
using llvm::object::ELF32LEObjectFile = typedef ELFObjectFile<ELF32LE> |
Definition at line 467 of file ELFObjectFile.h.
using llvm::object::ELF64BE = typedef ELFType<support::big, true> |
Definition at line 98 of file ELFTypes.h.
using llvm::object::ELF64BEFile = typedef ELFFile<ELF64BE> |
using llvm::object::ELF64BEObjectFile = typedef ELFObjectFile<ELF64BE> |
Definition at line 470 of file ELFObjectFile.h.
using llvm::object::ELF64LE = typedef ELFType<support::little, true> |
Definition at line 97 of file ELFTypes.h.
using llvm::object::ELF64LEFile = typedef ELFFile<ELF64LE> |
using llvm::object::ELF64LEObjectFile = typedef ELFObjectFile<ELF64LE> |
Definition at line 468 of file ELFObjectFile.h.
Definition at line 306 of file XCOFFObjectFile.h.
Definition at line 307 of file XCOFFObjectFile.h.
using llvm::object::export_iterator = typedef content_iterator<ExportEntry> |
using llvm::object::export_name_pointer_table_entry = typedef support::ulittle32_t |
using llvm::object::export_ordinal_table_entry = typedef support::ulittle16_t |
using llvm::object::fixup_iterator = typedef content_iterator<MachOChainedFixupEntry> |
using llvm::object::imported_symbol_iterator = typedef content_iterator<ImportedSymbolRef> |
using llvm::object::rebase_iterator = typedef content_iterator<MachORebaseEntry> |
using llvm::object::relocation_iterator = typedef content_iterator<RelocationRef> |
Definition at line 76 of file ObjectFile.h.
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 28 of file RelocationResolver.h.
using llvm::object::section_iterator = typedef content_iterator<SectionRef> |
Definition at line 47 of file ObjectFile.h.
using llvm::object::SupportsRelocation = typedef bool (*)(uint64_t) |
Definition at line 27 of file RelocationResolver.h.
|
strong |
enum llvm::object::ImageKind : uint16_t |
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.
enum llvm::object::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.
|
strong |
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.
|
static |
Definition at line 66 of file COFFImportFile.cpp.
References B, and llvm::Data.
Definition at line 720 of file WindowsResource.cpp.
References assert(), and llvm::COFF::NameSize.
Definition at line 21 of file SymbolSize.cpp.
Referenced by computeSymbolSizes().
std::vector< std::pair< SymbolRef, uint64_t > > llvm::object::computeSymbolSizes | ( | const ObjectFile & | O | ) |
Definition at line 50 of file SymbolSize.cpp.
References llvm::array_pod_sort(), compareAddress(), E, getSectionID(), getSymbolSectionID(), llvm::object::SymbolRef::getValue(), I, N, P, llvm::report_fatal_error(), Size, and llvm::Expected< T >::takeError().
Referenced by llvm::symbolize::SymbolizableObjectFile::create().
|
static |
Definition at line 168 of file WindowsResource.cpp.
References llvm::convertUTF16ToUTF8String(), llvm::copy(), llvm::sys::IsBigEndianHost, and UNI_UTF16_BYTE_ORDER_MARK_SWAPPED.
Referenced by makeDuplicateResourceError(), and printStringOrID().
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.
Source | The 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::Archive::create(), llvm::object::MachOUniversalBinary::create(), llvm::object::MinidumpFile::create(), llvm::object::TapiUniversal::create(), llvm::object::OffloadBinary::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_file_set, 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(), llvm::orc::StaticLibraryDefinitionGenerator::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().
Expected< OwningBinary< Binary > > llvm::object::createBinary | ( | StringRef | Path, |
LLVMContext * | Context = nullptr , |
||
bool | InitContent = true |
||
) |
Definition at line 103 of file Binary.cpp.
References llvm::Bin, Context, createBinary(), llvm::errorCodeToError(), llvm::Expected< T >::get(), llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFileOrSTDIN(), and llvm::Expected< T >::takeError().
Definition at line 84 of file Error.h.
References parse_failed.
Referenced by llvm::object::ELFFile< ELFT >::android_relas(), llvm::object::ELFFile< ELFT >::create(), llvm::object::ObjectFile::createELFObjectFile(), llvm::object::ELFFile< ELFT >::decodeBBAddrMap(), defaultWarningHandler(), llvm::object::ELFFile< ELFT >::dynamicEntries(), llvm::object::MachOObjectFile::getDyldChainedFixupTargets(), llvm::object::ELFFile< ELFT >::getEntry(), getExtendedSymbolTableIndex(), llvm::object::XCOFFObjectFile::getImportFileTable(), llvm::object::ELFFile< ELFT >::getLinkAsStrtab(), getLoaderSecSymNameInStrTbl(), llvm::object::XCOFFObjectFile::getRawData(), llvm::object::ELFObjectFile< ELFT >::getRelocationAddend(), getSection(), llvm::object::ELFFile< ELFT >::getSectionAndRelocations(), llvm::object::XCOFFObjectFile::getSectionContents(), llvm::object::ELFFile< ELFT >::getSectionContentsAsArray(), llvm::object::XCOFFObjectFile::getSectionFileOffsetToRawData(), llvm::object::ELFFile< ELFT >::getSectionName(), llvm::object::ELFFile< ELFT >::getSectionStringTable(), llvm::object::ELFFile< ELFT >::getSegmentContents(), llvm::object::ELFFile< ELFT >::getSHNDXTable(), llvm::object::ELFFile< ELFT >::getStringTable(), llvm::object::XCOFFObjectFile::getStringTableEntry(), llvm::object::ELFFile< ELFT >::getStringTableForSymtab(), llvm::object::ELFFile< ELFT >::getSymbol(), llvm::object::XCOFFObjectFile::getSymbolNameByIndex(), llvm::object::ELFFile< ELFT >::getSymbolVersionByIndex(), llvm::object::ELFFile< ELFT >::getVersionDefinitions(), llvm::object::ELFFile< ELFT >::getVersionDependencies(), llvm::object::XCOFFSymbolRef::getXCOFFCsectAuxRef(), llvm::object::MachOChainedFixupEntry::moveNext(), llvm::object::ELFFile< ELFT >::notes_begin(), llvm::object::DataRegion< T >::operator[](), llvm::object::ELFFile< ELFT >::program_headers(), readBBAddrMapImpl(), readDynsymVersionsImpl(), llvm::object::XCOFFObjectFile::relocations(), llvm::object::ELFFile< ELFT >::sections(), llvm::object::ELFFile< ELFT >::toMappedAddr(), and llvm::StackMapParser< Endianness >::validateHeader().
Definition at line 163 of file ELF.h.
References createError().
|
static |
Definition at line 143 of file ELF.h.
References llvm::cantFail(), getELFSectionTypeName(), llvm::object::ELFFile< ELFT >::getHeader(), and llvm::object::ELFFile< ELFT >::sections().
Referenced by llvm::object::ELFFile< ELFT >::decodeBBAddrMap(), llvm::object::ELFFile< ELFT >::getLinkAsStrtab(), llvm::object::ELFFile< ELFT >::getSectionAndRelocations(), llvm::object::ELFFile< ELFT >::getVersionDefinitions(), llvm::object::ELFFile< ELFT >::getVersionDependencies(), readBBAddrMapImpl(), and readDynsymVersionsImpl().
Definition at line 1339 of file XCOFFObjectFile.cpp.
References llvm::ArrayRef< T >::data(), llvm::support::endian::read32be(), and llvm::ArrayRef< T >::size().
Error llvm::object::extractOffloadBinaries | ( | MemoryBufferRef | Buffer, |
SmallVectorImpl< OffloadFile > & | Binaries | ||
) |
Extracts embedded device offloading code from a memory Buffer
to a list of Binaries
.
Definition at line 270 of file OffloadBinary.cpp.
References llvm::file_magic::archive, llvm::file_magic::bitcode, llvm::file_magic::coff_object, llvm::object::Archive::create(), llvm::object::ObjectFile::createObjectFile(), llvm::file_magic::elf_executable, llvm::file_magic::elf_relocatable, llvm::file_magic::elf_shared_object, llvm::Expected< T >::get(), llvm::MemoryBufferRef::getBuffer(), llvm::identify_magic(), llvm::file_magic::offload_binary, llvm::Error::success(), and llvm::Expected< T >::takeError().
Definition at line 50 of file XCOFFObjectFile.cpp.
References Name, and llvm::XCOFF::NameSize.
Referenced by llvm::object::XCOFFObjectFile::getCFileName(), llvm::object::XCOFFSectionHeader< T >::getName(), llvm::object::XCOFFSymbolRef::getName(), llvm::object::XCOFFObjectFile::getSectionName(), llvm::object::LoaderSectionSymbolEntry32::getSymbolName(), and llvm::object::XCOFFObjectFile::getSymbolSectionName().
std::optional< BuildIDRef > llvm::object::getBuildID | ( | const ObjectFile * | Obj | ) |
Returns the build ID, if any, contained in the given object file.
Definition at line 48 of file BuildID.cpp.
References llvm::dyn_cast(), and getBuildID().
Referenced by getBuildID(), and loadBinaryFormat().
|
static |
This function finds the number of dynamic symbols using a GNU hash table.
Table | The GNU hash table for .dynsym. |
Definition at line 684 of file ELF.h.
References llvm::createStringError(), and parse_failed.
|
static |
Definition at line 33 of file RelocationResolver.cpp.
References llvm::object::ELFRelocationRef::getAddend(), llvm::handleAllErrors(), and llvm::Expected< T >::takeError().
Referenced by resolveRelocation().
Definition at line 78 of file ELF.h.
References llvm::ELF::EI_CLASS, llvm::ELF::EI_DATA, llvm::ELF::EI_NIDENT, llvm::ELF::ELFCLASSNONE, llvm::ELF::ELFDATANONE, and llvm::Object.
Referenced by llvm::orc::ELFDebugObject::Create(), and llvm::object::ObjectFile::createELFObjectFile().
Definition at line 191 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_CSKY, llvm::ELF::EM_HEXAGON, llvm::ELF::EM_IAMCU, llvm::ELF::EM_LANAI, llvm::ELF::EM_LOONGARCH, llvm::ELF::EM_MIPS, 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_VE, and llvm::ELF::EM_X86_64.
Referenced by llvm::object::ELFFile< ELFT >::getRelativeRelocationType().
Definition at line 22 of file ELF.cpp.
References llvm::ELF::EM_386, llvm::ELF::EM_68K, 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_CSKY, llvm::ELF::EM_HEXAGON, llvm::ELF::EM_IAMCU, llvm::ELF::EM_LANAI, llvm::ELF::EM_LOONGARCH, llvm::ELF::EM_MIPS, llvm::ELF::EM_MSP430, 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_VE, llvm::ELF::EM_X86_64, and llvm::ELF::EM_XTENSA.
Referenced by llvm::jitlink::getJITLinkEdgeKind(), llvm::object::ELFFile< ELFT >::getRelocationTypeName(), and llvm::object::ELFObjectFile< ELFT >::getRelocationTypeName().
|
inline |
Definition at line 429 of file ELF.h.
References assert(), createError(), llvm::object::DataRegion< T >::First, llvm::ELF::SHN_XINDEX, llvm::Expected< T >::takeError(), and llvm::dwarf::toString().
Convert a string Name
to an image kind.
Definition at line 321 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, IMG_PTX, and Name.
Convert an image kind to its string representation.
Definition at line 331 of file OffloadBinary.cpp.
References IMG_Bitcode, IMG_Cubin, IMG_Fatbinary, IMG_Object, and IMG_PTX.
|
static |
Definition at line 50 of file COFFImportFile.cpp.
References llvm::COFF::IMAGE_FILE_MACHINE_AMD64, llvm::COFF::IMAGE_FILE_MACHINE_ARM64, llvm::COFF::IMAGE_FILE_MACHINE_ARM64EC, llvm::COFF::IMAGE_FILE_MACHINE_ARMNT, llvm::COFF::IMAGE_FILE_MACHINE_I386, llvm::COFF::IMAGE_REL_AMD64_ADDR32NB, llvm::COFF::IMAGE_REL_ARM64_ADDR32NB, llvm::COFF::IMAGE_REL_ARM_ADDR32NB, llvm::COFF::IMAGE_REL_I386_DIR32NB, and llvm_unreachable.
Expected< StringRef > llvm::object::getLoaderSecSymNameInStrTbl | ( | const T * | LoaderSecHeader, |
uint64_t | Offset | ||
) |
Definition at line 93 of file XCOFFObjectFile.cpp.
References createError(), llvm::Offset, and llvm::Twine::utohexstr().
Referenced by llvm::object::LoaderSectionSymbolEntry32::getSymbolName(), and llvm::object::LoaderSectionSymbolEntry64::getSymbolName().
|
static |
Definition at line 99 of file COFFImportFile.cpp.
References llvm::StringRef::contains(), llvm::COFF::IMAGE_FILE_MACHINE_I386, llvm::COFF::IMPORT_NAME, llvm::COFF::IMPORT_NAME_NOPREFIX, llvm::COFF::IMPORT_NAME_UNDECORATE, and llvm::StringRef::startswith().
Referenced by writeImportLibrary().
|
static |
Definition at line 33 of file XCOFFObjectFile.cpp.
References Addr, llvm::object::Binary::checkOffset(), E, Ptr, and Size.
Referenced by llvm::object::ImportDirectoryEntryRef::getImportTableEntry(), and getNumberOfRelocations().
OffloadKind llvm::object::getOffloadKind | ( | StringRef | Name | ) |
Convert a string Name
to an offload kind.
Definition at line 300 of file OffloadBinary.cpp.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), Name, OFK_Cuda, OFK_HIP, OFK_None, and OFK_OpenMP.
StringRef llvm::object::getOffloadKindName | ( | OffloadKind | Name | ) |
Convert an offload kind to its string representation.
Definition at line 308 of file OffloadBinary.cpp.
References OFK_Cuda, OFK_HIP, and OFK_OpenMP.
std::string llvm::object::getPhdrIndexForError | ( | const ELFFile< ELFT > & | Obj, |
const typename ELFT::Phdr & | Phdr | ||
) |
Definition at line 153 of file ELF.h.
References llvm::consumeError(), and llvm::object::ELFFile< ELFT >::program_headers().
Referenced by llvm::object::ELFFile< ELFT >::getSegmentContents().
std::pair< SupportsRelocation, RelocationResolver > llvm::object::getRelocationResolver | ( | const ObjectFile & | Obj | ) |
Definition at line 749 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::loongarch32, llvm::Triple::loongarch64, 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(), resolveLoongArch(), 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(), supportsLoongArch(), 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().
std::string llvm::object::getSecIndexForError | ( | const ELFFile< ELFT > & | Obj, |
const typename ELFT::Shdr & | Sec | ||
) |
Definition at line 129 of file ELF.h.
References llvm::consumeError(), and llvm::object::ELFFile< ELFT >::sections().
Referenced by llvm::object::ELFFile< ELFT >::getSectionContentsAsArray(), llvm::object::ELFFile< ELFT >::getSectionName(), llvm::object::ELFFile< ELFT >::getStringTable(), and llvm::object::ELFFile< ELFT >::getSymbol().
|
inline |
Definition at line 421 of file ELF.h.
References createError().
Referenced by llvm::object::ELFFile< ELFT >::getEntry(), llvm::object::ELFFile< ELFT >::getLinkAsStrtab(), llvm::object::ELFObjectFile< ELFT >::getRelocatedSection(), llvm::object::ELFFile< ELFT >::getSection(), llvm::object::ELFObjectFile< ELFT >::getSectionAddress(), llvm::object::ELFObjectFile< ELFT >::getSectionAlignment(), llvm::object::ELFFile< ELFT >::getSectionAndRelocations(), llvm::object::ELFObjectFile< ELFT >::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::ELFObjectFile< ELFT >::getSectionType(), llvm::object::ELFObjectFile< ELFT >::isBerkeleyData(), llvm::object::ELFObjectFile< ELFT >::isBerkeleyText(), llvm::object::ELFObjectFile< ELFT >::isSectionBSS(), llvm::object::ELFObjectFile< ELFT >::isSectionCompressed(), llvm::object::ELFObjectFile< ELFT >::isSectionData(), llvm::object::ELFObjectFile< ELFT >::isSectionText(), llvm::object::ELFObjectFile< ELFT >::isSectionVirtual(), LLVMMoveToContainingSection(), and llvm::object::ELFObjectFile< ELFT >::moveSectionNext().
|
static |
Definition at line 41 of file XCOFFObjectFile.cpp.
References llvm::sampleprof::Base, and llvm::Offset.
Referenced by llvm::object::XCOFFObjectFile::getAdvancedSymbolEntryAddress(), llvm::object::XCOFFObjectFile::getSectionByNum(), llvm::object::XCOFFObjectFile::getSymbolAuxType(), llvm::object::XCOFFObjectFile::relocations(), and llvm::object::XCOFFObjectFile::section_end().
This function returns the hash value for a symbol in the .dynsym section for the GNU hash table.
The implementation is defined in the GNU hash ABI. REF : https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/elf.c#l222
Definition at line 1254 of file ELF.h.
References llvm::CallingConv::C, H, and Name.
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 1239 of file ELF.h.
References llvm::CallingConv::C, and g().
|
static |
Definition at line 36 of file COFFImportFile.cpp.
References llvm::COFF::IMAGE_FILE_MACHINE_AMD64, llvm::COFF::IMAGE_FILE_MACHINE_ARM64, llvm::COFF::IMAGE_FILE_MACHINE_ARM64EC, llvm::COFF::IMAGE_FILE_MACHINE_ARMNT, llvm::COFF::IMAGE_FILE_MACHINE_I386, and llvm_unreachable.
Definition at line 57 of file COFFModuleDefinition.cpp.
References llvm::StringRef::contains(), and llvm::StringRef::startswith().
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 82 of file Error.cpp.
References llvm::handleErrors(), invalid_file_type, and llvm::Error::success().
template llvm::Expected< llvm::ArrayRef< llvm::object::XCOFFRelocation32 > > llvm::object::llvm::object::XCOFFObjectFile::relocations< llvm::object::XCOFFSectionHeader32, llvm::object::XCOFFRelocation32 > | ( | llvm::object::XCOFFSectionHeader32 const & | ) | const |
template llvm::Expected< llvm::ArrayRef< llvm::object::XCOFFRelocation64 > > llvm::object::llvm::object::XCOFFObjectFile::relocations< llvm::object::XCOFFSectionHeader64, llvm::object::XCOFFRelocation64 > | ( | llvm::object::XCOFFSectionHeader64 const & | ) | const |
|
inline |
Definition at line 40 of file Error.h.
References object_category().
Referenced by llvm::object::BinaryError::BinaryError(), and llvm::object::GenericBinaryError::GenericBinaryError().
|
static |
Definition at line 179 of file WindowsResource.cpp.
References convertUTF16LEToUTF8String(), OS, and printResourceTypeName().
Referenced by llvm::object::WindowsResourceParser::parse().
|
static |
Definition at line 226 of file WindowsResource.cpp.
References Context, OS, and printStringOrID().
const std::error_category & llvm::object::object_category | ( | ) |
Definition at line 77 of file Error.cpp.
Referenced by make_error_code().
|
inline |
Definition at line 59 of file SymbolicFile.h.
References operator==().
|
inline |
Definition at line 63 of file SymbolicFile.h.
|
inline |
Definition at line 151 of file ObjectFile.h.
OStream & llvm::object::operator<< | ( | OStream & | OS, |
const DataRefImpl & | D | ||
) |
Definition at line 47 of file SymbolicFile.h.
References D, llvm::format(), and OS.
raw_ostream & llvm::object::operator<< | ( | raw_ostream & | OS, |
const SectionedAddress & | Addr | ||
) |
Definition at line 34 of file ObjectFile.cpp.
References Addr, llvm::format_hex(), OS, and llvm::object::SectionedAddress::UndefSection.
|
inline |
Definition at line 53 of file SymbolicFile.h.
|
inline |
Expected< COFFModuleDefinition > llvm::object::parseCOFFModuleDefinition | ( | MemoryBufferRef | MB, |
COFF::MachineTypes | Machine, | ||
bool | MingwDef = false |
||
) |
Definition at line 354 of file COFFModuleDefinition.cpp.
References llvm::MemoryBufferRef::getBuffer(), and llvm::object::Parser::parse().
Referenced by llvm::dlltoolDriverMain(), and llvm::libDriverMain().
void llvm::object::printResourceTypeName | ( | uint16_t | TypeID, |
raw_ostream & | OS | ||
) |
Definition at line 141 of file WindowsResource.cpp.
References OS.
Referenced by makeDuplicateResourceError(), and printStringOrID().
|
static |
Definition at line 211 of file WindowsResource.cpp.
References convertUTF16LEToUTF8String(), llvm::object::WindowsResourceParser::StringOrID::ID, llvm::object::WindowsResourceParser::StringOrID::IsString, OS, printResourceTypeName(), and llvm::object::WindowsResourceParser::StringOrID::String.
Referenced by makeDuplicateResourceError().
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::object::IRObjectFile::findBitcodeInMemBuffer(), llvm::getBitcodeFileContents(), llvm::irsymtab::readBitcode(), and llvm::Expected< T >::takeError().
Referenced by llvm::lto::InputFile::create().
|
static |
Definition at line 97 of file WindowsResource.cpp.
References llvm::BinaryStreamReader::getOffset(), llvm::BinaryStreamReader::readInteger(), llvm::BinaryStreamReader::readWideString(), RETURN_IF_ERROR, llvm::BinaryStreamReader::setOffset(), and llvm::Error::success().
|
static |
Definition at line 116 of file COFFImportFile.cpp.
References llvm::StringRef::find(), From, llvm::StringRef::npos, parse_failed, llvm::StringRef::startswith(), and llvm::StringRef::substr().
Referenced by writeImportLibrary().
|
static |
Definition at line 90 of file RelocationResolver.cpp.
References llvm_unreachable, and llvm::Offset.
Referenced by getRelocationResolver().
|
static |
Definition at line 265 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 332 of file RelocationResolver.cpp.
References assert(), llvm_unreachable, and llvm::Offset.
Referenced by getRelocationResolver().
|
static |
Definition at line 358 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 118 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 628 of file RelocationResolver.cpp.
References llvm::COFF::IMAGE_REL_ARM_ADDR32, llvm::COFF::IMAGE_REL_ARM_SECREL, and llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 649 of file RelocationResolver.cpp.
References llvm::COFF::IMAGE_REL_ARM64_ADDR64, llvm::COFF::IMAGE_REL_ARM64_SECREL, and llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 585 of file RelocationResolver.cpp.
References llvm::COFF::IMAGE_REL_I386_DIR32, llvm::COFF::IMAGE_REL_I386_SECREL, and llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 606 of file RelocationResolver.cpp.
References llvm::COFF::IMAGE_REL_AMD64_ADDR64, llvm::COFF::IMAGE_REL_AMD64_SECREL, and llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 509 of file RelocationResolver.cpp.
References llvm_unreachable, and llvm::Offset.
Referenced by getRelocationResolver().
|
static |
Definition at line 422 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 374 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 543 of file RelocationResolver.cpp.
References llvm_unreachable, and llvm::Offset.
Referenced by getRelocationResolver().
|
static |
Definition at line 665 of file RelocationResolver.cpp.
References llvm_unreachable, and llvm::MachO::X86_64_RELOC_UNSIGNED.
Referenced by getRelocationResolver().
|
static |
Definition at line 391 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 142 of file RelocationResolver.cpp.
References llvm_unreachable, and llvm::Offset.
Referenced by getRelocationResolver().
|
static |
Definition at line 168 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 311 of file RelocationResolver.cpp.
References llvm_unreachable, and llvm::Offset.
Referenced by getRelocationResolver().
|
static |
Definition at line 192 of file RelocationResolver.cpp.
References llvm_unreachable, and llvm::Offset.
Referenced by getRelocationResolver().
uint64_t llvm::object::resolveRelocation | ( | RelocationResolver | Resolver, |
const RelocationRef & | R, | ||
uint64_t | S, | ||
uint64_t | LocData | ||
) |
Definition at line 846 of file RelocationResolver.cpp.
References getELFAddend(), llvm::Triple::riscv32, llvm::Triple::riscv64, and llvm::ELF::SHT_RELA.
Referenced by llvm::DWARFDataExtractor::getRelocatedValue(), loadObj(), llvm::RuntimeDyldImpl::resolveRelocationList(), and llvm::RuntimeDyldELF::~RuntimeDyldELF().
|
static |
Definition at line 454 of file RelocationResolver.cpp.
References A, llvm_unreachable, llvm::Offset, and RA.
Referenced by getRelocationResolver().
|
static |
Definition at line 411 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
|
static |
Definition at line 242 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 218 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver().
|
static |
Definition at line 708 of file RelocationResolver.cpp.
References llvm_unreachable.
Referenced by getRelocationResolver(), and resolveWasm64().
|
static |
Definition at line 732 of file RelocationResolver.cpp.
References llvm::Offset, and resolveWasm32().
Referenced by getRelocationResolver().
|
static |
Definition at line 287 of file RelocationResolver.cpp.
References llvm_unreachable, and llvm::Offset.
Referenced by getRelocationResolver().
|
static |
Definition at line 57 of file RelocationResolver.cpp.
References llvm_unreachable, and llvm::Offset.
Referenced by getRelocationResolver().
Definition at line 77 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 255 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 322 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 348 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 108 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 618 of file RelocationResolver.cpp.
References llvm::COFF::IMAGE_REL_ARM_ADDR32, and llvm::COFF::IMAGE_REL_ARM_SECREL.
Referenced by getRelocationResolver().
Definition at line 639 of file RelocationResolver.cpp.
References llvm::COFF::IMAGE_REL_ARM64_ADDR64, and llvm::COFF::IMAGE_REL_ARM64_SECREL.
Referenced by getRelocationResolver().
Definition at line 575 of file RelocationResolver.cpp.
References llvm::COFF::IMAGE_REL_I386_DIR32, and llvm::COFF::IMAGE_REL_I386_SECREL.
Referenced by getRelocationResolver().
Definition at line 596 of file RelocationResolver.cpp.
References llvm::COFF::IMAGE_REL_AMD64_ADDR64, and llvm::COFF::IMAGE_REL_AMD64_SECREL.
Referenced by getRelocationResolver().
Definition at line 498 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 418 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 370 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 523 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 661 of file RelocationResolver.cpp.
References llvm::MachO::X86_64_RELOC_UNSIGNED.
Referenced by getRelocationResolver().
Definition at line 381 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 130 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 158 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 301 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 180 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 429 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 401 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 230 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 208 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 672 of file RelocationResolver.cpp.
Referenced by getRelocationResolver(), and supportsWasm64().
Definition at line 694 of file RelocationResolver.cpp.
References supportsWasm32().
Referenced by getRelocationResolver().
Definition at line 276 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 41 of file RelocationResolver.cpp.
Referenced by getRelocationResolver().
Definition at line 46 of file XCOFFObjectFile.cpp.
Error llvm::object::writeImportLibrary | ( | StringRef | ImportName, |
StringRef | Path, | ||
ArrayRef< COFFShortExport > | Exports, | ||
COFF::MachineTypes | Machine, | ||
bool | MinGW | ||
) |
Definition at line 578 of file COFFImportFile.cpp.
References E, Exports, llvm::sys::path::filename(), getNameType(), llvm::COFF::IMPORT_CODE, llvm::COFF::IMPORT_CONST, llvm::COFF::IMPORT_DATA, llvm::COFF::IMPORT_ORDINAL, llvm::object::Archive::K_GNU, Name, replace(), and llvm::writeArchive().
Referenced by llvm::dlltoolDriverMain(), and llvm::libDriverMain().
|
static |
Definition at line 72 of file COFFImportFile.cpp.
References B, llvm::Length, llvm::Offset, and llvm::support::endian::write32le().
Definition at line 314 of file MachOUniversalWriter.cpp.
References llvm::sys::fs::all_exe, llvm::sys::fs::all_read, llvm::sys::fs::all_write, llvm::any_of(), llvm::sys::fs::can_execute(), llvm::sys::fs::TempFile::create(), E, llvm::object::Slice::getBinary(), llvm::object::Binary::getFileName(), llvm::joinErrors(), llvm::Expected< T >::takeError(), and writeUniversalBinaryToStream().
Error llvm::object::writeUniversalBinaryToStream | ( | ArrayRef< Slice > | Slices, |
raw_ostream & | Out | ||
) |
Definition at line 273 of file MachOUniversalWriter.cpp.
References assert(), buildFatArchList(), llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::MachO::FAT_MAGIC, llvm::raw_ostream::flush(), llvm::MemoryBufferRef::getBufferSize(), llvm::MemoryBufferRef::getBufferStart(), llvm::sys::IsLittleEndianHost, llvm::MachO::fat_header::magic, llvm::MachO::fat_header::nfat_arch, llvm::Offset, llvm::ArrayRef< T >::size(), llvm::SmallVectorBase< Size_T >::size(), Size, llvm::Error::success(), llvm::MachO::swapStruct(), llvm::Expected< T >::takeError(), llvm::raw_ostream::write(), and llvm::raw_ostream::write_zeros().
Referenced by llvm::objcopy::macho::executeObjcopyOnMachOUniversalBinary(), and writeUniversalBinary().
Expected< std::unique_ptr< MemoryBuffer > > llvm::object::writeWindowsResourceCOFF | ( | llvm::COFF::MachineTypes | MachineType, |
const WindowsResourceParser & | Parser, | ||
uint32_t | TimeDateStamp | ||
) |
Definition at line 1003 of file WindowsResource.cpp.
References E, llvm::Error::success(), and llvm::object::WindowsResourceCOFFWriter::write().
Definition at line 33 of file Archive.h.
Referenced by llvm::object::Archive::Archive(), and llvm::object::Archive::getArchiveMagicLen().
Definition at line 35 of file Archive.h.
Referenced by llvm::object::Archive::Archive(), llvm::object::Archive::create(), and llvm::object::Archive::getArchiveMagicLen().
Definition at line 40 of file ELFObjectFile.cpp.
Referenced by llvm::object::ELFSymbolRef::getELFTypeName().
|
static |
Definition at line 26 of file XCOFFObjectFile.cpp.
Referenced by llvm::object::XCOFFSymbolRef::isFunction().
Definition at line 43 of file WindowsResource.cpp.
Definition at line 27 of file XCOFFObjectFile.cpp.
Referenced by llvm::object::XCOFFObjectFile::isRelocatableObject().
|
static |
Definition at line 136 of file COFFImportFile.cpp.
|
constexpr |
Definition at line 46 of file ELFObjectFile.h.
Definition at line 47 of file WindowsResource.cpp.
|
static |
Definition at line 28 of file XCOFFObjectFile.cpp.
Referenced by llvm::object::XCOFFObjectFile::getSymbolAuxType().
Definition at line 34 of file Archive.h.
Referenced by llvm::object::Archive::Archive(), and llvm::object::Archive::getArchiveMagicLen().
Definition at line 57 of file WindowsResource.h.
Definition at line 56 of file WindowsResource.h.
const size_t llvm::object::WIN_RES_MAGIC_SIZE = 16 |
Definition at line 54 of file WindowsResource.h.
Referenced by llvm::object::WindowsResource::createWindowsResource().
const size_t llvm::object::WIN_RES_NULL_ENTRY_SIZE = 16 |
Definition at line 55 of file WindowsResource.h.
Referenced by llvm::object::WindowsResource::createWindowsResource().
Definition at line 58 of file WindowsResource.h.