Ian Lance Taylor wrote:

Greetings, Ian, et all.


You want to convert from .obj
files, presumably in the Windows PE/COFF object file format, to object
files in the ELF file format?  If you want to do that conversion, then
subtracting 4 from the contents of the section for PC relative relocs
is the least of the issues you are going to have to deal with.

Yes, that's the crux of it.

As of late yesterday evening, we've been able to get this to work by linking the .obj (PE/COFF) files with ld emitting a PE executable, and then using objcopy to convert to the final ELF executable.

Binutils 2.16.1 compiled with "--enable-targets=i386-pe" on a Linux box.


What we had been doing prior was attempting to bypass the objcopy step
and have ld perform the conversion from PE/COFF to ELF directly (with
the appropriate switches, of course).  It's at this point that the reloc
issue popped up.

So, is it safe to assume that attempting the conversion using ld alone will not produce a working ELF file in our case? That instead we should use objcopy to produce the final file?

Thanks for your time and patience,

Armando Rivera




_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to