aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-02-24 05:42:27 -0800
committerH.J. Lu <hjl.tools@gmail.com>2016-02-24 05:49:48 -0800
commit13f422778ff5307dad1f66d25a1d211bb8f76a8b (patch)
treef06e0ab10c988cf256ad0e0ef88cb32ea7ac06a2 /bfd/elf64-x86-64.c
parentbf74e428bca61022bd5cdf6bf28789a184748b4d (diff)
downloadbinutils-13f422778ff5307dad1f66d25a1d211bb8f76a8b.zip
binutils-13f422778ff5307dad1f66d25a1d211bb8f76a8b.tar.gz
binutils-13f422778ff5307dad1f66d25a1d211bb8f76a8b.tar.bz2
Set plt_got.offset to (bfd_vma) -1
Since plt_got.offset may be updated in x86 allocate_dynrelocs, set plt_got.offset to (bfd_vma) -1 when setting needs_plt to 0. * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset to (bfd_vma) -1 when setting needs_plt to 0. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 8ea478d..7debc1e 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2723,12 +2723,14 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
}
else
{
+ eh->plt_got.offset = (bfd_vma) -1;
h->plt.offset = (bfd_vma) -1;
h->needs_plt = 0;
}
}
else
{
+ eh->plt_got.offset = (bfd_vma) -1;
h->plt.offset = (bfd_vma) -1;
h->needs_plt = 0;
}