Re: adding another tls dialect

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

 



trashmailer <my.1337.trash.mail@xxxxxxxxxxxxxx> writes:

> I have got gcc running and compile & link from linux for another os (all
> x86 though). Now I have got some source code given, that needs to be
> ported. Problem is that it uses thread local variables using the
> __thread-keyword and the code emited by gcc for thread local variables
> does not work right away (GS has a different purpose in this kernel and
> to get the actual thread local storage we need one more level of
> indirection).
> I omit the details here, as I believe they are not really relevant.
> What I want to do is make gcc emit code that supports this behavior.
>
> As the topic states, I believe that what I want to do can be achieved by
> adding another tls-dialect (in addition to the given ones: gnu, gnu2 and
> sun). I have had a look into the source code and my guess is that the
> i386.md file (and probably i386.h and i386.c) is mainly what I need (for
> now only the "initial-exec" is of interest, especially no dynamic model
> will be used).
>
> Can somebody confirm that I am on the right track?

Yes.

> Where else do I have to expect to make changes?

You should not have to change anything outside of the config/i386
directory.

> For now I am trying to understand the definitions in the .md file. Is
> there actually more to that (regarding my problem) than the defines in
> that file, e.g. some setup that is done beforehand or the like?

You should look at the TLS code in i386.c to see if it matters for you.
The exact details are really going to depend on the details of what you
are trying to do.

Ian


[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