bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: reloc


From: hjl.tools at gmail dot com
Subject: [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object
Date: Fri, 30 Oct 2020 01:22:10 +0000

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

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Thiago Macieira from comment #2)
> (In reply to H.J. Lu from comment #1)
> > You can override it with linker options:
> > 
> >   -Bsymbolic                  Bind global references locally
> >   -Bsymbolic-functions        Bind global function references locally
> 
> Those options shouldn't be needed. The protected visibility already implies
> them.
>

GOT relocation is needed for function pointer comparison.

> Either way, the fact that gold and ld.bfd behave different is a problem. And
> so is the fact that passing an empty --dynamic-list file causes it to work.

An empty --dynamic-list file is the same as -Bsymbolic.

-- 
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]