Fix typo in _bfd_elf_strtab_add

PR 17141
	* elf.c (_bfd_elf_strtab_add): Check strtab name for failure.
This commit is contained in:
Maks Naumov 2014-07-11 23:55:30 +09:30 committed by Alan Modra
parent 808f7ab1fc
commit 17ca87fc69
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-07-11 Maks Naumov <maksqwe1@ukr.net>
PR 17141
* elf.c (_bfd_elf_strtab_add): Check strtab name for failure.
2014-07-08 Nick Clifton <nickc@redhat.com> 2014-07-08 Nick Clifton <nickc@redhat.com>
PR ld/17110 PR ld/17110

View File

@ -5298,7 +5298,7 @@ prep_headers (bfd *abfd)
elf_tdata (abfd)->shstrtab_hdr.sh_name = elf_tdata (abfd)->shstrtab_hdr.sh_name =
(unsigned int) _bfd_elf_strtab_add (shstrtab, ".shstrtab", FALSE); (unsigned int) _bfd_elf_strtab_add (shstrtab, ".shstrtab", FALSE);
if (elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1 if (elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1
|| elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1 || elf_tdata (abfd)->strtab_hdr.sh_name == (unsigned int) -1
|| elf_tdata (abfd)->shstrtab_hdr.sh_name == (unsigned int) -1) || elf_tdata (abfd)->shstrtab_hdr.sh_name == (unsigned int) -1)
return FALSE; return FALSE;