What should the memory layout look like for wasm modules? (original) (raw)

Currently wasm's linker, LLD, largely decides the memory layout for wasm modules and how items interact in the module's memory address space. We should either (a) decide that LLD's layout is ok or (b) figure out a different layout for ourselves and work with that!

Currently with LLD it looks like:

That's quite a small stack! It looks like LLD has options to change the start of data --global-base but I don't see an option to change the stack. That probably needs to change! - turns out -z stack-size=1024