[PATCH] D47507: [MC] [X86] Teach leaq _GLOBAL_OFFSET_TABLE(%rip), %r15 to use R_X86_64_GOTPC32 instead of R_X86_64_PC32

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 14:21:51 PDT 2018


ruiu added a comment.

I'm not very familiar with this code, so please take it with a grain of salt.



================
Comment at: lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:355-356
     ImmOffset -= 4;
+    if (StartsWithGlobalOffsetTable(Expr) != GOT_None)
+      FixupKind = MCFixupKind(X86::reloc_global_offset_table);
+  }
----------------
Is this the right place to add this code? There's code in this function that also set the same value to FixupKind. Can't you merge them?


Repository:
  rL LLVM

https://reviews.llvm.org/D47507





More information about the llvm-commits mailing list