[PATCH] D48090: [PPC64] global dynamic to initial exec relaxation

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 12 13:16:59 PDT 2018


ruiu added a comment.

Can you give me a pointer to the spec describing these relaxations?



================
Comment at: ELF/Arch/PPC64.cpp:408
 }
+RelExpr PPC64::adjustRelaxExpr(RelType Type, const uint8_t *Data,
+                               RelExpr Expr) const {
----------------
Add a blank line


================
Comment at: ELF/Arch/PPC64.cpp:410
+                               RelExpr Expr) const {
+  if (Expr == R_RELAX_TLS_GD_TO_IE) {
+    return R_RELAX_TLS_GD_TO_IE_GOT_OFF;
----------------
nit:? remove {}


================
Comment at: ELF/InputSection.cpp:784
     case R_PPC_CALL:
+      //  If this is a call to __tls_get_addr, it may be part of a TLS
+      // sequence that has been relaxed and turned into a nop. In this
----------------
Remove an extra space character at beginning of the sentence.


================
Comment at: ELF/InputSection.cpp:787
+      // case, we don't want to handle it as a call.
+        if (read32(BufLoc) == 0x60000000) // nop
+          break;
----------------
Wrong indentation.


================
Comment at: ELF/Relocations.h:70
   R_RELAX_TLS_GD_TO_IE_END,
+  R_RELAX_TLS_GD_TO_IE_GOT_OFF,
   R_RELAX_TLS_GD_TO_IE_PAGE_PC,
----------------
Did you really have to add these two new types? I'm not claiming that they are unnecessary, I'm just wondering, so could you please explain why the existing types don't work for you?


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D48090





More information about the llvm-commits mailing list