[PATCH] D21606: [ELF][MIPS] Support MIPS TLS relocations
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 22:06:29 PDT 2016
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: ELF/InputSection.cpp:224
@@ +223,3 @@
+ case R_MIPS_TLSGD:
+ return Out<ELFT>::Got->getGlobalDynOffset(Body) +
+ Out<ELFT>::Got->getMipsTlsOffset() - MipsGPOffset;
----------------
No need to add an addend?
================
Comment at: ELF/OutputSections.cpp:140
@@ +139,3 @@
+ // GOT entries created for MIPS TLS relocations behave like
+ // almost GOT entries from other ABIs. They go the the end
+ // of the global offset table.
----------------
"the the"
================
Comment at: ELF/Target.cpp:1711-1715
@@ -1708,5 +1710,7 @@
PltRel = R_MIPS_JUMP_SLOT;
if (ELFT::Is64Bits)
RelativeRel = (R_MIPS_64 << 8) | R_MIPS_REL32;
else
RelativeRel = R_MIPS_REL32;
+ if (ELFT::Is64Bits) {
+ TlsGotRel = R_MIPS_TLS_TPREL64;
----------------
Merge these two `if`s and `else`s.
Repository:
rL LLVM
http://reviews.llvm.org/D21606
More information about the llvm-commits
mailing list