-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Remove memory/table information from emscripten_metadata #12189
Conversation
The emscripten metadata section was originally added back in #7815. @rianhunter I'm hoping that these particular pieces are data are no longer needed. emscripten has moved a lot of this stuff into internal implementation details on the wasm side so I'm hoping that exporting it is no longer needed in order to run an emscripten-built module. What do you think? Could you confirm this for me? |
a1514af
to
fc381e8
Compare
For example, implementing malloc or sbrk outside of the wasm module previously required this information, but those functions are now always part of the module itself. |
fc381e8
to
4d8b58b
Compare
See #12231 |
@@ -19,7 +18,7 @@ | |||
# NB: major version 0 implies no compatibility | |||
# NB: when changing the metadata format, we should only append new fields, not | |||
# reorder, modify, or remove existing ones. | |||
EMSCRIPTEN_METADATA_MAJOR, EMSCRIPTEN_METADATA_MINOR = (0, 3) | |||
EMSCRIPTEN_METADATA_MAJOR, EMSCRIPTEN_METADATA_MINOR = (1, 0) |
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.
1 as the major version indicates stability (see line 19/18) - probably we don't want that?
4d8b58b
to
1a6c680
Compare
We are moving away from the world where the memory layout if decided by the python driver code and towards a world where the wasm-ld decides the final layout. For relocatable module (SIDE_MODULE and MAIN_MODULE) the size and alignment of memory and table segments is already encoded in the `dylink` sections. For non-relocatable modules I don't think this information is needed by the embedded as they can simply look at the requirements on the table and memory that a given module imports. In general symbols like `__global_base` or `__data_end` and `__heap_base` are details we don't export by default but can be explictly exported if needed.
1a6c680
to
0c5e0fb
Compare
We are moving away from the world where the memory layout is
determined by the python driver code and towards a world where
the wasm-ld decides the final layout.
For relocatable module (SIDE_MODULE and MAIN_MODULE) the size
and alignment of memory and table segments is already encoded
in the
dylink
sections.For non-relocatable modules I don't think this information is
needed by the embedder anymore.
Symbols like
__global_base
or__data_end
and__heap_base
aredetails we don't export by default but can be explicitly exported if needed.
This is part of an effort to completely remove DYNAMIC_BASE.