http://llvm.org/bugs/show_bug.cgi?id=5466
Summary: lli -force-interpreter unable to resolve external
symbols?
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Steps to reproduce:
1) cat > foo.c <<EOF
void do_hello(void);
int main(int argc, char *argv[]) {
do_hello();
return 0;
}
EOF
2) cat > bar.c <<EOF
#include <stdio.h>
void do_hello(void) {
printf("Hello world\n");
}
EOF
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs