tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Feature request: _Thread_local (and a possible bug)


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Feature request: _Thread_local (and a possible bug)
Date: Sun, 03 Nov 2013 23:34:50 +0800
User-agent: KMail/4.10.5 (Linux/2.6.38-ac2-ac100; KDE/4.10.5; armv7l; ; )

Le jeudi 31 octobre 2013 16:17:00 Thomas Preud'homme a écrit :
> Le mercredi 30 octobre 2013 19:40:10 Robert Clausecker a écrit :
> > I see nothing in the patch you made that indicates any special access
> > conventions to thread-local variables (such as %fs-relative
> > instructions). It might very well be possible that I missed that, but I
> > can't test because tcc does not compile the code at all on my machine.
> 
> Right, it just handles the syntax and the ELF part. I'll improve the patch.

Well, I was way too optimist as to the complexity of TLS. After reading the 
document from Ulrich Drepper on TLS and a few search on google I realized that 
at least the following are missing :

- segment register not select in load and store
- no relocation added for computing offset of per-thread symbol
- no support for TLS-specific relocations (link-time and run-time)
- no program header added as per Drepper document about TLS

I also need to think about what part of the dynamic machinery are needed for 
tcc -run and what part will be taken care of by ld.so. That answer might be 
obvious but it's getting late for me and I haven't given it much thought.

Since it's going to take some time to implement, I'll give the priority to 
other long work I had put aside such as ARM calling convention refactoring (+ 
add comments) and returning of struct in registers. In other words, TLS is not 
going to happen soon.

Best regards,

Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]