This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] MIPS/BFD: Fix assertions with SGI IRIX files
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: <binutils at sourceware dot org>, <gdb-patches at sourceware dot org>
- Date: Mon, 24 Oct 2011 14:59:01 +0100
- Subject: Re: [PATCH] MIPS/BFD: Fix assertions with SGI IRIX files
- References: <alpine.DEB.1.10.1108181530580.4083__36247.0631408089$1313685694$gmane$org@tp.orcam.me.uk> <m3hb5dpwk6.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com> <alpine.DEB.1.10.1108311837450.5774@tp.orcam.me.uk> <87vctdl4p1.fsf@firetop.home> <alpine.DEB.1.10.1109021057200.22353@tp.orcam.me.uk>
On Fri, 2 Sep 2011, Maciej W. Rozycki wrote:
> > >> A patch to remove the assertions is pre-approved if you agree that's OK.
> > >
> > > OK, but are you positive that'll be no regression?
> >
> > This is binutils. You can never be positive that a patch won't break
> > something. But the handling of SHN_MIPS_DATA and SHN_MIPS_TEXT isn't
> > written in an SGI-specific way (just as the handling of the other
> > SHN_MIPS_* sections isn't written in an SGI-specific way). I couldn't see,
> > and still can't see, a reason why removing the assertions is wrong.
>
> OK, this is good enough a justification for me, thanks for investigating.
> I meant any improper handling within BFD itself of course. I'll make that
> change and push it at my earliest convenience. It may take a couple of
> days.
It's been a couple of days a couple of times now, but there you go. I
have applied the change below now.
2011-10-24 Maciej W. Rozycki <macro@codesourcery.com>
bfd/
* elfxx-mips.c (_bfd_mips_elf_symbol_processing): Remove
assertions.
Maciej
binutils-mips-sgi-assert.diff
Index: binutils-fsf-trunk-quilt/bfd/elfxx-mips.c
===================================================================
--- binutils-fsf-trunk-quilt.orig/bfd/elfxx-mips.c 2011-10-24 14:48:39.655926020 +0100
+++ binutils-fsf-trunk-quilt/bfd/elfxx-mips.c 2011-10-24 14:49:14.745883975 +0100
@@ -6337,7 +6337,6 @@ _bfd_mips_elf_symbol_processing (bfd *ab
{
asection *section = bfd_get_section_by_name (abfd, ".text");
- BFD_ASSERT (SGI_COMPAT (abfd));
if (section != NULL)
{
asym->section = section;
@@ -6353,7 +6352,6 @@ _bfd_mips_elf_symbol_processing (bfd *ab
{
asection *section = bfd_get_section_by_name (abfd, ".data");
- BFD_ASSERT (SGI_COMPAT (abfd));
if (section != NULL)
{
asym->section = section;