emscripten/src
Sam Clegg 99942ab74d
Use `asmLibraryArg` when resolving symbols dynamically (#13949)
Use `asmLibraryArg` as the primary symbol map used in dynamic linking.
Previously we would use the `Module` object itself when looking up
symbols and when merging in new symbols.

After this change we continue to export new dynamic symbols on the
Module object but we might want to consider changing that in the future.

One of the issues that this fixes is that it allows JS library symbols
that were exported on `asmLibraryArg` but *not* exported on the Module
object (i.e. not included in DEFAULT_LIBRARY_FUNCS_TO_INCLUDE) to be
visible to the dynamic linker.  The test here requires that since it
needs to assign a GOT entry to a JS library function that is not
exported via DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.

Fixes: #13786
2021-04-30 04:05:18 +02:00
..
closure-externs Enable --closure + dynamic linking (#13880) 2021-04-15 01:14:06 +02:00
embind Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
Fetch.js Add "synchronous" mode to `callUserCallback` (#13929) 2021-04-19 17:16:38 -07:00
IDBStore.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
URIUtils.js Optimize URIUtils.js. NFC (#13908) 2021-04-19 15:19:35 -07:00
arrayUtils.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
base64Decode.js Micro-optimize code size of base64 decoding via the observation that 'true/false' coerce to 1/0 in arithmetic, e.g. 3 - true == 2. (#11360) 2020-06-06 11:29:19 +03:00
base64Utils.js Fix more Closure warnings (#10525) 2020-02-22 11:44:15 +02:00
compiler.js Read exports from side modules at link time (#13915) 2021-04-16 15:04:06 -07:00
cpuprofiler.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
deterministic.js Remove DYNAMICTOP_PTR (#12057) 2020-09-02 14:50:00 -07:00
emrun_postjs.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
emrun_prejs.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
emscripten-source-map.min.js Revive emscripten_log tests (#12471) 2020-10-07 17:02:04 -07:00
gl-matrix.js
growableHeap.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
headless.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
headlessCanvas.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
jsifier.js Remove EXPORTED_FUNCTIONS from jsifier output. NFC (#14017) 2021-04-26 20:29:59 -07:00
library.js Revert musl change to asctime.c. NFC (#13973) 2021-04-23 08:08:27 -07:00
library_asmfs.js Simplify `allocate` function to only take a single type (#12279) 2020-09-21 10:25:03 -07:00
library_async.js [Asyncify] Assert on async operations not being done during or after shutdown (#14030) 2021-04-27 13:30:09 -07:00
library_bootstrap.js Add centralized handling for calling user callbacks (#13596) 2021-03-12 11:31:18 -08:00
library_browser.js Fix closure compiler errors in JS libraries. NFC (#13857) 2021-04-12 17:42:48 -07:00
library_c_preprocessor.js Add support for layout(binding=x) in shaders. (#13887) 2021-04-23 04:38:19 -07:00
library_cyberdwarf.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
library_dylink.js Use `asmLibraryArg` when resolving symbols dynamically (#13949) 2021-04-30 04:05:18 +02:00
library_egl.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
library_emmalloc.js Remove use of WASM setting in library JS (#12122) 2020-09-08 08:03:30 -07:00
library_exceptions.js Fail at link time if exception catching is enabled at compile time but not link time (#13862) 2021-04-12 16:37:16 -07:00
library_exceptions_stub.js Fix and test INCLUDE_FULL_LIBRARY (#13863) 2021-04-12 23:00:47 +02:00
library_exports.js Remove some WASM_BACKEND usage in src/. (part 3) See #11860 (#11885) 2020-08-14 17:31:28 -07:00
library_fetch.js Add centralized handling for calling user callbacks (#13596) 2021-03-12 11:31:18 -08:00
library_formatString.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
library_fs.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
library_glemu.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
library_glew.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
library_glfw.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
library_glut.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
library_html5.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
library_html5_webgl.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
library_html5_webgpu.js Move Emscripten-specific bits of WebGPU out from html5.h (#11342) 2020-06-06 11:36:32 +03:00
library_idbfs.js Remove unused variables in library_idbfs.js (#13635) 2021-03-10 19:53:36 -08:00
library_idbstore.js Cleanup unused makeSetValue family of helper functions (#12228) 2020-09-15 18:28:36 -07:00
library_int53.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
library_little_endian_heap.js Big Endian Support (using extra acorn AST pass) (#13413) 2021-03-09 13:57:15 -08:00
library_lz4.js Fix --use-preload-plugins with -s LZ4 (#13235) 2021-02-09 13:13:14 -08:00
library_math.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
library_memfs.js Remove old leftover MEMFS code (#13255) 2021-01-14 23:24:45 +02:00
library_nodefs.js Implement mmap and msync for NODERAWFS (#13052) 2021-01-06 16:51:43 -08:00
library_noderawfs.js Implement mmap and msync for NODERAWFS (#13052) 2021-01-06 16:51:43 -08:00
library_openal.js Fix closure compiler errors in JS libraries. NFC (#13857) 2021-04-12 17:42:48 -07:00
library_path.js Remove trailing slash from path in PATH.basename (#11938) 2020-08-18 11:03:20 -07:00
library_pipefs.js Remove most of the use of modeStringToFlags FS helper (#12671) 2020-11-05 12:51:23 -08:00
library_proxyfs.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
library_pthread.js Add comments regarding STACK_OVERFLOW_CHECK exports. NFC. (#13891) 2021-04-13 23:22:10 -07:00
library_pthread_stub.js Fix closure compiler errors in JS libraries. NFC (#13857) 2021-04-12 17:42:48 -07:00
library_sdl.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
library_signals.js Move more of library_pthread_stub.js to native code. (#12848) 2020-11-24 16:05:45 -08:00
library_sockfs.js Add centralized handling for calling user callbacks (#13596) 2021-03-12 11:31:18 -08:00
library_stack_trace.js Avoid 'err' in jsStackTrace, which can conflict in LIBRARY_DEBUG which adds code that calls the global err() (#12089) 2020-08-31 13:54:05 -07:00
library_strings.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
library_syscall.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
library_trace.js Move emscripten_stack_get_base/end into native code (#12615) 2020-10-28 20:13:45 -07:00
library_tty.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
library_uuid.js fixes UUID variant marker to be compliant to RFC-4122 (#13577) 2021-03-07 12:03:25 -08:00
library_wasi.js Enable --closure + dynamic linking (#13880) 2021-04-15 01:14:06 +02:00
library_webgl.js Address review for layout(binding) support: more precise regex, and avoid ES6 arrow notation. (#13984) 2021-04-27 13:21:04 +03:00
library_webgl2.js New uniform location handling (#13732) 2021-03-31 13:32:25 -07:00
library_webgpu.js Update WebGPU to the latest changes (#13941) 2021-04-28 09:53:32 -07:00
library_websocket.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
library_workerfs.js Fix workerfs inode (#10856) 2020-04-09 10:29:40 -07:00
library_xlib.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
memoryprofiler.js Prefer `.includes()` over `.indexOf()` (#13945) 2021-04-21 13:27:52 -07:00
minimal_runtime_worker_externs.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
modules.js Simplify libraryFunction metadata exported from JS compiler (#14016) 2021-04-26 15:48:56 -07:00
node_shell_read.js Move dynamic linking JS code into library_dylink.js. (#12127) 2020-09-08 16:34:01 -07:00
parseTools.js Revert "Remove unused `hasExportedFunction` helper from src/parseTools.js. NFC (#14009)" (#14024) 2021-04-27 11:22:34 -07:00
postamble.js Don't run ATMAINS unless there is _main function exported (#13901) 2021-04-15 11:50:52 -07:00
postamble_minimal.js Revert "Remove unused `hasExportedFunction` helper from src/parseTools.js. NFC (#14009)" (#14024) 2021-04-27 11:22:34 -07:00
preamble.js Use `asmLibraryArg` when resolving symbols dynamically (#13949) 2021-04-30 04:05:18 +02:00
preamble_minimal.js Big Endian Support (using extra acorn AST pass) (#13413) 2021-03-09 13:57:15 -08:00
promise_polyfill.js Fix .isArray() checks on Promise polyfill (#10706) 2020-03-17 18:12:47 +02:00
proxyClient.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
proxyWorker.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
runtime.js Remove DYNAMICTOP_PTR (#12057) 2020-09-02 14:50:00 -07:00
runtime_assertions.js Remove unused/broken abortFnPtrError JS helper. NFC (#13866) 2021-04-12 07:35:58 -07:00
runtime_debug.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
runtime_functions.js Some minor cleanups split out from #12461 (#12532) 2020-10-15 15:46:06 -07:00
runtime_init_memory.js Create memory in wasm binaryn by default (#12790) 2020-11-17 19:06:01 -08:00
runtime_init_table.js SPLIT_MODULE with dynamic linking (#13070) 2021-01-06 14:37:18 -08:00
runtime_math.js Remove builtin primitive concept from jsifier (#12354) 2020-09-28 17:09:15 -07:00
runtime_safe_heap.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
runtime_stack_check.js Move emscripten_stack_get_base/end into native code (#12615) 2020-10-28 20:13:45 -07:00
runtime_strings.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
runtime_strings_extra.js Fix an off-by-one error when converting UTF16 strings to JavaScript strings (#12631) 2020-10-29 19:05:34 -07:00
settings.js Remove LIBRARY_DEPS_TO_AUTOEXPORT setting (#14014) 2021-04-26 11:37:02 -07:00
settings_internal.js Use `asmLibraryArg` when resolving symbols dynamically (#13949) 2021-04-30 04:05:18 +02:00
shell.html
shell.js Enable --closure + dynamic linking (#13880) 2021-04-15 01:14:06 +02:00
shell_minimal.html
shell_minimal.js Don't run ATMAINS unless there is _main function exported (#13901) 2021-04-15 11:50:52 -07:00
shell_minimal_runtime.html Run wasm2js if wasm fails (#10621) 2020-06-10 15:34:35 +03:00
socket.io.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
source_map_support.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
struct_info.json Update WebGPU to the latest changes (#13941) 2021-04-28 09:53:32 -07:00
struct_info_internal.json Move thread profile block declaration into pthread_impl.h. NFC. (#13840) 2021-04-07 19:46:41 -07:00
support.js Remove unused makeBigInt runtime function (#13944) 2021-04-21 13:22:11 -07:00
threadprofiler.js Fix a couple of issues with `--thread-profiles` (#13171) 2021-01-05 15:58:02 -08:00
utility.js Remove dead functions from src/utility.js (#12901) 2020-11-30 11:30:07 -08:00
wasm2js.js Fix Wasm2JS polyfill of Promise .catch() handler to work in WASM=2 mode (#11980) 2021-02-04 13:00:59 +02:00
wasm_offset_converter.js Use compact SPDX license identifer in JS files (#10771) 2020-03-27 15:20:11 -07:00
webGLClient.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
webGLWorker.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00
web_or_worker_shell_read.js Fix loading wasm in electron by falling back to XHR (#12921) 2021-01-06 14:31:58 -08:00
worker.js Use "dylink" section for main module dependencies (#13764) 2021-03-25 08:43:03 -07:00
wrtcp.js JS style: consistent use of space around for/while/if conditions. NFC. (#13669) 2021-03-16 16:09:43 +01:00