This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: MIPS, strip --only-keep-debug & an infinite loop
- From: "Mark Kettenis" <mark dot kettenis at xs4all dot nl>
- To: "Maciej W. Rozycki" <macro at linux-mips dot org>
- Cc: "Mark Kettenis" <mark dot kettenis at xs4all dot nl>, drow at false dot org, binutils at sources dot redhat dot com
- Date: Thu, 26 May 2005 01:33:12 +0200 (CEST)
- Subject: Re: MIPS, strip --only-keep-debug & an infinite loop
- References: <200504282014.j3SKEO8G001654@elgar.sibelius.xs4all.nl> <Pine.LNX.4.61L.0504291249500.32392 at blysk.ds.pg.gda.pl> <20050429121900.GD1621@hattusa.textio> <Pine.LNX.4.61L.0504291326090.32392@blysk.ds.pg.gda.pl> <20050429130154.GE1621@hattusa.textio> <20050429130646.GA19824@nevyn.them.org> <Pine.LNX.4.61L.0504291413340.32392@blysk.ds.pg.gda.pl> <20050429135107.GA21441@nevyn.them.org> <Pine.LNX.4.61L.0504291458240.32392@blysk.ds.pg.gda.pl> <200505172255.j4HMtc5J008824@elgar.sibelius.xs4all.nl> <Pine.LNX.4.61L.0505181157111.19170@blysk.ds.pg.gda.pl> <Pine.LNX.4.61L.0505232051440.4541@blysk.ds.pg.gda.pl>
> On Wed, 18 May 2005, Maciej W. Rozycki wrote:
> Well, I've had a look at the patch and I found out just returning a
> failure is inadequate for these functions. For
> _bfd_mips_elf_section_processing() it's simply ignored. For
> _bfd_mips_elf_section_from_shdr() it leads to such a damaged object being
> completely rejected, which prevents doing `objdump' or fixing it with
> another run of `strip --only-keep-debug' and is probably an overkill. In
> neither case any useful diagnostics is available. Therefore I've
> rewritten these changes to provide some diagnostics and attempt to
> continue anyway.
>
> For _bfd_mips_elf_fake_sections() I agree appropriate handling of all
> special sections is desirable.
>
> This has been checked not to cause any regressions in the test suite run
> for mipsel-linux-gnu natively.
>
> 2005-05-23 Mark Kettenis <kettenis@gnu.org>
> Maciej W. Rozycki <macro@linux-mips.org>
>
> * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
> stop processing of options if one of invalid size is
> encountered.
> (_bfd_mips_elf_section_from_shdr): Likewise.
> (_bfd_mips_elf_fake_sections): Reset the type of empty special
> sections.
>
> OK to apply? Since it fixes a fatal problem, I'm asking for permission
> for 2.16.1, too.
This looks fine to me. Unfortunately I won't have the opportunity to test
this for a few weeks. But I'm pretty confident it'll work.
Mark