[sanitizers] [SystemZ] Add __tls_get_offset interceptor.
s390 is special again - instead of __tls_get_addr, it has __tls_get_offset with special calling conventions: the result is TP relative, and the argument is GOT-relative. Since we need to get address of the caller's GOT, which is in %r12, we have to use assembly like glibc does. Aside of __tls_get_offset, glibc also implements a slightly saner __tls_get_addr_internal, which takes a pointer as argument, but still returns a TP-relative offset. It is used for dlsym() called on TLS symbols, so we have to intercept it was well. Our __tls_get_offset is also implemented by delegating to it. Differential Revision: http://reviews.llvm.org/D19778 llvm-svn: 273041
Loading
Please sign in to comment