4 ms·
glibc cannot be linked statically.[1] Compile hello world against musl libc with -static and you get an 8kb binary. [1] https://sourceware.org/glibc/wiki/FAQ#E
by mahkoh 8y ago
glibc cannot be linked statically.[1] Compile hello world against musl libc with -static and you get an 8kb binary.
[1] https://sourceware.org/glibc/wiki/FAQ#Even_statically_linked_programs_need_some_shared_libraries_which_is_not_acceptable_for_me.__What_can_I_do.3F https://sourceware.org/glibc/wiki/FAQ#Even_statically_linked...
- dottrap 8y agoHere's another link which compares musl, uClibc, dietlibc, and glibc sizes, features, and performance. http://www.etalabs.net/compare_libcs.html http://www.etalabs.net/compare_libcs.html It says musl's smallest static C program can be 1.8k as opposed to glibc's 662k, showing libc doesn't always have to be big and bloated.