skeeto/scratch

Better way to -nostdlib

Opened this issue · 2 comments

Saw your recent threading blog on HN. The Linux kernel now has a nolibc header that takes care of a lot of SYSCALL interfacing.

https://github.com/torvalds/linux/blob/master/tools/include/nolibc/nolibc.h

Several years back, I took a crack at this for Ubuntu and i386, x86_64 (https://github.com/lpsantil/rt0). I should update it to work on Fedora. I had some notes about that somewhere.

rt0 is very, very minimal. I reference a bunch of other work I learned from in writing rt0. Maybe combine your ideas, my ideas, and nolibc. I tend to only care about ARM, ARM64, i386, and x86_64 these days.

Funny, I think I was inspired to write rt0 after reading some of your older blogs.