This patch Implements the R_AARCH64_TLSLE_MOVW_TPREL_G*[_NC]. These are logically the same calculation as the existing TLSLE relocations with the result written back to mov[nz] and movk instructions. A typical code sequence is:
movz x0, #:tprel_g2:foo // bits [47:32] of R_TLS with overflow check movk x0, #:tprel_g1_nc:foo // bits [31:16] of R_TLS with no overflow check movk x0, #:tprel_g0_nc:foo // bits [15:0] of R_TLS with no overflow check
This type of code sequence is usually used with a large code model.
We also do not yet support the :dtprel_g*: and :gottprel_g*: associated with local dynamic and initial exec. These can be added in separate patches as they may need some thought over how to deal with relaxation. The tprel relocations are already local exec so can't be relaxed further.