From cd2b2c108e1cbbef5d8898070c875e4fd546141d Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 13 Oct 2009 16:37:39 +0000 Subject: [PATCH] 2009-10-13 H.J. Lu PR binutils/10763 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt earlier. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-i386.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 81e6835169e..c0b915b8762 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2009-10-13 H.J. Lu + + PR binutils/10763 + * elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt + earlier. + 2009-10-13 Alan Modra * elflink.c (_bfd_elf_merge_symbol): Revert previous patch. diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 9de1a6c7aff..016e04611af 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), -- 2.30.2