-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[m68k] Add support for thread local storage #60354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-backend-m68k |
It is hilarious that I can always break though the bottleneck upon submitting issue. And this time is no exception. The reason gcc does not use general-dynamic model is due to the absense of this parameter :
Although I still don't know why I'm still eager to know what should we take care when implementing TLS support. Any comment is precisous and will be appreciated. |
If there was ever a TLS ABI defined for SVR4 on 68K, then that’s what should probably be used initially. |
The following text describes the m68k TLS and NPTL ABI as it was designed by CodeSourcery. Source: https://lists.debian.org/debian-68k/2007/11/msg00071.html
|
Joseph Myers was kind enough to provide an updated version of the documentation via email. He says, he cannot guarantee though the documentation reflects the actual implementation by 100%.
|
I have a queation: what is the difference between They seems to have almost the same functionality, and gcc use Here is the description respectively:
There is a nuanced difference: The description of
I guess this may affect the correctness of the pc-relative relocation ? I mean, if we use |
https://mrjester.hapisan.com/04_MC68/Sect05Part06/Index.html |
It is also worth mentioning that 68020+ offers also the As for the relocation, to have a truly relocatable code you can't use |
While otherwise semantically identical, |
I have a dumb question:
What does DTP mean here ? |
Candidate patch: D143317. |
Nice, that was really fast! PS: I have asked the author of the TLS ABI document for the explanation of what DTP means, but I haven't heard back yet. |
According to Joseph Myers, DTP stands for "Dynamic Thread Pointer" which is relevant for the linker only. |
Candidate patch: D144941 |
close by 4c2ec08 |
This is a place for discussion regarding the support of TLS on m68k.
This issue blocks #59161.
cc @glaubitz
Reference for TLS.
A terse description of TLS
There are four access model for TLS
The first one is the most generic one and is able to handle all possible cases. 2, 3 and 4 are optimization under certain circumstances.
Current status of gcc
It is weird that gcc seems to only support the two more-restricted access model: inital exec and local exec.
The other two, general dynamic and local dynamic, are unsupported, which may causes problem with dynamically loaded object.
You can attest this claim with the following code:
It still uses the initial-exec model instead of general-dynamic model specified in the command line.
I have no idea why gcc fails to support the general-dynamic model. Or maybe my understanding is incorrect ?
What should we do now ?
We need to know the status of the runtime (glibc and linux) so that we can decided to what extent we need to support.
The text was updated successfully, but these errors were encountered: