Comment 1 for bug 739374

Peter Maydell (pmaydell) wrote :

Note that the approach taken by that patch is that when writing the TLS register we move bit 20 down into bit 0, and then on reading we move bit 0 back up into bit 20. So this requires changes to everything that reads or writes the TLS register. There are Android patches that do this for libc and the kernel; however gcc will happily emit inline TLS register accesses for __thread variables if it is compiling for armv7, because it knows the CP15 register must exist. Presumably for Android the idea is that code going onto the device can be controlled sufficiently to mandate compiling with non-inline TLS accesses. Unfortunately I don't think that's going to fly for a generic Linux...