This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Fix i386 @NTPOFF and @DTPOFF with addend
On Tue, Sep 10, 2002 at 06:26:36PM -0400, Jakub Jelinek wrote:
> Well, addend is ignored with all the GOT style relocs (@GOT, @TLSGD,
> @TLSLDM, @GOTTPOFF), say:
> movl x@GOT(%ebx), %eax
> movl 8+x@GOT(%ebx), %ecx
> will generate identical instructions/relocs in both cases.
> We should probably add a warning for all of these with non-zero addend,
> but I'm pretty sure nobody is using it intentionally - it makes no sense
> at all to request a got slot for one variable and load from a slot 8 bytes
> later in .got (that's about the same as int i; int j = *(&i + 2);).
The sensible way to define these relocs is to interpret it
as (x+8)@GOT, not x@GOT+8. But it's too late for this now,
so a warning is the best we can do.
I think the patch is ok, minus the -value thing.
r~