This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] x86-64: support newer relocation types
On Sun, Jun 12, 2005 at 02:28:25PM +0200, Jan Hubicka wrote:
>
> > + /* Note that sgot is not involved in this
> > + calculation. We always want the start of .got.plt. If we
> > + defined _GLOBAL_OFFSET_TABLE_ in a different way, as is
> > + permitted by the ABI, we might have to change this
> > + calculation. */
> > + relocation -= htab->sgotplt->output_section->vma
> > + + htab->sgotplt->output_offset;
> > + break;
> > +
> > + case R_X86_64_GOTPC32:
> > + /* Use global offset table as symbol value. */
> > + relocation = htab->sgotplt->output_section->vma
> > + + htab->sgotplt->output_offset;
> > + unresolved_reloc = FALSE;
> > + break;
>
>
> There is another difference relative to my implementation:
>
> + /* Note that sgot->output_offset is not involved in this
> + calculation. We always want the start of .got. If we
> + defined _GLOBAL_OFFSET_TABLE in a different way, as is
> + permitted by the ABI, we might have to change this
> + calculation. */
> + relocation -= htab->sgot->output_section->vma;
> + break;
> +
> + case R_X86_64_GOTPC32:
> + /* Use global offset table as symbol value. */
> + relocation = htab->sgot->output_section->vma;
> + unresolved_reloc = FALSE;
> + break;
> +
>
Jan's version is the same as i386. I believe those relocations are
the same between i386 and x86_64.
H.J.