title: What is the "___emutls_get_address" symbol?
body: <p>Oh, I am a newbie in GCC and MAC and Makefile. Today I intended to build a dynamic lib using MAC OS X and GCC 4.4.2, but when linking the .o files, the compiler complains like this:</p>
  
  <pre><code>Undefined symbols:
    "___emutls_get_address", referenced from:
        _malloc in michael.o
        _malloc in michael.o
  ld: symbol(s) not found
  </code></pre>
  
  <p>I googled this info, but I can't understand the results well, I wonder what does the symbol mean, and why lots of programs have this linking error. I also wonder what is the possible cause for this error, the linking command is:</p>
  
  <pre><code>g++ -Dx86 -D_GNU_SOURCE -D_REENTRANT  -Wall -m32 \
      -fno-strict-aliasing -fno-pic -O3 -ggdb \
      michael.o malloc_new.o -o libmichael.so \
      -lpthread -lm -lstdc++  -shared
  </code></pre>