[LLVMbugs] [Bug 5466] New: lli -force-interpreter unable to resolve external symbols?

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Nov 11 13:09:48 PST 2009


           Summary: lli -force-interpreter unable to resolve external
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: timo.lindfors at iki.fi
                CC: llvmbugs at cs.uiuc.edu

Steps to reproduce:
1) cat > foo.c <<EOF
void do_hello(void);

int main(int argc, char *argv[]) {
    return 0;
2) cat > bar.c <<EOF
#include <stdio.h>

void do_hello(void) {
    printf("Hello world\n");
3) clang -c -emit-llvm foo.c
4) clang -fPIC -c bar.c
5) gcc -shared -Wl,-soname,libbar.so.1 -o libbar.so bar.o -lc
6) LD_LIBRARY_PATH=. lli -load libbar.so -force-interpreter foo.o

Expected results:
6) program prints "Hello world" // lli interpretes foo.o bitcode and uses FFI
to call do_hello in libbar.so. 

Actual reults:
6) lli prints
LLVM ERROR: Tried to execute an unknown external function: void ()* do_hello

More info:
1) The program runs if I remove "-force-interpreter"
2) distro is debian stable
3) architecture is x86
4) llvm revision is 86876
5) clang revision is 86879

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list