Hi Bjoern,
However… About your solution. This looks really promising – Thank you! - but sadly, I’m not experienced enough with ORC yet to understand how to use it.
I create a llvm::orc::LLJIT and then add my llvm::Module to it.
Can I use the getExecutionSession function of LLJIT to get access to this special lookup function after I added the module?
Yes. 
Also I have some difficulties with providing the parameters .w. For example… I don’t have a “JITDylibSearchList” nor “SymbolNameSet” (I probably have it hidden somewhere). I do know those from when I do the symbol resolving. I didn’t created a JITDylib for it, instead I attached a generator function to the MainJITDylib – because I have to lookup symbols from the shared memory and that list changes.
A JITDylib search list is a vector of (JITDylib*, JITDylibLookupFlags) pairs, where the flags indicate whether non-exported symbols should be visible to the lookup (the default is to match against exported-symbols only). A SymbolLookupSet defines the set of symbols to look up as a vector of (SymbolStringPtr, SymbolLookupFlags) pairs, where the flags tell you whether the symbol must be present (SymbolLookupFlags::RequiredSymbol, the default), or is allowed to be missing without generating an error (SymbolLookupFlags::WeaklyReferencedSymbol). In your case we can just use the defaults. Your code will look like:
// Get symbol names to look up. I’m assuming below that they’re
// already mangled and just need to be interned. If they have
// not been mangled yet you will need to do that.
std::vector SymbolNames = ;
auto &ES = J->getExecutionSession();
SymbolLookupSet LookupSet;
for (StringRef Name : SymbolsNames)
LookupSet.add(ES.intern(Name));
auto Result = ES.lookup(
{ { &J->getMainJITDylib(),
JITDylibLookupFlags::MatchExportedSymbolsOnly } },
LookupSet, LookupKind::Static, SymbolState::Resolved);
Result will now contain a map of linker-mangled symbol names (as SymbolStringPtrs) to their resolved addresses.
I was going to say that you just need to send this mapping to the remote, but then I realized that that’s not sufficient: You will have addresses for the symbols now, but you won’t know if they’re safe to access yet.
How are you solving this problem in your memory-manager based solution? E.g. What if you have a cycle of dependencies: A ← B ← C ← A, with A, B and C all being provided by different processes? How do you know when any given symbol is safe?
Orc has to deal with the same problem internally and handles it by maintaining a dependence graph between symbols. We could re-use this infrastructure by reflecting symbols and symbol-states between ExecutionSessions, but this would not be trivial. If possible, this is a very strong motivation for moving to a single ExecutionSession. 
So I’m not sure how to use it yet - sorry for the noobie question >o<
No worries at all.
Cheers,
Lang.