[LLVMdev] Another question to add to the pile
Talin
talin at acm.org
Sun Aug 26 11:40:07 PDT 2007
Chris Lattner wrote:
>> However, I'm stumped as to how to resolve references to external C
>> functions in my own runtime. I saw the "addLibrary" function in the
>> stacker example, but that just takes a module name - it doesn't tell
>> the linker/interpreter where the module is located, and there doesn't
>> appear to be any command-line options in lli to tell it where to find
>> external libraries.
>
> You can use the -load command to do this:
>
> lli -load /path/to/your.so foo.bc
>
> this will cause it to dlopen the specified .so/.dylib.
Cool, that's what I needed. I was a little confused by the description
of that option in --help, which says "Load the specified plugin". I
usually associate the word "plugin" with something that has a specific
interface, not just an arbitrary .so.
-- Talin
More information about the llvm-dev
mailing list