-
Notifications
You must be signed in to change notification settings - Fork 691
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
wat2wasm --relocatable should record exports in linking symtab #1534
Comments
wingo
added a commit
to wingo/wabt
that referenced
this issue
Sep 8, 2020
This commit refactors the representations of symbols in the binary writer. It will allow us to fix WebAssembly#1534 in a followup.
To fix this, I could either add an "exported" flag to the various IR nodes, and use it when recording symbol references in the binary writer, or I could precompute a side table in the binary writer if we are doing --relocatable. I guess it's easier to reason about a side table, compared to a mutable flag, so I'll take that approach. |
wingo
added a commit
to wingo/wabt
that referenced
this issue
Sep 9, 2020
This commit refactors the representations of symbols in the binary writer. It will allow us to fix WebAssembly#1534 in a followup.
wingo
added a commit
to wingo/wabt
that referenced
this issue
Sep 9, 2020
This commit refactors the representations of symbols in the binary writer. It will allow us to fix WebAssembly#1534 in a followup.
binji
pushed a commit
that referenced
this issue
Sep 10, 2020
This commit refactors the representations of symbols in the binary writer. It will allow us to fix #1534 in a followup.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider
a.c
which exports a function that calls something fromb.c
:With clang and wasm-ld, we can make a wasm file:
Let's say we want to replace
a.c
with a wat file.OK great. However:
That is to say: dude, where's my export (of
a
)?The problem is that in the a.o as produced by clang, the linking and reloc sections look like this:
Whereas as produced by
wat2wasm
, they look like this:I know that on #1137 there is a question about whether to keep up the functionality of --relocatable at all, but I think that with a couple of bug-fixes it can be usable enough for me, so I will take a look at fixing this unless there's an objection.
The text was updated successfully, but these errors were encountered: