Cross-Module Function Calls

I have had great luck in the last couple of months getting llvm to do
cool stuff with directly linked modules using llvm-as and llvm-ld. Now,
I would like to get some of the same functionality working through an
ExecutionEngine; however, I am having trouble making functions call
across module boundaries. I know from previous discussions on this list
that what I am attempting should be easy. I would really appreciate it
if someone more knowledgeable could take a look at the trivial failing
test I've hooked up and tell me what obvious thing I've missed, or at
least what I should try next.

;;;; bar.ll
define i32 @bar( i32 %a )
{
    %out = mul i32 %a, 2
    ret i32 %out
}
;;;;

;;;; foo.ll
declare i32 @bar( i32 )

define i32 @main( i32 %argc, i8** %argv )
{
    %out = call i32 @bar( i32 4 )
    ret i32 %out
}
;;;;

//// test.cpp
#include <string>
#include <vector>
#include <llvm/Support/MemoryBuffer.h>
#include <llvm/Bitcode/ReaderWriter.h>
#include <llvm/ModuleProvider.h>
#include <llvm/ExecutionEngine/ExecutionEngine.h>

int main( int argc, char** argv )
{
  std::string error;
  llvm::MemoryBuffer *foo_buffer, *bar_buffer;
  llvm::ModuleProvider *foo_provider, *bar_provider;
  foo_buffer = llvm::MemoryBuffer::getFile( "foo.bc", &error );
  foo_provider = llvm::getBitcodeModuleProvider(foo_buffer,&err);
  bar_buffer = llvm::MemoryBuffer::getFile( "bar.bc", &error );
  bar_provider = llvm::getBitcodeModuleProvider(bar_buffer,&err);

  llvm::ExecutionEngine *engine;
  engine = llvm::ExecutionEngine::create( foo_provider );
  engine->addModuleProvider( bar_provider );

  std::vector<std::string> args;
  args.push_back( "foo.ll" );
  llvm::Function *fn_main = engine->FindFunctionNamed( "main" );
  int rv = engine->runFunctionAsMain( fn_main, args, environ );
  return rv;
}
////

#### Makefile
AS=/home/terrence/programming/OSS-rcs/llvm/Debug/bin/llvm-as
LD=/home/terrence/programming/OSS-rcs/llvm/Debug/bin/llvm-ld
CC=g++
LLVM_CONFIG=/home/terrence/programming/OSS-rcs/llvm/Debug/bin/llvm-config
LLVM_CXXFLAGS=`${LLVM_CONFIG} --cxxflags`
LLVM_LDFLAGS=`${LLVM_CONFIG} --ldflags`
LLVM_LIBS=`${LLVM_CONFIG} --libs`

lower:
  ${AS} -f -o=foo.bc foo.ll
  ${AS} -f -o=bar.bc bar.ll

link: lower
  ${LD} -native -o=linked foo.bc bar.bc

test: lower
  ${CC} -o test.o -c ${LLVM_CXXFLAGS} test.cpp
  ${CC} -o test test.o ${LLVM_LDFLAGS} ${LLVM_LIBS}