4 ms·
Prior art: Debian used to shrink libc for the use in their installer. The code is still available at https://salsa.debian.org/installer-team/mklibs/-/tree/maste
by patrakov 3y ago
Prior art: Debian used to shrink libc for the use in their installer. The code is still available at https://salsa.debian.org/installer-team/mklibs/-/tree/master https://salsa.debian.org/installer-team/mklibs/-/tree/master
It works by keeping an ar archive with PIC objects that would normally go into libc.so.6, determining all symbols used by all programs in the Debian installer, then mapping these symbols to objects, and linking a new libc.so.6 containing only the needed objects.