@@ -87,7 +87,7 @@ RelExpr MIPS<ELFT>::getRelExpr(RelType type, const Symbol &s,
8787 // (e.g. a table of function pointers). When we encounter this, ignore the
8888 // relocation and emit a warning instead.
8989 if (!s.isFunc () && s.type != STT_NOTYPE) {
90- warn (getErrorLocation ( loc) +
90+ warn (getErrorLoc (ctx, loc) +
9191 " found R_MIPS_JALR relocation against non-function symbol " +
9292 toString (s) + " . This is invalid and most likely a compiler bug." );
9393 return R_NONE;
@@ -191,7 +191,7 @@ RelExpr MIPS<ELFT>::getRelExpr(RelType type, const Symbol &s,
191191 case R_MIPS_NONE:
192192 return R_NONE;
193193 default :
194- error (getErrorLocation ( loc) + " unknown relocation (" + Twine (type) +
194+ error (getErrorLoc (ctx, loc) + " unknown relocation (" + Twine (type) +
195195 " ) against symbol " + toString (s));
196196 return R_NONE;
197197 }
@@ -473,7 +473,7 @@ int64_t MIPS<ELFT>::getImplicitAddend(const uint8_t *buf, RelType type) const {
473473 // These relocations are defined as not having an implicit addend.
474474 return 0 ;
475475 default :
476- internalLinkerError (getErrorLocation ( buf),
476+ internalLinkerError (getErrorLoc (ctx, buf),
477477 " cannot read addend for relocation " + toString (type));
478478 return 0 ;
479479 }
@@ -501,7 +501,7 @@ calculateMipsRelChain(uint8_t *loc, RelType type, uint64_t val) {
501501 return std::make_pair (type2, val);
502502 if (type2 == R_MIPS_SUB && (type3 == R_MIPS_HI16 || type3 == R_MIPS_LO16))
503503 return std::make_pair (type3, -val);
504- error (getErrorLocation ( loc) + " unsupported relocations combination " +
504+ error (getErrorLoc (ctx, loc) + " unsupported relocations combination " +
505505 Twine (type));
506506 return std::make_pair (type & 0xff , val);
507507}
@@ -559,7 +559,7 @@ static uint64_t fixupCrossModeJump(uint8_t *loc, RelType type, uint64_t val) {
559559 llvm_unreachable (" unexpected jump/branch relocation" );
560560 }
561561
562- error (getErrorLocation ( loc) +
562+ error (getErrorLoc (ctx, loc) +
563563 " unsupported jump/branch instruction between ISA modes referenced by " +
564564 toString (type) + " relocation" );
565565 return val;
0 commit comments