[PATCH] PR gold/17640
Ilya Tocar
tocarip.intel@gmail.com
Fri Mar 13 11:26:00 GMT 2015
On 12 Mar 16:37, H.J. Lu wrote:
> On Thu, Mar 12, 2015 at 3:08 PM, Cary Coutant <ccoutant@google.com> wrote:
> > + // If we convert this from
> > + // mov foo@GOT(%reg), %reg
> > + // to
> > + // lea foo@GOTOFF(%reg), %reg
> > + // in Relocate::relocate, then there is nothing to do here.
> > + // Avoid converting _DYNAMIC, because its address may be used.
> >
> > I'm sorry, but I still don't understand the rationale for treating
> > _DYNAMIC specially. If you convert all of the references to @GOTOFF,
> > what's the point of having the GOT entry? If the loader is going to
> > use it, how does it find it?
I was trying to mirror behavior of bfd linker.
>
> It is related to
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=14538
>
> With the old x86-64 elf_machine_dynamic, we generate
>
> addq _DYNAMIC@GOTPCREL(%rip), %rdx
>
> We need to keep _DYNAMIC GOT entry.
>
Than why does 32-bit bfd linker also avoids optimizing _DYNAMIC?
More information about the Binutils
mailing list