https://llvm.org/bugs/show_bug.cgi?id=20656
Lang Hames <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #32 from Lang Hames <[email protected]> --- Hi Federico, It looks like the global mapping code was never properly attached to MCJIT. I'm not sure how the "fix" for this addressed Murat's bug. (Murat - did you confirm that this actually fixed your issue?) On MacOSX the failure was masked by the fact that RTDyldMemoryManager searches the JIT process symbols by default as a fallback, and finds "someFunction" there without ever looking up the global mapping. If someFunction is mapped as "foo", the bug shows up as a failure to find foo. I'm working on hooking this up now, and have emailed Hans to see if it's possible to get this in to the 3.7 release. Federico - are you caching objects in your JIT at all, or do you always build the IR from scratch? If the later, I have a workaround for you in case this doesn't get in: You can inject the address of someFunction into your bitcode when you create it, rather than referencing someFunction: I.e., Where you would have made a call to @someFunction, instead construct: %call = call i32 inttoptr (i64 12345678 to i32 ()*)() substituting the address of someFunction for the integer. -- 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
