ld: cannot perform PE operations on non PE output file.
Posted: Thu Nov 03, 2011 7:01 pm
I decided to start migrating from assembly language to C for OSdev. I have MinGW installed on my Win7 laptop, and I have been trying to build my kernel, and I am getting the error message above. I have a batch file set up to build everything. The link command is like so:
ld -Ttext 0x10000 --oformat binary -o kernel.bin kernelstart.o kernel.o
How can I get my linker to link the files properly? I think I may need to make a cross-compiler (I even kind of know what that means), and I read the wiki page on GCC Cross-Compiler, but I have no idea how to make one. I looked at crosstool, but it was still full of confusing *nix gobbledy-gook. If I make a cross-compiler, I know I my host is Win7, but I have no idea what my target would be. I would appreciate someone who has done OSdev on Windows to help me with this.
ld -Ttext 0x10000 --oformat binary -o kernel.bin kernelstart.o kernel.o
How can I get my linker to link the files properly? I think I may need to make a cross-compiler (I even kind of know what that means), and I read the wiki page on GCC Cross-Compiler, but I have no idea how to make one. I looked at crosstool, but it was still full of confusing *nix gobbledy-gook. If I make a cross-compiler, I know I my host is Win7, but I have no idea what my target would be. I would appreciate someone who has done OSdev on Windows to help me with this.