This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PR 18167, Relax PR 15228 protected visibility restriction
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Binutils <binutils at sourceware dot org>
- Date: Sat, 28 Mar 2015 23:17:42 +1030
- Subject: Re: PR 18167, Relax PR 15228 protected visibility restriction
- Authentication-results: sourceware.org; auth=none
- References: <20150327054327 dot GB26234 at bubble dot grove dot modra dot org> <551531AA dot 1060006 at redhat dot com> <20150327122941 dot GC26234 at bubble dot grove dot modra dot org> <55158778 dot 8050009 at redhat dot com> <CAMe9rOrZB+kuDd-Z0hx-EMiZO=c2tG3J7gQH1JpNe_gHGSUBKA at mail dot gmail dot com>
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