@@ -491,9 +491,10 @@ bool ARM::inBranchRange(RelType type, uint64_t src, uint64_t dst) const {
491491// Helper to produce message text when LLD detects that a CALL relocation to
492492// a non STT_FUNC symbol that may result in incorrect interworking between ARM
493493// or Thumb.
494- static void stateChangeWarning (uint8_t *loc, RelType relt, const Symbol &s) {
494+ static void stateChangeWarning (Ctx &ctx, uint8_t *loc, RelType relt,
495+ const Symbol &s) {
495496 assert (!s.isFunc ());
496- const ErrorPlace place = getErrorPlace (loc);
497+ const ErrorPlace place = getErrorPlace (ctx, loc);
497498 std::string hint;
498499 if (!place.srcLoc .empty ())
499500 hint = " ; " + place.srcLoc ;
@@ -630,7 +631,7 @@ void ARM::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const {
630631 // lld 10.0 and before always used bit0Thumb when deciding to write a BLX
631632 // even when type not STT_FUNC.
632633 if (!rel.sym ->isFunc () && isBlx != bit0Thumb)
633- stateChangeWarning (loc, rel.type , *rel.sym );
634+ stateChangeWarning (ctx, loc, rel.type , *rel.sym );
634635 if (rel.sym ->isFunc () ? bit0Thumb : isBlx) {
635636 // The BLX encoding is 0xfa:H:imm24 where Val = imm24:H:'1'
636637 checkInt (loc, val, 26 , rel);
@@ -687,7 +688,7 @@ void ARM::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const {
687688 // lld 10.0 and before always used bit0Thumb when deciding to write a BLX
688689 // even when type not STT_FUNC.
689690 if (!rel.sym ->isFunc () && !rel.sym ->isInPlt () && isBlx == useThumb)
690- stateChangeWarning (loc, rel.type , *rel.sym );
691+ stateChangeWarning (ctx, loc, rel.type , *rel.sym );
691692 if ((rel.sym ->isFunc () || rel.sym ->isInPlt ()) ? !useThumb : isBlx) {
692693 // We are writing a BLX. Ensure BLX destination is 4-byte aligned. As
693694 // the BLX instruction may only be two byte aligned. This must be done
0 commit comments