[LLVMdev] Quick trampoline intrinsics question

Jonathan S. Shapiro shap at eros-os.org
Thu Dec 25 11:42:10 PST 2014


The specification of llvm.init.trampoline does not say whether the
trampoline can safely be moved after code has been generated. Is there any
contract about this?

My question is motivated by copying collectors, which may want to relocate
procedure objects (in llvm-speak: trampolines). If the generated trampoline
code uses a PC-relative call instruction, then either:

   1. The trampoline needs to be updated during relocation (in which case I
   need a way to recover the target procedure's address), or
   2. Trampolines cannot be relocated

I know that I can look at the LLVM implementation to see what it actually
does, but if this question is not resolved by the specification of
llvm.init.trampoline then the implementation is free to change in future.

Thank you.


Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141225/41ed0700/attachment.html>


More information about the llvm-dev mailing list