[PATCH] D20664: [ELF][MIPS] Always resolve MIPS GP-relative relocations to 'local' definitions

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 06:11:28 PDT 2016

rafael added inline comments.

Comment at: ELF/Relocations.cpp:234
@@ -233,1 +233,3 @@
+static bool isForcedLinkTimeConstant(RelExpr E) {
+  // In case of MIPS GP-relative relocations always resolve to a definition
From the description it looks like what you want is

static bool isPreemptible(const SymbolBody &B, RelExpr E) {
  if (Config->EMachine == EM_MIPS &&  E == R_GOTREL)
    return false;
  return Body.isPreemptible();

and use that in here instead of a plain Body.isPreemptible.



More information about the llvm-commits mailing list