How call other lib functions in a pass?

I modify the Makefile, and it is not a problem. :slight_smile:

My pass has to call one function of a binary library. But when opt loads my pass, it tells me that the function is "undefined symbol".

I copy the library to /usr/lib, and run ldconfig, but this is unuseful.

Should I modify the Makefile? :frowning:

Thanks.

Xia

-------------------------------------------------------------------------------------ÖܽÜÂ×ÔÚ"µÚÒ»ÏÖ³¡"ÓëÄãÃæ¶ÔÃæ http://smspop.163.com/special/jay200408/index2.html

Xia,

That's not the best way to deal with it. The opt program can dynamically
load your pass, if its compiled to a shared object. See the manual page
for opt and in particular the -load option:

http://llvm.cs.uiuc.edu/docs/CommandGuide/html/opt.html

Reid.