forked from pyodide/pyodide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document some emsdk patches (pyodide#863)
- Loading branch information
1 parent
42c53ac
commit 6391a75
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
This fixes an upstream bug introduced in emscripten 1.38.34 that causes dlsym | ||
to always return 0 for function pointers when EMULATE_FUNCTION_POINTER_CASTS is | ||
enabled. This is a simple typo, since `mangled == "_" + symbol`. This piece of | ||
code is no longer present in upstream master, hence there is no effort to | ||
upstream the fix. | ||
|
||
diff --git a/emsdk/fastcomp/emscripten/src/library.js b/emsdk/fastcomp/emscripten/src/library.js | ||
index 97cca10..5c002d7 100644 | ||
--- a/emsdk/fastcomp/emscripten/src/library.js | ||
+++ b/emsdk/fastcomp/emscripten/src/library.js | ||
@@ -2194,7 +2194,7 @@ LibraryManager.library = { | ||
// can call (which does not use that ABI), as the function pointer would | ||
// not be usable from wasm. instead, the wasm has exported function pointers | ||
// for everything we need, with prefix fp$, use those | ||
- result = lib.module['fp$' + symbol]; | ||
+ result = lib.module['fp$' + mangled]; | ||
if (typeof result === 'object') { | ||
// a breaking change in the wasm spec, globals are now objects | ||
// https://github.com/WebAssembly/mutable-global/issues/1 |