Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2015-10-28 06:24:23 +0300
committerMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2015-10-28 06:24:23 +0300
commit00024eafa60956d75e3a0676d2ace22e2f2954db (patch)
treee4931982e54c63cdcd8352e2dc3b53b1a6419cd2 /src/JitInterface
parent5bf38778feb5cc2fd01d9b24f4c7eaae6ad0926b (diff)
parentc8e3bf83c3050dfe4e8faf34b8f20e5c9f9a481b (diff)
Merge pull request #135 from MichalStrehovsky/rodata-halfway
Half-implementation of RyuJIT generated ROData blocks
Diffstat (limited to 'src/JitInterface')
-rw-r--r--src/JitInterface/src/CorInfoImpl.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/JitInterface/src/CorInfoImpl.cs b/src/JitInterface/src/CorInfoImpl.cs
index 23a7a5876..a4ffc22f7 100644
--- a/src/JitInterface/src/CorInfoImpl.cs
+++ b/src/JitInterface/src/CorInfoImpl.cs
@@ -1810,7 +1810,23 @@ namespace Internal.JitInterface
Debug.Assert(locationBlock >= 0);
reloc.Block = (sbyte)locationBlock;
- reloc.Target = HandleToObject((IntPtr)target);
+ int targetOffset;
+ int targetBlock = findKnownBlock(target, out targetOffset);
+ if (targetBlock < 0)
+ {
+ // Reloc points to something outside of the generated blocks
+ reloc.Target = HandleToObject((IntPtr)target);
+ }
+ else
+ {
+ // Target is relative to one of the blocks
+ reloc.Target = new BlockRelativeTarget
+ {
+ Block = (sbyte)targetBlock,
+ Offset = targetOffset
+ };
+ }
+
reloc.Delta = addlDelta;
if (_relocs == null)