So I'd like to be able to compile static (+crt-static
) binaries utilizing the uclibc-ng
library. I'm the maintainer for tier 3 target armv7-unknown-linux-uclibceabi. uclibc-ng like musl is friendly to creating completely static binaries, I do it all the time with regular c/c++ code. The issue right now is that anything more complicated than a 'hello world' program in rust will segfault. I think there must be some tweaking to achieve this for uclibc-ng.
One of the first issues I see is the what is being passed to the linker while using -Ctarget-feature=+crt-static
. I would expect to only see -Wl,-Bstatic
which is what it shows for the majority of the native target libraries (-lc,-lpthread etc) , but -Wl,-Bdynamic
is also showing up with -ldl
. I created a wrapper script for the linker which removes -Wl,-Bdynamic
. Running that through gdb I see the segfault message says 0x00d38f28 in dlsym ()
Seem like there still some dynamic linking logic going on still, and now I'm not sure where to look from here.
thanks,
Lance
edit: When dynamic linking everything is working perfectly.