This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: For 2.12: sh-coff
On Sun, Feb 17, 2002 at 08:45:31PM -0800, Ian Lance Taylor wrote:
> Daniel Jacobowitz <drow@mvista.com> writes:
>
> > On Sun, Feb 17, 2002 at 05:37:17PM -0800, Ian Lance Taylor wrote:
> > > Daniel Jacobowitz <drow@mvista.com> writes:
> > >
> > > > This has come up before on this list, but apparently was never fixed. I
> > > > only recall it being discussed in terms of archives, but the problem is more
> > > > general. From the testsuite:
> > > >
> > > > /opt/src/binutils/obj-sh-coff/ld/ld-new -o tmpdir/asm.x --check-sections tmpdir/asm.o
> > > > tmpdir/asm.o: file not recognized: File format is ambiguous
> > > > tmpdir/asm.o: matching formats: coff-shl coff-shl-small
> > > >
> > > > Anyone?
> > >
> > > What is in the bfd_default_vector array in your ld-new executable?
> >
> > Only shcoff_vec. Which is, of course, big endian. Yet GAS seems to be
> > producing coff-shl by default.
>
> This patch, which Nick checked in on November 15 with an unrelated
> ChangeLog entry, shows that gas will always generate a little endian
> object.
> I would guess that the October 16 patch was not tested for sh-coff.
>
> I imagine that the correct fix is to restore the old obj-coff.h
> setting of TARGET_FORMAT, but have it test target_big_endian rather
> than shl.
Since that's the same conclusion I came to, and since a patch to do
exactly that fixed most of the testsuite failures, I'll check in
that solution in a day or two if no one else pipes up. OK?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer