[dmd-internals] __tls_callbacks_a
Rainer Schuetze
r.sagitario at gmx.de
Fri Jan 20 01:01:21 PST 2012
Are you sure? Please check by generating the map file with "-map
-L/MAP:FULL -L/XREF". For me, the tlsdata module is no longer linked in
and the symbols are taken from the D file.
Please note that the generated executable does not run correctly, you
have to fill the _tls_used struct as shown by Walters' code snippet.
Rainer
On 20.01.2012 09:52, Alex wrote:
> Redefining both links fine, but the one from snn.lib seems to be
> picked over my definition. Code:
>
> __gshared extern(C) int _tls_used = 0;
> __gshared extern(C) int _tls_index = 0;
>
> int main()
> {
> return _tls_used + _tls_index;
> }
>
> Regards,
> Alex
>
> On Fri, Jan 20, 2012 at 9:33 AM, Rainer Schuetze<r.sagitario at gmx.de> wrote:
>> You have to redefine both symbols _tls_index and _tls_used.
>>
>>
>> On 20.01.2012 08:41, Alex wrote:
>>> This doesn't seem to work:
>>>
>>> __gshared extern(C) int _tls_used = 0;
>>>
>>> int main()
>>> {
>>> return _tls_used;
>>> }
More information about the dmd-internals
mailing list