[PATCH] D66274: [ELF][Hexagon] Replace R_HEXAGON_GOT with R_GOTPLT
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 10:03:03 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL369128: [ELF][Hexagon] Replace R_HEXAGON_GOT with R_GOTPLT (authored by MaskRay, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66274/new/
https://reviews.llvm.org/D66274
Files:
lld/trunk/ELF/Arch/Hexagon.cpp
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/Relocations.cpp
lld/trunk/ELF/Relocations.h
Index: lld/trunk/ELF/Relocations.cpp
===================================================================
--- lld/trunk/ELF/Relocations.cpp
+++ lld/trunk/ELF/Relocations.cpp
@@ -344,9 +344,9 @@
// returns false for TLS variables even though they need GOT, because
// TLS variables uses GOT differently than the regular variables.
static bool needsGot(RelExpr expr) {
- return oneof<R_GOT, R_GOT_OFF, R_HEXAGON_GOT, R_MIPS_GOT_LOCAL_PAGE,
- R_MIPS_GOT_OFF, R_MIPS_GOT_OFF32, R_AARCH64_GOT_PAGE_PC,
- R_GOT_PC, R_GOTPLT>(expr);
+ return oneof<R_GOT, R_GOT_OFF, R_MIPS_GOT_LOCAL_PAGE, R_MIPS_GOT_OFF,
+ R_MIPS_GOT_OFF32, R_AARCH64_GOT_PAGE_PC, R_GOT_PC, R_GOTPLT>(
+ expr);
}
// True if this expression is of the form Sym - X, where X is a position in the
@@ -369,7 +369,7 @@
static bool isStaticLinkTimeConstant(RelExpr e, RelType type, const Symbol &sym,
InputSectionBase &s, uint64_t relOff) {
// These expressions always compute a constant
- if (oneof<R_DTPREL, R_GOTPLT, R_GOT_OFF, R_HEXAGON_GOT, R_TLSLD_GOT_OFF,
+ if (oneof<R_DTPREL, R_GOTPLT, R_GOT_OFF, R_TLSLD_GOT_OFF,
R_MIPS_GOT_LOCAL_PAGE, R_MIPS_GOTREL, R_MIPS_GOT_OFF,
R_MIPS_GOT_OFF32, R_MIPS_GOT_GP_PC, R_MIPS_TLSGD,
R_AARCH64_GOT_PAGE_PC, R_GOT_PC, R_GOTONLY_PC, R_GOTPLTONLY_PC,
Index: lld/trunk/ELF/Arch/Hexagon.cpp
===================================================================
--- lld/trunk/ELF/Arch/Hexagon.cpp
+++ lld/trunk/ELF/Arch/Hexagon.cpp
@@ -103,7 +103,7 @@
case R_HEX_GOT_11_X:
case R_HEX_GOT_16_X:
case R_HEX_GOT_32_6_X:
- return R_HEXAGON_GOT;
+ return R_GOTPLT;
default:
return R_ABS;
}
Index: lld/trunk/ELF/Relocations.h
===================================================================
--- lld/trunk/ELF/Relocations.h
+++ lld/trunk/ELF/Relocations.h
@@ -82,7 +82,6 @@
R_AARCH64_RELAX_TLS_GD_TO_IE_PAGE_PC,
R_AARCH64_TLSDESC_PAGE,
R_ARM_SBREL,
- R_HEXAGON_GOT,
R_MIPS_GOTREL,
R_MIPS_GOT_GP,
R_MIPS_GOT_GP_PC,
Index: lld/trunk/ELF/InputSection.cpp
===================================================================
--- lld/trunk/ELF/InputSection.cpp
+++ lld/trunk/ELF/InputSection.cpp
@@ -672,8 +672,6 @@
case R_GOT_PC:
case R_RELAX_TLS_GD_TO_IE:
return sym.getGotVA() + a - p;
- case R_HEXAGON_GOT:
- return sym.getGotVA() - in.gotPlt->getVA();
case R_MIPS_GOTREL:
return sym.getVA(a) - in.mipsGot->getGp(file);
case R_MIPS_GOT_GP:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66274.215629.patch
Type: text/x-patch
Size: 2531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190816/2d8afe7b/attachment.bin>
More information about the llvm-commits
mailing list