-
Notifications
You must be signed in to change notification settings - Fork 11
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
Translator for start function (remapstart) #99
Comments
Gonna take this one on |
What do you mean by this? Referring to the pwasm API I am guessing. |
https://github.com/wasmx/wasm-chisel/blob/master/libchisel/src/trimstartfunc.rs |
@axic I see no real reason to drop the names section, as export names are unique. The names section exists solely as a custom section to aid debuggers and other binary tools. |
The reason is that we were lazy to check if the exported names are duplicated in the names section. |
They aren't, and the names section doesn't seem to matter anyway. Maybe introducing another module for that later would make more sense (as opposed to implicit behavior in |
We have another which removes sections. It does matter because we don't want to generate an invalid output. This is the spec: https://webassembly.github.io/spec/core/appendix/custom.html#name-section |
Agreed that other transformations changing the export section don't deal with the names section. We should clarify this and fix if needed, but we can do it after remapstart. |
Rename the function pointed to by the start section to
main
. If there is another function namedmain
, rename it (prefix it with_
) to avoid conflict – if there this conflicts with another function, keep adding underscore prefixes until it won't.Remove the start section. (See
dropstartfunction
.)The text was updated successfully, but these errors were encountered: