On Mon, Apr 25, 2016 at 11:35:46AM -0600, Jeff Law wrote: > No, we revert to the gcc-4.9 behavior WRT protected visibility and ensure > that we're getting a proper diagnostic from the linker. > > That direction is consistent with the intent of protected visibility, fixes > the problem with preemption of protected symbols and gives us a diagnostic > for the case that can't be reasonably handled.
I agree that this is the correct solution. Unfortunately there is a complication. PIE + shared lib using protected visibility worked fine with gcc-4.9, but since then code generated by gcc for PIEs on x86_64 has been optimized to rely on the horrible old hack of .dynbss and copy relocations. That means you'll have regressions from 4.9 if just reverting the protected visibility change.. The PIE optimization will need reverting too, and I imagine you'll see some resistance to that idea due to the fact that it delivers quite a nice performance improvement for PIEs. -- Alan Modra Australia Development Lab, IBM