search for: myrtdyld

Displaying 1 result from an estimated 1 matches for "myrtdyld".

2013 Jan 05
0
[LLVMdev] RuntimeDyld bug in resolving addresses with offset?
...following piece of C code (attached as rtdyldbug.c): double numbers[5] = {33, 34, 35, 36, 37}; void foo(double val, double other[]) { other[2] += val * numbers[4]; } I adapted llvm-rtdyld.cpp to load the .o file of the code above, get a pointer to foo, and invoke it (whole thing is attached as myrtdyld.cpp): typedef void(*myFun)(double, double*); int main() { std::string funName = "_foo"; std::string fileName = "rtdyldbug.o"; myFun fptr = (myFun)getFunctionPointer(funName, fileName); double w[5] = {0, 0, 0, 0, 0}; fptr(4, w); printf("%f \n", w[2]);...