diff --git a/src/coreclr/vm/arm/asmhelpers.S b/src/coreclr/vm/arm/asmhelpers.S index f098901bb63e7..decc14d01ca7f 100644 --- a/src/coreclr/vm/arm/asmhelpers.S +++ b/src/coreclr/vm/arm/asmhelpers.S @@ -979,14 +979,20 @@ g_rgWriteBarrierDescriptors: .global g_rgWriteBarrierDescriptors + .text + // ------------------------------------------------------------------ // __declspec(naked) void F_CALL_CONV JIT_WriteBarrier_Callable(Object **dst, Object* val) LEAF_ENTRY JIT_WriteBarrier_Callable // Branch to the write barrier - ldr r2, =JIT_WriteBarrier_Loc // or R3? See targetarm.h + ldr r2, 2f // or R3? See targetarm.h +1: + add r2, pc + ldr r2, [r2] ldr pc, [r2] - +2: + .long JIT_WriteBarrier_Loc(GOT_PREL)-((1b+4)-2b) LEAF_END JIT_WriteBarrier_Callable #ifdef FEATURE_READYTORUN