[PATCH] [lld] [ELF] Support for general dynamic TLS relocations on X86_64

Rafael Auler rafaelauler at gmail.com
Fri Sep 26 14:10:41 PDT 2014


Sorry, my bad, I mixed up definitions. You are right, that would work well. However, usually compilers generate an undefine for __tls_get_addr that is just a regular, non-weak undefine. For example:

$ clang -c -o test.o -x c - <<< '__thread int my_tls_number = 0; int mynum() { return my_tls_number; }'
$ readelf -a test.o
...
    12: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND __tls_get_addr
...

http://reviews.llvm.org/D5505






More information about the llvm-commits mailing list