This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld problems on win32
- To: mr_jrt at hotmail dot com
- Subject: Re: ld problems on win32
- From: DJ Delorie <dj at delorie dot com>
- Date: Mon, 9 Jul 2001 19:44:14 -0400
- CC: binutils at sources dot redhat dot com
- References: <OE50JMXehYSoOZzHZlJ000027a7@hotmail.com>
Yup, it works that way. The --oformat option does override the
builtins, but your problem is that the linker just can't convert from
PE to ELF like that. If you're targetting a different system, you should
build a cross-compiler and cross-linker, which would produce ELF objects
and there would be no conversion.
The reason it breaks is because there's a lot of PE-specific
information that's stored in the objects and binaries, and ld needs to
preserve that somehow. It can't if the format changes, and the PE
backend (at least, for your linker) isn't smart enough to see if the
output file isn't PE.
> Supported emulations:
> i386pe
Does you linker even *support* ELF format? Try "ld --help" and see if
ELF is listed.