4 ms·
Its also useful for creating statically linked executables, which is usually not possible with glibc if you use certain functions (getaddrinfo?).
by edwintorok 11y ago
Its also useful for creating statically linked executables, which is usually not possible with glibc if you use certain functions (getaddrinfo?).
- nadams 11y agoI always thought you could statically link glibc - but your executable will be huge as it needs to pull in the entire plus extras. Regardless - I'm glad I'm not the only one who is concerned about binary sizes.
- alanpost 11y agoIME you can statically link glibc, but your statically linked binary will still call ld.so.
- mcguire 11y agoThe NSS stuff? And something else? There's some specific things that are supposed to be modular library-wise.
- edwintorok 11y agoI think you usually get a warning at link-time if you try to statically link GCC and use a function that requires matching libc version at runtime, getaddrinfo was the one I remembered but there are certainly more functions like that: x.c:(.text+0x85): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking