aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2021-04-22 16:54:58 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2021-05-20 09:59:31 -0700
commit3a293cbf13a2b6ddb2c1f6d27077ee922f32c404 (patch)
tree224c083dd75a7e344fb998c9a57d74c8432093fb /llvm/lib/Object/WasmObjectFile.cpp
parent5b6cae5524905bc43cfc21a515f828528d1f2e68 (diff)
downloadllvm-3a293cbf13a2b6ddb2c1f6d27077ee922f32c404.zip
llvm-3a293cbf13a2b6ddb2c1f6d27077ee922f32c404.tar.gz
llvm-3a293cbf13a2b6ddb2c1f6d27077ee922f32c404.tar.bz2
[WebAssembly] Fix PIC/GOT codegen for wasm64
__table_base is know 64-bit, since in LLVM it represents a function pointer offset __table_base32 is a copy in wasm32 for use in elem init expr, since no truncation may be used there. New reloc R_WASM_TABLE_INDEX_REL_SLEB64 added Differential Revision: https://reviews.llvm.org/D101784
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
-rw-r--r--llvm/lib/Object/WasmObjectFile.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index 8004c5e..38895e4 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -870,6 +870,7 @@ Error WasmObjectFile::parseRelocSection(StringRef Name, ReadContext &Ctx) {
case wasm::R_WASM_TABLE_INDEX_I32:
case wasm::R_WASM_TABLE_INDEX_I64:
case wasm::R_WASM_TABLE_INDEX_REL_SLEB:
+ case wasm::R_WASM_TABLE_INDEX_REL_SLEB64:
if (!isValidFunctionSymbol(Reloc.Index))
return make_error<GenericBinaryError>(
"invalid relocation function index", object_error::parse_failed);