Re: [Mingw-users] __thread not using PE loader support?
- Date: Sat, 10 Nov 2007 20:00:04 +0100
- From: Roland Schwarz <roland.schwarz@xxxxxxxxx>
- Subject: Re: [Mingw-users] __thread not using PE loader support?
Ross Ridge wrote:
>
> The GNU binutils package doesn't fully support thread local variables on
> PE-COFF targets. While the linker does support creating a TLS directory,
> that's not sufficient. You also need section relative relocations to
> be supported in both the assembler and linker so the code can reference
> the variables.
I see, thank you for this information.
> Well, you should know that TLS callbacks aren't portable. They don't
> work on Win9x/ME targets and they don't work wirth dynamically loaded
> DLLs on any version of Windows.
Ok, that is fine for me.
The callbacks are used in the boost thread lib for cleaning up tls
variables.
boost thread provides its own tls api. The implementation resides in a
library which itself makes use of the windows TLS api. This works when
the boost thread lib is dynamically linked to the user application where
it hooks into DLLMain.
When the lib is statically linked I need some mechanism to be notified
of thread termination. This is where I intend to use the callbacks.
So I am happy with what is currently available.
The only problem I can imagine to run into, is when mingw starts to
provide its own implementation of _tls_used directory, which would
result into a double definition of this structure.
Roland aka speedsnail
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users