-
Notifications
You must be signed in to change notification settings - Fork 12
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
Make symbol linkage weak in certain cases #11
Comments
I had some issues with weak linkage for these symbols before (as well as malloc, free, etc) when compiling on a much older nightly. If you're able to make this work, I'd certainly be happy. Although we'd want some way to test the weak linkage on Travis now that libc-test has been submodule'd. I'm not really sure it matters how link args are handled on Windows or Mac -- (m|r)usl only supports Linux, and even if cross compiling is useful we wouldn't want the symbols to stop being weak when cross compiling. I guess this also gets at a broader question of platform compatibility, but since Linux is the only environment I'm aware of with a stable syscall ABI, I don't see it being very useful to compile rusl for other platforms. Your thoughts? |
I think the linkage feature is broken in rustc. I annotated all the symbols, just like in |
Looks like the progress here is being tracked in rust-lang/rust#29603, although that doesn't reference any issues which explicitly list it as broken. |
Closed by #15 |
Musl makes the linkage of some symbols weak (using
weak_alias(foo, bar)
). Currently, the list of symbols which don't have weak linkage attributes looks like this:clock_gettime
madvise
__vm_wait
mmap
mmap64
mremap
munmap
stpcpy
Weak linkage is a feature of ELF binaries, so it's not supported in Windows or Mac OS X. It should be as simple as an attribute like so on the above functions:
And an attribute like so to enable the
linkage
feature:See the Rust reference and
rlibc
repository for more.The text was updated successfully, but these errors were encountered: