not able to resolve external function symbol error issued at RuntimeDyldImpl::resolveExternalSymbols

Hi, All

I am using MCJIT to create multiple modules and execution engines to
do cross module linking between functions. For example, module1
contains f1 and f2 calls f1. After module1 is compiled, a new module2
and execution engine is generated for f3 which calls f1. I followed
the example of "Using MCJIT with Kaleidoscope Tutorial" written by
Andy Kaylor, basically I found f1 in module1, then created a new f1
prototype in module2, then make f3 call f1. During the
MCJIT::finalizeLoadModules for module2 time, I got "program used
external function f1 which could not be resolved" error at
RuntimeDyldImpl::resolveExternalSymbols method. I provided a
getPointerToNamedFunction method to traverse all the modules I have in
the class inherent from SectionMemoryManager, but that does not help
since resolveExternalSymbols is called earlier. I am using llvm 3.4.

Any suggestions? Thank you very much.