ld: PE operations on non PE file
Posted: Fri Apr 04, 2003 10:08 am
I was trying to compile a simple kernel like in the mega-tokyo os faq.
int main() {
}
I run:
gcc -c main.c
then I try to link,
ld --oformat binary -Ttext 1x100000 -o kernel.bin main.o
However I get the error - ld: PE operations on non PE file.
What is wrong? How do I fix this? When gcc -c is run does it format the .o file for pei386 automatically? If so, is there an argument I can pass to gcc at compile time?
int main() {
}
I run:
gcc -c main.c
then I try to link,
ld --oformat binary -Ttext 1x100000 -o kernel.bin main.o
However I get the error - ld: PE operations on non PE file.
What is wrong? How do I fix this? When gcc -c is run does it format the .o file for pei386 automatically? If so, is there an argument I can pass to gcc at compile time?