This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: Mips, -fpie and TLS management


2009/3/17 Daniel Jacobowitz <drow@false.org>:
> On Tue, Mar 17, 2009 at 10:26:05AM +0100, Joel Porquet wrote:
>> I don't understand how the runtime loader could know that! As far as I
>> know, the tls model is not embedded in reloc information.
>
> Sure it is. ?I suggest you go back to Ulrich Drepper's TLS paper
> for more information about the relocations.

The only information is whether the module uses a static model. So we
are able to distinguish *-dynamic from *-exec models. Nevertheless, I
still don't see how the runtime loader can distinguish local-dynamic
and global-dynamic: when it goes through the relocations, it only sees
*DTPMOD32 which is common for both models.

>> I don't know how to figure this out (actually, that's why I'm writing
>> on this ml). I just wrote a small function which uses a tls variable
>> and gcc did the rest.
>>
>> __thread unsigned int *tty;
>> void puts(char *str)
>> {
>> ? ? while(*str)
>> ? ? ? ? *tty = *str++;
>> }
>
> If you believe there is a bug, and you have a testcase, please report
> it in bugzilla. ?Thanks.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]