compatibility of (mips ELF) .o files between binutils versions?
Daniel Jacobowitz
drow@mvista.com
Mon Jul 15 11:56:00 GMT 2002
On Mon, Jul 15, 2002 at 11:11:39AM -0700, H. J. Lu wrote:
> On Mon, Jul 15, 2002 at 10:24:56AM -0700, cgd@broadcom.com wrote:
> > [ replying to several e-mail msgs in one. ]
> >
> > At 15 Jul 2002 14:41:03 +0100, Nick Clifton wrote:
> > > > (I'm not really sure where to even begin debugging this...)
> > >
> > > It appears to be a problem with the relocs. What does 'objdump -r'
> > > show for the 2.11.2 assembled binary vs the 2.12.1 assembled binary ?
> >
> > mips-elf-objdump -xDr shows identical output for the two (using
> > objdump from the 2.12.1 binutils.
> >
> >
> > At Mon, 15 Jul 2002 07:28:44 -0700, H. J. Lu wrote:
> > > As I recall, gas/mips 2.11.2 generates really bad files under certain
> > > conditions. I agree ld shouldn't segfault. But I don't expect it will
> > > generate correct results.
> >
> > in this case, 2.10 and 2.11.2 generate the same .o file.
> >
> >
> > At 15 Jul 2002 16:02:13 +0100, Nick Clifton wrote:
> > > I guess that we need a test object file with which to investigate the
> > > problem.
> >
> > Several people asked for same. 8-)
> >
> >
> > > Chris - can you generate a *small* binary and post it/point to it ?
> >
> > I've included below a uuencoded tgz which contains the sample, in many
> > forms. 8-)
> >
> > run a little script to run all of the cmds
> > to gen the rest.
> > run.log output from said cmds.
> > foo.s input source
> > foo-<version>.o foo.s compiled w/ that version
> > assembler.
> > foo-<version1>.dump-<version2>
> > foo-<version>.o dumped with
> > mips-elf-objdump -xDr from version2 of
> > binutils.
> >
> > I've removed the 'core' and 'bad.o' files, to keep things small.
> >
> > all of the tools used were built from fresh tarballs from
> > ftp://ftp.gnu.org/pub/gnu/binutils/
> >
>
> I got
>
> /export/build/gnu/binutils-debug/build-mips-linux/ld/ld-new -r foo-2_11_2.o
> /export/build/gnu/binutils-debug/build-mips-linux/ld/ld-new: a.out: relocation
> size mismatch in foo-2_11_2.o section .data
> /export/build/gnu/binutils-debug/build-mips-linux/ld/ld-new: final link failed:
> Archive object file in wrong format
Which begs the question - why did the relocation size change between
your configurations, Chris?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
More information about the Binutils
mailing list