This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strip on mips


On 03/20/2012 06:16 PM, Roland McGrath wrote:
> Corey Minyard cited this problem and had a fix (which we've not yet reviewed).
> I've just now noticed that Corey didn't post to the list, but only sent a
> private message to me and Ulrich.
>
> Corey, can you post your message to the list for everyone to see?
>
>
> Thanks,
> Roland
Ok, sorry, I couldn't find the mailing list referenced in the sources.  
Here's the patch.  It doesn't really feel like the right way to fix 
this, but I couldn't think of a better way.

-corey


MIPS gives SHT_MIPS_DWARF type to debug sections which is not handled 
properly
by the strip utility, it changes the section type to SHT_NOTYPE in the
stripped file.

--- elfutils-0.96/libelf/elf-knowledge.h.orig    2005-06-28 
15:08:39.000000000 -0700
+++ elfutils-0.96/libelf/elf-knowledge.h    2005-06-28 
15:06:42.000000000 -0700
@@ -46,7 +46,7 @@
&& ((remove_comment) || strcmp (name, ".comment") != 0)))          \
     /* So far we do not remove any of the non-standard sections.        
       \
        XXX Maybe in future.  */                              \
- && (shdr)->sh_type < SHT_NUM)
+ && ((shdr)->sh_type < SHT_NUM || (shdr)->sh_type == SHT_MIPS_DWARF))


  /* Test whether `sh_info' field in section header contains a section



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]