<p dir="ltr">I don't have another hardware ARM system, but I got it working under a qemu ARM system before trying Android and there are no issues there. I'm only putting one module in the JIT, so that shouldn't be the issue; thanks for the registerEHFrame suggestion though. I won't get time to try it until the weekend though.</p>

<div class="gmail_quote">On 5 Nov 2013 19:09, "Kaylor, Andrew" <<a href="mailto:andrew.kaylor@intel.com">andrew.kaylor@intel.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Is it possible to try your program on a non-Android Linux?  It might make debugging a bit less painful.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If you haven’t updated to the trunk code recently, it’s possible that calling finalizeObject more than once would cause a crash.  The changes that introduced
 multiple module support should have fixed that issue.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">It might be useful to set breakpoints in the memory manager you are using.  During finalizeObject you are likely to see calls to finalizeMemory, getSymbolAddress,
 registerEHFrames and notifyObjectLoaded.  I think registerEHFrames is the most likely source of the problem, particularly given that the debugger is also crashing.  If that’s the problem, you could probably get a little further (for experimental purposes at
 least) by just having the memory manager do nothing in response to that call.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-Andy<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> <a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>James Lyon<br>
<b>Sent:</b> Monday, November 04, 2013 11:46 PM<br>
<b>To:</b> Renato Golin<br>
<b>Cc:</b> LLVM Dev<br>
<b>Subject:</b> Re: [LLVMdev] Android build patch<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">I'm trying to build LLVM on Android rather than the other way around! Really just to see if it can be done. I worked out the first problem (my code was written for the old JIT and I'd missed something in updating to the MCJIT to make it
 work on ARM). It still doesn't work, but at this point I have no idea why and it'll be a while before I get to look at it again: the Android debug tools simply crash and give no output whatsoever, so all I know is that the test app exits somewhere inside MCJIT::finalizeObject.<br>

<br>
On 05/11/13 07:13, Renato Golin wrote:<u></u><u></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 30 October 2013 17:08, James Lyon <<a href="mailto:jameslyon0@gmail.com" target="_blank">jameslyon0@gmail.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Sadly even though it builds I can't get generated code to work - it appears at the moment that the generated code doesn't have execute permissions set for some reason (this is 3.3, not svn).<u></u><u></u></p>

</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">You may have a look at the LLVM Linux builds (<a href="http://llvm.linuxfoundation.org/index.php/Main_Page" target="_blank">http://llvm.linuxfoundation.org/index.php/Main_Page</a>), it might help you getting Android compiled with LLVM.<u></u><u></u></p>

</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">cheers,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">--renato<u></u><u></u></p>
</div>
</div>
</blockquote>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

</blockquote></div>