PR24689 again, string table corruption
authorAlan Modra <amodra@gmail.com>
Sun, 23 Jun 2019 02:40:02 +0000 (12:10 +0930)
committerAlan Modra <amodra@gmail.com>
Sun, 23 Jun 2019 04:54:45 +0000 (14:24 +0930)
Depending on optimisation level and gcc version, git commit 890f750a3b
introduces a false positive warning that i_shdrp may be used
uninitialized.

PR 24689
* elfcode.h (elf_object_p): Warning fix.

bfd/ChangeLog
bfd/elfcode.h

index bc7671e9ea300ca74ab077f572c963f98fdad831..964ab71b204cdfd6a1931248889600f8601b361f 100644 (file)
@@ -1,3 +1,8 @@
+2019-06-23  Alan Modra  <amodra@gmail.com>
+
+       PR 24689
+       * elfcode.h (elf_object_p): Warning fix.
+
 2019-06-21  Alan Modra  <amodra@gmail.com>
 
        PR 24689
index 5180f79a74dfea8aab803e6c9d70429c146bedab..9a73c3b71f52daa83b17350489c9275aca2bc3d2 100644 (file)
@@ -749,11 +749,7 @@ elf_object_p (bfd *abfd)
                  != 0))
            abfd->flags &= ~D_PAGED;
        }
-    }
 
-  /* A further sanity check.  */
-  if (i_ehdrp->e_shnum != 0)
-    {
       if (i_ehdrp->e_shstrndx >= elf_numsections (abfd)
          || i_shdrp[i_ehdrp->e_shstrndx].sh_type != SHT_STRTAB)
        {
This page took 0.0552 seconds and 4 git commands to generate.