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.
This commit is contained in:
Alan Modra 2019-06-23 12:10:02 +09:30
parent a8d21e9ef0
commit 14b2a8e424
2 changed files with 5 additions and 4 deletions

View 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

View 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)
{