Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You for the most part don't need to rewrite anything. You can take the source code for most libc functions and compile them independently.


Musl libc has every function in a separate file, so if you statically link you just get what you use, modulo a number of functions that use each other. So building it yourself is not going to be much better.


Just a remark: If you find it confusing to scatter your code over too many small files with only one function each, look up "-ffunction-sections" on the gcc manual.


Both you and tptacek understand what it is I want. Apparently the musl author is on the same page too. Very good.

But note my goal is not to achieve "better" than what someone else has written.

My goal is having more control over the result and to practice assembly language programming. And... to eliminate some of the "overhead" I see.

Big difference between my handwritten assembly and what gcc generates. Regardless of which is "better" one is more succinct.

Perhaps I drifted a bit from the original blog post; I think the author may have just been trying to find a speed increase, rather than chasing after some sort of minimalist aesthetic.




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

Search: