MIPS, strip --only-keep-debug & an infinite loop

Mark Kettenis mark.kettenis@xs4all.nl
Wed May 18 17:32:00 GMT 2005


   Date: Wed, 18 May 2005 11:58:52 +0100 (BST)
   From: "Maciej W. Rozycki" <macro@linux-mips.org>

   On Wed, 18 May 2005, Mark Kettenis wrote:

   >     That makes sense.  And with readelf I can see the problem now -- 
   >    ".MIPS.options" is left marked as SHT_MIPS_OPTIONS as opposed to 
   >    SHT_NOBITS.  Since that section no longer contains anything relevant, it 
   >    should be considered a bug.
   > 
   > Hmm, this seems to have fallen between the cracks.  Anyway, here is a
   > patch that seems to work for me.  It seems to fix objcopy/strip
   > --only-keep-debug and avoids the infinite loop.  However, I do think
   > the SEC_HAS_CONTENTS check should probably be applied to other faked
   > sections too.

    It hasn't really fallen -- it's just my lack of time, sigh...  Thanks for 
   looking into it -- I'll see if I can test it before 2.16.1.

Ok, thanks.  But this doesn't feel like something you need to rush in.
Perhaps the safest thing is to only add the "return FALSE" bit to the
release branch.  That at least avoids the infinite loop.

Mark



More information about the Binutils mailing list