<div dir="ltr">Hi Eugene,<div><br></div><div>There's no way to 'skip' application of a relocation.</div><div><br></div><div>You could use the NotifyLoadedFtor and libObject to scan the object ahead of time and record the relocations that you'd like to override, then you could supply a custom Resolver that just returns '0' for the symbols that you want to handle manually. </div><div><span style="line-height:normal"><br></span></div><div><span style="line-height:normal">There's no way to handle distinct relocations for the same symbol differently: For performance reasons we only look up each symbol once and re-use the supplied address to apply every relocation for that symbol.</span></div><div><span style="line-height:normal"><br></span></div><div><span style="line-height:normal">Is that sufficient to support your use-case?</span></div><div><span style="line-height:normal"><br></span></div><div>Cheers,</div><div>Lang.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 24, 2015 at 12:03 AM, Eugene Rozenfeld <span dir="ltr"><<a href="mailto:Eugene.Rozenfeld@microsoft.com" target="_blank">Eugene.Rozenfeld@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m working on LLILC (a jit for the CoreCLR built on ORC), in particular, on using LLILC as an ngen jit. I would like to have an ability to be notified of relocations that ObjectLinkingLayer is applying and to be able to tell the linking
layer not to resolve certain relocations for external symbols (so that the client can do some custom resolutions later). The only way I found of looking at relocations in the client is via NotifyLoadedFtor notifications but I couldn’t find a way of blocking
a relocation resolution.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">One way to achieve that is to change the Resolver::findSymbol api to allow clients to indicate that the relocations for the symbol shouldn’t be resolved and update RuntimeDyldImpl::resolveExternalSymbols accordingly. Would this be a reasonable
approach?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Eugene<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div></div></blockquote></div><br></div>