Hi Ulrich and community members,

Thank you for your feedback.

>This doesn't look right to me.  The issue is not so much the
>"TLS model", which is mostly a matter of optimization.  The
>issue is more fundamental: thread-local variables defined in
>libraries loaded with dlopen *cannot* be accessed directly
>relative to the thread pointer, because the storage for
>those is only allocated at dlopen time and not statically
>known at compile or link time.


>Ideally, you should be able to implement full support (by
>accessing the AIX libc equivalent of the DTV).  If that is
>not possible for some reason, then you should at least
>restrict the implementation to variables guaranteed to
>work (e.g. by checking whether the objfile passsed to
>fetch_tls_load_module_address corresponds to the main
>executable or an initially loaded library).

Thanks for letting me know this. I have implemented it in two patches and sent the same.

v1-0002-Add-TLS-support-for-shared-libraries-in-AIX.patch

v2-0001-Add-TLS-variable-debug-support-for-AIX-64-bit-XCO.patch 


Where 

v2-0001-Add-TLS-variable-debug-support-for-AIX-64-bit-XCO.patch  - Now just blocks shared library thread local variable computation


v1-0002-Add-TLS-support-for-shared-libraries-in-AIX.patch - Where we compute thread local variable for shared library.


Let me know what you think and kindly give me feedback for the same.


Have a nice day.


Thanks and regards,

Aditya.