4 ms·
This program uses for example printf, which is provided by libc, so it needs some form of libc to run.
by chrisseaton 8y ago
This program uses for example printf, which is provided by libc, so it needs some form of libc to run.
- saagarjha 8y agoIt’s easy to swap out the limited use of printed in this program, which just prints strings and integers, with a short loop and a syscall. Like I said, nobody needs libc; it’s just convenient to use.
- chrisseaton 8y agoThis program, as it is written, needs libc to run. It would not run without a libc. If you wrote a different program, that didn't use libc, then it would not need libc, that is correct. But would that program fit on a post card?
- saagarjha 8y agoThat’s my argument: it probably could; I think it would be a dozen or so more characters.
- chrisseaton 8y agoEven the AMD64 instruction names alone for fabsf, sqrtf, powf, fmodf, will add up to more than a dozen characters. That's before you implement rand and printf. I'm skeptical.