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

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 03:40:04 PDT 2017


peter.smith abandoned this revision.
peter.smith added a comment.

I've split this into 3 reviews:
https://reviews.llvm.org/D31748 Split handleNoRelaxTlsRelocation into ARM and Mips specific impls
https://reviews.llvm.org/D31749 Fix ARM TLS global dynamic TlsOffsetRel for non-preemtible symbols
https://reviews.llvm.org/D31751 Tidy up handleARMTlsRelocation [NFC]
To separate out the refactoring from the fix.

I've also put some extra comments in the handleARMTlsRelocation to explain a bit more about what the ABI requires.

My understanding is that only ARM and Mips need to write TLS entries directly into the GOT this way is because the Local and Global Dynamic TLS can't be relaxed to Initial Exec and Local Exec, on all other Targets including AArch64 (ARM != AArch64) we never have to use the GOT for the cases where it is required on ARM and Mips (static linking) as it is these cases that can be relaxed. A possibility is to have an ARMGotSection as well as a MipsGotSection that handles TLS Entries separately. This would mean that ARM and Mips could probably share the same handleNoRelaxTlsRelocation without many extra conditions. It would mean duplicating some of the code in GotSection for ARM which is what put me off doing so at the time.


https://reviews.llvm.org/D31672





More information about the llvm-commits mailing list