From: Alan Modra Date: Sun, 23 Jun 2019 02:40:02 +0000 (+0930) Subject: PR24689 again, string table corruption X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14b2a8e4244a29208ad430167860a0f01b20f215;p=binutils-gdb.git PR24689 again, string table corruption 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bc7671e9ea3..964ab71b204 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2019-06-23 Alan Modra + + PR 24689 + * elfcode.h (elf_object_p): Warning fix. + 2019-06-21 Alan Modra PR 24689 diff --git a/bfd/elfcode.h b/bfd/elfcode.h index 5180f79a74d..9a73c3b71f5 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -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) {