Force global-dynamic TLS model

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Apologies if this has already been answered before.

I am experimenting with thread-local variables. I was wondering if it is
possible to make gcc force a specific TLS access model for some TLS
variables.

For example, let's say we have an ELF executable that defines and
accesses a TLS variable. From gcc's man page, I read that, in this case,
gcc will use the initial-exec TLS model by default. My question is if we
can change that and, say, use the global-dynamic model. To this end, I
have tried the `-ftls-model=global-dynamic` option and the `tls_model`
gcc variable attribute. None of these worked.

So, my question is: In this particular example, can we force gcc to use
the global-dynamic instead of the initial-exec TLS model?  And, in
general, can we force gcc to use global-dynamic for all accesses to
thread-local variables?

Thanks,
Nikos



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux