1. A software method for obtaining an address of a thread-local variable while executing a computer program, comprising the acts of: a) designating a memory location to store an address of a function; and b) after the computer program starts to run, obtaining the address of the thread-local variable by executing a function whose address is stored in the memory location when a module that references the thread-local variable is loaded.