diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs index a0b956c3d8fc9..666f2cde30923 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs @@ -3752,10 +3752,14 @@ private void recordRelocation(void* location, void* locationRW, void* target, us break; } - relocDelta += addlDelta; - TargetArchitecture targetArchitecture = _compilation.TypeSystemContext.Target.Architecture; RelocType relocType = GetRelocType(targetArchitecture, fRelocType); + + if (relocType == RelocType.IMAGE_REL_BASED_REL32) + { + relocDelta += addlDelta; + } + // relocDelta is stored as the value Relocation.WriteValue(relocType, location, relocDelta);