diff options
| author | George Rimar <grimar@accesssoftek.com> | 2015-12-01 18:24:07 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2015-12-01 18:24:07 +0000 |
| commit | b17f739808a7956b6b443ac1e005c42872fdc4a8 (patch) | |
| tree | dbbc57d3606f04b65db0a121b274f9c188117482 /lld/ELF/Writer.cpp | |
| parent | 60849f291340b3599219eb42dce91062b2f3596c (diff) | |
| download | bcm5719-llvm-b17f739808a7956b6b443ac1e005c42872fdc4a8.tar.gz bcm5719-llvm-b17f739808a7956b6b443ac1e005c42872fdc4a8.zip | |
Reapply r254428.
Fix was:
uint32_t getLocalTlsIndexVA() { return getVA() + LocalTlsIndexOff; }
=>
uint32_t getLocalTlsIndexVA() { return Base::getVA() + LocalTlsIndexOff; }
Both works for my MSVS.
Original commit message:
[ELF] - Refactor of tls_index implementation for tls local dynamic model.
Patch contains the next 2 changes:
1) static variable Out<ELFT>::LocalModuleTlsIndexOffset moved to Out<ELFT>::Got. At fact there is no meaning for it to be separated from GOT class because at each place of using it anyways needs to call GOT`s getVA(). Also it is impossible to have that offset and not have GOT.
2) addLocalModuleTlsIndex -> addLocalModelTlsIndex (word "Module" changed to "Model"). Not sure was it a mistype or not but I think that update is closer to Urlich terminology.
Differential revision: http://reviews.llvm.org/D15113
llvm-svn: 254433
Diffstat (limited to 'lld/ELF/Writer.cpp')
| -rw-r--r-- | lld/ELF/Writer.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 11fb9b020d4..16dedc53a4e 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -205,11 +205,8 @@ void Writer<ELFT>::scanRelocs( if (Target->isTlsLocalDynamicReloc(Type)) { if (Target->isTlsOptimized(Type, nullptr)) continue; - if (Out<ELFT>::LocalModuleTlsIndexOffset == uint32_t(-1)) { - Out<ELFT>::LocalModuleTlsIndexOffset = - Out<ELFT>::Got->addLocalModuleTlsIndex(); + if (Out<ELFT>::Got->addLocalModelTlsIndex()) Out<ELFT>::RelaDyn->addReloc({&C, &RI}); - } continue; } |

