summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Relocations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Relocations.cpp')
-rw-r--r--lld/ELF/Relocations.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index bc4f4b21bc3..e7c1c522cb9 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -778,9 +778,8 @@ static RelExpr processRelocAux(InputSectionBase &Sec, RelExpr Expr,
InX::RelaDyn->addReloc(Target->RelativeRel, &Sec, Offset, &Sym, Addend,
Expr, Type);
return Expr;
- } else if (Target->isPicRel(Type)) {
- InX::RelaDyn->addReloc(Target->getDynRel(Type), &Sec, Offset, &Sym,
- Addend, R_ADDEND, Type);
+ } else if (RelType Rel = Target->getDynRel(Type)) {
+ InX::RelaDyn->addReloc(Rel, &Sec, Offset, &Sym, Addend, R_ADDEND, Type);
// MIPS ABI turns using of GOT and dynamic relocations inside out.
// While regular ABI uses dynamic relocations to fill up GOT entries
OpenPOWER on IntegriCloud