[PATCH] D29222: MCJIT: Support setting relocation model from C wrappers
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 28 00:53:24 PST 2017
evgeny777 added a comment.
The real problem is with memory reservation for position independent code, which occurs because RuntimeDyld doesn't calculate size of .got section.
Memory reservation occurs when virtual method needsToReserveAllocationSpace() of memory manager returns true. Currently jitting position
independent code and using memory reservation at the same time causes undefined behavior.
I have patch addressing this issue, but it is blocked by this review:
https://reviews.llvm.org/D28571
The source file MCJITCAPITest.cpp already has test for JIT memory reservation (see TestReserveSectionMemoryManager), so to test the fix for a "PIC/reservation" problem I would need to
add just few lines of code. But I need to be able to set relocation model from C API to do this.
So what I actually plan to do is to land this patch + https://reviews.llvm.org/D28571, and after that submit a review for problem described above.
This patch makes it very easy to write a test case for that problem.
Repository:
rL LLVM
https://reviews.llvm.org/D29222
More information about the llvm-commits
mailing list