Page 1 of 1

Mingw & elf

Posted: Sun Apr 10, 2005 8:45 am
by Guest
Hello, i want use MinGW now, instead of DJGPP. I want create an elf file. But if i use the ld-elf from djgpp the call addresses are wrong. If i try to link to an elf with the MinGw linker i get this:

C:\MinGW\bin>ld --oformat elf32-i386 main.o
ld: PE operations on non PE file.


Pls help.

Re:Mingw & elf

Posted: Sun Apr 10, 2005 10:30 am
by Poseidon
there are lots of threads about this on the forum. The problem is that the djgpp, mingw, cygwin and all related stuff can't output to elf. If you really want to use that format, you have to build a cross-compiler (see the os-faq). You can also output to coff or exe, you have to add extra information to your multibootheader, if you're using GRUB.

Re:Mingw & elf

Posted: Mon Apr 11, 2005 4:30 am
by Pype.Clicker
due to other issues with mingw (http://www.osdev.org/osfaq2/index.php/MinGW), you may better like to use cygwin instead of mingw ...

And unless you have a real preference for ELF files, you can simply go with COFF or another natively-supported format.