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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carmelo AMOROSO
Sent: den 25 augusti 2006 10:31
To: [email protected]
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 

_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to