[PATCH] D71822: [ELF] Delete the RelExpr member R_HINT. NFC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 22 17:11:44 PST 2019
MaskRay created this revision.
MaskRay added reviewers: grimar, jrtc27, peter.smith, ruiu.
Herald added subscribers: llvm-commits, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
R_HINT is ignored like R_NONE. There are no strong reasons to keep
R_HINT. The largest RelExpr member R_RISCV_PC_INDIRECT is 60 now.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71822
Files:
lld/ELF/Arch/ARM.cpp
lld/ELF/Arch/RISCV.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
@@ -1251,8 +1251,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 marker relocations.
+ if (oneof<R_NONE>(expr))
return;
// We can separate the small code model relocations into 2 categories:
Index: lld/ELF/Arch/RISCV.cpp
===================================================================
--- lld/ELF/Arch/RISCV.cpp
+++ lld/ELF/Arch/RISCV.cpp
@@ -229,7 +229,7 @@
case R_RISCV_RELAX:
case R_RISCV_ALIGN:
case R_RISCV_TPREL_ADD:
- return R_HINT;
+ return R_NONE;
default:
return R_ABS;
}
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.235083.patch
Type: text/x-patch
Size: 1613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191223/6fb8daaf/attachment-0001.bin>
More information about the llvm-commits
mailing list