Copy relocations against protected symbols

H.J. Lu hjl.tools@gmail.com
Thu Dec 18 18:30:00 GMT 2014


On Thu, Dec 18, 2014 at 10:28 AM, Cary Coutant <ccoutant@google.com> 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 ld.so 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?

-- 
H.J.



More information about the Binutils mailing list