that's what -ffreestanding and others (-nostdlib) are for.
C is not cheating, the compiler assumes you work on user level stuff. Want to write bare metal (kernel) then you need to tell the compiler.
C is not cheating, the compiler assumes you work on user level stuff. Want to write bare metal (kernel) then you need to tell the compiler.
Strictly speaking that isn't proper C as defined by ISO/IEC 9899:2018.