[PATCH-NPTL] TLS symbol handling in _dl_find_hash

Joakim Tjernlund joakim.tjernlund at transmode.se
Sat Sep 22 10:41:10 UTC 2007


Hi Carmelo
 
Had a look at you dl_find hash again, it came up on IRC.
I think you should change 
  char *_dl_find_hash(const char *name, struct dyn_elf *rpnt, struct elf_resolve *mytpnt, int type_class
 #ifdef USE_TLS
 ,struct elf_resolve **tls_tpnt
 #endif 
 )
 
Into(module syntax errors):
rename _dl_find_hash to _dl_lookup_hash:
  char *_dl_lookup_hash(const char *name, struct dyn_elf *rpnt, struct elf_resolve *mytpnt, int type_class
  #ifdef USE_TLS
  ,struct elf_resolve **tls_tpnt
  #endif 
 )
 
In header file do:
 static __inline__ char *_dl_find_hash(const char *name, struct dyn_elf *rpnt, struct elf_resolve *mytpnt,
                                                       int type_class, struct elf_resolve **tls_tpnt)
{
#ifdef USE_TLS
        return _dl_lookup_hash(name, rpnt, mytpnt, type_class, tls_tpnt);
#else
        return _dl_lookup_hash(name, rpnt, mytpnt, type_class);
#endif
}

This way the call sites will look the same wrt. NTPL or No NPTL
 
 Jocke

  _____  

From: uclibc-bounces at uclibc.org [mailto:uclibc-bounces at uclibc.org] On Behalf Of Carmelo AMOROSO
Sent: den 25 augusti 2006 10:31
To: uclibc at uclibc.org
Subject: [PATCH-NPTL] TLS symbol handling in _dl_find_hash



Hi Steve, All 
I had a look into _dl_find_hash changes to handle TLS symbol. 
Both CodeSourcery's and Steve's implementation are defining a new 
_dl_find_hash function suitable 
to handle TLS symbols. 
I'd like to submit to your attention my own implementation. I simply 
uses an I/O parameter referring to the 
TLS module which resolves the target TLS symbol. 
Only few changes are required in calling functions to meet the new 
interface (that is guarded by USE_TLS). 
Note that the patch is against uClinc-nptl branch at April, 28th. For 
you convenience I attached both the patch 
and the source file. 

Rgds, 
Carmelo 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20070922/c53dd302/attachment-0001.htm 


More information about the uClibc mailing list