[PATCH] PR gold/17640
H.J. Lu
hjl.tools@gmail.com
Thu Mar 12 23:37:00 GMT 2015
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?
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.
--
H.J.
More information about the Binutils
mailing list