Copy relocations against protected symbols

H.J. Lu
Thu Dec 18 18:30:00 GMT 2014

On Thu, Dec 18, 2014 at 10:28 AM, Cary Coutant <> wrote:
>> I doubt we'll find any clever solution.  The linker defining a copy of
>> a variable in .dynbss is quite at odds with protected visibility.  For
>> example, a protected visibility variable allows a compiler to generate
>> shared library code that accesses the variable without a GOT
>> indirection.  However, it is exactly that GOT indirection that is
>> needed for to make the shared library use the .dynbss copy.
> Agreed. It looks like gold has the same problem; I'll commit a patch soon.

Should we simply disallow creating DSO with protected data on targets
with copy relocation?


More information about the Binutils mailing list