twiggy icon indicating copy to clipboard operation
twiggy copied to clipboard

Use the wasm relocations custom section if available

Open fitzgen opened this issue 7 years ago • 1 comments

It will actually tell us which functions are using which data. The parity_wasm crate also parses the relocations section, so it shouldn't be too hard to add support for.

If we did this, and our results are noticably better when we have relocations, then we should also document how to build rust to wasm and preserve relocations.

fitzgen avatar Jun 25 '18 21:06 fitzgen

👋 This is a problem I frequently have. Relocations can cause nonsensical results in twiggy paths for data ownership. My workaround has been to decompile to wat and inspect the data section manually, but this is time consuming.

I'm interested in working on this feature. Can you point me in the right direction for building Rust to WASM with a relocations section?

kjvalencik avatar Jun 17 '22 12:06 kjvalencik