@@ -50,8 +50,7 @@ class MipsELFObjectWriter : public MCELFObjectTargetWriter {
5050
5151 unsigned getRelocType (const MCFixup &, const MCValue &,
5252 bool IsPCRel) const override ;
53- bool needsRelocateWithSymbol (const MCValue &Val, const MCSymbol &Sym,
54- unsigned Type) const override ;
53+ bool needsRelocateWithSymbol (const MCValue &, unsigned Type) const override ;
5554 void sortRelocs (std::vector<ELFRelocationEntry> &Relocs) override ;
5655};
5756
@@ -440,15 +439,14 @@ void MipsELFObjectWriter::sortRelocs(std::vector<ELFRelocationEntry> &Relocs) {
440439 Relocs[CopyTo++] = R.R ;
441440}
442441
443- bool MipsELFObjectWriter::needsRelocateWithSymbol (const MCValue &Val,
444- const MCSymbol &Sym,
442+ bool MipsELFObjectWriter::needsRelocateWithSymbol (const MCValue &V,
445443 unsigned Type) const {
446444 // If it's a compound relocation for N64 then we need the relocation if any
447445 // sub-relocation needs it.
448446 if (!isUInt<8 >(Type))
449- return needsRelocateWithSymbol (Val, Sym , Type & 0xff ) ||
450- needsRelocateWithSymbol (Val, Sym , (Type >> 8 ) & 0xff ) ||
451- needsRelocateWithSymbol (Val, Sym , (Type >> 16 ) & 0xff );
447+ return needsRelocateWithSymbol (V , Type & 0xff ) ||
448+ needsRelocateWithSymbol (V , (Type >> 8 ) & 0xff ) ||
449+ needsRelocateWithSymbol (V , (Type >> 16 ) & 0xff );
452450
453451 switch (Type) {
454452 default :
@@ -481,7 +479,7 @@ bool MipsELFObjectWriter::needsRelocateWithSymbol(const MCValue &Val,
481479 // FIXME: It should be safe to return false for the STO_MIPS_MICROMIPS but
482480 // we neglect to handle the adjustment to the LSB of the addend that
483481 // it causes in applyFixup() and similar.
484- if (cast<MCSymbolELF>(Sym). getOther () & ELF::STO_MIPS_MICROMIPS)
482+ if (cast<MCSymbolELF>(V. getAddSym ())-> getOther () & ELF::STO_MIPS_MICROMIPS)
485483 return true ;
486484 return false ;
487485
@@ -492,7 +490,7 @@ bool MipsELFObjectWriter::needsRelocateWithSymbol(const MCValue &Val,
492490 case ELF::R_MIPS_16:
493491 case ELF::R_MIPS_32:
494492 case ELF::R_MIPS_GPREL32:
495- if (cast<MCSymbolELF>(Sym). getOther () & ELF::STO_MIPS_MICROMIPS)
493+ if (cast<MCSymbolELF>(V. getAddSym ())-> getOther () & ELF::STO_MIPS_MICROMIPS)
496494 return true ;
497495 [[fallthrough]];
498496 case ELF::R_MIPS_26:
0 commit comments