Re: Force global-dynamic TLS model

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

 



* Nikos Dragazis:

> 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.

Try -ftls-model=global-dynamic -fpic.  This will prevent GCC from
performing relaxation.  For many targets, the link editor still performs
relaxation.  To turn this off, you will have to link the executable with
-shared, I think, with some hackery to produce an executable that can
actually be run.

Thanks,
Florian




[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