LLVM 20.0.0git
|
#include "llvm/Object/Wasm.h"
Classes | |
struct | ReadContext |
WasmObjectFile::WasmObjectFile | ( | MemoryBufferRef | Object, |
Error & | Err | ||
) |
Definition at line 348 of file WasmObjectFile.cpp.
References llvm::StringRef::bytes_begin(), llvm::object::WasmObjectFile::ReadContext::End, llvm::object::Binary::getData(), llvm::wasm::WasmObjectHeader::Magic, llvm::object::parse_failed, llvm::object::WasmObjectFile::ReadContext::Ptr, readSection(), readUint32(), llvm::StringRef::size(), llvm::object::WasmObjectFile::ReadContext::Start, llvm::StringRef::substr(), llvm::wasm::WasmObjectHeader::Version, and llvm::wasm::WasmVersion.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 155 of file Wasm.h.
Referenced by getSymbolSize().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2094 of file WasmObjectFile.cpp.
References llvm::Triple::wasm32, and llvm::Triple::wasm64.
|
overridevirtual |
The number of bytes used to represent an address in this object file format.
Implements llvm::object::ObjectFile.
Definition at line 2088 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1885 of file WasmObjectFile.cpp.
References llvm_unreachable.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2098 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2092 of file WasmObjectFile.cpp.
const wasm::WasmObjectHeader & WasmObjectFile::getHeader | ( | ) | const |
Definition at line 1775 of file WasmObjectFile.cpp.
Referenced by llvm::objcopy::wasm::Reader::create().
|
inline |
|
inline |
Definition at line 160 of file Wasm.h.
Referenced by getSymbolSize().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 162 of file Wasm.h.
Referenced by llvm::objcopy::wasm::Reader::create().
|
inline |
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2037 of file WasmObjectFile.cpp.
References getWasmRelocation(), llvm::wasm::WasmRelocation::Offset, and llvm::Ref.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2042 of file WasmObjectFile.cpp.
References getWasmRelocation(), llvm::wasm::WasmRelocation::Index, llvm::Ref, Sym, symbol_end(), llvm::object::ObjectFile::SymbolRef, and llvm::wasm::WasmRelocation::Type.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2052 of file WasmObjectFile.cpp.
References getWasmRelocation(), llvm::Ref, and llvm::wasm::WasmRelocation::Type.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2057 of file WasmObjectFile.cpp.
References llvm::StringRef::begin(), llvm::StringRef::end(), getWasmRelocation(), llvm::Ref, and llvm::wasm::WasmRelocation::Type.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1975 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, isRelocatableObject(), and isSharedObject().
Referenced by getSymbolAddress().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2000 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1993 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::WasmSection::Content, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1983 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1966 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::createStringError(), llvm::object::DataRefImpl::d, llvm::object::invalid_section_index, llvm::object::WasmSection::Name, llvm::wasm::sectionTypeToString(), llvm::object::WasmSection::Type, llvm::wasm::WASM_SEC_CUSTOM, and llvm::wasm::WASM_SEC_LAST_KNOWN.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1987 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::WasmSection::Content, llvm::object::DataRefImpl::d, and llvm::ArrayRef< T >::size().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1825 of file WasmObjectFile.cpp.
References llvm::wasm::WasmFunction::CodeSectionOffset, llvm::Expected< T >::get(), getSectionAddress(), getSymbolSection(), llvm::object::ObjectFile::getSymbolValue(), getWasmSymbol(), llvm::wasm::WasmGlobal::Offset, Sym, llvm::Expected< T >::takeError(), llvm::wasm::WASM_SYMBOL_TYPE_FUNCTION, and llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL.
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 1880 of file WasmObjectFile.cpp.
References llvm_unreachable.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1781 of file WasmObjectFile.cpp.
References llvm::dbgs(), getWasmSymbol(), LLVM_DEBUG, llvm::object::BasicSymbolRef::SF_Executable, llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_Hidden, llvm::object::BasicSymbolRef::SF_None, llvm::object::BasicSymbolRef::SF_Undefined, llvm::object::BasicSymbolRef::SF_Weak, and Sym.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1821 of file WasmObjectFile.cpp.
References getWasmSymbol(), llvm::object::WasmSymbol::Info, and llvm::wasm::WasmSymbolInfo::Name.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1914 of file WasmObjectFile.cpp.
References getWasmSymbol(), llvm::Ref, section_end(), llvm::object::ObjectFile::SectionRef, and Sym.
Referenced by getSymbolAddress().
Definition at line 1924 of file WasmObjectFile.cpp.
References getWasmSymbol(), and Sym.
Definition at line 1948 of file WasmObjectFile.cpp.
References functions(), getNumImportedFunctions(), getWasmSymbol(), llvm::wasm::WasmGlobal::Size, and Sym.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1891 of file WasmObjectFile.cpp.
References getWasmSymbol(), llvm_unreachable, llvm::object::SymbolRef::ST_Data, llvm::object::SymbolRef::ST_Debug, llvm::object::SymbolRef::ST_Function, llvm::object::SymbolRef::ST_Other, Sym, llvm::wasm::WASM_SYMBOL_TYPE_DATA, llvm::wasm::WASM_SYMBOL_TYPE_FUNCTION, llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL, llvm::wasm::WASM_SYMBOL_TYPE_SECTION, llvm::wasm::WASM_SYMBOL_TYPE_TABLE, and llvm::wasm::WASM_SYMBOL_TYPE_TAG.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1876 of file WasmObjectFile.cpp.
References getWasmSymbol(), and getWasmSymbolValue().
|
inline |
const wasm::WasmRelocation & WasmObjectFile::getWasmRelocation | ( | const RelocationRef & | Ref | ) | const |
Definition at line 2117 of file WasmObjectFile.cpp.
References getWasmRelocation(), and llvm::Ref.
Referenced by getRelocationOffset(), getRelocationSymbol(), getRelocationType(), getRelocationTypeName(), and getWasmRelocation().
const WasmSection & WasmObjectFile::getWasmSection | ( | const SectionRef & | Section | ) | const |
Definition at line 2112 of file WasmObjectFile.cpp.
References getWasmSection().
Referenced by llvm::objcopy::wasm::Reader::create(), getWasmSection(), isSectionData(), isSectionText(), and section_rel_end().
const WasmSymbol & WasmObjectFile::getWasmSymbol | ( | const DataRefImpl & | Symb | ) | const |
Definition at line 1813 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
Referenced by getSymbolAddress(), getSymbolFlags(), getSymbolName(), getSymbolSection(), getSymbolSectionId(), getSymbolSize(), getSymbolType(), getSymbolValueImpl(), and getWasmSymbol().
const WasmSymbol & WasmObjectFile::getWasmSymbol | ( | const SymbolRef & | Symbol | ) | const |
Definition at line 1817 of file WasmObjectFile.cpp.
References llvm::object::BasicSymbolRef::getRawDataRefImpl(), and getWasmSymbol().
uint64_t WasmObjectFile::getWasmSymbolValue | ( | const WasmSymbol & | Sym | ) | const |
Definition at line 1846 of file WasmObjectFile.cpp.
References llvm::wasm::WasmInitExpr::Extended, llvm::wasm::WasmInitExpr::Inst, llvm::wasm::WasmInitExprMVP::Int32, llvm::wasm::WasmInitExprMVP::Int64, llvm_unreachable, llvm::wasm::WasmDataSegment::Offset, llvm::wasm::WasmInitExprMVP::Opcode, Sym, llvm::wasm::WasmInitExprMVP::Value, llvm::wasm::WASM_OPCODE_GLOBAL_GET, llvm::wasm::WASM_OPCODE_I32_CONST, llvm::wasm::WASM_OPCODE_I64_CONST, llvm::wasm::WASM_SYMBOL_TYPE_DATA, llvm::wasm::WASM_SYMBOL_TYPE_FUNCTION, llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL, llvm::wasm::WASM_SYMBOL_TYPE_SECTION, llvm::wasm::WASM_SYMBOL_TYPE_TABLE, and llvm::wasm::WASM_SYMBOL_TYPE_TAG.
Referenced by getSymbolValueImpl().
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements llvm::object::SymbolicFile.
|
overridevirtual |
True if this is a relocatable object (.o/.obj).
Implements llvm::object::ObjectFile.
Definition at line 2102 of file WasmObjectFile.cpp.
Referenced by getSectionAddress().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2016 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2004 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2012 of file WasmObjectFile.cpp.
References getWasmSection(), llvm::object::WasmSection::Type, and llvm::wasm::WASM_SEC_DATA.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2008 of file WasmObjectFile.cpp.
References getWasmSection(), llvm::object::WasmSection::Type, and llvm::wasm::WASM_SEC_CODE.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2018 of file WasmObjectFile.cpp.
bool WasmObjectFile::isSharedObject | ( | ) | const |
Definition at line 2104 of file WasmObjectFile.cpp.
Referenced by getSectionAddress().
|
inline |
|
inline |
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2035 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1964 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1779 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2076 of file WasmObjectFile.cpp.
References llvm::Ref, and llvm::object::ObjectFile::SectionRef.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2082 of file WasmObjectFile.cpp.
References llvm::Ref, and llvm::object::ObjectFile::SectionRef.
Referenced by getSymbolSection().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2020 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, llvm::Ref, and llvm::object::ObjectFile::RelocationRef.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2027 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, getWasmSection(), llvm::Ref, llvm::object::ObjectFile::RelocationRef, and llvm::object::WasmSection::Relocations.
|
inline |
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1799 of file WasmObjectFile.cpp.
References llvm::Ref.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1806 of file WasmObjectFile.cpp.
References llvm::Ref.
Referenced by getRelocationSymbol().
|
inline |
|
inline |
|
inline |