How to make an OS
They actually wrote a guide on making an OS: https://repl.it/talk/learn/A-beginners-guide-to-OS-Dev-Part-1/33328
That is a good guide, for setting up the bare minimum of a OS.
There is much much more to an OS than just aligning data sections and compiling.
That guide just explains how to get the basic setup of the OS going.
Also, usually C is also used to develop an OS since it's low-level.
For Example: Linux