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]

[Bug tools/21332] elflint doesn't handle compressed sections


https://sourceware.org/bugzilla/show_bug.cgi?id=21332

--- Comment #8 from rguenther at suse dot de ---
On Wed, 5 Apr 2017, mark at klomp dot org wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=21332
> 
> --- Comment #7 from Mark Wielaard <mark at klomp dot org> ---
> Turns out supporting (gabi) compressed ELF sections in eu-elflint is is fairly
> simple by just decompressing every section unconditionally at the start (when
> we also check if all sections are actually there):
> 
> diff --git a/src/elflint.c b/src/elflint.c
> index e0c65b6..51e53c2 100644
> --- a/src/elflint.c
> +++ b/src/elflint.c
> @@ -464,6 +466,9 @@ invalid number of section header table entries\n"));
>         scn = elf_nextscn (ebl->elf, scn);
>         if (scn == NULL)
>           break;
> +       /* If the section wasn't compressed this does nothing, but
> +          returns an error.  We don't care.  */
> +       elf_compress (scn, 0, 0);
>       }
>    if (scnt < shnum)
>      ERROR (gettext ("Can only check %u headers, shnum was %u\n"), scnt,
> shnum);
> 
> Full patch plus testcases:
> https://sourceware.org/ml/elfutils-devel/2017-q2/msg00026.html
> 
> Would you be able to test that on your s390x setup?

A quick test shows that it works.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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