LLVM
8.0.1
|
#include "llvm/Object/COFF.h"
Friends | |
class | ImportDirectoryEntryRef |
class | ExportDirectoryEntryRef |
Additional Inherited Members | |
Public Types inherited from llvm::object::ObjectFile | |
using | symbol_iterator_range = iterator_range< symbol_iterator > |
using | section_iterator_range = iterator_range< section_iterator > |
Public Types inherited from llvm::object::SymbolicFile | |
using | basic_symbol_iterator_range = iterator_range< basic_symbol_iterator > |
Protected Types inherited from llvm::object::Binary | |
enum | { ID_Archive, ID_MachOUniversalBinary, ID_COFFImportFile, ID_IR, ID_WinRes, ID_StartObjects, ID_COFF, ID_ELF32L, ID_ELF32B, ID_ELF64L, ID_ELF64B, ID_MachO32L, ID_MachO32B, ID_MachO64L, ID_MachO64B, ID_Wasm, ID_EndObjects } |
Static Protected Member Functions inherited from llvm::object::Binary | |
static unsigned int | getELFType (bool isLE, bool is64Bits) |
static unsigned int | getMachOType (bool isLE, bool is64Bits) |
Protected Attributes inherited from llvm::object::Binary | |
MemoryBufferRef | Data |
COFFObjectFile::COFFObjectFile | ( | MemoryBufferRef | Object, |
std::error_code & | EC | ||
) |
Definition at line 666 of file COFFObjectFile.cpp.
References llvm::object::dos_header::AddressOfNewExeHeader, llvm::object::ObjectFile::base(), llvm::COFF::BigObjMagic, checkSize(), llvm::object::Binary::Data, getNumberOfSections(), getNumberOfSymbols(), getObject(), getPointerToSymbolTable(), llvm::COFF::IMAGE_FILE_MACHINE_UNKNOWN, llvm::object::coff_file_header::isImportLibrary(), llvm::object::coff_file_header::Machine, llvm::object::pe32_header::Magic, memcmp, llvm::COFF::BigObjHeader::MinBigObjectVersion, llvm::object::pe32_header::NumberOfRvaAndSize, llvm::object::pe32plus_header::NumberOfRvaAndSize, llvm::object::coff_file_header::NumberOfSections, llvm::object::parse_failed, llvm::COFF::PE32Header::PE32, llvm::COFF::PE32Header::PE32_PLUS, llvm::COFF::PEMagic, llvm::object::coff_file_header::SizeOfOptionalHeader, llvm::object::coff_bigobj_file_header::UUID, and llvm::object::coff_bigobj_file_header::Version.
Referenced by llvm::object::ObjectFile::createCOFFObjectFile().
base_reloc_iterator COFFObjectFile::base_reloc_begin | ( | ) | const |
Definition at line 873 of file COFFObjectFile.cpp.
Referenced by base_relocs().
base_reloc_iterator COFFObjectFile::base_reloc_end | ( | ) | const |
Definition at line 877 of file COFFObjectFile.cpp.
Referenced by base_relocs().
iterator_range< base_reloc_iterator > COFFObjectFile::base_relocs | ( | ) | const |
Definition at line 937 of file COFFObjectFile.cpp.
References base_reloc_begin(), base_reloc_end(), and llvm::make_range().
Definition at line 1072 of file COFF.h.
References llvm::object::Binary::isCOFF().
|
inline |
|
inline |
|
inline |
iterator_range< delay_import_directory_iterator > COFFObjectFile::delay_import_directories | ( | ) | const |
Definition at line 927 of file COFFObjectFile.cpp.
References delay_import_directory_begin(), delay_import_directory_end(), and llvm::make_range().
delay_import_directory_iterator COFFObjectFile::delay_import_directory_begin | ( | ) | const |
Definition at line 834 of file COFFObjectFile.cpp.
Referenced by delay_import_directories().
delay_import_directory_iterator COFFObjectFile::delay_import_directory_end | ( | ) | const |
Definition at line 840 of file COFFObjectFile.cpp.
Referenced by delay_import_directories().
iterator_range< export_directory_iterator > COFFObjectFile::export_directories | ( | ) | const |
Definition at line 933 of file COFFObjectFile.cpp.
References export_directory_begin(), export_directory_end(), and llvm::make_range().
Referenced by llvm::symbolize::SymbolizableObjectFile::create().
export_directory_iterator COFFObjectFile::export_directory_begin | ( | ) | const |
Definition at line 846 of file COFFObjectFile.cpp.
References ExportDirectoryEntryRef.
Referenced by export_directories().
export_directory_iterator COFFObjectFile::export_directory_end | ( | ) | const |
Definition at line 851 of file COFFObjectFile.cpp.
References llvm::object::export_directory_table_entry::AddressTableEntries, and ExportDirectoryEntryRef.
Referenced by export_directories().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 900 of file COFFObjectFile.cpp.
References llvm::Triple::aarch64, getMachine(), llvm::COFF::IMAGE_FILE_MACHINE_AMD64, llvm::COFF::IMAGE_FILE_MACHINE_ARM64, llvm::COFF::IMAGE_FILE_MACHINE_ARMNT, llvm::COFF::IMAGE_FILE_MACHINE_I386, llvm::Triple::thumb, llvm::Triple::UnknownArch, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by getBytesInAddress().
|
inline |
Definition at line 1011 of file COFF.h.
References E, llvm::errorToErrorCode(), llvm::object::getSymbol(), getSymbolName(), and llvm::Expected< T >::takeError().
|
overridevirtual |
The number of bytes used to represent an address in this object file format.
Implements llvm::object::ObjectFile.
Definition at line 881 of file COFFObjectFile.cpp.
References llvm::Triple::aarch64, getArch(), and llvm::Triple::x86_64.
|
inline |
Definition at line 830 of file COFF.h.
References llvm::object::coff_file_header::Characteristics, llvm::object::coff_file_header::isImportLibrary(), and llvm_unreachable.
std::error_code COFFObjectFile::getCOFFBigObjHeader | ( | const coff_bigobj_file_header *& | Res | ) | const |
Definition at line 948 of file COFFObjectFile.cpp.
std::error_code COFFObjectFile::getCOFFHeader | ( | const coff_file_header *& | Res | ) | const |
Definition at line 942 of file COFFObjectFile.cpp.
const coff_relocation * COFFObjectFile::getCOFFRelocation | ( | const RelocationRef & | Reloc | ) | const |
Definition at line 1191 of file COFFObjectFile.cpp.
References llvm::object::RelocationRef::getRawDataRefImpl().
const coff_section * COFFObjectFile::getCOFFSection | ( | const SectionRef & | Section | ) | const |
Definition at line 1174 of file COFFObjectFile.cpp.
References llvm::object::SectionRef::getRawDataRefImpl().
Referenced by getDataDirectory(), getRvaAndSizeAsBytes(), and getRvaPtr().
COFFSymbolRef COFFObjectFile::getCOFFSymbol | ( | const DataRefImpl & | Ref | ) | const |
Definition at line 1178 of file COFFObjectFile.cpp.
References llvm_unreachable.
Referenced by getCOFFSymbol(), getCommonSymbolSizeImpl(), getSymbolAddress(), getSymbolAlignment(), getSymbolFlags(), getSymbolSection(), getSymbolSectionID(), getSymbolType(), and getSymbolValueImpl().
COFFSymbolRef COFFObjectFile::getCOFFSymbol | ( | const SymbolRef & | Symbol | ) | const |
Definition at line 1186 of file COFFObjectFile.cpp.
References getCOFFSymbol(), and llvm::object::BasicSymbolRef::getRawDataRefImpl().
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 244 of file COFFObjectFile.cpp.
References getCOFFSymbol(), and llvm::object::COFFSymbolRef::getValue().
std::error_code COFFObjectFile::getDataDirectory | ( | uint32_t | index, |
const data_directory *& | Res | ||
) | const |
Definition at line 965 of file COFFObjectFile.cpp.
References assert(), E, getCOFFSection(), getNumberOfSections(), getSection(), llvm::COFF::isReservedSectionNumber(), llvm::object::pe32_header::NumberOfRvaAndSize, llvm::object::pe32plus_header::NumberOfRvaAndSize, llvm::object::parse_failed, llvm::ARMBuildAttrs::Section, llvm::object::ObjectFile::sections(), and llvm::object::unexpected_eof.
Referenced by getHintName().
std::error_code llvm::object::COFFObjectFile::getDebugPDBInfo | ( | const debug_directory * | DebugDir, |
const codeview::DebugInfo *& | Info, | ||
StringRef & | PDBFileName | ||
) | const |
Get PDB information out of a codeview debug directory entry.
Referenced by getHintName().
std::error_code llvm::object::COFFObjectFile::getDebugPDBInfo | ( | const codeview::DebugInfo *& | Info, |
StringRef & | PDBFileName | ||
) | const |
Get PDB information from an executable.
If the information is not present, Info will be set to nullptr and PDBFileName will be empty. An error is returned only on corrupt object files. Convenience accessor that can be used if the debug directory is not already handy.
|
inline |
Definition at line 969 of file COFF.h.
References llvm::object::getSection().
Referenced by getSectionSize().
|
inlineoverridevirtual |
Implements llvm::object::ObjectFile.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 885 of file COFFObjectFile.cpp.
References getMachine(), llvm::COFF::IMAGE_FILE_MACHINE_AMD64, llvm::COFF::IMAGE_FILE_MACHINE_ARM64, llvm::COFF::IMAGE_FILE_MACHINE_ARMNT, and llvm::COFF::IMAGE_FILE_MACHINE_I386.
std::error_code COFFObjectFile::getHintName | ( | uint32_t | Rva, |
uint16_t & | Hint, | ||
StringRef & | Name | ||
) | const |
Definition at line 496 of file COFFObjectFile.cpp.
References llvm::object::debug_directory::AddressOfRawData, llvm::COFF::BASE_RELOCATION_TABLE, llvm::object::Binary::checkOffset(), D, llvm::object::Binary::Data, llvm::ArrayRef< T >::data(), debug_directories(), llvm::COFF::DEBUG_DIRECTORY, llvm::COFF::DELAY_IMPORT_DESCRIPTOR, llvm::ArrayRef< T >::drop_front(), llvm::COFF::EXPORT_TABLE, getDataDirectory(), getDebugPDBInfo(), getRvaAndSizeAsBytes(), getRvaPtr(), llvm::COFF::IMAGE_DEBUG_TYPE_CODEVIEW, llvm::COFF::IMPORT_TABLE, llvm::COFF::LOAD_CONFIG_TABLE, llvm::object::parse_failed, llvm::object::data_directory::RelativeVirtualAddress, llvm::ArrayRef< T >::size(), llvm::object::data_directory::Size, llvm::object::debug_directory::SizeOfData, and llvm::StringRef::split().
uint64_t COFFObjectFile::getImageBase | ( | ) | const |
Definition at line 441 of file COFFObjectFile.cpp.
References llvm::object::pe32_header::ImageBase, and llvm::object::pe32plus_header::ImageBase.
Referenced by llvm::symbolize::SymbolizableObjectFile::create(), getSectionAddress(), getSymbolAddress(), getVaPtr(), and llvm::pdb::PDBContext::PDBContext().
|
inline |
|
inline |
Definition at line 884 of file COFF.h.
References assert(), getSectionID(), getSymbolName(), getSymbolSectionID(), getSymbolType(), llvm::Ref, llvm::ARMBuildAttrs::Section, and llvm::ARMBuildAttrs::Symbol.
|
inline |
Definition at line 812 of file COFF.h.
References llvm_unreachable, llvm::object::coff_file_header::Machine, and llvm::object::coff_bigobj_file_header::Machine.
Referenced by getArch(), getFileFormatName(), getRelocationTypeName(), and llvm::symbolize::SymbolizableObjectFile::isWin32Module().
|
inline |
Definition at line 848 of file COFF.h.
References llvm::object::coff_file_header::isImportLibrary(), llvm_unreachable, llvm::object::coff_file_header::NumberOfSections, and llvm::object::coff_bigobj_file_header::NumberOfSections.
Referenced by COFFObjectFile(), getDataDirectory(), section_end(), and toSymb().
|
inline |
Definition at line 873 of file COFF.h.
Referenced by COFFObjectFile(), getRelocationSymbol(), getSymbolAuxData(), getSymbolIndex(), and section_rel_end().
std::error_code COFFObjectFile::getPE32Header | ( | const pe32_header *& | Res | ) | const |
Definition at line 953 of file COFFObjectFile.cpp.
std::error_code COFFObjectFile::getPE32PlusHeader | ( | const pe32plus_header *& | Res | ) | const |
Definition at line 959 of file COFFObjectFile.cpp.
|
inline |
Definition at line 856 of file COFF.h.
References llvm::object::coff_file_header::isImportLibrary(), llvm_unreachable, llvm::object::coff_file_header::PointerToSymbolTable, and llvm::object::coff_bigobj_file_header::PointerToSymbolTable.
Referenced by COFFObjectFile(), getSymbolAuxData(), section_rel_end(), and toSymb().
|
inline |
Definition at line 865 of file COFF.h.
References llvm::object::coff_file_header::isImportLibrary(), llvm_unreachable, llvm::object::coff_file_header::NumberOfSymbols, and llvm::object::coff_bigobj_file_header::NumberOfSymbols.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 1149 of file COFFObjectFile.cpp.
References llvm::object::coff_relocation::VirtualAddress.
ArrayRef< coff_relocation > COFFObjectFile::getRelocations | ( | const coff_section * | Sec | ) | const |
Definition at line 1196 of file COFFObjectFile.cpp.
References llvm::object::ObjectFile::base(), llvm::object::Binary::Data, getFirstReloc(), and getNumberOfRelocations().
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 1154 of file COFFObjectFile.cpp.
References getNumberOfSymbols(), llvm_unreachable, llvm::object::DataRefImpl::p, symbol_end(), llvm::object::ObjectFile::SymbolRef, and llvm::object::coff_relocation::SymbolTableIndex.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 1168 of file COFFObjectFile.cpp.
References llvm::object::coff_relocation::Type.
StringRef COFFObjectFile::getRelocationTypeName | ( | uint16_t | Type | ) | const |
Definition at line 1205 of file COFFObjectFile.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::StringRef::begin(), llvm::StringRef::end(), getMachine(), llvm::COFF::IMAGE_FILE_MACHINE_AMD64, llvm::COFF::IMAGE_FILE_MACHINE_ARM64, llvm::COFF::IMAGE_FILE_MACHINE_ARMNT, llvm::COFF::IMAGE_FILE_MACHINE_I386, llvm::COFF::IMAGE_REL_AMD64_ABSOLUTE, llvm::COFF::IMAGE_REL_AMD64_ADDR32, llvm::COFF::IMAGE_REL_AMD64_ADDR32NB, llvm::COFF::IMAGE_REL_AMD64_ADDR64, llvm::COFF::IMAGE_REL_AMD64_PAIR, llvm::COFF::IMAGE_REL_AMD64_REL32, llvm::COFF::IMAGE_REL_AMD64_REL32_1, llvm::COFF::IMAGE_REL_AMD64_REL32_2, llvm::COFF::IMAGE_REL_AMD64_REL32_3, llvm::COFF::IMAGE_REL_AMD64_REL32_4, llvm::COFF::IMAGE_REL_AMD64_REL32_5, llvm::COFF::IMAGE_REL_AMD64_SECREL, llvm::COFF::IMAGE_REL_AMD64_SECREL7, llvm::COFF::IMAGE_REL_AMD64_SECTION, llvm::COFF::IMAGE_REL_AMD64_SREL32, llvm::COFF::IMAGE_REL_AMD64_SSPAN32, llvm::COFF::IMAGE_REL_AMD64_TOKEN, llvm::COFF::IMAGE_REL_ARM64_ABSOLUTE, llvm::COFF::IMAGE_REL_ARM64_ADDR32, llvm::COFF::IMAGE_REL_ARM64_ADDR32NB, llvm::COFF::IMAGE_REL_ARM64_ADDR64, llvm::COFF::IMAGE_REL_ARM64_BRANCH14, llvm::COFF::IMAGE_REL_ARM64_BRANCH19, llvm::COFF::IMAGE_REL_ARM64_BRANCH26, llvm::COFF::IMAGE_REL_ARM64_PAGEBASE_REL21, llvm::COFF::IMAGE_REL_ARM64_PAGEOFFSET_12A, llvm::COFF::IMAGE_REL_ARM64_PAGEOFFSET_12L, llvm::COFF::IMAGE_REL_ARM64_REL21, llvm::COFF::IMAGE_REL_ARM64_SECREL, llvm::COFF::IMAGE_REL_ARM64_SECREL_HIGH12A, llvm::COFF::IMAGE_REL_ARM64_SECREL_LOW12A, llvm::COFF::IMAGE_REL_ARM64_SECREL_LOW12L, llvm::COFF::IMAGE_REL_ARM64_SECTION, llvm::COFF::IMAGE_REL_ARM64_TOKEN, llvm::COFF::IMAGE_REL_ARM_ABSOLUTE, llvm::COFF::IMAGE_REL_ARM_ADDR32, llvm::COFF::IMAGE_REL_ARM_ADDR32NB, llvm::COFF::IMAGE_REL_ARM_BLX11, llvm::COFF::IMAGE_REL_ARM_BLX23T, llvm::COFF::IMAGE_REL_ARM_BLX24, llvm::COFF::IMAGE_REL_ARM_BRANCH11, llvm::COFF::IMAGE_REL_ARM_BRANCH20T, llvm::COFF::IMAGE_REL_ARM_BRANCH24, llvm::COFF::IMAGE_REL_ARM_BRANCH24T, llvm::COFF::IMAGE_REL_ARM_MOV32A, llvm::COFF::IMAGE_REL_ARM_MOV32T, llvm::COFF::IMAGE_REL_ARM_SECREL, llvm::COFF::IMAGE_REL_ARM_SECTION, llvm::COFF::IMAGE_REL_ARM_TOKEN, llvm::COFF::IMAGE_REL_I386_ABSOLUTE, llvm::COFF::IMAGE_REL_I386_DIR16, llvm::COFF::IMAGE_REL_I386_DIR32, llvm::COFF::IMAGE_REL_I386_DIR32NB, llvm::COFF::IMAGE_REL_I386_REL16, llvm::COFF::IMAGE_REL_I386_REL32, llvm::COFF::IMAGE_REL_I386_SECREL, llvm::COFF::IMAGE_REL_I386_SECREL7, llvm::COFF::IMAGE_REL_I386_SECTION, llvm::COFF::IMAGE_REL_I386_SEG12, llvm::COFF::IMAGE_REL_I386_TOKEN, LLVM_COFF_SWITCH_RELOC_TYPE_NAME, and llvm::object::coff_relocation::Type.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
std::error_code COFFObjectFile::getRvaAndSizeAsBytes | ( | uint32_t | RVA, |
uint32_t | Size, | ||
ArrayRef< uint8_t > & | Contents | ||
) | const |
Given an RVA base and size, returns a valid array of bytes or an error code if the RVA and size is not contained completely within a valid section.
Definition at line 474 of file COFFObjectFile.cpp.
References llvm::object::ObjectFile::base(), getCOFFSection(), llvm::object::parse_failed, llvm::object::coff_section::PointerToRawData, llvm::ARMBuildAttrs::Section, llvm::object::ObjectFile::sections(), and llvm::object::coff_section::VirtualAddress.
Referenced by getHintName().
std::error_code COFFObjectFile::getRvaPtr | ( | uint32_t | Rva, |
uintptr_t & | Res | ||
) | const |
Definition at line 459 of file COFFObjectFile.cpp.
References llvm::object::ObjectFile::base(), getCOFFSection(), llvm::object::parse_failed, llvm::object::coff_section::PointerToRawData, llvm::ARMBuildAttrs::Section, llvm::object::ObjectFile::sections(), llvm::object::coff_section::VirtualAddress, and llvm::object::coff_section::VirtualSize.
Referenced by getHintName(), and getVaPtr().
std::error_code llvm::object::COFFObjectFile::getSection | ( | int32_t | index, |
const coff_section *& | Res | ||
) | const |
Referenced by getDataDirectory(), getSymbolAddress(), and getSymbolSection().
std::error_code llvm::object::COFFObjectFile::getSection | ( | StringRef | SectionName, |
const coff_section *& | Res | ||
) | const |
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 279 of file COFFObjectFile.cpp.
References getImageBase(), and llvm::object::coff_section::VirtualAddress.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 306 of file COFFObjectFile.cpp.
References llvm::object::coff_section::getAlignment().
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Referenced by getSectionIndex().
std::error_code COFFObjectFile::getSectionContents | ( | const coff_section * | Sec, |
ArrayRef< uint8_t > & | Res | ||
) | const |
Definition at line 1123 of file COFFObjectFile.cpp.
References llvm::object::ObjectFile::base(), llvm::object::Binary::checkOffset(), llvm::object::Binary::Data, getSectionSize(), llvm::makeArrayRef(), llvm::object::DataRefImpl::p, llvm::object::parse_failed, llvm::object::coff_section::PointerToRawData, and llvm::COFF::SectionSize.
unsigned COFFObjectFile::getSectionID | ( | SectionRef | Sec | ) | const |
Definition at line 333 of file COFFObjectFile.cpp.
References assert(), llvm::object::SectionRef::getRawDataRefImpl(), and llvm::object::DataRefImpl::p.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 289 of file COFFObjectFile.cpp.
References llvm::ArrayRef< T >::data(), getSectionContents(), getSectionSize(), and llvm::ArrayRef< T >::size().
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Referenced by moveSectionNext().
std::error_code COFFObjectFile::getSectionName | ( | const coff_section * | Sec, |
StringRef & | Res | ||
) | const |
Definition at line 1078 of file COFFObjectFile.cpp.
References decodeBase64StringEntry(), llvm::StringRef::getAsInteger(), Name, llvm::object::coff_section::Name, llvm::COFF::NameSize, llvm::object::parse_failed, llvm::StringRef::startswith(), and llvm::StringRef::substr().
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Referenced by getSectionContents(), and getSectionIndex().
uint64_t COFFObjectFile::getSectionSize | ( | const coff_section * | Sec | ) | const |
Definition at line 1106 of file COFFObjectFile.cpp.
References getDOSHeader(), llvm::object::coff_section::SizeOfRawData, and llvm::object::coff_section::VirtualSize.
|
inline |
Definition at line 820 of file COFF.h.
References llvm::object::coff_file_header::isImportLibrary(), llvm_unreachable, and llvm::object::coff_file_header::SizeOfOptionalHeader.
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 915 of file COFFObjectFile.cpp.
References llvm::object::pe32_header::AddressOfEntryPoint.
|
inline |
Definition at line 986 of file COFF.h.
References llvm::object::parse_failed.
|
inline |
Definition at line 994 of file COFF.h.
References llvm::errorCodeToError(), llvm::object::getSymbol(), and llvm::object::parse_failed.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 169 of file COFFObjectFile.cpp.
References llvm::errorCodeToError(), getCOFFSymbol(), getImageBase(), getSection(), llvm::object::COFFSymbolRef::getSectionNumber(), llvm::object::ObjectFile::getSymbolValue(), llvm::object::COFFSymbolRef::isAnyUndefined(), llvm::object::COFFSymbolRef::isCommon(), llvm::COFF::isReservedSectionNumber(), llvm::ARMBuildAttrs::Section, and llvm::object::coff_section::VirtualAddress.
|
overrideprotectedvirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 162 of file COFFObjectFile.cpp.
References getCOFFSymbol(), llvm::object::COFFSymbolRef::getValue(), and llvm::PowerOf2Ceil().
ArrayRef< uint8_t > COFFObjectFile::getSymbolAuxData | ( | COFFSymbolRef | Symbol | ) | const |
Definition at line 1046 of file COFFObjectFile.cpp.
References assert(), llvm::object::ObjectFile::base(), llvm::object::COFFSymbolRef::getNumberOfAuxSymbols(), getNumberOfSymbols(), getPointerToSymbolTable(), llvm::object::COFFSymbolRef::getRawPtr(), getSymbolTableEntrySize(), llvm::makeArrayRef(), and llvm::report_fatal_error().
|
overrideprotectedvirtual |
Implements llvm::object::SymbolicFile.
Definition at line 213 of file COFFObjectFile.cpp.
References getCOFFSymbol(), llvm::object::COFFSymbolRef::getSectionNumber(), llvm::object::COFFSymbolRef::getWeakExternal(), llvm::COFF::IMAGE_SYM_ABSOLUTE, llvm::COFF::IMAGE_WEAK_EXTERN_SEARCH_ALIAS, llvm::object::COFFSymbolRef::isCommon(), llvm::object::COFFSymbolRef::isExternal(), llvm::object::COFFSymbolRef::isFileRecord(), llvm::object::COFFSymbolRef::isSectionDefinition(), llvm::object::COFFSymbolRef::isUndefined(), llvm::object::COFFSymbolRef::isWeakExternal(), llvm::object::BasicSymbolRef::SF_Absolute, llvm::object::BasicSymbolRef::SF_Common, llvm::object::BasicSymbolRef::SF_FormatSpecific, llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_None, llvm::object::BasicSymbolRef::SF_Undefined, and llvm::object::BasicSymbolRef::SF_Weak.
uint32_t COFFObjectFile::getSymbolIndex | ( | COFFSymbolRef | Symbol | ) | const |
Definition at line 1068 of file COFFObjectFile.cpp.
References assert(), getNumberOfSymbols(), llvm::object::COFFSymbolRef::getRawPtr(), getSymbolTable(), and getSymbolTableEntrySize().
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Referenced by getSymbolName().
std::error_code COFFObjectFile::getSymbolName | ( | COFFSymbolRef | Symbol, |
StringRef & | Res | ||
) | const |
Definition at line 1022 of file COFFObjectFile.cpp.
References llvm::object::COFFSymbolRef::getGeneric(), and getSymbolName().
std::error_code COFFObjectFile::getSymbolName | ( | const coff_symbol_generic * | Symbol, |
StringRef & | Res | ||
) | const |
Definition at line 1027 of file COFFObjectFile.cpp.
References llvm::object::coff_symbol_generic::Name, llvm::COFF::NameSize, llvm::object::StringTableOffset::Offset, llvm::object::coff_symbol_generic::Offset, llvm::object::coff_symbol_generic::ShortName, and llvm::object::StringTableOffset::Zeroes.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 250 of file COFFObjectFile.cpp.
References llvm::errorCodeToError(), getCOFFSymbol(), getSection(), llvm::object::COFFSymbolRef::getSectionNumber(), llvm::COFF::isReservedSectionNumber(), llvm::object::DataRefImpl::p, llvm::MipsISD::Ret, section_end(), and llvm::object::ObjectFile::SectionRef.
Definition at line 262 of file COFFObjectFile.cpp.
References getCOFFSymbol(), llvm::object::BasicSymbolRef::getRawDataRefImpl(), and llvm::object::COFFSymbolRef::getSectionNumber().
|
inline |
Definition at line 804 of file COFF.h.
Referenced by getSymbolIndex(), and symbol_begin().
|
inline |
Definition at line 1027 of file COFF.h.
References Info, llvm_unreachable, Name, and Size.
Referenced by getSymbolAuxData(), getSymbolIndex(), and section_rel_end().
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 190 of file COFFObjectFile.cpp.
References getCOFFSymbol(), llvm::object::COFFSymbolRef::getComplexType(), llvm::object::COFFSymbolRef::getSectionNumber(), llvm::COFF::IMAGE_SYM_DEBUG, llvm::COFF::IMAGE_SYM_DTYPE_FUNCTION, llvm::object::COFFSymbolRef::isAnyUndefined(), llvm::object::COFFSymbolRef::isCommon(), llvm::object::COFFSymbolRef::isFileRecord(), llvm::COFF::isReservedSectionNumber(), llvm::object::COFFSymbolRef::isSectionDefinition(), llvm::object::SymbolRef::ST_Data, llvm::object::SymbolRef::ST_Debug, llvm::object::SymbolRef::ST_File, llvm::object::SymbolRef::ST_Function, llvm::object::SymbolRef::ST_Other, and llvm::object::SymbolRef::ST_Unknown.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 158 of file COFFObjectFile.cpp.
References getCOFFSymbol(), and llvm::object::COFFSymbolRef::getValue().
|
inline |
Definition at line 840 of file COFF.h.
References llvm_unreachable, llvm::object::coff_file_header::TimeDateStamp, and llvm::object::coff_bigobj_file_header::TimeDateStamp.
std::error_code COFFObjectFile::getVaPtr | ( | uint64_t | VA, |
uintptr_t & | Res | ||
) | const |
Definition at line 451 of file COFFObjectFile.cpp.
References assert(), getImageBase(), and getRvaPtr().
iterator_range< import_directory_iterator > COFFObjectFile::import_directories | ( | ) | const |
Definition at line 922 of file COFFObjectFile.cpp.
References import_directory_begin(), import_directory_end(), and llvm::make_range().
import_directory_iterator COFFObjectFile::import_directory_begin | ( | ) | const |
Definition at line 819 of file COFFObjectFile.cpp.
References import_directory_end(), ImportDirectoryEntryRef, and llvm::object::coff_import_directory_table_entry::isNull().
Referenced by import_directories().
import_directory_iterator COFFObjectFile::import_directory_end | ( | ) | const |
Definition at line 828 of file COFFObjectFile.cpp.
References ImportDirectoryEntryRef.
Referenced by import_directories(), and import_directory_begin().
|
overridevirtual |
True if this is a relocatable object (.o/.obj).
Implements llvm::object::ObjectFile.
Definition at line 1305 of file COFFObjectFile.cpp.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 325 of file COFFObjectFile.cpp.
References llvm::object::coff_section::Characteristics, llvm::COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA, llvm::COFF::IMAGE_SCN_MEM_READ, and llvm::COFF::IMAGE_SCN_MEM_WRITE.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 311 of file COFFObjectFile.cpp.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 320 of file COFFObjectFile.cpp.
References llvm::object::coff_section::Characteristics, and llvm::COFF::IMAGE_SCN_CNT_INITIALIZED_DATA.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 315 of file COFFObjectFile.cpp.
References llvm::object::coff_section::Characteristics, and llvm::COFF::IMAGE_SCN_CNT_CODE.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 340 of file COFFObjectFile.cpp.
References llvm::object::coff_section::PointerToRawData.
Maps a debug section name to a standard DWARF section name.
Reimplemented from llvm::object::ObjectFile.
Definition at line 1309 of file COFFObjectFile.cpp.
References llvm::StringSwitch< T, R >::Default(), Name, and llvm::object::ImportDirectoryEntryRef::operator==().
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 1144 of file COFFObjectFile.cpp.
References llvm::object::DataRefImpl::p.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 267 of file COFFObjectFile.cpp.
References getSectionName(), and llvm::object::DataRefImpl::p.
|
overrideprotectedvirtual |
Implements llvm::object::SymbolicFile.
Definition at line 135 of file COFFObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 859 of file COFFObjectFile.cpp.
References llvm::object::DataRefImpl::p, llvm::MipsISD::Ret, and llvm::object::ObjectFile::SectionRef.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 865 of file COFFObjectFile.cpp.
References getNumberOfSections(), llvm::object::coff_file_header::isImportLibrary(), llvm::object::DataRefImpl::p, llvm::MipsISD::Ret, and llvm::object::ObjectFile::SectionRef.
Referenced by getSymbolSection().
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 382 of file COFFObjectFile.cpp.
References llvm::object::ObjectFile::base(), llvm::sys::path::begin(), llvm::object::Binary::Data, getFirstReloc(), llvm::object::DataRefImpl::p, llvm::object::ObjectFile::RelocationRef, llvm::report_fatal_error(), llvm::MipsISD::Ret, and llvm::object::coff_section::VirtualAddress.
|
overrideprotectedvirtual |
Implements llvm::object::ObjectFile.
Definition at line 392 of file COFFObjectFile.cpp.
References llvm::object::ObjectFile::base(), llvm::object::Binary::Data, getFirstReloc(), getNumberOfRelocations(), getNumberOfSymbols(), getObject(), getPointerToSymbolTable(), getSymbolTableEntrySize(), I, llvm::object::DataRefImpl::p, llvm::object::parse_failed, llvm::object::ObjectFile::RelocationRef, and llvm::MipsISD::Ret.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 806 of file COFFObjectFile.cpp.
References getSymbolTable(), llvm::object::DataRefImpl::p, llvm::MipsISD::Ret, and llvm::object::ObjectFile::SymbolRef.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 812 of file COFFObjectFile.cpp.
References llvm::object::DataRefImpl::p, llvm::MipsISD::Ret, and llvm::object::ObjectFile::SymbolRef.
Referenced by getRelocationSymbol().
const coff_symbol_type* llvm::object::COFFObjectFile::toSymb | ( | DataRefImpl | Ref | ) | const |
Definition at line 103 of file COFFObjectFile.cpp.
References assert(), llvm::object::ObjectFile::base(), llvm::object::Binary::checkOffset(), llvm::object::Binary::Data, getNumberOfSections(), getPointerToSymbolTable(), llvm::object::DataRefImpl::p, llvm::Ref, and llvm::report_fatal_error().
|
friend |
Definition at line 766 of file COFF.h.
Referenced by export_directory_begin(), and export_directory_end().
|
friend |
Definition at line 765 of file COFF.h.
Referenced by import_directory_begin(), and import_directory_end().