Don't forget the linker script:
https://github.com/jart/cosmopolitan/blob/master/ape/ape.lds
It has a longform explanation in the comment at the top.
https://github.com/jart/cosmopolitan/blob/master/ape/ape.lds
It has a longform explanation in the comment at the top.
https://github.com/jart/cosmopolitan/blob/master/ape/ape.S
It is very commented, in a good way.