diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 12 | ||||
-rw-r--r-- | bfd/elf32-i386.c | 5 | ||||
-rw-r--r-- | bfd/elf64-x86-64.c | 5 |
3 files changed, 18 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 87a0bff..a8a0ad9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,15 @@ +2015-05-27 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/18458 + * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section + for now binding only if pointer equality isn't needed. + (elf_i386_allocate_dynrelocs): Use .plt.got section for now + binding only if pointer equality isn't needed. + * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got + section for now binding only if pointer equality isn't needed. + (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now + binding only if pointer equality isn't needed. + 2015-05-26 H.J. Lu <hongjiu.lu@intel.com> PR binutils/18437 diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 23d50e1..f3aee96 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1885,7 +1885,8 @@ do_size: if (use_plt_got && h != NULL && h->plt.refcount > 0 - && ((info->flags & DF_BIND_NOW) || h->got.refcount > 0) + && (((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) + || h->got.refcount > 0) && htab->plt_got == NULL) { /* Create the GOT procedure linkage table. */ @@ -2323,7 +2324,7 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { bfd_boolean use_plt_got; - if ((info->flags & DF_BIND_NOW)) + if ((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; diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 4428f97..072c00b 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -2080,7 +2080,8 @@ do_size: if (use_plt_got && h != NULL && h->plt.refcount > 0 - && ((info->flags & DF_BIND_NOW) || h->got.refcount > 0) + && (((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) + || h->got.refcount > 0) && htab->plt_got == NULL) { /* Create the GOT procedure linkage table. */ @@ -2542,7 +2543,7 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) { bfd_boolean use_plt_got; - if ((info->flags & DF_BIND_NOW)) + if ((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; |