diff options
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r-- | lld/ELF/Writer.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 6bb13912499..d3505aba2ba 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -609,11 +609,8 @@ void Writer<ELFT>::scanRelocs(InputSectionBase<ELFT> &C, ArrayRef<RelTy> Rels) { // We can however do better than just copying the incoming relocation. We // can process some of it and and just ask the dynamic linker to add the // load address. - if (Target->isSizeRel(Type)) { - C.Relocations.push_back({R_SIZE, Type, Offset, Addend, &Body}); - continue; - } - if (!Config->Pic || Target->isRelRelative(Type) || Expr == R_PC) { + if (!Config->Pic || Target->isRelRelative(Type) || Expr == R_PC || + Expr == R_SIZE) { if (Config->EMachine == EM_MIPS && Body.isLocal() && (Type == R_MIPS_GPREL16 || Type == R_MIPS_GPREL32)) Expr = R_MIPS_GP0; |