What's the point of statically linking libc? I've gotten the picture that there really aren't systems that don't have libc. Or is it just that dynamic linking is bad overall in some sense?
Pardon my possibly inaccurate wording, I'm still pretty new to low level stuff like this.
@neon many who push static linking propose that the latter is true, and that dynamic linking is harmful and should not be used in the majority of situations
on systems with a sanely designed libc (ie, not glibc) you often end up with better performance and lower memory usage than if you dynamically link (despite dynamic linking supposedly being better for those things)
@scarlett but it doesn't replicate the internal glibc headers that a lot of applications use even though they're not supposed to, it doesn't replicate a lot of gnu extensions
it does expect a compiler with __asm__
it does maintain a minor level of abi compatibility with glibc but all except the simplest applications will probably break if you try to drop it in place
@ky0ko Oh, that's good! When I first read about statically linking with Rust* I saw that you could statically link with musl, and wondered why that, not just your system libc. I guess that explains it!
* Well, it links rust dependencies statically by default, but like properly statically linking everything.
@kurisu Does this have something missing? https://doc.rust-lang.org/1.9.0/book/advanced-linking.html#static-linking