[uclibc-ng-devel] Status of TLS and NPTL support for noMMU
jcmvbkbc at gmail.com
Tue Sep 22 22:17:04 CEST 2015
On Tue, Sep 22, 2015 at 7:25 PM, Rich Felker <dalias at libc.org> wrote:
> As far as I can tell, the bFLT format and linker scripts used have no
> way to represent the location/size of the TLS image, so inability to
> initialize TLS makes sense. I think this could be solved by having the
> linker script put symbols around the TLS image and referencing the
> symbols rather than ELF headers to find it. Of course dropping bFLT
> and using FDPIC or regular ELF would be the ideal solution.
> I've looked at this all recently; see this and the containing thread:
Thanks for the hints, I've only started looking at FDPIC ABI.
>> So my questions are:
>> - are TLS and NPTL supported by uClibc for uclinux?
>> - if not, what are the supported threading options?
> At this point, I think the answer is no, and it would probably be
> considerable work to get it working. Nothing that's prohibitively
> difficult for someone familiar with the code and linking/binfmt
> topics, but still time-consuming.
> The old LinuxThreads may or may not work (for some limited definition
> of "work") on some NOMMU targets. It probably varies from one to
> another so I don't think there's a single answer to your second
> question without knowing which target(s) you care about.
They appear to work, at least for my simple tests.
> What I would recommend if you need threads/TLS, but I'm naturally
> biased: I'm presently working on FDPIC-based NOMMU support in musl
> libc with thread and TLS support matching normal targets with MMU.
> It's already mostly working and progressing rapidly, but the only
> supported target so far is SH. Getting more NOMMU targets added would
> be great.
I'm currently in the middle of porting musl to xtensa, I guess after
making it work I'll look closer at adding noMMU support to it.
More information about the devel