compile and link objects with mingw, g++, gcc, ld -
compile and link objects with mingw, g++, gcc, ld -
i'm next istructions found here compile os kernel. unfortunely error , don't know do:
gcc boot.o kernel.o -t linker.ld -o kern - nostdlib -nodefaultlibs -lgcc
yields this:
boot.o: in function `start': boot.asm:(.mbheader+0xe): undefined reference `kernel_main' collect2.exe: error: ld returned 1 exit status
everything same except replaced loader.o boot.o (it seems me mistake, loader.o not mentioned anywhere on page).
how can create work?
c++ name mangling calling kernel_main else.
i defined function extern "c" recompiled , opened object. saw actual function name _kernal_main. opened boot.asm file , referenced name.
gcc mingw ld
Comments
Post a Comment