This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH 1/4] default_debugscn_p: Add support for compressed debug section.
- From: Kurt Roeckx <kurt at roeckx dot be>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 13 Aug 2012 18:22:29 +0200
- Subject: Re: [PATCH 1/4] default_debugscn_p: Add support for compressed debug section.
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