how to runtime link to shared library symbols in the JIT?

I would like to load shared libraries at runtime for use in some JIT'd
code. I can't find much about how the JIT resolves symbols, so can
somebody answer a few questions for me?

1. Will the symbols from a dlopen'd library with RTLD_GLOBAL be
available? In this case I can manually dlopen the libraries prior to the
JIT run.

2. Can I derive from ExecutionEngine and override the
getPointerToNamedFunction method? If so, does this just return the C/ABI
pointer to the function? What is the equivalent for data variables?

3. Is the same basic model available on Windows using DLLs? I really
don't have any experience there yet.

On Windows DLLs loaded with llvm::sys::DynamicLibrary::LoadLibraryPermanently() are available to the JIT and MCJIT. I guess this should work with other OS.