This is the mail archive of the
mailing list for the binutils project.
Re: binary to elf conversion
- From: "H.J. Lu" <hjl at lucon dot org>
- To: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- Cc: binutils at sourceware dot org, Ralf Corsepius <ralf dot corsepius at rtems dot org>
- Date: Thu, 16 Aug 2007 11:45:38 -0700
- Subject: Re: binary to elf conversion
- References: <46C46561.firstname.lastname@example.org>
On Thu, Aug 16, 2007 at 09:55:29AM -0500, Joel Sherrill wrote:
> I think something broke for converting binary
> files to elf using objcopy. I know I did this before
> but can't seem to find a binutils that can do
> this now. I have tried both the RTEMS testing
> version (a pre 2.18 snapshot) and our
> stable repositories (something older)
> and neither is able to link with the object file produced by objcopy'ing
> a binary file to a .o.
> unknown architecture of input file `o-optimize/tarfile.o' is incompatible
> with powerpc:common output
> Produced by this command:
> powerpc-rtems4.8-objcopy -I binary -O elf32-powerpc tarfile
> I tried mips and i386 and both fail with similar errors.
> Is this working for anyone else on any target?
[hjl@gnu-6 tmp]$ file x
x: ASCII English text
[hjl@gnu-6 tmp]$ objcopy --version -I binary -O elf32-i386 x y
GNU objcopy (Linux/GNU Binutils) 188.8.131.52.1.20070814
[hjl@gnu-6 tmp]$ file y
y: ELF 32-bit LSB relocatable, no machine, version 1 (SYSV), not stripped