2009-09-01 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 1 Sep 2009 21:27:47 +0000 (21:27 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 1 Sep 2009 21:27:47 +0000 (21:27 +0000)
* elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
plt earlier.

bfd/ChangeLog
bfd/elf64-x86-64.c

index 89d77b982fdf26ff5aa22579679ed8efaca7d17b..7358db845a14c520827f9fb476a77394397da389 100644 (file)
@@ -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
index de6f6ecd242a2735dda536e73698b8e51e85bde5..443897669734bcc3a399b60a7817aaa5d2ff00b5 100644 (file)
@@ -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),