News for hackers. Stuff that matters.
Re:Writing C software without the standard library by lolisamurai on Tuesday November 29, 2016 @11:25AM (#13064009)
Suppose you want to port to some architecture not supported by libc. If you were using libc you would have to find a replacement that works and targets that arch or port libc yourself. If you wrote everything from scratch, instead, you just have to read the specification and add support to your code. That's what I meant.

Of course, if your target archs are all supported by libc, porting is much easier with libc.

Re:Writing C software without the standard library by time4tea on Wednesday November 30, 2016 @01:28PM (#13073264)
Well, not if you expect that you will have exactly the same time/space behaviour and pre/post conditions.

This is why lots of embedded, secure and defense software doesn't use standard libraries, and printf will instead be called sio04583 or something....

Also.. Don't forget that you can get gcc to get rid of unused code when compiling static executables, and use sstrip (yes, two 's' - it's a different program) to strip even more, if it's an ELF binary...

Re:Writing C software without the standard library by sqeaky on Tuesday November 29, 2016 @01:33PM (#13065088)
Depending on the scope of your project porting libc itself might be good idea. Then you simplify porting any tools you need that also use libc. Then you can port a few extra dependencies, then more tools...
Re:Writing C software without the standard library by bogomipz on Tuesday November 29, 2016 @09:39PM (#13068010)
What are some archs that arent't supported by libc? Just embedded systems?