<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Calibri;
}
@page Section1 {margin: 2.0cm 42.5pt 2.0cm 3.0cm; }
A:link {
        
}
SPAN.MSOHYPERLINK {
        
}
A:visited {
        
}
SPAN.MSOHYPERLINKFOLLOWED {
        
}
P.MSOACETATE {
        
}
LI.MSOACETATE {
        
}
DIV.MSOACETATE {
        
}
SPAN.BALLOONTEXTCHAR {
        
}
SPAN.BALLOONTEXTCHAR0 {
        
}
SPAN.BALLOONTEXTCHAR00 {
        
}
P.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
LI.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
DIV.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MSOHYPERLINK {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MSOHYPERLINKFOLLOWED {
        COLOR: blue; TEXT-DECORATION: underline
}
P.MSOACETATE {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: Tahoma; FONT-SIZE: 8pt
}
LI.MSOACETATE {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: Tahoma; FONT-SIZE: 8pt
}
DIV.MSOACETATE {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: Tahoma; FONT-SIZE: 8pt
}
SPAN.BALLOONTEXTCHAR {
        FONT-FAMILY: Tahoma
}
P.balloontext {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
LI.balloontext {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
DIV.balloontext {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
P.balloontext0 {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
LI.balloontext0 {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
DIV.balloontext0 {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
P.BalloonText1 {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
LI.BalloonText1 {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
DIV.BalloonText1 {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt
}
SPAN.BALLOONTEXTCHAR0 {
        FONT-FAMILY: Tahoma
}
SPAN.BALLOONTEXTCHAR00 {
        FONT-FAMILY: Tahoma
}
SPAN.EmailStyle24 {
        FONT-FAMILY: Arial; COLOR: navy
}
SPAN.EmailStyle25 {
        FONT-FAMILY: Calibri; COLOR: #1f497d
}
SPAN.EmailStyle26 {
        FONT-FAMILY: Arial; COLOR: navy
}
SPAN.EmailStyle27 {
        FONT-FAMILY: Arial; COLOR: navy
}
SPAN.EmailStyle28 {
        FONT-FAMILY: Calibri; COLOR: #1f497d
}
SPAN.EmailStyle29 {
        FONT-FAMILY: Calibri; COLOR: #1f497d
}
SPAN.EmailStyle30 {
        FONT-FAMILY: Arial; COLOR: navy
}
SPAN.EmailStyle32 {
        FONT-FAMILY: Calibri; COLOR: #1f497d
}
SPAN.EmailStyle33 {
        FONT-FAMILY: Arial; COLOR: navy
}
DIV.Section1 {
        
}
</style>
<meta name="GENERATOR" content="MSHTML 8.00.6001.19088">
<style id="owaTempEditStyle"></style><style title="owaParaStyle"><!--P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
--></style>
</head>
<body lang="RU" link="blue" vlink="blue" ocsi="x">
<div style="FONT-FAMILY: Tahoma; DIRECTION: ltr; COLOR: #000000; FONT-SIZE: x-small">
<div>Hi everyone,</div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma">These patches was reverted by some reason, so please review changed patches 01-RuntimeDyLd-04.patch and 02-MCJIT_tests-02.patch.</font></div>
<p><font face="tahoma"><font face="tahoma"></font></font> </p>
<p><font face="tahoma"><font face="tahoma">The 01-RuntimeDyLd-04.patch </font></font><font face="tahoma">has some style and name changes with Chandler wrote me about.<br>
It's also has changes in MachO relocations committed by Sean in r153466.<br>
Unfortunately, I again cannot add to this patch Sean's changes from r153147 because the ExecutionEngine/MCJIT tests fails with these changes.<br>
Sean, can you review attached the relocation_referrers.patch? It's has these changes prepared for my patch, maybe I missed something.</font></p>
<p><font face="tahoma">02-MCJIT_tests-02.patch tests has changes for cmake, so the host_os filter now correctly works.<br>
</p>
<div> </div>
<p><font face="tahoma">Regards,</font></p>
<p><font face="tahoma">Danil</font></p>
<p><font face="tahoma"></font> </p>
<div><br>
</div>
</font>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma"></font> </div>
<div style="DIRECTION: ltr" id="divRpF648036">
<hr tabindex="-1">
<font color="#000000" size="2" face="Tahoma"><b>From:</b> Danil Malyshev<br>
<b>Sent:</b> Wednesday, March 21, 2012 2:20 PM<br>
<b>To:</b> Kaylor, Andrew; Jim Grosbach; llvm-commits@cs.uiuc.edu<br>
<b>Subject:</b> RE: RuntimeDyLd new features<br>
</font><br>
</div>
<div></div>
<div>
<div class="Section1">
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Hello,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Committed at r153221, thank you!</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">I tried to add changes from r153147 to the patch, but unfortunately, the test ExecutionEngine/MCJIT/test-global-init-nonzero.ll
 failed after it.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Attached the patch does these changes, maybe Spyffe can fix it.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Regards,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Danil</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<div>
<div style="TEXT-ALIGN: center" class="MsoNormal" align="center"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">
<hr tabindex="-1" align="center" size="2" width="100%">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt; FONT-WEIGHT: bold">From:</span></font></b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt"> Kaylor, Andrew [mailto:andrew.kaylor@intel.com]
<br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Wednesday, March 21, 2012 2:28 AM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b> Danil Malyshev; Jim Grosbach; llvm-commits@cs.uiuc.edu<br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b> RE: RuntimeDyLd new features</span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Looks good to me!</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt; FONT-WEIGHT: bold" lang="EN-US">From:</span></font></b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt" lang="EN-US"> Danil
 Malyshev [mailto:dmalyshev@accesssoftek.com] <br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Tuesday, March 20, 2012 12:00 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b> Kaylor, Andrew; Jim Grosbach; llvm-commits@cs.uiuc.edu<br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b> RE: RuntimeDyLd new features</span></font></p>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Hello Andrew,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">I'm very sorry for big delay.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">I'm just yet submitted the patch move_getPointerToNamedFunction-01.patch:</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">It's will moves getPointerToNamedFunction() from JIT/MCJIT to JITMemoryManager, so we can use it in MCJITMemoryManager.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Please review attached the patch 01-RuntimeDyLd-03.patch</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">It's uses MCJITMemoryManager.getPointerToNamedFunction() for lookup external functions.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">But until the patch move_getPointerToNamedFunction-01.patch not committed, MCJITMemoryManager.getPointerToNamedFunction()
 implementation uses sys::DynamicLibrary::SearchForAddressOfSymbol, so I can commit it right now and it's will work normally and will pass tests from 02-MCJIT_tests-01.patch.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Also I add changes RuntimeDyldMachO from March 8 to this patch.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Regards,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Danil</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<div>
<div style="TEXT-ALIGN: center" class="MsoNormal" align="center"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">
<hr align="center" size="2" width="100%">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt; FONT-WEIGHT: bold">From:</span></font></b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt"> Kaylor, Andrew [<a href="mailto:andrew.kaylor@intel.com">mailto:andrew.kaylor@intel.com</a>]
<br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Tuesday, March 20, 2012 10:13 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b> Kaylor, Andrew; Jim Grosbach; Danil Malyshev;
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b> RE: RuntimeDyLd new features</span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Ping</span></font><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">.</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt; FONT-WEIGHT: bold" lang="EN-US">From:</span></font></b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt" lang="EN-US">
<a href="mailto:llvm-commits-bounces@cs.uiuc.edu">llvm-commits-bounces@cs.uiuc.edu</a> [<a href="mailto:llvm-commits-bounces@cs.uiuc.edu">mailto:llvm-commits-bounces@cs.uiuc.edu</a>]
<b><span style="FONT-WEIGHT: bold">On Behalf Of </span></b>Kaylor, Andrew<br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Tuesday, March 13, 2012 3:28 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b> Jim Grosbach; Danil Malyshev; <a href="mailto:llvm-commits@cs.uiuc.edu">
llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b> Re: [llvm-commits] RuntimeDyLd new features</span></font></p>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">What is the status of this patch?</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">I have some changes to go into this code area which layer on top of this patch.  Should I post a contingent version
 of my changes to the list so that people can get a preview of what I’ve got in the works?</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Thanks,</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Andy</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt; FONT-WEIGHT: bold" lang="EN-US">From:</span></font></b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt" lang="EN-US"> Jim
 Grosbach [<a href="mailto:grosbach@apple.com">mailto:grosbach@apple.com</a>] <br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Tuesday, March 06, 2012 1:40 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b> Danil Malyshev<br>
<b><span style="FONT-WEIGHT: bold">Cc:</span></b> Kaylor, Andrew; <a href="mailto:llvm-commits@cs.uiuc.edu">
llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b> Re: RuntimeDyLd new features</span></font></p>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US">Hi Danil,</span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US">Yes, I agree getPointerToNamedFunction() should move to the memory manager.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
<div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US">On Mar 6, 2012, at 12:31 PM, Danil Malyshev <<a href="mailto:dmalyshev@accesssoftek.com">dmalyshev@accesssoftek.com</a>> wrote:</span></font></p>
</div>
<p style="MARGIN-BOTTOM: 12pt" class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Hi Jim,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Thank you for the update. You wrote an interesting idea. If we continue to follow it, I think the best way is move an implementation
 of the getPointerToNamedFunction() from JIT/MCJIT to DefaultJITMemoryManager.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">And JIT/MCJIT::getPointerToNamedFunction() just will do something like:</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">  if (!isSymbolSearchingDisabled()) {</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">    JMM->getPointerToNamedFunction(</span></font><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt">…);</span></font></p>
</div>
<blockquote style="MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt">
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">  }</span></font></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US">Right, with the minor nit that this will call MemMgr-> getPointerToNamedFunction() since that's what the MCJIT has access to. The JMM will be called by MCJITMemoryManager().</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<p style="MARGIN-BOTTOM: 12pt" class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">So we can delete MCJIT/Intercept.cpp and store only JIT/Intercept.cpp.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US">Exactly. Eventually, JIT/Intercept.cpp will go away too, which the old JIT is removed entirely. We could refactor this part of it to use the JMM as well if
 we want, though.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US">Regards,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US">  Jim</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<p style="MARGIN-BOTTOM: 12pt" class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">That do you think about it?</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Regards,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Danil</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<div>
<div style="TEXT-ALIGN: center" class="MsoNormal" align="center"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">
<hr align="center" size="2" width="100%">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt; FONT-WEIGHT: bold" lang="EN-US">From:</span></font></b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt" lang="EN-US"> Jim
 Grosbach [<a href="mailto:grosbach@apple.com">mailto:grosbach@apple.com</a>] <br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Tuesday, March 06, 2012 10:40 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b> Danil Malyshev<br>
<b><span style="FONT-WEIGHT: bold">Cc:</span></b> Kaylor, A<span lang="RU">ndrew</span><span lang="RU">;
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b> Re: RuntimeDyLd new features</span></span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">Hi Danil,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">Ack, sorry! I lost track of where things stood and didn't realize you were waiting for me. Mea culpa.</span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">I like the general idea of putting the guts of the logic for symbol in the memory manager interface, as you're right, that's the piece that actually knows about the target.
  The RTDyldMemoryManager is just an interface specification, not an implementation of anything. I like the idea of using that for the conduit. The only thing I don't care for is the idea that the memory manager should call into the ExecutionEngine. I don't
 think that's right. I would instead do it the other way around. We'd add the interface to RTDyldMemoryManger and JITMemoryManager, both. The MCJITMemoryManager implementation would tie the two together via:</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">uint64_t getExternalSymbolAddr(…) {</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">  return JMM->getExternalSymbolAddr(…);</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">}</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">The DefaultJITMemoryManager() would, as it does now, consider itself a hosted environment and do whatever appropriate symbol lookup is needed. There's some legacy horribleness
 in MCJIT/Intercept.cpp that would all go away via this, which would be fantastic.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">It seems OK to me for RuntimeDyld to call this function whenever it sees a symbol it doesn't know. Theoretically, that should allow everything to "just work" for external
 symbols in a hosted environment without any extra fiddling by the client process. For a remote target, there will be a custom JITMemoryManager implementation anyway to handle the remote allocation and such, so that can be handled there, too.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">Regards,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">-Jim</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">On Mar 6, 2012, at 9:00 AM, Danil Malyshev <<a href="mailto:dmalyshev@accesssoftek.com">dmalyshev@accesssoftek.com</a>> wrote:</span></font></p>
</div>
<p style="MARGIN-BOTTOM: 12pt" class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Hi Andrew,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">I'm waiting for Jim's response, but can submit the changed patch tomorrow.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Regards,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Danil</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<div>
<div style="TEXT-ALIGN: center" class="MsoNormal" align="center"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">
<hr align="center" size="2" width="100%">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt; FONT-WEIGHT: bold">From:</span></font></b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt"> Kaylor, Andrew [<a href="mailto:andrew.kaylor@intel.com">mailto:andrew.kaylor@intel.com</a>]
<br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Tuesday, March 06, 2012 8:46 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b> Danil Malyshev; Jim Grosbach<br>
<b><span style="FONT-WEIGHT: bold">Cc:</span></b> <a href="mailto:llvm-commits@cs.uiuc.edu">
llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b> RE: RuntimeDyLd new features</span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Hi Danil,</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">What is the current status of your patch?  Are you waiting for a response from Jim or will you be re-submitting
 something soon?</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">I have a set of changes merged with your latest patch and I’m hoping to minimize any conflicts in our ongoing
 work.</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Thanks,</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Andy</span></font></p>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt; FONT-WEIGHT: bold" lang="EN-US">From:</span></font></b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt" lang="EN-US"> Danil
 Malyshev [<a href="mailto:dmalyshev@accesssoftek.com">mailto:dmalyshev@accesssoftek.com</a>]
<br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Tuesday, February 28, 2012 12:46 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b> Jim Grosbach; Kaylor, Andrew<br>
<b><span style="FONT-WEIGHT: bold">Cc:</span></b> <a href="mailto:llvm-commits@cs.uiuc.edu">
llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b> RE: RuntimeDyLd new features</span></font></p>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Hello Jim,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">As variant, add the GetExternalSymbolAddr() to the RTDyldMemoryManager.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">The memory manager linked to a target system, its emit sections to the target system, so its can known external symbol
 addresses.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">The MCJITMemoryManager will use ExecutionEngine for getting addresses, another memory manager will use their methods, or
 just return 0 if this feature not supported.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">I can add these changes to the patch quickly.</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Thank you,</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Danil</span></font></p>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
<div>
<div style="TEXT-ALIGN: center" class="MsoNormal" align="center"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">
<hr align="center" size="2" width="100%">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt; FONT-WEIGHT: bold">From:</span></font></b><font size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt"> Jim Grosbach [<a href="mailto:grosbach@apple.com">mailto:grosbach@apple.com</a>]
<br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b> Tuesday, February 28, 2012 4:36 AM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b> Kaylor, Andrew<br>
<b><span style="FONT-WEIGHT: bold">Cc:</span></b> Danil Malyshev; <a href="mailto:llvm-commits@cs.uiuc.edu">
llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b> Re: RuntimeDyLd new features</span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
<div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">On Feb 23, 2012, at 2:08 PM, "Kaylor, Andrew" <<a href="mailto:andrew.kaylor@intel.com">andrew.kaylor@intel.com</a>> wrote:</span></font></p>
</div>
<p style="MARGIN-BOTTOM: 12pt" class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
<div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">These changes look good to me.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">The test-globall.ll test is failing because your code doesn’t handle sections without bits in the object image
 and needing zero-initialization (at least, that’s why it fails on ELF).  I believe that the stubs.ll and test-common-symbols.ll tests are both failing because common symbols aren’t being properly handled.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">As I mentioned before, I think the common symbol issue requires a bit of restructuring to allow format specific
 handling of part of the common symbol processing.  I have a fix ready which addresses this for ELF and would provide most of the fix and the necessary interface to fix it on MachO.  Basically, my fix makes a list of common symbols, allocates memory for the
 common symbols and calls a virtual function to update the symbol address in the SymbolRef.  MachO would just need an implementation of the function to test a symbol to see if it is a common symbol, and an implementation of the function to update the address.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">I also have a general fix ready for the nobits/zero-init problem.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Therefore, I think it would be OK to have this patch committed as is, with the understanding that these problems
 would be fixed shortly afterward.  Again, that is assuming that the changes are otherwise acceptable to Jim.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">I'm generally OK with that, with one exception. Adding a back-reference to the ExecutionEngine to RuntimeDyld is a pretty bad layering violation, as alluded to in the code
 comments. I'm not comfortable with that part going in as-is.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">We need an interface to the RuntimeDyld which will allow the client to query for unresolved symbols and to</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">a) provide an address for them if they are true external symbols, or</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">b) provide a module which supplies the symbols.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">In a normal hosted JIT environment, the second option is our vector to lazy compilation. The JIT builds the entry point, then queries for unresolved symbols. It creates
 a module containing each that has a compile-stub as an instantiation.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">The key is that the behavior is driven top-down from the client. There shouldn't be calls back up from the RuntimeDyld to either the JIT or the ExecutionEngine.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt">-Jim</span></font></p>
</div>
<p style="MARGIN-BOTTOM: 12pt" class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
<div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">I would like to discuss the way that the MCJIT-specific tests are handled, but we can talk about that later.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">-Andy</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<div>
<p class="MsoNormal"><b><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt; FONT-WEIGHT: bold" lang="EN-US">From:</span></font></b><span class="apple-converted-space"><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"> </span></font></span><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">Danil
 Malyshev [<a href="mailto:dmalyshev@accesssoftek.com">mailto:dmalyshev@accesssoftek.com</a>]<span class="apple-converted-space"> </span><br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b><span class="apple-converted-space"> </span>Wednesday, February 22, 2012 4:08 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b><span class="apple-converted-space"> </span>Jim Grosbach; Kaylor, Andrew;
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b><span class="apple-converted-space"> </span>RE: RuntimeDyLd new features</span></font></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><font color="black" size="3" face="Times New Roman"><span style="COLOR: black; FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Hi Jim,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">The MCJIT with changed RuntimeDyLd passes most of ExecutionEngine tests on Mac OS, except of 3 tests: stubs.ll, test-common-symbols.ll
 and test-global.ll.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">And I will work to ensure that these three tests are also passed.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Please look 01-RuntimeDyLd-02.patch of the previous letter, can I commit it?</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Regards,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Danil</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<div style="TEXT-ALIGN: center" class="MsoNormal" align="center"><font color="black" size="3" face="Times New Roman"><span style="COLOR: black; FONT-SIZE: 12pt">
<hr align="center" size="2" width="100%">
</span></font></div>
<div>
<p class="MsoNormal"><b><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt; FONT-WEIGHT: bold">From:</span></font></b><span class="apple-converted-space"><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt"> </span></font></span><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt">Kaylor,
 Andrew</span></font><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt"> [<a href="mailto:andrew.kaylor@intel.com">mailto:andrew.kaylor@intel.com</a>]<span class="apple-converted-space"> </span><br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b><span class="apple-converted-space"> </span>Saturday, February 18, 2012 5:41 AM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b><span class="apple-converted-space"> </span>Danil Malyshev;
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Cc:</span></b><span class="apple-converted-space"> </span>Jim Grosbach<br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b><span class="apple-converted-space"> </span>RE: RuntimeDyLd new features</span></font></p>
</div>
</div>
<div>
<p class="MsoNormal"><font color="black" size="3" face="Times New Roman"><span style="COLOR: black; FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Hi Danil,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">I’d like to make clear that if Jim is OK with the impact of your patch on MachO JIT loading then I’d be happy
 for you to proceed with your patch, incorporating my comments below, and we will withdraw our previous uncommitted patch and I will merge the GDB JIT debugging integration code we have with your changes after they have been committed.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Thanks,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Andy</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<div>
<p class="MsoNormal"><b><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt; FONT-WEIGHT: bold" lang="EN-US">From:</span></font></b><span class="apple-converted-space"><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"> </span></font></span><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"><a href="mailto:llvm-commits-bounces@cs.uiuc.edu">llvm-commits-bounces@cs.uiuc.edu</a>
 [<a href="mailto:llvm-commits-bounces@cs.uiuc.edu">mailto:llvm-commits-bounces@cs.uiuc.edu</a>]<span class="apple-converted-space"> </span><b><span style="FONT-WEIGHT: bold">On Behalf Of<span class="apple-converted-space"> </span></span></b>Kaylor, Andrew<br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b><span class="apple-converted-space"> </span>Tuesday, February 14, 2012 4:53 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b><span class="apple-converted-space"> </span>Danil Malyshev;
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b><span class="apple-converted-space"> </span>Re: [llvm-commits] RuntimeDyLd new features</span></font></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><font color="black" size="3" face="Times New Roman"><span style="COLOR: black; FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Hi Danil,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">I've been working with your patch also.  Mostly, it looks pretty good.  I've been able to layer most of our added
 functionality on top of it, and I have GDB integration working and our integration tests passing.  There are a few issues I'd like to bring up, however.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">The first thing I saw with your patch is that I had problems loading images that were generated with debug information
 included.  In particular, applying relocations to debug sections using the actual addresses of the debug sections causes problems.  This is really a small issue because, as you mentioned, debug sections don't need to be loaded.  I worked around this problem
 by adding a new member function to SectionRef to query whether or not the section is required for execution.  This is fairly trivial for ELF.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">A related problem is that your code does not properly handle sections which are only represented by a header
 in the ELF image (that is, SHT_NOBITS sections) or sections which need to be zero-initialized.  I worked around these problems using the existing isBSS() member in SectionRef, but it would probably be better to split these two concepts.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Similarly, your code does not handle symbols which are marked as relative to the SHN_COMMON section.  Fixing
 this is a bit more complicated.  I think we can probably build a table of these symbols in the RuntimeDyldImpl class by adding a new member to SectionRef, but we'll need deeper access to the format-specific classes to update the symbol addresses.  I'm working
 on an implementation of this for ELF.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">The code which loads the sections is currently assuming pointer-sized alignment for all sections.  I ran into
 a case using floating point numbers where 16-byte alignment was required.  This is a fairly simple fix as the alignment value is accessible through SectionRef.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">I think it would be worthwhile adding an function to SectionRef to query whether or not a section contains code
 rather than the current algorithmic method you are using.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">In a few places you are using uintptr_t or uint8_t* in places that will restrict cross-architecture JITing. 
 The TargetAddr in the SectionEntry structure is an example that comes to mind.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">The distinction between code and data for memory allocation will be important going forward.  I think it would
 be better to fix the existing bug that to disable the specific allocations.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">In RuntimeDyld::loadObject, in the "parse and process relocations loop" "SectionID == 0" is used to identify
 sections that need to be looked up, but zero is a valid SectionID.  For that section, it goes into the lookup for every relocation.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">I'm continuing to work on integrating our code, including some that hasn't yet been submitted to the list for
 review, with your changes.  I need to go over what I've done with the rest of my co-workers, but I wanted to give you a progress update now.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">-Andy</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<div>
<p class="MsoNormal"><b><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt; FONT-WEIGHT: bold" lang="EN-US">From:</span></font></b><span class="apple-converted-space"><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"> </span></font></span><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">Danil
 Malyshev [<a href="mailto:dmalyshev@accesssoftek.com">mailto:dmalyshev@accesssoftek.com</a>]<span class="apple-converted-space"> </span><br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b><span class="apple-converted-space"> </span>Tuesday, February 14, 2012 10:30 AM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b><span class="apple-converted-space"> </span>Kaylor, Andrew;
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Cc:</span></b><span class="apple-converted-space"> </span>Jim Grosbach<br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b><span class="apple-converted-space"> </span>RE: RuntimeDyLd new features</span></font></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><font color="black" size="3" face="Times New Roman"><span style="COLOR: black; FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Hi Andrew,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Thank you for the detailed explanation.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">I have carefully studied your patch and DyldELFObject.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">A gdb support is very important and it's actually a big step for MCJIT. I like your patch, its loadObject() looks faster
 than my. But I see one big conceptual problem.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">The RuntimeDyLd was developed as a linker, which is able to prepare data for running on another platform. The RuntimeDyldMachO
 largely implements it.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">In the RuntimeDyldELF you went the other way. Now it is very far from remote execution. And even if the object file will
 be emitted with RTDyldMemoryManager, it is not a good idea: (1) remote execution doesn't need many parts of object file, such as debugging information, headers, section table and etc, (2) some sections is code and must has execution permit, some sections is
 data without execution permit, so the best way is use a different methods for emits different type of sections.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">If your patch will be committed, we obtain a RuntimeDyldMachO and RuntimeDyldELF, which different principles and a different
 results. And most likely, for ELF will never be fully realization for remote execution.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">I think another ways will be better, just for instance, two possible solutions:</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">1. Always emits the sections required to execution with a RTDyldMemoryManager. Resolve relocation in these sections. And
 if the isDebugging flag is set, then in addition, DyldELFObject::rebaseObject make his job, except that for the sections stored by the RTDyldMemoryManager write the correct address.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">2. Check the debug flag at first, before load object file. If it set, just use your realization of loadObject, otherwise
 - use normal way with RTDyldMemoryManager.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Both alternatives have their shortcomings, perhaps you find another solution. Also, I would be glad to hear that Jim thinks
 about it.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Now I trying to merge your patch with my.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Regards,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US">Danil</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="navy" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: navy; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<div style="TEXT-ALIGN: center" class="MsoNormal" align="center"><font color="black" size="3" face="Times New Roman"><span style="COLOR: black; FONT-SIZE: 12pt">
<hr align="center" size="2" width="100%">
</span></font></div>
<div>
<p class="MsoNormal"><b><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt; FONT-WEIGHT: bold">From:</span></font></b><span class="apple-converted-space"><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt"> </span></font></span><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt">Kaylor,
 Andrew</span></font><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt"> [<a href="mailto:andrew.kaylor@intel.com">mailto:andrew.kaylor@intel.com</a>]<span class="apple-converted-space"> </span><br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b><span class="apple-converted-space"> </span>Thursday, February 09, 2012 4:56 AM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b><span class="apple-converted-space"> </span>Danil Malyshev;
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b><span class="apple-converted-space"> </span>RE: RuntimeDyLd new features</span></font></p>
</div>
</div>
<div>
<p class="MsoNormal"><font color="black" size="3" face="Times New Roman"><span style="COLOR: black; FONT-SIZE: 12pt"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">Hi Danil,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">Thanks for your efforts in this area.  As Eli Bendersky mentioned, we have a patch out for review in this area also. 
 I'm hopeful that we can find a convergence between our code, your code and the code that Jim Grosbach has put in place.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">Unfortunately, we have been submitting our code in small chunks for ease of review and to keep things stable, and
 it may not be obvious from what we've put out for review what our intentions were or our intended solutions to the problems that were left open.  I'd like to take this opportunity to discuss the direction we we're heading and see how it might align with what
 you and Jim have done.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">Let me first explain what we have done, and then I'll offer specific comments on your code and possible next steps.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">We have had two primary goals: (1) to get MCJIT generated code to work correctly on Intel architecture and help pave
 the way for other implementations and (2) enable source-level debugging of JITed code with GDB.  This second goal seems to be dropping from view, but it places a few constraints on the eventual implementation.  We've had GDB integration working, BTW.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">In order to get GDB to handle JITed code, we need to register an ELF object image through an interface GDB defines. 
 As you might expect, GDB has some peculiar expectations for what this ELF object image should look like.  In particular, we need to set a flag in the ELF header and update the sh_addr members in the section headers to reflect the address where the section
 contents reside in memory.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">Our most recent patch (<a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/135997.html" target="_blank"><font color="purple"><span style="COLOR: purple">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/135997.html</span></font></a>,
 not yet committed) begins by copying the entire ELF image emitted by the MC code generator into an executable buffer.  This was intended as a temporary step toward our eventual solution.  It enabled us to perform relocations in-place on the object and execute
 functions in place (thus eliminating an extra copy that was previously being done).  We were in the process of implementing a smarter section-based approach, but Jim Grosbach was implementing a similar approach in parallel and our submission ended up appearing
 out of step in this regard.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">So that's our background.  Now, returning to your patch....</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">I like the idea of combining as much common code as possible into the RuntimeDyldImpl class.  I'm interested to hear
 from users of the MachO loader if your implementation has lost any of the specialization that they need.  I think it's a promising approach.  There are some ELF-specific details that we will need to have incorporated to re-enable GDB integration, but I expect
 that we'll be able to find a way to work that in with a few well-placed overloaded function calls.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">I have some reservations about the use of the basic ObjectFile interface, which has some serious limitations.  We've
 been working toward exposing the ELFObjectFile template for use in the runtime loading process (as well as other unrelated uses).  It may be that this is something that can be generalized enough to fit with your approach.  My main concern in this regard is
 that we need to be able to update specific entries in the ELF image, as described above.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">A related issue is that section loading can be refined with some ELF-specific details.  Some sections need to have
 memory allocated for their contents.  Other sections can be left in place in the originally generated image.  There is a good bit of unnecessary copying going on in the existing implementation, and I'm not clear to what extent your patch addresses that.  Before
 the object is loaded, it is copied into a new buffer and then the contents of each section are copied again as we go.  What I'd like is for the runtime loaders to use the buffer into which the object is originally generated and only make copies where it is
 strictly necessary.  This isn't necessarily something you need to do for your work to be acceptable, but I mention it as a likely next step.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">Over the next few days I intend to apply your patch locally and try to merge our work into it.  I'll provide additional
 feedback as I get a better feel for what you've done.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: black; FONT-SIZE: 11pt" lang="EN-US">-Andy</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="#1f497d" size="2" face="Calibri"><span style="FONT-FAMILY: Calibri; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></font> </p>
</div>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<div>
<p class="MsoNormal"><b><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt; FONT-WEIGHT: bold" lang="EN-US">From:</span></font></b><span class="apple-converted-space"><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"> </span></font></span><font color="black" size="2" face="Tahoma"><span style="FONT-FAMILY: Tahoma; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"><a href="mailto:llvm-commits-bounces@cs.uiuc.edu">llvm-commits-bounces@cs.uiuc.edu</a>
 [<a href="mailto:llvm-commits-bounces@cs.uiuc.edu">mailto:llvm-commits-bounces@cs.uiuc.edu</a>]<span class="apple-converted-space"> </span><b><span style="FONT-WEIGHT: bold">On Behalf Of<span class="apple-converted-space"> </span></span></b>Danil Malyshev<br>
<b><span style="FONT-WEIGHT: bold">Sent:</span></b><span class="apple-converted-space"> </span>Tuesday, February 07, 2012 12:24 PM<br>
<b><span style="FONT-WEIGHT: bold">To:</span></b><span class="apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b><span style="FONT-WEIGHT: bold">Subject:</span></b><span class="apple-converted-space"> </span>[llvm-commits] RuntimeDyLd new features</span></font></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><font color="black" size="3" face="Times New Roman"><span style="COLOR: black; FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">Hello everyone,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">Please review the RuntimeDyLd-01.patch.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">This patch makes the following changes:</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">1. The main works will made in the RuntimeDyLdImpl with uses the ObjectFile class. RuntimeDyLdMachO and RuntimeDyLdELF
 now only parses relocations and resolve it. This is allows to make improvements of the RuntimeDyLd more easily. In addition the support for COFF can be easily added.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">2. Added ARM relocations to RuntimeDyLdELF.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">3. Added support for stub functions for the ARM, allowing to do a long branch.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">4. Added support for external functions that are not loaded from the object files, but can be loaded from external libraries.
 Now MCJIT can correctly execute the code containing the printf, putc, and etc.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">5. The sections emitted instead functions, thanks Jim Grosbach. MemoryManager.startFunctionBody() and MemoryManager.endFunctionBody()
 have been removed.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">6. MCJITMemoryManager.allocateDataSection() and MCJITMemoryManager. allocateCodeSection() used JMM->allocateSpace() instead
 of JMM->allocateCodeSection() and JMM->allocateDataSection(), because I got an error: "Cannot allocate an allocated block!" with object file contains more than one code or data sections.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">7. Fixed ELF::R_X86_64_PC32 relocation for the case when RealOffset is negative value.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">8. Added new testing folder: ExecutionEngine/MCJIT because mcjit tests can be running only for x86 and arm and it's can
 be filtered with dg.exp.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">Tested in Ubuntu x86_64, Ubuntu armv7 and MacOS 64.</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"></span></font> </p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">Thank you,</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" size="2" face="Arial"><span style="FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">Danil</span></font></p>
</div>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt"></span></font> </p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="FONT-SIZE: 12pt" lang="EN-US"></span></font> </p>
</div>
</div>
</div>
</div>
</body>
</html>