This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Adjusting relocation addends with objcopy
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Steve Freeland <caucasatron at yahoo dot ca>
- Cc: binutils at sources dot redhat dot com
- Date: 24 Nov 2003 10:56:36 -0500
- Subject: Re: Adjusting relocation addends with objcopy
- References: <20031124134716.8368.qmail@web40512.mail.yahoo.com>
Steve Freeland <caucasatron@yahoo.ca> writes:
> What I'm trying to do is this: I'm attempting to make use of the code
> in a Windows-built relocatable PE/COFF object file (.obj) for a build
> on Linux, so I'm attempting to use objcopy to convert it over the ELF
> format. I have no idea if this is realistic, but hey.
In general you can not use objcopy to convert object files. In
general it is not possible to convert relocation information.
What you may be able to do instead is to build the ELF linker with
support for PE/COFF, and to simply use your PE/COFF file as linker
input. This linker feature is rarely used, and may not work.
Note that if your object file uses dllexport or dllimport, it is very
unlikely that you will be able to get it to work on GNU/Linux.
Ian