I'd like to clean up the way that it figures out which special vars are thread slots, for sure.
But what else, if anything, is bad about what it's doing? The idea is that any global symbol can be known to have a tls-index. While it certainly works to have the loader figure out the thread slots just the same as any random symbol, that's not quite as good as can be, because the loader will be forced to use a 32-bit displacement to every thread slot.
the debugger regression is due to a wrong storage-class for one temp var.
The number it reports in the unbound variable turns out to be the symbol's address. I'm surprised we didn't have a test for the correct variable in an error handler.