LLVM
8.0.1
|
#include "llvm/Object/Wasm.h"
Classes | |
struct | ReadContext |
WasmObjectFile::WasmObjectFile | ( | MemoryBufferRef | Object, |
Error & | Err | ||
) |
Definition at line 247 of file WasmObjectFile.cpp.
Definition at line 130 of file Wasm.h.
References llvm::object::Binary::isWasm().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1427 of file WasmObjectFile.cpp.
References llvm::Triple::wasm32.
|
overridevirtual |
The number of bytes used to represent an address in this object file format.
Implements llvm::object::ObjectFile.
Definition at line 1423 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1225 of file WasmObjectFile.cpp.
References llvm_unreachable.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1429 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1425 of file WasmObjectFile.cpp.
const wasm::WasmObjectHeader & WasmObjectFile::getHeader | ( | ) | const |
Definition at line 1144 of file WasmObjectFile.cpp.
|
inline |
|
inline |
Definition at line 151 of file Wasm.h.
References getFeatures(), getSymbolName(), and getSymbolType().
|
inline |
|
inline |
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1372 of file WasmObjectFile.cpp.
References getWasmRelocation(), and llvm::wasm::WasmRelocation::Offset.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1377 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, getWasmRelocation(), llvm::wasm::WasmRelocation::Index, symbol_end(), llvm::object::ObjectFile::SymbolRef, and llvm::wasm::WasmRelocation::Type.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1387 of file WasmObjectFile.cpp.
References getWasmRelocation(), and llvm::wasm::WasmRelocation::Type.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1392 of file WasmObjectFile.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::StringRef::begin(), llvm::StringRef::end(), getWasmRelocation(), and llvm::wasm::WasmRelocation::Type.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1312 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1333 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1323 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::WasmSection::Content, llvm::object::DataRefImpl::d, llvm::ArrayRef< T >::data(), and llvm::ArrayRef< T >::size().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1314 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1282 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, ECase, llvm::AMDGPUISD::EXPORT, llvm::NVPTX::PTXLdStInstCode::GLOBAL, llvm::object::invalid_section_index, llvm::object::WasmSection::Name, llvm::object::WasmSection::Type, and llvm::wasm::WASM_SEC_CUSTOM.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1318 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 1192 of file WasmObjectFile.cpp.
References llvm::object::ObjectFile::getSymbolValue().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 1220 of file WasmObjectFile.cpp.
References llvm_unreachable.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1150 of file WasmObjectFile.cpp.
References llvm::dbgs(), getWasmSymbol(), llvm::object::WasmSymbol::isBindingLocal(), llvm::object::WasmSymbol::isBindingWeak(), llvm::object::WasmSymbol::isDefined(), llvm::object::WasmSymbol::isHidden(), llvm::object::WasmSymbol::isTypeFunction(), 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, and llvm::object::BasicSymbolRef::SF_Weak.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1188 of file WasmObjectFile.cpp.
References getWasmSymbol(), llvm::object::WasmSymbol::Info, and llvm::wasm::WasmSymbolInfo::Name.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1252 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, llvm::wasm::WasmSymbolInfo::ElementIndex, getWasmSymbol(), llvm::object::WasmSymbol::Info, llvm::object::WasmSymbol::isUndefined(), llvm::wasm::WasmSymbolInfo::Kind, llvm_unreachable, llvm::Ref, section_end(), llvm::object::ObjectFile::SectionRef, llvm::wasm::WASM_SYMBOL_TYPE_DATA, llvm::wasm::WASM_SYMBOL_TYPE_EVENT, llvm::wasm::WASM_SYMBOL_TYPE_FUNCTION, llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL, and llvm::wasm::WASM_SYMBOL_TYPE_SECTION.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1231 of file WasmObjectFile.cpp.
References getWasmSymbol(), llvm::object::WasmSymbol::Info, llvm::wasm::WasmSymbolInfo::Kind, llvm_unreachable, llvm::object::SymbolRef::ST_Data, llvm::object::SymbolRef::ST_Debug, llvm::object::SymbolRef::ST_Function, llvm::object::SymbolRef::ST_Other, llvm::wasm::WASM_SYMBOL_TYPE_DATA, llvm::wasm::WASM_SYMBOL_TYPE_EVENT, llvm::wasm::WASM_SYMBOL_TYPE_FUNCTION, llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL, and llvm::wasm::WASM_SYMBOL_TYPE_SECTION.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1216 of file WasmObjectFile.cpp.
References getWasmSymbol(), and getWasmSymbolValue().
const wasm::WasmRelocation & WasmObjectFile::getWasmRelocation | ( | const RelocationRef & | Ref | ) | const |
Definition at line 1448 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), llvm::object::DataRefImpl::b, llvm::StringSwitch< T, R >::Case(), llvm::object::DataRefImpl::d, llvm::StringSwitch< T, R >::Default(), llvm::object::RelocationRef::getRawDataRefImpl(), llvm_unreachable, llvm::StringSwitch< T, R >::StartsWith(), llvm::wasm::WASM_SEC_CODE, llvm::wasm::WASM_SEC_CUSTOM, llvm::wasm::WASM_SEC_DATA, llvm::wasm::WASM_SEC_DATACOUNT, llvm::wasm::WASM_SEC_ELEM, llvm::wasm::WASM_SEC_EVENT, llvm::wasm::WASM_SEC_EXPORT, llvm::wasm::WASM_SEC_FUNCTION, llvm::wasm::WASM_SEC_GLOBAL, llvm::wasm::WASM_SEC_IMPORT, llvm::wasm::WASM_SEC_MEMORY, llvm::wasm::WASM_SEC_START, llvm::wasm::WASM_SEC_TABLE, and llvm::wasm::WASM_SEC_TYPE.
Referenced by getRelocationOffset(), getRelocationSymbol(), getRelocationType(), and getRelocationTypeName().
const WasmSection & WasmObjectFile::getWasmSection | ( | const SectionRef & | Section | ) | const |
Definition at line 1443 of file WasmObjectFile.cpp.
References llvm::object::SectionRef::getRawDataRefImpl().
Referenced by isSectionData(), isSectionText(), isSharedObject(), and section_rel_end().
const WasmSymbol & WasmObjectFile::getWasmSymbol | ( | const DataRefImpl & | Symb | ) | const |
Definition at line 1180 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and llvm::object::BasicSymbolRef::getRawDataRefImpl().
Referenced by getSymbolFlags(), getSymbolName(), getSymbolSection(), getSymbolType(), and getSymbolValueImpl().
const WasmSymbol& llvm::object::WasmObjectFile::getWasmSymbol | ( | const SymbolRef & | Symbol | ) | const |
uint64_t WasmObjectFile::getWasmSymbolValue | ( | const WasmSymbol & | Sym | ) | const |
Definition at line 1196 of file WasmObjectFile.cpp.
References assert(), llvm::wasm::WasmSymbolInfo::DataRef, llvm::wasm::WasmSymbolInfo::ElementIndex, llvm::object::WasmSymbol::Info, llvm::wasm::WasmInitExpr::Int32, llvm::wasm::WasmSymbolInfo::Kind, llvm_unreachable, llvm::wasm::WasmDataSegment::Offset, llvm::wasm::WasmDataReference::Offset, llvm::wasm::WasmInitExpr::Opcode, llvm::wasm::WasmDataReference::Segment, llvm::wasm::WasmInitExpr::Value, llvm::wasm::WASM_OPCODE_I32_CONST, llvm::wasm::WASM_SYMBOL_TYPE_DATA, llvm::wasm::WASM_SYMBOL_TYPE_EVENT, llvm::wasm::WASM_SYMBOL_TYPE_FUNCTION, llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL, and llvm::wasm::WASM_SYMBOL_TYPE_SECTION.
Referenced by getSymbolValueImpl().
|
inline |
|
inline |
|
overridevirtual |
True if this is a relocatable object (.o/.obj).
Implements llvm::object::ObjectFile.
Definition at line 1433 of file WasmObjectFile.cpp.
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 1353 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1349 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1337 of file WasmObjectFile.cpp.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1345 of file WasmObjectFile.cpp.
References getWasmSection(), llvm::object::WasmSection::Type, and llvm::wasm::WASM_SEC_DATA.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1341 of file WasmObjectFile.cpp.
References getWasmSection(), llvm::object::WasmSection::Type, and llvm::wasm::WASM_SEC_CODE.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1351 of file WasmObjectFile.cpp.
bool WasmObjectFile::isSharedObject | ( | ) | const |
Definition at line 1435 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, assert(), llvm::object::DataRefImpl::d, getWasmSection(), and llvm::Ref.
|
inline |
|
inline |
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1370 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::b, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1280 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1148 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, and llvm::object::DataRefImpl::d.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1411 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, llvm::Ref, and llvm::object::ObjectFile::SectionRef.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1417 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, llvm::Ref, and llvm::object::ObjectFile::SectionRef.
Referenced by getSymbolSection().
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1355 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, and llvm::object::ObjectFile::RelocationRef.
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 1362 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::b, llvm::object::DataRefImpl::d, getWasmSection(), llvm::object::ObjectFile::RelocationRef, and llvm::object::WasmSection::Relocations.
|
inline |
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1168 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and llvm::Ref.
|
overridevirtual |
Implements llvm::object::SymbolicFile.
Definition at line 1174 of file WasmObjectFile.cpp.
References llvm::object::DataRefImpl::a, llvm::object::DataRefImpl::d, and llvm::Ref.
Referenced by getRelocationSymbol().
|
inline |
|
inline |
|
inline |