This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #16214] Fix TLS access on S390 with -march=z10

On Thu, Nov 28, 2013 at 11:29:18AM +0100, Andreas Krebbel wrote:
> > I think the canonical way to avoid PLT dereference within or
> > is to have the function with the exported name and have an
> > rtld_hidden_def?  So in this case the function should be
> > ___tls_get_addr with a rtld_hidden_def() directive.  
> The sequence above was the only way I found to export a tls_get_addr version privately without
> exporting the original version but I'm eager to hear about better ways. I've failed with the following:
> - Put a Versions script somewhere in the path which replaces GLIBC_2.3 on __tls_get_addr with
> GLIBC_PRIVATE. No matter where I put it it appears after the original version definition and is
> ignored that way.
> - Adding a new symbol for __tls_get_addr and putting the GLIBC_PRIVATE version on it.  The new
> symbol can only be exported when removing the hidden attribute from the original function but this
> led to the original function to be exported as __tls_get_addr@@GLIBC_2.3 what I'm trying to prevent.

How about just something like:

strong_alias (__tls_get_addr, __tls_get_addr_internal);

and then adding __tls_get_addr_internal as GLIBC_PRIVATE in Versions?
I believe that should keep __tls_get_addr private and export
__tls_get_addr_internal@@GLIBC_PRIVATE.  I don't have a test box yet
to verify my claim, so this is again a suggestion based on just
reading the code.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]