elflint: Don't check section group without flags word.
authorMark Wielaard <mark@klomp.org>
Tue, 28 Mar 2017 11:33:03 +0000 (13:33 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 3 Apr 2017 22:28:03 +0000 (00:28 +0200)
https://sourceware.org/bugzilla/show_bug.cgi?id=21320

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/elflint.c

index d285e06..e022503 100644 (file)
@@ -1,3 +1,7 @@
+2017-03-28  Mark Wielaard  <mark@klomp.org>
+
+       * elflint (check_group): Don't check if there is no flag word.
+
 2017-03-27  Mark Wielaard  <mark@klomp.org>
 
        * elflint.c (check_elf_header): Sanity check phnum and shnum.
index 6c83a77..e0c65b6 100644 (file)
@@ -2681,9 +2681,12 @@ section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n"),
               idx, section_name (ebl, idx));
 
       if (data->d_size < elsize)
-       ERROR (gettext ("\
+       {
+         ERROR (gettext ("\
 section [%2d] '%s': section group without flags word\n"),
               idx, section_name (ebl, idx));
+         return;
+       }
       else if (be_strict)
        {
          if (data->d_size < 2 * elsize)