elf64-x86-64.c compile problem
H.J. Lu
hjl.tools@gmail.com
Tue Sep 1 21:28:00 GMT 2009
On Tue, Sep 1, 2009 at 1:34 PM, Jerker Bäck<jerker.back@gmail.com> wrote:
> My compiler have problems with this
>
> bfd\elf64-x86-64.c(3893)
> --------------------------------------------------------------------
> {
> 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;
> bfd_put_64 (output_bfd, (plt->output_section->vma
> + plt->output_offset
> + h->plt.offset),
> htab->elf.sgot->contents + h->got.offset);
> return TRUE;
> }
> --------------------------------------------------------------------
>
> asection *plt should have been declared earlier, right?
>
I checked in this patch.
Thanks.
--
H.J.
---
Index: elf64-x86-64.c
===================================================================
--- elf64-x86-64.c (revision 6668)
+++ elf64-x86-64.c (working copy)
@@ -3883,13 +3883,15 @@ elf64_x86_64_finish_dynamic_symbol (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),
More information about the Binutils
mailing list