<div dir="ltr">Hi LLVM, Lang.<div><br></div><div>I'm looking for a advice here. And I truly understand very little what the relocations are and how they work.</div><div><br></div><div>The problem I want to solve is the case where a jitted code has to call back the host application to query additional data. I can think of 3 possible solutions:</div><div><ol><li>Use built-in relocation resolver (in default memory manager?) and allow the JIT to find the callback function by name. The host application needs to contain symbols that the JIT will search for. You can have only single implementation of them. The JIT will need to search in the set of all symbols in the executable.</li><li>Pass addresses of callback functions as pointers to functions to a jitted function. The generated code should use pointer to functions instead of predefined function names in calls.</li><li>Create you own Memory Manager that will provide addresses to callback functions. Because the set of callback functions is known upfront and quite small that seems to be better than 1.</li></ol><div>Can you help me to evaluate the solutions?</div></div><div><br></div><div>- PaweÅ‚</div></div>