[PATCH] D71822: [ELF] Delete the RelExpr member R_HINT. NFC

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 11:02:26 PST 2020


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbec1b55c64cf: [ELF] Delete the RelExpr member R_HINT. NFC (authored by MaskRay).

Changed prior to commit:
  https://reviews.llvm.org/D71822?vs=235171&id=238044#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71822/new/

https://reviews.llvm.org/D71822

Files:
  lld/ELF/Arch/ARM.cpp
  lld/ELF/Relocations.cpp
  lld/ELF/Relocations.h


Index: lld/ELF/Relocations.h
===================================================================
--- lld/ELF/Relocations.h
+++ lld/ELF/Relocations.h
@@ -40,7 +40,6 @@
   R_GOTPLT,
   R_GOTPLTREL,
   R_GOTREL,
-  R_HINT,
   R_NEG_TLS,
   R_NONE,
   R_PC,
Index: lld/ELF/Relocations.cpp
===================================================================
--- lld/ELF/Relocations.cpp
+++ lld/ELF/Relocations.cpp
@@ -1250,8 +1250,8 @@
   const uint8_t *relocatedAddr = sec.data().begin() + rel.r_offset;
   RelExpr expr = target->getRelExpr(type, sym, relocatedAddr);
 
-  // Ignore "hint" relocations because they are only markers for relaxation.
-  if (oneof<R_HINT, R_NONE>(expr))
+  // Ignore R_*_NONE and other marker relocations.
+  if (expr == R_NONE)
     return;
 
   // We can separate the small code model relocations into 2 categories:
Index: lld/ELF/Arch/ARM.cpp
===================================================================
--- lld/ELF/Arch/ARM.cpp
+++ lld/ELF/Arch/ARM.cpp
@@ -140,7 +140,7 @@
     // given address. It can be used to implement a special linker mode which
     // rewrites ARMv4T inputs to ARMv4. Since we support only ARMv4 input and
     // not ARMv4 output, we can just ignore it.
-    return R_HINT;
+    return R_NONE;
   default:
     return R_ABS;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71822.238044.patch
Type: text/x-patch
Size: 1293 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200114/9bbc5a35/attachment-0001.bin>


More information about the llvm-commits mailing list