[PATCH] D31672: [LLD][ELF] Fix ARM TLS global dynamic TlsOffsetRel for non-preemptible symbols
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 17:12:03 PDT 2017
ruiu added inline comments.
================
Comment at: ELF/Relocations.cpp:136
if (Target->isTlsGlobalDynamicRel(Type)) {
if (Got->addDynTlsEntry(Body) &&
----------------
The new code is probably fine, but as a whole I think I don't fully understand this piece of code because it is entangled and complicated. What is this for?
================
Comment at: ELF/Relocations.cpp:146
+ Got->Relocations.push_back({R_ABS, Target->TlsOffsetRel,
+ Off + Config->Wordsize, 0, &Body });
}
----------------
Format.
================
Comment at: ELF/Target.cpp:1845
case R_ARM_TLS_TPOFF32:
+ case R_ARM_TLS_DTPOFF32:
write32le(Loc, Val);
----------------
Instead of adding `Target->TlsOffsetRel`, can you add R_ARM_ABS32, so that it is obvious that it is just an abs relocation?
https://reviews.llvm.org/D31672
More information about the llvm-commits
mailing list