This is the mail archive of the
mailing list for the binutils project.
Re: [committed, PATCH] PR gas/19600: Preserve addend for R_386_GOT32 and R_X86_64_GOT32
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Sun, 22 May 2016 14:49:11 +0930
- Subject: Re: [committed, PATCH] PR gas/19600: Preserve addend for R_386_GOT32 and R_X86_64_GOT32
- Authentication-results: sourceware.org; auth=none
- References: <20160520130243 dot GA11187 at intel dot com>
On Fri, May 20, 2016 at 06:02:43AM -0700, H.J. Lu wrote:
> We should preserve addend for R_386_GOT32 and R_X86_64_GOT32 as in
> "movl $foo@GOT + 4, %eax" and "movq $foo@GOT + 4, %rax".
Well, perhaps, but it is mostly useless. Consider that $foo@got
results in an entry in the GOT containing the value of foo, and
resolves to that entry's address. On x86 $foo@got+4 gives you the
next entry in the GOT, which is for some random other symbol (or
perhaps even off the end of the GOT).
Australia Development Lab, IBM