summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 8d276ec2d65..5d98ff7c99b 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -573,9 +573,7 @@ void Writer<ELFT>::scanRelocs(InputSectionBase<ELFT> &C, ArrayRef<RelTy> Rels) {
}
// If a relocation needs GOT, we create a GOT slot for the symbol.
- if (Expr == R_GOT || Expr == R_GOT_OFF || Expr == R_MIPS_GOT ||
- Expr == R_MIPS_GOT_LOCAL || Expr == R_GOT_PAGE_PC || Expr == R_GOT_PC ||
- Expr == R_GOT_FROM_END) {
+ if (refersToGotEntry(Expr)) {
uint32_t T = Body.isTls() ? Target->getTlsGotRel(Type) : Type;
if (Config->EMachine == EM_MIPS && Expr == R_GOT_OFF)
Addend -= MipsGPOffset;
OpenPOWER on IntegriCloud