diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-04 22:58:54 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-04 22:58:54 +0000 |
commit | 869ed6990db9f42c79706f4f09fb0df685f1a3f1 (patch) | |
tree | f26b7264b3feedcf490c27d04e382eb951afe02d | |
parent | 41561f4e296c89809e178a87c76321444f8a8816 (diff) |
Rename adjustRelaxGotExpr.
It will be used for more than just gots.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@271812 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | ELF/Relocations.cpp | 2 | ||||
-rw-r--r-- | ELF/Target.cpp | 12 | ||||
-rw-r--r-- | ELF/Target.h | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/ELF/Relocations.cpp b/ELF/Relocations.cpp index d2f0272ed..193fa051e 100644 --- a/ELF/Relocations.cpp +++ b/ELF/Relocations.cpp @@ -388,7 +388,7 @@ static RelExpr adjustExpr(const elf::ObjectFile<ELFT> &File, SymbolBody &Body, 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)) diff --git a/ELF/Target.cpp b/ELF/Target.cpp index c18e45b61..dc63dae0d 100644 --- a/ELF/Target.cpp +++ b/ELF/Target.cpp @@ -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(uint32_t Type) const { 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_t *Loc, uint32_t Type, } } -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]; diff --git a/ELF/Target.h b/ELF/Target.h index 5fa1181f5..65f25755d 100644 --- a/ELF/Target.h +++ b/ELF/Target.h @@ -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; |