Mingw & elf

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Guest

Mingw & elf

Post 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.
Poseidon

Re:Mingw & elf

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Mingw & elf

Post 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.
Post Reply