-
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
Expose Code Section Offset #190
Comments
This crate in general is intended for wasm transformations, but would y'all's use case fall moreso into simply parsing? For something like that building on |
I first started using I think it's fine to close this issue, that said, |
Ah yeah unfortunately there aren't a ton of crates for representing "here's an API to the wasm module you just parsed". That sort of use though tends to be pretty context-specific and it's difficult to make "one API to rule them all" really. The That's not to say though that we couldn't add all this information to walrus. If it's the case that walrus is the best fit in the ecosystem for now (even if it's not the best fit for your use case theoretically), it seems fine to at least provide the information! I'd personally be totally fine with a PR to add "source information" to things like functions which would be optional (for created functions), but present on all decoded functions. |
Motivation
Currently you cannot learn about the in-WASM file offset of the code section. This is however necessary to make DWARF work as offsets in DWARF files are relative within the code section whereas back traces by browsers provide the absolute offset within the WASM file. To calculate the difference the offset of the code section is required.
Currently the only way to get this information appears to parse the file a second time with
wasmparser
:Proposed Solution
Keep track of the
CodeSectionStart
's range start in the module.Alternatives
Parse again as we're doing currently.
Additional Context
Some notes on why we need this can be found here: getsentry/symbolic#290
The text was updated successfully, but these errors were encountered: