Operating System - HP-UX
1834149 Members
2366 Online
110064 Solutions
New Discussion

Re: Use of __thread in a dynamically loaded library on HP UX

 
Pankaj Agrawal
Occasional Advisor

Use of __thread in a dynamically loaded library on HP UX

Usage of the __thread keyword in a shared library prevents that shared library from being dynamically loaded (that is, loaded via an explicit call to shl_load).

Is there a way out of this? That is by using some compiler option or somethg, can we dynamically load a library having __thread ??

Kindly help
2 REPLIES 2
Steve Steel
Honored Contributor

Re: Use of __thread in a dynamically loaded library on HP UX

Hi


command used

error seen

And are you using LD_PRELOAD

see ld man page for details


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Dennis Handly
Acclaimed Contributor

Re: Use of __thread in a dynamically loaded library on HP UX

You must compile with +tls=dynamic. Available only on 11.23. Or use LD_PRELOAD as Steve says.