PR 18167, Relax PR 15228 protected visibility restriction

Alan Modra amodra@gmail.com
Sat Mar 28 12:47:00 GMT 2015


On Fri, Mar 27, 2015 at 09:40:08AM -0700, H.J. Lu wrote:
> There is no backward compatibility to speak with since protected
> data symbol never worked before.

That isn't entirely true.  It is true that they didn't always work as
designed when a non-PIC executable referenced a protected variable in
a shared library, but they do work as designed where an executable has
a definition of the variable.  In that case the executable uses its
own variable, and the shared library uses its own protected variable.
I believe your change to gcc would break this particular usage of
protected variables since the shared library would use the
executable's variable, if an older ld.so resolved the symbols.  So
there needs to be some mechanism to avoid this regression.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list