Ali Demiröz via llvm-dev
2015-Sep-06 13:02 UTC
[llvm-dev] LLVM Runtime Code Generation on Android
Hi, Is there anybody out there that is experienced with run-time code generation on an android device? Is it even possible to achieve this? I compiled both llvm and clang for x64 android tablet and everything seemed fine until i tried to call exposed generated function through my native code: it gave an error that indicating I dont have rights to execute code in this memory block.(I will add the exact error when i access my development machine. ) My tablet is not rooted so I can not be sure that is caused by memory protection. But I would expect llvm/clang to handle memory rights that generated code resides in. right? Thanks, Ali -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150906/be21e5dc/attachment.html>
Bruce Hoult via llvm-dev
2015-Sep-07 12:03 UTC
[llvm-dev] LLVM Runtime Code Generation on Android
Yup, there's even a library for it included in AOSP: https://android.googlesource.com/platform/external/vixl/ On Sun, Sep 6, 2015 at 4:02 PM, Ali Demiröz <llvm-dev at lists.llvm.org> wrote:> Hi, > > Is there anybody out there that is experienced with run-time code > generation on an android device? > Is it even possible to achieve this? > > I compiled both llvm and clang for x64 android tablet and everything > seemed fine until i tried to call exposed generated function through my > native code: it gave an error that indicating I dont have rights to execute > code in this memory block.(I will add the exact error when i access my > development machine. ) > > My tablet is not rooted so I can not be sure that is caused by memory > protection. But I would expect llvm/clang to handle memory rights that > generated code resides in. right? > > Thanks, > Ali > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150907/a452d0ad/attachment.html>
Ali Demiröz via llvm-dev
2015-Sep-07 14:30 UTC
[llvm-dev] LLVM Runtime Code Generation on Android
Exception previously mentioned : "signal SIGSEGV: address access protected (fault address: 0x7f5ef23010)" Architecture : AARCH64 @Bruce Thanks, I didn't know such library exist. Is this library somehow related to LLVM? Actually my question was if it is possible to generate and run code with LLVM on Android(AARCH64). On Mon, Sep 7, 2015 at 3:03 PM, Bruce Hoult <bruce at hoult.org> wrote:> Yup, there's even a library for it included in AOSP: > > https://android.googlesource.com/platform/external/vixl/ > > > On Sun, Sep 6, 2015 at 4:02 PM, Ali Demiröz <llvm-dev at lists.llvm.org> > wrote: > >> Hi, >> >> Is there anybody out there that is experienced with run-time code >> generation on an android device? >> Is it even possible to achieve this? >> >> I compiled both llvm and clang for x64 android tablet and everything >> seemed fine until i tried to call exposed generated function through my >> native code: it gave an error that indicating I dont have rights to execute >> code in this memory block.(I will add the exact error when i access my >> development machine. ) >> >> My tablet is not rooted so I can not be sure that is caused by memory >> protection. But I would expect llvm/clang to handle memory rights that >> generated code resides in. right? >> >> Thanks, >> Ali >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150907/7f2abfcd/attachment.html>
Seemingly Similar Threads
- [LLVMdev] ASan for Android Applications
- [LLVMdev] Android, llvm-ar and setLastModificationAndAccessTime
- [LLVMdev] Android, llvm-ar and setLastModificationAndAccessTime
- [LLVMdev] Android, llvm-ar and setLastModificationAndAccessTime
- [LLVMdev] Android build patch