You know how I always say picolibc isn't a Linux C library because it doesn't do all of the fancy Linux stuff? Well, it turns out you don't need much to get a semi-functioning system.
$ size test-hello-picolibc test-hello-glibc
text data bss dec hex filename
3632 144 4656 8432 20f0 test-hello-picolibc
645697 23704 22576 691977 a8f09 test-hello-glibc
I blame Kees Cook for nerd-sniping me on this one.
@keithp With musl, gcc -Os -static hello.c, on stock Alpine x86_64:
text data bss dec hex filename
3893 344 1744 5981 175d a.out
@etchedpixels @dalias yeah, gcc converts printf("hello world\n") into puts("hello world");
That's one of the numerous optimizations present in "hosted" mode, which is why I always tell people to get rid of -ffreestanding when building with a full C library.
Btw, on armhf, hello world is way smaller than on x86_64:
$ size test-hello-armhf
text data bss dec hex filename
1520 76 4624 6220 184c test-hello-armhf