Comment by ben_bai
7 years ago
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.
7 years ago
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.
Right, as mentioned on my comment, compiler extensions.
Strictly speaking that isn't proper C as defined by ISO/IEC 9899:2018.