[AAELF64] Allow R_AARCH64_TLS_DTPREL to be used statically.
Permit the R_AARCH64_TLS_DTPREL dynamic relocation to be used statically so that debug information can describe the location of TLS variables.
All code sequences to access TLS data use immediates, hence all existing static TLS relocations are instruction relocations.
To describe the location of a TLS variable in debug information requires a static data relocation. The necessary expression needed is DTPREL(S + A) which is performed by the traditional dialect dynamic relocation R_AARCH64_TLS_DTPREL.
There is prior art in the x86_64 and PPC64 ABIs to use the equivalent relocation R_X86_64_DTPOFF64 and R_PPC_DTPREL64 respectively for relocating debug information statically.
We also introduce a syntax for assembler operators operating on data directives, with an instance %dtprel(expr) to generate R_AARCH64_DTPREL.
The 32-bit Arm ABI uses the R_ARM_TLS_LDO32 static local dynamic relocation. The advantage of using local dynamic is that these only apply to a TLS variable local to the module so no additional note is needed. An alternative design adds a new relocation code to local dynamic.
fixes: https://github.com/ARM-software/abi-aa/issues/176
I've chosen to use %operator(expr) for data directives following the conversation in https://github.com/llvm/llvm-project/issues/132570 based on https://maskray.me/blog/2025-03-16-relocation-generation-in-assemblers