[PATCH 1/4] default_debugscn_p: Add support for compressed debug section.
Kurt Roeckx
kurt at roeckx.be
Mon Aug 13 16:22:29 UTC 2012
On Mon, Aug 13, 2012 at 01:36:10PM +0200, Mark Wielaard wrote:
> On Sun, Aug 12, 2012 at 06:28:59PM +0200, Kurt Roeckx wrote:
> > @@ -657,7 +657,13 @@ default_debugscn_p (const char *name)
> > const size_t ndwarf_scn_names = (sizeof (dwarf_scn_names)
> > / sizeof (dwarf_scn_names[0]));
> > for (size_t cnt = 0; cnt < ndwarf_scn_names; ++cnt)
> > - if (strcmp (name, dwarf_scn_names[cnt]) == 0)
> > + if (strcmp (name, dwarf_scn_names[cnt]) == 0
> > +#if USE_ZLIB
> > + || (name[0] == '.' && name[1] == 'z'
> > + && dwarf_scn_names[cnt][1] == 'd'
> > + && strcmp (&name[2], &dwarf_scn_names[cnt][1]) == 0)
> > +#endif
>
> I don't think it is necessary to depend on USE_ZLIB here, we are
> just checking the name, not the content anyway.
I did that based on the same #if in readelf.c
Kurt
More information about the elfutils-devel
mailing list