[PATCH] D31672: [LLD][ELF] Fix ARM TLS global dynamic TlsOffsetRel for non-preemptible symbols

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 16:32:02 PDT 2017


ruiu added a comment.

Currently, we add a relocation to a GOT section to set a GOT slot for a TLS variable to 1. But that is an intricate way of setting it to 1, because when we add a relocation, we already have a reference to GOT. We should be able to directly set it to 1, instead of doing it indirectly using relocate().

What I was trying to do is to separate the GOT class into two classes -- one for the regular GOT and the other is for TLS variables. TLS variables use GOT slots very differently than regular variables, I think that will reduce complexity. (But doing that isn't easy as I don't understand some parts of MIPS/AArch64 TLS variables ABIs.)


https://reviews.llvm.org/D31672





More information about the llvm-commits mailing list