[PATCH] D26238: [LLD][ARM] Correct ARM TLS GOT entries without dynamic relocations.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 12:39:16 PST 2016
rafael added inline comments.
================
Comment at: ELF/OutputSections.cpp:394
+ if (B->IsTlsGotRel)
+ VA += alignTo(Target->TcbSize, Out<ELFT>::TlsPhdr->p_align);
+ uint8_t *Entry = Buf + B->GotIndex * sizeof(uintX_t);
----------------
This is the same value as what R_TLS would compute, no?
now that the got is a synthetic section, it has a Relocations array. Could we maybe use that instead of Entries? So the code for having a non zero value in the got would become something like
In<ELFT>::Got.Relocations.push_back({R_ABS, Target->?, }Body.getGotPltOffset<ELFT>() , 0, &Body})
Do you think that would be better? If not something like this (rebase now that .got is a synthetic section) is probably ok.
https://reviews.llvm.org/D26238
More information about the llvm-commits
mailing list