search for: getpointertoglobalmapping

Displaying 4 results from an estimated 4 matches for "getpointertoglobalmapping".

2015 Aug 20
2
Linking existing functions from JITed code
...nullptr); > > to add the currently running process before calling > > llvm::RTDyldMemoryManager::getSymbolAddressInProcess(name);. > > Also, all of the function needs to be declared as extern C to avoid name > mangling. > > I however think that adding the addGlobalMapping/getPointerToGlobalMapping > functions to the ORC kaleidoscope examples is very useful, as for example > one wants a set of private symbols made available to JITed code. > > > > On Aug 13, 2015, at 7:41 PM, Lang Hames <lhames at gmail.com> wrote: > > Hi Andy, > > I haven't tested this...
2015 Aug 13
2
Linking existing functions from JITed code
...look up first in JIT'ed code >> if (auto sym = findMangledSymbol(name)) { >> return RuntimeDyld::SymbolInfo(sym.getAddress(), >> sym.getFlags()); >> return RuntimeDyld::SymbolInfo(nullptr); >> } >> >> // look up in added globals >> if (auto addr = getPointerToGlobalMapping(name)) { >> return RuntimeDyld::SymbolInfo(addr, JITSymbolFlags::Exported); >> } >> >> // finally try to look up existing process symbols, note >> // this works for symbols loaded in shared libraries, but >> // does NOT seem to find symbols declared in the execut...
2015 Aug 13
4
Linking existing functions from JITed code
...ver = createLambdaResolver( [&](const std::string &name) { // look up first in JIT'ed code if (auto sym = findMangledSymbol(name)) { return RuntimeDyld::SymbolInfo(sym.getAddress(), sym.getFlags()); return RuntimeDyld::SymbolInfo(nullptr); } // look up in added globals if (auto addr = getPointerToGlobalMapping(name)) { return RuntimeDyld::SymbolInfo(addr, JITSymbolFlags::Exported); } // finally try to look up existing process symbols, note // this works for symbols loaded in shared libraries, but // does NOT seem to find symbols declared in the executable. if (auto Addr = RTDyldMemoryManager::getSymbolA...
2015 Aug 20
2
Linking existing functions from JITed code
...dd the currently running process before calling >> >> llvm::RTDyldMemoryManager::getSymbolAddressInProcess(name);. >> >> Also, all of the function needs to be declared as extern C to avoid name mangling. >> >> I however think that adding the addGlobalMapping/getPointerToGlobalMapping functions to the ORC kaleidoscope examples is very useful, as for example one wants a set of private symbols made available to JITed code. >> >> >> >>> On Aug 13, 2015, at 7:41 PM, Lang Hames <lhames at gmail.com> wrote: >>> >>> Hi Andy, >...