search for: jitsymbolinfo

Displaying 2 results from an estimated 2 matches for "jitsymbolinfo".

2018 Aug 29
2
JIT client - late cross references
...u load module A SymbolResolver will ask for an address of b_trampoline, you can give back an address of a heap-allocated storage, i.e.: ... uint64_t *trampolineStorage = new uint64_t; ... SymbolResolver::findSymbol(const std::string &name) { if (name == "b_trampoline") { JITSymbolInfo((uint64_t) trampolineStorage, JITSymbolFlags::Exported) } ... } Later on, when everything is loaded and you are ready to execute JITed code you can fill in the trampolineStorage with the actual address, i.e.: *trampolineStorage = jit.getSymbol("b").getAddress(); That should do...
2018 Aug 29
2
JIT client - late cross references
Hello Lang, thank you for your response! So the use case would be some kind of wrapping or just taking control. Taking that Module 'A' has function a() and Module 'B' has function b() and c() - also a() calls b(). The normal resolving process would resolve the function call correct. But for some reason (like having a wrapper) I would prefer to resolve calls to b() with a call to