Hacker News new | past | comments | ask | show | jobs | submit login

I built a linux on a floppy about 20 years ago, with a number of ethernet drivers built in (the common ones of the day, some 3com, tulip and a few others), X11 (tinyx with vesa fb, so close to universal support then, just not accelerated) with vnc and rdesktop. i.e. a thin client on a floppy.

it was a demonstration on how one dynamically compile (for smallest binaries), but then "reassemble" libc to only include the symbols needed for the actual applications. I demonstrated doing this with uclibc which didnt need the help as much as well as glibc (which if my memory serves me correct was basically close to the size of the floppy by itself). if all the binaries were statically linked, they would have been too big (because of duplication of symbols between them), but by essentially stripping libc of unneeded symbols, was able to create an embedded system that worked perfectly.

It might be a bit harder today for the same reason its hard to actually statically link glibc today. glibc at runtime can do dynamic loading itself, even if statically linked into the binary.




> if all the binaries were statically linked, they would have been too big (because of duplication of symbols between them)

Apropos of this, another solution I've seen (more of a dirty trick, but also greater space savings) is to build libc as a fixed chunk of page-aligned memory, and then de-duplicate the underlying disk sectors between different executable files. Works pretty well, assuming a read-only or cooperative filesystem.


I did the similar thing at uni, there was an arts lab with a bunch of dos only pcs that were never used, my boot disk had minimal Linux and X to start a remote session to the beefy alpha servers.




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

Search: