[lld] r271812 - Rename adjustRelaxGotExpr.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 4 15:58:56 PDT 2016
Author: rafael
Date: Sat Jun 4 17:58:54 2016
New Revision: 271812
URL: http://llvm.org/viewvc/llvm-project?rev=271812&view=rev
Log:
Rename adjustRelaxGotExpr.
It will be used for more than just gots.
Modified:
lld/trunk/ELF/Relocations.cpp
lld/trunk/ELF/Target.cpp
lld/trunk/ELF/Target.h
Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=271812&r1=271811&r2=271812&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Sat Jun 4 17:58:54 2016
@@ -388,7 +388,7 @@ static RelExpr adjustExpr(const elf::Obj
if (needsPlt(Expr))
Expr = fromPlt(Expr);
if (Expr == R_GOT_PC)
- Expr = Target->adjustRelaxGotExpr(Type, Data + Offset, Expr);
+ Expr = Target->adjustRelaxExpr(Type, Data + Offset, Expr);
}
if (IsWrite || isStaticLinkTimeConstant<ELFT>(Expr, Type, Body))
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=271812&r1=271811&r2=271812&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Sat Jun 4 17:58:54 2016
@@ -113,8 +113,8 @@ public:
int32_t Index, unsigned RelOff) const override;
void relocateOne(uint8_t *Loc, uint32_t Type, uint64_t Val) const override;
- RelExpr adjustRelaxGotExpr(uint32_t Type, const uint8_t *Data,
- RelExpr Expr) const override;
+ RelExpr adjustRelaxExpr(uint32_t Type, const uint8_t *Data,
+ RelExpr Expr) const override;
void relaxGot(uint8_t *Loc, uint64_t Val) const override;
void relaxTlsGdToIe(uint8_t *Loc, uint32_t Type, uint64_t Val) const override;
void relaxTlsGdToLe(uint8_t *Loc, uint32_t Type, uint64_t Val) const override;
@@ -238,8 +238,8 @@ bool TargetInfo::isTlsGlobalDynamicRel(u
return false;
}
-RelExpr TargetInfo::adjustRelaxGotExpr(uint32_t Type, const uint8_t *Data,
- RelExpr Expr) const {
+RelExpr TargetInfo::adjustRelaxExpr(uint32_t Type, const uint8_t *Data,
+ RelExpr Expr) const {
return Expr;
}
@@ -739,8 +739,8 @@ void X86_64TargetInfo::relocateOne(uint8
}
}
-RelExpr X86_64TargetInfo::adjustRelaxGotExpr(uint32_t Type, const uint8_t *Data,
- RelExpr RelExpr) const {
+RelExpr X86_64TargetInfo::adjustRelaxExpr(uint32_t Type, const uint8_t *Data,
+ RelExpr RelExpr) const {
if (Type != R_X86_64_GOTPCRELX && Type != R_X86_64_REX_GOTPCRELX)
return RelExpr;
const uint8_t Op = Data[-2];
Modified: lld/trunk/ELF/Target.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=271812&r1=271811&r2=271812&view=diff
==============================================================================
--- lld/trunk/ELF/Target.h (original)
+++ lld/trunk/ELF/Target.h Sat Jun 4 17:58:54 2016
@@ -89,8 +89,8 @@ public:
uint32_t ThunkSize = 0;
- virtual RelExpr adjustRelaxGotExpr(uint32_t Type, const uint8_t *Data,
- RelExpr Expr) const;
+ virtual RelExpr adjustRelaxExpr(uint32_t Type, const uint8_t *Data,
+ RelExpr Expr) const;
virtual void relaxGot(uint8_t *Loc, uint64_t Val) const;
virtual void relaxTlsGdToIe(uint8_t *Loc, uint32_t Type, uint64_t Val) const;
virtual void relaxTlsGdToLe(uint8_t *Loc, uint32_t Type, uint64_t Val) const;
More information about the llvm-commits
mailing list