Linker

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
pskyboy

Linker

Post by pskyboy »

Hey Guys

What linkers are people using? I have been using the DJGPP verison of LD.exe and that was working fine but when i switched to trying to use the Linker with MinGW i get

cannot perform PE operations on non PE file.

Does anyone know how to get it to stop these operations ?

cheers
Peter
jamescox3k

Re:Linker

Post by jamescox3k »

My advice to you is to continue using DJGPP or install Linux and use the standar ld that come with your distribution.

I found Linux to be a very easy OS Dev environment.

I'm using SuSE Linux Pro, it came with
* mtools
* gcc
* nasm
* bochs
* 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:Linker

Post by Pype.Clicker »

pskyboy wrote: Hey Guys

What linkers are people using? I have been using the DJGPP verison of LD.exe and that was working fine but when i switched to trying to use the Linker with MinGW i get

cannot perform PE operations on non PE file.

Does anyone know how to get it to stop these operations ?

cheers
Peter
It has been answered tons of time on this forum ... i think the workaround is to link to a PE and then use OBJCOPY to binary rather than using -fbinary ...

but i can't be 100% sure as i don't use cygwin myself.
May the Search Button be with you :)
Chris Giese

Re:Linker

Post by Chris Giese »

pskyboy wrote: What linkers are people using? I have been using the DJGPP verison of LD.exe and that was working fine but when i switched to trying to use the Linker with MinGW i get
Wait a minute. Are you using the MinGW linker with DJGPP? This is not a good idea, to put it mildly. DJGPP COFF .o files and Win32 PE COFF .o files appear to be identical, but they are not. In particular, the relocations work differently. MinGW ld may accept DJGPP .o files without complaint, and DJGPP ld may accept MinGW .o files, but the resulting executable file won't work.
_mark

Re:Linker

Post by _mark »

Anyone else using JLOC. I have found it to be extreamly easy to use. My hats off to J. Fine for this peice of freeware. The nice thing about it, it does exactly what you tell it to. There is no guessing as to what it does behind your back. I just wish the source was available for it.

_mark()
Post Reply