3 ms·
Theoretically, the compiler can form a complete "statically-linked" executable, and even sidestep libc to use kernel APIs. Golang tends towards this. This may d
by nine_k 5y ago
Theoretically, the compiler can form a complete "statically-linked" executable, and even sidestep libc to use kernel APIs. Golang tends towards this. This may diminish if not eliminate the role of linking.
The case of VM-based languages is entirely out of purview of the system linker, too.
- titzer 5y ago> Theoretically, the compiler can form a complete "statically-linked" executable, and even sidestep libc to use kernel APIs. This isn't theoretical, it's exactly how Virgil generates binaries for x86-darwin, x86-linux, and x86-64-linux. The output is just one binary and no C environment. No C libraries for anything. Instead, the Virgil compiler knows the kernel ABI for the target and library code (written in Virgil) implements a thin portable layer directly in terms of syscalls using raw pointers.
- junon 5y agoAgain, that's if the compiler is the only thing contributing object code to the final executable...