A software method for obtaining an address of a thread-local variable
while executing a computer program is described. The method designates a
memory location to store an address of a function. The method, after the
computer program starts to run, obtains the address of the thread-local
variable by executing a resolver function whose address is stored in the
memory location when a module that references the thread-local variable
is loaded. The resolver can be a lazy resolver function or other resolver
functions optimized for specific modules or variables.