This is the mail archive of the
mailing list for the elfutils project.
Re: Strip on mips
- From: Corey Minyard <cminyard at mvista dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 20 Mar 2012 21:17:07 -0500
- Subject: 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?
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.
MIPS gives SHT_MIPS_DWARF type to debug sections which is not handled
by the strip utility, it changes the section type to SHT_NOTYPE in the
--- elfutils-0.96/libelf/elf-knowledge.h.orig 2005-06-28
+++ elfutils-0.96/libelf/elf-knowledge.h 2005-06-28
@@ -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