Skip to content

Resolve symbol collisions among Wasm runtimes #139

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

Closed
mathetake opened this issue Mar 10, 2021 · 3 comments · Fixed by #258
Closed

Resolve symbol collisions among Wasm runtimes #139

mathetake opened this issue Mar 10, 2021 · 3 comments · Fixed by #258

Comments

@mathetake
Copy link
Contributor

Migrated from envoyproxy/envoy#14012.

The more runtime we have, The more we want to have single binary to, at least, benchmark all at once.

Using objcopy --prefix-symbols on all the object files of runtimes might be a solution, though I'm not sure what changes would be necessary to be applied to C++ interfaces (V8 and WAVM for examples). Changes to the C interfaces would be trivial.
And This might have side effects in the final binary size?

Relevant to #113

@mathetake mathetake changed the title resolve symbol collisions among Wasm runtimes Resolve symbol collisions among Wasm runtimes Mar 10, 2021
@PiotrSikora
Copy link
Member

I'm all in for fixing this issue, but do we have any real use case for it, other than benchmarks?

@mathetake
Copy link
Contributor Author

No, I don't have any specific real use case. So this is going to be my weekend task when I have time until the real necessity comes up.

@mathetake
Copy link
Contributor Author

mathetake commented Mar 14, 2021

I found that --prefix-symbols cannot be used for this purpose since it literally prefixes every symbol and we end up having something like my_prefix_pthread_mutex_unlock which is a mess. Instead, we can use redefine-sym for renaming every duplicated symbol and leaving others intact. I have a prototype in my local machine. Though I am not sure what we can do for Windows.

PiotrSikora added a commit to PiotrSikora/proxy-wasm-cpp-host that referenced this issue Feb 10, 2022
Fixes proxy-wasm#139.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
PiotrSikora added a commit that referenced this issue Feb 17, 2022
This is intended for benchmarks and development, not for production.

Fixes #139.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants