Description
i noticed current musl target doesn't support dynamic linking:
i was working to make an executable shared lib, but linked statically with musl, so that the library doesn't expect glibc from host system, and it can also be called from other languages dynamically. i was hoping dylib or cdylib for musl target is going to help me with that.
i also tried the following:
i follow the tutorial here: https://doc.rust-lang.org/book/advanced-linking.html#linux
and at the end of the compilation, instead of an executable, i chose staticlib as crate-type.
the above steps work fine.
after getting the staticlib .a file, i was trying to use:
musl-gcc -shared -o libexample.so -Wl,--whole-archive libexample.a
to convert the staticlib to dynamic lib, but no luck.
bunch of multiple definitions and missing definitions error.
is this even possible with musl? a shared lib with musl statically linked?