LLVM 20.0.0git
|
#include "llvm/Object/Wasm.h"
Classes | |
struct | ReadContext |
WasmObjectFile::WasmObjectFile | ( | MemoryBufferRef | Object, |
Error & | Err | ||
) |
Definition at line 345 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 2089 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 2083 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1880 of file WasmObjectFile.cpp.
References llvm_unreachable.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2093 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2087 of file WasmObjectFile.cpp.
const wasm::WasmObjectHeader & WasmObjectFile::getHeader | ( | ) | const |
Definition at line 1770 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 2032 of file WasmObjectFile.cpp.
References getWasmRelocation(), llvm::wasm::WasmRelocation::Offset, and llvm::Ref.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2037 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 2047 of file WasmObjectFile.cpp.
References getWasmRelocation(), llvm::Ref, and llvm::wasm::WasmRelocation::Type.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2052 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 1970 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 1995 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1988 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 1978 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1961 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 1982 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 1820 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 1875 of file WasmObjectFile.cpp.
References llvm_unreachable.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1776 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 1816 of file WasmObjectFile.cpp.
References getWasmSymbol(), llvm::object::WasmSymbol::Info, and llvm::wasm::WasmSymbolInfo::Name.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1909 of file WasmObjectFile.cpp.
References getWasmSymbol(), llvm::Ref, section_end(), llvm::object::ObjectFile::SectionRef, and Sym.
Referenced by getSymbolAddress().
Definition at line 1919 of file WasmObjectFile.cpp.
References getWasmSymbol(), and Sym.
Definition at line 1943 of file WasmObjectFile.cpp.
References functions(), getNumImportedFunctions(), getWasmSymbol(), llvm::wasm::WasmGlobal::Size, and Sym.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1886 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 1871 of file WasmObjectFile.cpp.
References getWasmSymbol(), and getWasmSymbolValue().
|
inline |
const wasm::WasmRelocation & WasmObjectFile::getWasmRelocation | ( | const RelocationRef & | Ref | ) | const |
Definition at line 2112 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 2107 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 1808 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 1812 of file WasmObjectFile.cpp.
References llvm::object::BasicSymbolRef::getRawDataRefImpl(), and getWasmSymbol().
uint64_t WasmObjectFile::getWasmSymbolValue | ( | const WasmSymbol & | Sym | ) | const |
Definition at line 1841 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 2097 of file WasmObjectFile.cpp.
Referenced by llvm::objcopy::wasm::Reader::create(), and getSectionAddress().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2011 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1999 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2007 of file WasmObjectFile.cpp.
References getWasmSection(), llvm::object::WasmSection::Type, and llvm::wasm::WASM_SEC_DATA.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2003 of file WasmObjectFile.cpp.
References getWasmSection(), llvm::object::WasmSection::Type, and llvm::wasm::WASM_SEC_CODE.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2013 of file WasmObjectFile.cpp.
bool WasmObjectFile::isSharedObject | ( | ) | const |
Definition at line 2099 of file WasmObjectFile.cpp.
Referenced by getSectionAddress().
|
inline |
|
inline |
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2030 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1959 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1774 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2071 of file WasmObjectFile.cpp.
References llvm::Ref, and llvm::object::ObjectFile::SectionRef.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2077 of file WasmObjectFile.cpp.
References llvm::Ref, and llvm::object::ObjectFile::SectionRef.
Referenced by getSymbolSection().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 2015 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 2022 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 1794 of file WasmObjectFile.cpp.
References llvm::Ref.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1801 of file WasmObjectFile.cpp.
References llvm::Ref.
Referenced by getRelocationSymbol().
|
inline |
|
inline |
|
inline |