This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed, PATCH] PR gas/19600: Preserve addend for R_386_GOT32 and R_X86_64_GOT32


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).

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]