summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2009-09-01 21:27:47 +0000
committerH.J. Lu <hjl@lucon.org>2009-09-01 21:27:47 +0000
commit6e42c180cc188019d5740b97c0506bfaba5ef308 (patch)
tree4fef2ece8ec71a2ab343fa898891e397a554010c
parent573ded31525e9d14858dfa6372d6925b3d49f2f4 (diff)
downloadgdb-6e42c180cc188019d5740b97c0506bfaba5ef308.tar.gz
2009-09-01 H.J. Lu <hongjiu.lu@intel.com>
* elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare plt earlier.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-x86-64.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 89d77b982fd..7358db845a1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
+ plt earlier.
+
2009-09-01 Tristan Gingold <gingold@adacore.com>
* makefile.vms: Ported to Itanium VMS. Remove useless variable and
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index de6f6ecd242..44389766973 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -3883,13 +3883,15 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd,
}
else
{
+ asection *plt;
+
if (!h->pointer_equality_needed)
abort ();
/* For non-shared object, we can't use .got.plt, which
contains the real function addres if we need pointer
equality. We load the GOT entry with the PLT entry. */
- asection *plt = htab->elf.splt ? htab->elf.splt : htab->elf.iplt;
+ plt = htab->elf.splt ? htab->elf.splt : htab->elf.iplt;
bfd_put_64 (output_bfd, (plt->output_section->vma
+ plt->output_offset
+ h->plt.offset),