http://bugs.winehq.org/show_bug.cgi?id=31308
--- Comment #1 from Anastasius Focht focht@gmx.net 2012-07-24 19:17:47 CDT --- Hello,
until the meaning/working of this "user" TLS register is known we could just write some magic value to it on thread init, forcing exception on access/dereference. This allows to trap/emulate the TLS access, checking for the magic value and give back some chunk of good memory. The problem would be newer Linux 3.3.5+ kernels that clear the value on context switch. We would have to analyse the code sequence, looking at previous opcode(s) for "MRC p15, 0, <Rd>, c13, c0, 2" to figure out if this was not a simple null pointer access by other code.
Best solution would be to have the kernel preserve TPIDRURW on context switch so Wine could mimic whatever Windows on ARM does.
Regards