objcopy problem with pe-i386 ?

H. J. Lu hjl@lucon.org
Wed Oct 15 16:50:00 GMT 2003


On Wed, Oct 15, 2003 at 09:39:40AM -0700, Ian Lance Taylor wrote:
> JIRO TERAKAWA <tera@tera-tech.com> writes:
> 
> > I'm trying to convert object files compiled by Microsoft VisualC++6.0
> > into elf32-i386 using objcopy on Linux host.
> 
> In general you can not convert relocateable object files from format
> to another.  In general it is not possible to convert the relocation
> information.  Sorry.

If the ABI of your MS VC++ compiled relocateable files is compatible
with Linux, you may just link them directly. You need to enable
i386-pe in your linker and use

# objcopy --remove-leading-char foo.o

to remove the leading '_' in foo.o. The Linux binutils binary on
www.kernel.org has i386-pe enabled.


H.J.



More information about the Binutils mailing list