aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-10-13 16:37:39 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-10-13 16:37:39 +0000
commitcd2b2c108e1cbbef5d8898070c875e4fd546141d (patch)
tree45873f330c610cbcabffc3500c4ccb5fd1bbf90a /bfd/elf32-i386.c
parent313c53d19e95820f8dfb8e3b22f3753428938c3f (diff)
downloadgdb-cd2b2c108e1cbbef5d8898070c875e4fd546141d.zip
gdb-cd2b2c108e1cbbef5d8898070c875e4fd546141d.tar.gz
gdb-cd2b2c108e1cbbef5d8898070c875e4fd546141d.tar.bz2
2009-10-13 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10763 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt earlier.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 9de1a6c..016e046 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -4251,13 +4251,15 @@ elf_i386_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_32 (output_bfd,
(plt->output_section->vma
+ plt->output_offset + h->plt.offset),