$ cat hello.c
#include <stdio.h>
int main() {
printf("hello world!\n");
}
$ gcc -o hello hello.c
$ ldd hello
linux-vdso.so.1 (0x00007ffff9da0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed449d0000)
/lib64/ld-linux-x86-64.so.2 (0x00007fed45000000)
$ gcc -o hello hello.c -static
$ ldd hello
not a dynamic executableIf you're the kind of person who wants static linking then you really don't want these features.
The real problem is that statically linked programs under Linux don't (didn't?) support VDSO, which means that syscalls like gettimeofday() are suddenly orders of magnitude slower.
In the end, we had to do a kind of pseudo-static linking - link everything static except glibc.
glibc is GPL licensed, and the GPL explicitly forbids statically linking to it unless your code is GPL too.
Thus any non-GPL project has it's license tainted by the GPL if you statically link it.
It's not a technical limitation, it's a legal one.
It's FUD.
See here -
https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynami...