wasm-merge tool#919
Merged
Merged
Conversation
Member
Author
Member
Author
|
This has been refactored a lot, and is hopefully in nice-enough shape to look at more closely. In particular we were discussing using this as a basis for more linking stuff, so let me know how that looks. |
Member
Author
|
Merging, there seem to be no concerns here, and this functionality would have been useful in a recent emscripten mailing list discussion where someone was trying various linking mechanisms. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a new tool,
wasm-merge. It merges the inputs in a simple way into a single output, just making sure they don't trample over each other, so colliding internal function names are fixed up, etc.This doesn't do any real linking - no relocations, aliases, individual static allocations, etc. - hence the name "merge" and not "link". It is meant to help with debugging in the same way that
llvm-linkdoes in llvm (but with an even more limited set of uses).Perhaps it makes sense to share code with the
wasm-linkerfunctionality? That supports general linking and is tied tos2wasm, so I didn't see a natural way and started out with separate code, but let me know if there's a better way.