<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@page WordSection1 {margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
LI.MsoNormal {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
DIV.MsoNormal {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
P.MsoAcetate {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-SIZE: 8pt
}
LI.MsoAcetate {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-SIZE: 8pt
}
DIV.MsoAcetate {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-SIZE: 8pt
}
P.msochpdefault {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 10pt
}
LI.msochpdefault {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 10pt
}
DIV.msochpdefault {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 10pt
}
SPAN.emailstyle18 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d
}
SPAN.BalloonTextChar {
        FONT-FAMILY: "Tahoma","sans-serif"
}
SPAN.EmailStyle22 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d
}
.msochpdefault {
        FONT-SIZE: 10pt
}
DIV.WordSection1 {
        
}
</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="EN-US" link="blue" vlink="purple" ocsi="x">
<div style="FONT-FAMILY: Tahoma; DIRECTION: ltr; COLOR: #000000; FONT-SIZE: x-small">
<div>Hi,</div>
<div><font face="tahoma"></font> </div>
<div>Committed at r154948, thank you!</div>
<p><font face="tahoma"></font> </p>
<p><font size="2" face="tahoma">Regards,</font></p>
<p><font size="2" face="tahoma">Danil</font></p>
<div dir="ltr"><font color="#000000" face="Tahoma"></font> </div>
<div style="DIRECTION: ltr" id="divRpF951136">
<hr tabindex="-1">
<font color="#000000" face="Tahoma"><b>From:</b> Kaylor, Andrew [andrew.kaylor@intel.com]<br>
<b>Sent:</b> Thursday, April 12, 2012 6:43 PM<br>
<b>To:</b> Danil Malyshev<br>
<b>Cc:</b> llvm-commits@cs.uiuc.edu<br>
<b>Subject:</b> RE: [llvm-commits] [llvm] [Patch] MCJIT, fix ARM ELF stub relocations<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">OK.  That makes sense.</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"></span> </p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">So in that case, I’d so the patch looks good.</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"></span> </p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">-Andy</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"></span> </p>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<p class="MsoNormal"><b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</span></b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> Danil Malyshev [mailto:dmalyshev@accesssoftek.com]
<br>
<b>Sent:</b> Thursday, April 12, 2012 1:03 PM<br>
<b>To:</b> Kaylor, Andrew<br>
<b>Cc:</b> llvm-commits@cs.uiuc.edu<br>
<b>Subject:</b> RE: [llvm-commits] [llvm] [Patch] MCJIT, fix ARM ELF stub relocations</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">Hi Andrew,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">Some ARM branch instructions use offset between current instruction and destination instruction instead of full destination address. These instructions has
 a short jump range, so if we have relocations for this instruction we need use a special stub function in bottom of section which a full destionation address and resolve branch relocation to this function. The offset is always the same, wherever we moved the
 section, so I resolve this relocation immediate and use the local address for it.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">Regards,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">Danil</span></p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"></span> </p>
</div>
<div id="divRpF788342">
<div style="TEXT-ALIGN: center" class="MsoNormal" align="center"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">
<hr align="center" size="2" width="100%">
</span></div>
<p style="MARGIN-BOTTOM: 12pt" class="MsoNormal"><b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">From:</span></b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt"> Kaylor, Andrew [andrew.kaylor@intel.com]<br>
<b>Sent:</b> Tuesday, April 10, 2012 10:23 AM<br>
<b>To:</b> Danil Malyshev; <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b>Subject:</b> RE: [llvm-commits] [llvm] [Patch] MCJIT, fix ARM ELF stub relocations</span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">It appears to me that this will result in the FinalAddress parameter being calculated from Section.Address.  Shouldn’t it be calculated from Section.LoadAddress? 
 That is, rather than passing ‘Target’ should you be passing ‘Section.LoadAddress + Rel.Offset’?</span><span style="COLOR: black"></span></p>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">It is my understanding that in the case of local execution Section.Address and Section.LoadAddress will be the same (and so existing tests would pass with
 the patch you submitted), but that the distinction exists to handle the case of remote JITing.  I think that we may have some clean-up to do to make this work correctly, but it looks like the foundation is more or less in place.</span><span style="COLOR: black"></span></p>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Let me know if I’ve misunderstood this in some way.</span><span style="COLOR: black"></span></p>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">-Andy</span><span style="COLOR: black"></span></p>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<p class="MsoNormal"><b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">From:</span></b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">
<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>On Behalf Of </b>Danil Malyshev<br>
<b>Sent:</b> Friday, April 06, 2012 5:49 PM<br>
<b>To:</b> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<b>Subject:</b> [llvm-commits] [llvm] [Patch] MCJIT, fix ARM ELF stub relocations</span><span style="COLOR: black"></span></p>
</div>
</div>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
<div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">Hello everyone,</span><span style="COLOR: black"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">Attached the patch fixed ARM stub relocations in RuntimeDyldELF.</span><span style="COLOR: black"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">Regards,</span><span style="COLOR: black"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: black; FONT-SIZE: 10pt">Danil</span><span style="COLOR: black"></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>