3 ms·
For example: https://github.com/ipankajg/ceed/blob/master/src/ceedpe.c https://github.com/ipankajg/ceed/blob/master/src/ceedpe.c While other small compilers st
by anta40 3y ago
For example:
https://github.com/ipankajg/ceed/blob/master/src/ceedpe.c https://github.com/ipankajg/ceed/blob/master/src/ceedpe.c
While other small compilers still rely on gcc/llvm/etc to build the actual executable.
Looks interesting.
- foldr 3y agoIt is indeed quite fun and educational to figure out how to construct an executable from scratch. I managed to do it for MachO and ELF executables a while back, and got some 'Hello World' style programs working. Ten or twenty years ago it would have been a bit easier, but modern executables are quite complex – especially if you are dynamically linking libc. As a strategy for implementing a compiler it does introduce a heavy maintenance burden. MacOS, for example, is constantly adding new requirements on valid executables and will often refuse to execute perfectly valid executables from only a few versions back.