-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Put all EM_JS/EM_ASM strings in a specific data section #13443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If we find a data segment with the name "em_js", strip it from the binary. Even in debug mode the names given to data segments by clang will always start with ".data." or ".rodata" so there is no risk of normal data ending up in a section with this name. See: emscripten-core/emscripten#13443
If we find a data segment with the name "em_js", strip it from the binary. Even in debug mode the names given to data segments by clang will always start with ".data." or ".rodata" so there is no risk of normal data ending up in a section with this name. See: emscripten-core/emscripten#13443
Is it worth working on an EM_JS-specific solution? That is, is there no solution for EM_JS and EM_ASM? |
Sure, I'm just doing it one step at a time. EM_JS is actually quite different to EM_ASM in that the strings don't actually need to have addresses in LLVM sense... so the solution we end up with might look different. But also I do think and EM_JS-only solution is better than nothing. |
This part of the change is really a no-brainer (IMHO). It doesn't actually do anything except group the EM_JS strings into a single data section. Even if we never get around to actually purging it on the binaryen side (which I totally think we will) I still think its good for debugging / understandably. |
Updated the comment to include plans to further investigate the EM_ASM situation. |
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, sounds great.
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
If we find a data segment whose entire contents is EM_JS or EM_ASM strings then strip it from the binary. See: emscripten-core/emscripten#13443
This way, once binaryen has extracted that string data it can potentially remove the segment or at least zero it out. Fixes #9366
842309d
to
510d924
Compare
This way, once binaryen has extracted that string data
it can potentially remove the segment or at least zero it
out.
Fixes #9366