[PATCH] D60941: [ELF][X86] Rename R_RELAX_TLS_GD_TO_IE_END to R_RELAX_TLS_GD_TO_IE_GOTPLT
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 20 23:52:37 PDT 2019
MaskRay created this revision.
MaskRay added a reviewer: ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
This relocation type is used by R_386_TLS_GD. Its formula is the same as
R_GOTPLT (e.g R_X86_64_GOT{32,64} R_386_TLS_GOTIE). Rename it to be clearer.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D60941
Files:
ELF/Arch/X86.cpp
ELF/InputSection.cpp
ELF/Relocations.h
Index: ELF/Relocations.h
===================================================================
--- ELF/Relocations.h
+++ ELF/Relocations.h
@@ -49,8 +49,8 @@
R_RELAX_GOT_PC_NOPIC,
R_RELAX_TLS_GD_TO_IE,
R_RELAX_TLS_GD_TO_IE_ABS,
- R_RELAX_TLS_GD_TO_IE_END,
R_RELAX_TLS_GD_TO_IE_GOT_OFF,
+ R_RELAX_TLS_GD_TO_IE_GOTPLT,
R_RELAX_TLS_GD_TO_LE,
R_RELAX_TLS_GD_TO_LE_NEG,
R_RELAX_TLS_IE_TO_LE,
Index: ELF/InputSection.cpp
===================================================================
--- ELF/InputSection.cpp
+++ ELF/InputSection.cpp
@@ -632,7 +632,7 @@
case R_GOTPLTREL:
return Sym.getVA(A) - In.GotPlt->getVA();
case R_GOTPLT:
- case R_RELAX_TLS_GD_TO_IE_END:
+ case R_RELAX_TLS_GD_TO_IE_GOTPLT:
return Sym.getGotVA() + A - In.GotPlt->getVA();
case R_TLSLD_GOT_OFF:
case R_GOT_OFF:
@@ -908,7 +908,7 @@
case R_RELAX_TLS_GD_TO_IE:
case R_RELAX_TLS_GD_TO_IE_ABS:
case R_RELAX_TLS_GD_TO_IE_GOT_OFF:
- case R_RELAX_TLS_GD_TO_IE_END:
+ case R_RELAX_TLS_GD_TO_IE_GOTPLT:
Target->relaxTlsGdToIe(BufLoc, Type, TargetVA);
break;
case R_PPC_CALL:
Index: ELF/Arch/X86.cpp
===================================================================
--- ELF/Arch/X86.cpp
+++ ELF/Arch/X86.cpp
@@ -161,7 +161,7 @@
default:
return Expr;
case R_RELAX_TLS_GD_TO_IE:
- return R_RELAX_TLS_GD_TO_IE_END;
+ return R_RELAX_TLS_GD_TO_IE_GOTPLT;
case R_RELAX_TLS_GD_TO_LE:
return R_RELAX_TLS_GD_TO_LE_NEG;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60941.195985.patch
Type: text/x-patch
Size: 1487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190421/1a561334/attachment.bin>
More information about the llvm-commits
mailing list