On Linux, you don't need C at all since you can interface with the kernel directly. The ABI is stable and simple enough that a new programming language could have a system_call keyword that makes the compiler emit the system call code.
With this one piece of functionality, it's possible to do literally anything on Linux. No need for C libraries and their legacy at all. The hardest part will be describing the Linux user space API data structures in the new language so that they can be passed to and from the kernel.
There are no such considerations when issuing Linux system calls. You place parameters in specific registers, trap into kernel mode and then read back the result from a specific register.
There is one MIPS architecture where you have to pass some arguments on the stack but that's about it.
> vdso are C-ABI objects
Yes, unfortunately. It is not necessary to use the vDSO though. It is a performance optimization. The normal system calls will work just fine.
Well, alright, but then you still need to parse C to be able to divine the shape of the data structures, as they're defined in C (or you have to make some assumptions).
Yes. Fortunately, these definitions are significantly less complex than libc stuff. They all use typedefs prefixed with __kernel that are defined in asm and asm-generic headers.
The Linux kernel headers with all relevant structure definitions are here:
TBF, the whole point of any ABI is that you don't need a specific programming language to call into functions implementing that ABI, could even use assembly.
“C isnt a programming language, it’s a protocol”
https://faultlore.com/blah/c-isnt-a-language/
https://news.ycombinator.com/item?id=33509223