Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can, but it is not supported. Certain features (NSS, iconv) will not work.


> Certain features (NSS, iconv) will not work.

If 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.


I think the vDSO page is mapped into every process regardless of how the program is linked, although you may have difficulty using it.


Vdso is supported with static linking in Musl libc at least.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: