Errors with linkers and stuff
Posted: Thu Dec 22, 2011 10:28 am
Hi.
I am having a problem following a tutorial (http://www.osdever.net/tutorials/view/w ... e-c-kernel). I have done everything and understand it all. My problem is that I am using Widows (MinGW) and my ld gives error:
The relevant compilation code is:
I have made some minor edits to the code given in the tutorial (my own cls and putstr in 32bit asm) but the main part is similar (with _kmain etc). I believe it is a problem with the MinGW ld. I found another topic with a similar problem. The fix for this however, relied on cygwin. Can anybody help?
I am having a problem following a tutorial (http://www.osdever.net/tutorials/view/w ... e-c-kernel). I have done everything and understand it all. My problem is that I am using Widows (MinGW) and my ld gives error:
Code: Select all
ld: cannot perform PE operations on non PE output file '..\filesystem\kernel.bin'.
Code: Select all
"C:\Program files\nasm\nasm.exe" -f elf32 kernel.asm -o ..\filesystem\kernel.o
gcc _kernel.c -c -o ..\filesystem\kn.o
ld -T link.ld ..\filesystem\kernel.o ..\filesystem\kn.o -o ..\filesystem\kernel.bin