Add dynCall_sig adaptor for MAIN_MODULE == 2#17759
Add dynCall_sig adaptor for MAIN_MODULE == 2#17759gl84 wants to merge 1 commit intoemscripten-core:mainfrom
Conversation
Follow up on PR emscripten-core#17328. - Create the wasm adaptor also for MAIN_MODULE == 2 - Remove obsolete assert (triggers for all cases were we create the wrapper)
|
cc @hoodmane My understanding was that |
|
It was not included because it shouldn't be necessary. In the example: The linker should look inside |
|
The example is only an easy reproducing case which exports everything (except the dynCalls)... In reality the MAIN_MODULE has never seen the plugin before loading it. Hence it is hard (or even impossible) to pre-generate all dynCalls at compile time. From my point of view the only thing the main program really expects is that dlopen and dlsym work without side effects... |
For that use case you're supposed to use |
|
That's a valid point. If one is interpreting MAIN_MODULE=2 that way something to prevent the elimination of the call to createDyncallWrapper in dynCallLegacy would be super helpful. @sbc100: Is there a way that doesn't need a new setting? |
|
Yes I think we should be analyzing the side modules at link time and creating extra dynCalls accordingly. |
Fixes #17707.
Follow up on PR #17328.