-
Notifications
You must be signed in to change notification settings - Fork 65
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
Have linking look for .imports
alongside each .a
.
#35
Comments
LLD change: https://reviews.llvm.org/D41922 |
Clang driver change: https://reviews.llvm.org/D41923 |
waterfall change: WebAssembly/waterfall#309 |
musl change: jfbastien/musl#34 |
This seems fine for the short term, seems like a better/more general mechanism than |
Funny, I have a branch I haven't yet turned into a PR where I was thinking along the same lines! I was going to take the easier route of renaming the (extremely generic) "wasm.syms" to "libc.syms". But I hadn't considered removing the |
This allows libraries to supply a list of symbols which are allowed to be undefined at link time (i.e. result in imports). This method replaces the existing mechanism (-allow-undefined-file) used by the clang driver to allow undefined symbols in libc. For more on motivation for this see: WebAssembly/tool-conventions#35 In the long run we hope to remove this features and instead include this information in the object format itself. Differential Revision: https://reviews.llvm.org/D41922 llvm-svn=322320
See: WebAssembly/tool-conventions#35 Differential Revision: https://reviews.llvm.org/D41923 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322321 91177308-0d34-0410-b5e6-96231b3b80d8
See: WebAssembly/tool-conventions#35 Differential Revision: https://reviews.llvm.org/D41923 llvm-svn=322321
See: WebAssembly/tool-conventions#35 Differential Revision: https://reviews.llvm.org/D41923 git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@322321 91177308-0d34-0410-b5e6-96231b3b80d8
We can use `.imports` files next to the `.a` files, and have the linker pick them up automatically. See WebAssembly/tool-conventions#35
Currently we rely on the clang driver adding
-allow-undefined-file wasm.syms
along with-lc
. Without this (if -lc is used on its own) symbols such as syscalls will cause the link to fail.I propose that we have the linker looks for an optional
.imports
files alongside each library can can list symbols which that library expects the wasm embedder to provide. We can then renamewasm.syms
tolibc.imports
and remove the-allow-undefined-file
from the driver.The text was updated successfully, but these errors were encountered: