The standard local dynamic model for TLS on ARM systems needs two relocations for each data access:
- R_ARM_TLS_LDM32 (module idx)
- R_ARM_TLS_LDO32 (offset of object from origin of module TLS block)
In GNU style assembler we use symbol(tlsldm) and symbol(tlsldo) to produce these relocations.
llvm-mc for ARM supports symbol(tlsldo) but does not support symbol(tlsldm). This patch wires up the existing symbol(tlsldm) support in the assembler to the R_ARM_TLS_LDM32 relocation.
This change is for llvm-mc only, it does not implement lowering of generated TLS code to local-dynamic (-mtls-model=local-dynamic).
TLS for ARM is defined in Addenda to, and Errata in, the ABI for the ARM Architecture