S/390: Fix segfault when linking -shared -nostartfiles
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Fri, 28 Jul 2017 15:59:25 +0000 (17:59 +0200)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Fri, 28 Jul 2017 16:26:25 +0000 (18:26 +0200)
commit79c12faeea57e61364b6a7a3e411b096edce989c
tree66333b8892e6dccfd68a4f07953242e6c5183da1
parent2b94abd48aef2d91bae1c35c8c10ebfb8757247d
S/390: Fix segfault when linking -shared -nostartfiles

Regression-tested on s390x.

bfd/ChangeLog:

2017-07-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
pointer check for htab->elf.irelplt.
* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
bfd/elf32-s390.c
bfd/elf64-s390.c