Bootloader in C won't compile

后端 未结 5 1962
你的背包
你的背包 2021-01-30 04:30

I am a newbie in writing bootloaders. I have written a helloworld bootloader in asm, and I am now trying to write one in C. I have written a helloworld bootloader in C, but I ca

5条回答
  •  Happy的楠姐
    2021-01-30 05:20

    I tried this a few years ago -- options may have changed.

    You have to run gcc with -ffreestanding (don't link) and then link using ld with the flags -static, -nostdlib

提交回复
热议问题