diff options
Diffstat (limited to 'src/wasm/wasm-emscripten.cpp')
-rw-r--r-- | src/wasm/wasm-emscripten.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp index 6710c7cd8..37cd2f431 100644 --- a/src/wasm/wasm-emscripten.cpp +++ b/src/wasm/wasm-emscripten.cpp @@ -1041,6 +1041,13 @@ struct FixInvokeFunctionNamesWalker wasm.removeFunction(importName); } ModuleUtils::renameFunctions(wasm, importRenames); + ImportInfo imports(wasm); + for (auto& pair : importRenames) { + // Update any associated GOT.func import. + if (auto g = imports.getImportedGlobal("GOT.func", pair.first)) { + g->base = pair.second; + } + } } }; |