Since the GOT procedure linkage table is supported only if plt_got
isn't NULL, we need to check plt_got before using it.
* elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
before using .plt.got.
* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
+2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
+ before using .plt.got.
+ * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
+
2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
if PLT is used. */
eh->func_pointer_refcount = 0;
- if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed)
+ if (htab->plt_got != NULL
+ && (info->flags & DF_BIND_NOW)
+ && !h->pointer_equality_needed)
{
/* Don't use the regular PLT for DF_BIND_NOW. */
h->plt.offset = (bfd_vma) -1;
if PLT is used. */
eh->func_pointer_refcount = 0;
- if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed)
+ if (htab->plt_got != NULL
+ && (info->flags & DF_BIND_NOW)
+ && !h->pointer_equality_needed)
{
/* Don't use the regular PLT for DF_BIND_NOW. */
h->plt.offset = (bfd_vma) -1;