[Mono-dev] JIT Patch Types

Martin Däumler mdae at cs.tu-chemnitz.de
Tue Jun 7 12:01:49 EDT 2011


Hello,

I have a further question about Mono internals. For a soft real-time
project based on Mono I try to pre-patch all JIT-, jump-, class init-
and delegate-trampolines (the latter at runtime). So I investigate
the patches that are emitted in "mono_resolve_patch_target()".

The underlying conditions are x86 architecture, Linux operating
system, non-AOT case and the mcs C#-compiler. That is, my
pre-patch only has to work with the C#-programs that can
be compiled by the mcs. I dived into the code but is not
always clear which patches are emitted under which circumstances.
Now, I want to know if it is possible that the following patches
are emitted by the JIT (non-AOT case):

MONO_PATCH_INFO_RGCTX_FETCH (only needed if generics are used?)
MONO_PATCH_INFO_JIT_ICALL_ADDR (not used on x86?)
MONO_PATCH_INFO_ICALL_ADDR (only for AOT case?)


I guess that the RGCTX (and practically the RGCTX lazy fetch
trampoline) is used only if generics are used. So, a call to
it is not emitted by the mcs, is it? For the other patches I
assume that they are emitted only in AOT-case, but I am not
sure.


With kind regards,
Martin Däumler


More information about the Mono-devel-list mailing list