[PATCH] D19778: [sanitizers] [SystemZ] Add __tls_get_offset interceptor.
Marcin KoĆcielnicki via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 13:51:56 PDT 2016
koriakin added a comment.
In http://reviews.llvm.org/D19778#419152, @eugenis wrote:
> All these macro definitions and conditionals make __tls_get_addr interceptor confusing.
> Maybe just copy the whole thing, then you'll end up with a few duplicated lines of code, but each version would be a lot simpler.
OK.
> Is it possible to avoid this module-level asm by implementing an honest interceptor for __tls_get_offset, and a tiny chunk of asm that simply returns %r12, or finds the address of GOT some other way (aren't there linker symbols for the start of each section?) ?
Finding the address of GOT would be rather hard (you need the caller's GOT not your own, so the symbol isn't of much use). A tiny chunk of asm in a function would be nice, but by that point the register allocator could've already used %r12 for something else. A naked function would make this code slightly less ugly, but it's not supported by gcc for s390. I really don't see how to avoid that top-level assembly...
Repository:
rL LLVM
http://reviews.llvm.org/D19778
More information about the llvm-commits
mailing list