bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/23997] PLT32 relocation is off by 4


From: nruslan_devel at yahoo dot com
Subject: [Bug gas/23997] PLT32 relocation is off by 4
Date: Wed, 19 Dec 2018 04:08:32 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=23997

--- Comment #4 from Ruslan Nikolaev <nruslan_devel at yahoo dot com> ---
(In reply to H.J. Lu from comment #3)
> (In reply to Ruslan Nikolaev from comment #2)
> > Sometimes when the assembly code is for both PIC and non-PIC code, you may
> 
> From x86-64 psAB:
> 
> address@hidden: specifies the offset to the PLT entry of symbol name from the
> current code
> location.
> 
> "address@hidden - ." has undefined behavior.  Can you just use address@hidden 
> for both
> PIC and non-PIC codes?
> 

It is possible but see below.

> > want to use this construction. I checked LLVM/clang; it compiles correct
> > output in both cases.
> 
> This isn't relevant.

I guess, I do not have a very strong opinion about that. But my concern is that
the generated relocation is off by 4 which is not clear why; I discovered that
by a mere chance. The LLVM behavior is probably more intuitive here but at the
very least it would be good to error out rather than just silently generate an
incorrect relocation.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]