Fix segfault when creating a dso with discarded .dynsym section.
bfd/ * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Fix segfault when creating a dso with discarded dynsym section.
This commit is contained in:
parent
09c14161c5
commit
131e2f8ea1
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-11-05 James Cowgill <james.cowgill@imgtec.com>
|
||||
|
||||
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Fix segfault
|
||||
when creating a dso with discarded dynsym section.
|
||||
|
||||
2014-11-05 Matthew Fortune <matthew.fortune@imgtec.com>
|
||||
|
||||
* elfxx-mips.c (update_mips_abiflags_isa): Add E_MIPS_ARCH_32R6
|
||||
|
|
|
@ -11457,9 +11457,11 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
|
|||
name = ".dynsym";
|
||||
elemsize = MIPS_ELF_SYM_SIZE (output_bfd);
|
||||
s = bfd_get_section_by_name (output_bfd, name);
|
||||
BFD_ASSERT (s != NULL);
|
||||
|
||||
dyn.d_un.d_val = s->size / elemsize;
|
||||
if (s != NULL)
|
||||
dyn.d_un.d_val = s->size / elemsize;
|
||||
else
|
||||
dyn.d_un.d_val = 0;
|
||||
break;
|
||||
|
||||
case DT_MIPS_HIPAGENO:
|
||||
|
|
Loading…
Reference in a new issue