
11 Mar
2020
11 Mar
'20
2:06 a.m.
Nutr1t07
On 3/10/20 5:21 PM, Niklas Hambüchen wrote:
that's right, you cannot statically link against glibc, especially not networking code, without getting crashes. Sorry to mention again, but I wonder why cannot link *especially networking code*? Because if I remove the networking part of my codes it seems to run well.
It's because glibc's NSS (name service switch) relies on dynamic linking whatever you do. https://stackoverflow.com/questions/3430400/linux-static-linking-is-dead See also `info libc "Name Service Switch"` on a system with texinfo installed, or the corresponding node in the glibc documentation online. -- Jack