[LLVMdev] ORC and relocations
Lang Hames
lhames at gmail.com
Wed Jun 24 16:42:05 PDT 2015
Hi Eugene,
There's no way to 'skip' application of a relocation.
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.
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.
Is that sufficient to support your use-case?
Cheers,
Lang.
On Wed, Jun 24, 2015 at 12:03 AM, Eugene Rozenfeld <
Eugene.Rozenfeld at microsoft.com> wrote:
> Hello,
>
>
>
> 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.
>
>
>
> 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?
>
>
>
> Thanks,
>
>
>
> Eugene
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150624/3aab0618/attachment.html>
More information about the llvm-dev
mailing list