-
Notifications
You must be signed in to change notification settings - Fork 67
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
DynamicLinking.md: add notes about memory/table exports #234
base: main
Are you sure you want to change the base?
Conversation
This is my attempt to capture the discussion in WebAssembly#232
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.
LGTM % comments
DynamicLinking.md
Outdated
### Note for memory/table exports | ||
|
||
The commonly used C conventions including WASIp1 require modules to | ||
export the "memory" memory and the "__indirect_function_table" table. |
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.
Use backticks here instead of quotes?
|
||
On the other hand, non-PIE executables need to export these instance | ||
resources as usual. | ||
|
||
## Implementation Status |
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.
I wonder if we can/should add something under this header for wasi now?
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.
do you mean to update the implementation status section?
However, because PIE executables with this dynamic-linking convention | ||
are already importing these instance resources, it's redundant to | ||
export them as well. For that reason, for PIE executables, we don't | ||
require these resources exported. |
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.
Who is "we" here? If its WASI the perhaps this belongs in the wasi repo instead?
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.
i guess it should be in both. (wasi and here)
i added it here first because i feel the memory/table convention is more widely used than just wasi.
DynamicLinking.md
Outdated
export them as well. For that reason, for PIE executables, we don't | ||
require these resources exported. | ||
|
||
Shared libraries don't need to export these instance resoures either |
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.
"Shared libraries should also import these resources, since they share a memory and function table with the main module."
This is my attempt to capture the discussion in
#232