[PATCH] D43860: [AArch64] DWARF: do not generate AT_location for thread local

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 26 01:49:47 PDT 2018


peter.smith added a comment.

I had a quick look at the PR last week after some people mentioned that they were seeing link errors in their project and were blaming the linker and not the compiler. I'm not a debug expert so it would be best to get someone else to look over the test case. I think the source code changes are probably the best that we can do right now.

To the best of my knowledge there is currently no way of expressing a relocation for the debug location in the AArch64 ABI. All the existing TLS relocations are with respect to instructions with small immediate fields, there is no equivalent to the DTPREL relocation for data that other Targets are using so there is no way of describing the location from debug data. At the moment I'm trying to work out if this is a limitation of the descriptor based TLS model that AArch64 uses or whether this is just an oversight in the design of the ABI. GCC for Arm does implement the descriptor based model with -mtls-model=gnu2, this uses the same relocation for debug as the non-descriptor based model; however I'm not confident that this is guaranteed to be correct.

I'm going to speak to some colleagues  that work on GCC and will raise an issue on the AArch64 ABI if it is a missing feature. This might make it possible to remove this patch if linker and debugger support becomes available later.


Repository:
  rL LLVM

https://reviews.llvm.org/D43860





More information about the llvm-commits mailing list