This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Allow linker script on executable and hidden symbol
On Thu, May 05, 2005 at 03:06:42PM -0700, James E Wilson wrote:
> On Thu, 2005-05-05 at 12:20, H. J. Lu wrote:
> > Here is the updated patch.
>
> The executable/version script part of this looks much better to me now.
> You have docs, and a linker consistency check.
>
> However, this patch still includes the stuff for forcibly exporting
> hidden variables. Alan Modra objected to that, and pointed out that we
> can get incorrect code in this case. I've never used hidden variables,
> and know little about how they work, but I do know that I should not be
> overruling Alan when it comes to binutils decisions like this. Maybe
> you need to discuss this with him a bit more.
>
> I think I see the point of the change. -Bsymbolic affects all
> variables, and you want a way to change the binding of individual
> variables. So effectively this is the same problem as the other part of
> the patch. Applying a linker script to an executable allows you to
> changing binding of individual variables, whereas --export-dynamic
> affects all of them.
>
> However, that still leaves the question of whether we can get incorrect
> code, which doesn't seem to have been resolved.
My view is it generats the same code as -Bsymbolic. If we allow
-Bsymbolic to generate "incorrect" code on all symbols, why not do it
selectively?
H.J.