Closed jwasinger closed 5 years ago
check if a start section is present. If not, just quit.
Already implemented as described.
check if an export named main exists. If yes, start (recursively) rename so that there is no main function.
I have a comment in the code because I wasn't sure whether to expect the module to be validly formed when remapstart
is run. But I see now that I will have to make a change to fail without panicking when main export is not found.
Also, I'm not sure that implementing this with recursion is much cleaner than what I am currently doing?
insert a new export called main which points to the same function index what the start section was using
Already implemented as described.
remove the start section
Already implemented as described.
Lets simplify my last comment https://github.com/wasmx/wasm-chisel/pull/107#pullrequestreview-245932155:
As a way to organise I'd say it should:
main
exists. If yes, remove that entry from the export section.main
which points to the same function index what the start section was using@jwasinger can you squash this to a single commit?
Fixes https://github.com/wasmx/wasm-chisel/issues/99