How to use the llvm::Linker?

Hi,All
this one pass that will use the Linker
namespace {
// Hello2 - The second implementation with getAnalysisUsage implemented.
llvm::StringRef programNametest("");
struct Hello2 : public ModulePass {
static char ID; // Pass identification, replacement for typeid
Hello2() : ModulePass(ID) {}

virtual bool runOnModule(llvm::Module &M){
llvm::Linker *linkertest = new llvm::Linker(programNametest,&M);
llvm::errs() << linkertest->getModule();
++HelloCounter;
errs() << "Hello: ";
return false;
}

// We don’t modify the program, so we preserve all analyses
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
}
};
}

char Hello2::ID = 0;
static RegisterPass
Y1(“hello2”, “Hello World Pass (with getAnalysisUsage implemented)”);

But ,when i run the pass with opt, there will be a Error:
./bin/opt: symbol lookup error: ./lib/Hello.so: undefined symbol: _ZN4llvm6Linker11LinkModulesEPNS_6ModuleES2_jPSs
by the c++filt, the function name is :
llvm::Linker::LinkModules(llvm::Module*, llvm::Module*, unsigned int, std::basic_string<char, std::char_traits, std::allocator >*)
So I think, may I should Modify the cmake, I want to know how to modify the files of cmake, so that i can complier the pass with Linker.
Thank.

Hi,