|
LLVM
5.0.0
|
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 } |
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) |
| using llvm::object::base_reloc_iterator = typedef content_iterator<BaseRelocRef> |
| using llvm::object::basic_symbol_iterator = typedef content_iterator<BasicSymbolRef> |
Definition at line 139 of file SymbolicFile.h.
| using llvm::object::bind_iterator = typedef content_iterator<MachOBindEntry> |
| 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 86 of file ELFTypes.h.
| using llvm::object::ELF32BEFile = typedef ELFFile<ELFType<support::big, false>> |
| using llvm::object::ELF32BEObjectFile = typedef ELFObjectFile<ELFType<support::big, false>> |
Definition at line 404 of file ELFObjectFile.h.
| using llvm::object::ELF32LE = typedef ELFType<support::little, false> |
Definition at line 85 of file ELFTypes.h.
| using llvm::object::ELF32LEFile = typedef ELFFile<ELFType<support::little, false>> |
| using llvm::object::ELF32LEObjectFile = typedef ELFObjectFile<ELFType<support::little, false>> |
Definition at line 402 of file ELFObjectFile.h.
| using llvm::object::ELF64BE = typedef ELFType<support::big, true> |
Definition at line 88 of file ELFTypes.h.
| using llvm::object::ELF64BEFile = typedef ELFFile<ELFType<support::big, true>> |
| using llvm::object::ELF64BEObjectFile = typedef ELFObjectFile<ELFType<support::big, true>> |
Definition at line 405 of file ELFObjectFile.h.
| using llvm::object::ELF64LE = typedef ELFType<support::little, true> |
Definition at line 87 of file ELFTypes.h.
| using llvm::object::ELF64LEFile = typedef ELFFile<ELFType<support::little, true>> |
| using llvm::object::ELF64LEObjectFile = typedef ELFObjectFile<ELFType<support::little, true>> |
Definition at line 403 of file ELFObjectFile.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::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 77 of file ObjectFile.h.
| using llvm::object::section_iterator = typedef content_iterator<SectionRef> |
Definition at line 48 of file ObjectFile.h.
|
strong |
| enum llvm::object::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.
|
strong |
|
static |
Definition at line 60 of file COFFImportFile.cpp.
Definition at line 20 of file SymbolSize.cpp.
References llvm::object::SymEntry::Address, and llvm::object::SymEntry::SectionID.
Referenced by computeSymbolSizes().
| std::vector< std::pair< SymbolRef, uint64_t > > llvm::object::computeSymbolSizes | ( | const ObjectFile & | O | ) |
Definition at line 41 of file SymbolSize.cpp.
References llvm::dwarf::syntax::Address, llvm::array_pod_sort(), compareAddress(), E, getSectionID(), getSymbolSectionID(), llvm::object::SymbolRef::getValue(), I, N, P, llvm::MipsISD::Ret, llvm::object::ObjectFile::sections(), llvm::AMDGPU::CodeObject::Kernel::Arg::Key::Size, llvm::object::SymbolicFile::symbol_begin(), and llvm::object::SymbolicFile::symbol_end().
Referenced by llvm::symbolize::SymbolizableObjectFile::create().
| Expected< std::unique_ptr< Binary > > llvm::object::createBinary | ( | MemoryBufferRef | Source, |
| LLVMContext * | Context = nullptr |
||
| ) |
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, 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 createBinary(), llvm::object::Archive::Child::getAsBinary(), and loadBinaryFormat().
| Expected< OwningBinary< Binary > > llvm::object::createBinary | ( | StringRef | Path | ) |
Definition at line 86 of file Binary.cpp.
References createBinary(), llvm::errorCodeToError(), llvm::ErrorOr< T >::get(), llvm::Expected< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFileOrSTDIN(), and llvm::Expected< T >::takeError().
|
inlinestatic |
Definition at line 47 of file ELF.h.
References parse_failed.
Referenced by llvm::object::Decompressor::create(), llvm::object::ELFFile< ELFT >::getEntry(), getExtendedSymbolTableIndex(), getSection(), llvm::object::ELFFile< ELFT >::getSectionContentsAsArray(), llvm::object::ELFFile< ELFT >::getSectionName(), llvm::object::ELFFile< ELFT >::getSectionStringTable(), llvm::object::ELFFile< ELFT >::getSHNDXTable(), llvm::object::ELFFile< ELFT >::getStringTable(), llvm::object::ELFFile< ELFT >::getStringTableForSymtab(), getSymbol(), llvm::object::ELFFile< ELFT >::program_headers(), and llvm::object::ELFFile< ELFT >::sections().
Definition at line 65 of file COFFModuleDefinition.cpp.
References llvm::Twine::str().
Definition at line 39 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::StringRef::size().
Referenced by llvm::object::ObjectFile::createELFObjectFile().
Definition at line 22 of file ELF.cpp.
References llvm::ELF::EM_386, llvm::ELF::EM_AARCH64, llvm::ELF::EM_AMDGPU, 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_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, and llvm::ELF::EM_X86_64.
Referenced by llvm::object::ELFFile< ELFT >::getRelocationTypeName(), and llvm::object::ELFObjectFile< ELFT >::getRelocationTypeName().
|
inline |
Definition at line 189 of file ELF.h.
References assert(), createError(), llvm::ELF::SHN_XINDEX, and llvm::ArrayRef< T >::size().
|
static |
Definition at line 47 of file COFFImportFile.cpp.
References llvm::COFF::IMAGE_FILE_MACHINE_AMD64, llvm::COFF::IMAGE_FILE_MACHINE_ARMNT, llvm::COFF::IMAGE_FILE_MACHINE_I386, llvm::COFF::IMAGE_REL_AMD64_ADDR32NB, llvm::COFF::IMAGE_REL_ARM_ADDR32NB, llvm::COFF::IMAGE_REL_I386_DIR32NB, and llvm_unreachable().
|
static |
Definition at line 92 of file COFFImportFile.cpp.
References 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().
|
inline |
Definition at line 181 of file ELF.h.
References createError().
Referenced by llvm::object::ELFFile< ELFT >::getEntry(), llvm::object::ELFObjectFile< ELFT >::getRelocatedSection(), llvm::object::ELFFile< ELFT >::getSection(), llvm::object::ELFObjectFile< ELFT >::getSectionAddress(), llvm::object::ELFObjectFile< ELFT >::getSectionAlignment(), 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 >::isSectionBSS(), llvm::object::ELFObjectFile< ELFT >::isSectionCompressed(), llvm::object::ELFObjectFile< ELFT >::isSectionData(), llvm::object::ELFObjectFile< ELFT >::isSectionText(), llvm::object::ELFObjectFile< ELFT >::isSectionVirtual(), LLVMGetSection(), LLVMMoveToContainingSection(), and llvm::object::ELFObjectFile< ELFT >::moveSectionNext().
|
inline |
Definition at line 243 of file ELF.h.
References createError().
Referenced by duplicateCPV(), llvm::MipsTargetELFStreamer::emitAssignment(), llvm::object::ELFObjectFile< ELFT >::getCommonSymbolSizeImpl(), 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(), llvm::MIPrinter::print(), llvm::NVPTXInstPrinter::printProtoIdent(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, false >, false >::setType(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, true >, false >::setType(), and llvm::MCStreamer::visitUsedExpr().
|
static |
Definition at line 405 of file WindowsResource.cpp.
References llvm::isUInt< 32 >().
|
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.
|
static |
Definition at line 35 of file COFFImportFile.cpp.
References llvm::COFF::IMAGE_FILE_MACHINE_AMD64, llvm::COFF::IMAGE_FILE_MACHINE_ARMNT, llvm::COFF::IMAGE_FILE_MACHINE_I386, and llvm_unreachable().
Definition at line 59 of file COFFModuleDefinition.cpp.
References 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 80 of file Error.cpp.
References llvm::lltok::Error, llvm::handleErrors(), invalid_file_type, and llvm::Error::success().
|
inline |
Definition at line 40 of file Error.h.
References object_category().
Referenced by llvm::object::BinaryError::BinaryError(), and llvm::object::GenericBinaryError::GenericBinaryError().
| const std::error_category & llvm::object::object_category | ( | ) |
Definition at line 76 of file Error.cpp.
References error_category.
Referenced by make_error_code().
Definition at line 59 of file SymbolicFile.h.
References operator==().
Definition at line 63 of file SymbolicFile.h.
| OStream& llvm::object::operator<< | ( | OStream & | OS, |
| const DataRefImpl & | D | ||
| ) |
Definition at line 47 of file SymbolicFile.h.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, llvm::format(), and llvm::object::DataRefImpl::p.
Definition at line 53 of file SymbolicFile.h.
Referenced by operator!=().
| Expected< COFFModuleDefinition > llvm::object::parseCOFFModuleDefinition | ( | MemoryBufferRef | MB, |
| COFF::MachineTypes | Machine, | ||
| bool | MingwDef = false |
||
| ) |
Definition at line 330 of file COFFModuleDefinition.cpp.
References llvm::MemoryBufferRef::getBuffer(), and Machine.
Referenced by llvm::dlltoolDriverMain().
| Expected< IRSymtabFile > llvm::object::readIRSymtab | ( | MemoryBufferRef | MBRef | ) |
Reads a bitcode file, creating its irsymtab if necessary.
Definition at line 143 of file IRObjectFile.cpp.
References llvm::errorCodeToError(), F, llvm::getBitcodeFileContents(), llvm::ErrorOr< T >::getError(), llvm::object::IRSymtabFile::Mods, llvm::irsymtab::readBitcode(), llvm::object::IRSymtabFile::Strtab, llvm::object::IRSymtabFile::Symtab, llvm::Expected< T >::takeError(), and llvm::object::IRSymtabFile::TheReader.
Referenced by llvm::lto::InputFile::create().
|
static |
Definition at line 86 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 101 of file COFFImportFile.cpp.
References llvm::StringRef::find(), llvm::StringRef::npos, llvm::StringRef::size(), llvm::StringRef::startswith(), and llvm::StringRef::substr().
Referenced by computeRelativePath(), llvm::sys::path::convert_to_slash(), getSignature(), lowerV8I16GeneralSingleInputVectorShuffle(), llvm::sys::path::native(), llvm::LiveVariables::replaceKillInstruction(), llvm::UnrollLoop(), and writeImportLibrary().
| std::error_code llvm::object::writeImportLibrary | ( | StringRef | ImportName, |
| StringRef | Path, | ||
| ArrayRef< COFFShortExport > | Exports, | ||
| COFF::MachineTypes | Machine, | ||
| bool | MakeWeakAliases | ||
| ) |
Definition at line 558 of file COFFImportFile.cpp.
References E, llvm::errorToErrorCode(), llvm::sys::path::filename(), getNameType(), llvm::COFF::IMPORT_CODE, llvm::COFF::IMPORT_CONST, llvm::COFF::IMPORT_DATA, llvm::object::Archive::K_GNU, Name, replace(), llvm::Expected< T >::takeError(), and llvm::writeArchive().
Referenced by llvm::dlltoolDriverMain().
|
static |
Definition at line 66 of file COFFImportFile.cpp.
References llvm::support::endian::write32le().
| Expected< std::unique_ptr< MemoryBuffer > > llvm::object::writeWindowsResourceCOFF | ( | llvm::COFF::MachineTypes | MachineType, |
| const WindowsResourceParser & | Parser | ||
| ) |
Definition at line 710 of file WindowsResource.cpp.
References E, llvm::Error::success(), and llvm::object::WindowsResourceCOFFWriter::write().
Definition at line 33 of file WindowsResource.cpp.
|
static |
Definition at line 121 of file COFFImportFile.cpp.
Definition at line 37 of file WindowsResource.cpp.
Definition at line 53 of file WindowsResource.h.
Definition at line 52 of file WindowsResource.h.
Definition at line 50 of file WindowsResource.h.
Referenced by llvm::object::WindowsResource::createWindowsResource().
Definition at line 51 of file WindowsResource.h.
Referenced by llvm::object::WindowsResource::createWindowsResource().
| const uint16_t llvm::object::WIN_RES_PURE_MOVEABLE = 0x0030 |
Definition at line 54 of file WindowsResource.h.
1.8.6