aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-x86-64.c11
2 files changed, 15 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 521e319..b8ae634 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/20800
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
+ plt_got.offset for R_X86_64_PLTOFF64.
+
2016-11-14 Nick Clifton <nickc@redhat.com>
* coffcode.h (coff_slurp_symbol_table): Fix typo: Faal -> Fall.
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 76f09bd..05a4776 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -4693,10 +4693,17 @@ do_ifunc_pointer:
symbols it's the symbol itself relative to GOT. */
if (h != NULL
/* See PLT32 handling. */
- && h->plt.offset != (bfd_vma) -1
+ && (h->plt.offset != (bfd_vma) -1
+ || eh->plt_got.offset != (bfd_vma) -1)
&& htab->elf.splt != NULL)
{
- if (htab->plt_bnd != NULL)
+ if (eh->plt_got.offset != (bfd_vma) -1)
+ {
+ /* Use the GOT PLT. */
+ resolved_plt = htab->plt_got;
+ plt_offset = eh->plt_got.offset;
+ }
+ else if (htab->plt_bnd != NULL)
{
resolved_plt = htab->plt_bnd;
plt_offset = eh->plt_bnd.offset;