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:
> 
> name@PLT: specifies the offset to the PLT entry of symbol name from the
> current code
> location.
> 
> "name@PLT - ." has undefined behavior.  Can you just use name@PLT 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.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to