summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Relocations.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-06-04 19:11:14 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-06-04 19:11:14 +0000
commit12dc4469394dac2e55a7ac6bb4105c9d0aa8e0fe (patch)
tree06be3810e7534a41463a55e2e724dcbb2ddbf05b /lld/ELF/Relocations.cpp
parent1fcdc23a6e7b1f7fad79f9c924958b9c16e6ee1f (diff)
downloadbcm5719-llvm-12dc4469394dac2e55a7ac6bb4105c9d0aa8e0fe.tar.gz
bcm5719-llvm-12dc4469394dac2e55a7ac6bb4105c9d0aa8e0fe.zip
Fix implicit plt creation on aarch64.
We were not handling page relative relocations. llvm-svn: 271798
Diffstat (limited to 'lld/ELF/Relocations.cpp')
-rw-r--r--lld/ELF/Relocations.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index 48fb403b50e..d2f0272ed42 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -251,7 +251,8 @@ template <class ELFT> static bool isAbsolute(const SymbolBody &Body) {
}
static bool needsPlt(RelExpr Expr) {
- return Expr == R_PLT_PC || Expr == R_PPC_PLT_OPD || Expr == R_PLT;
+ return Expr == R_PLT_PC || Expr == R_PPC_PLT_OPD || Expr == R_PLT ||
+ Expr == R_PLT_PAGE_PC;
}
// True if this expression is of the form Sym - X, where X is a position in the
@@ -311,6 +312,8 @@ static RelExpr toPlt(RelExpr Expr) {
return R_PPC_PLT_OPD;
if (Expr == R_PC)
return R_PLT_PC;
+ if (Expr == R_PAGE_PC)
+ return R_PLT_PAGE_PC;
if (Expr == R_ABS)
return R_PLT;
return Expr;
OpenPOWER on IntegriCloud