<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 10, 2013 at 3:13 PM, Kaylor, Andrew <span dir="ltr"><<a href="mailto:andrew.kaylor@intel.com" target="_blank">andrew.kaylor@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Actually, MCJIT doesn’t perform relocations on debug sections.  I’m not sure that would matter anyway.  The place where I’m handling the debug information is
 outside MCJIT and the MCJIT relocation code isn’t really accessible at that point.<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> </span></p></div></div></blockquote><div><br></div><div style>I know it doesn't, that's why I made the "non-alloc" comment. :)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Right now, when MCJIT emits an object image, it broadcasts an event to any registered listeners indicating that an object was emitted, passing an ObjectImage
 reference as the parameter to the listener.  The only current listener I’m aware of is the IntelJITEventListener, which wants to notify the Intel VTune Amplifier (if present) about the newly JITed functions.<u></u><u></u></span></p>

<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> </span></p></div></div></blockquote><div><br></div><div style>OK.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u></span></p>
<p class=""><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"> </span><br></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">The problem is that I have a test case that is trying to reference an inlined function.  In this case, the generated object puts the ‘inlined’ function in a
 separate section (I’m not clear why that is) and generates relocations for the .debug_line section.  Since these relocations are never applied, I end up with multiple sequences in the line table claiming to be at address zero.<u></u><u></u></span></p>

<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">FWIW, if I use whatever ‘dwarfdump’ is on my Linux box to look at the generated object, it shows me a line table with multiple entries claiming to be at address
 zero just like llvm-dwarf does.  If I let clang finish things and create an executable, both dwarfdump and llvm-dwarfdump show unique load-based addresses for everything.<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> </span></p></div></blockquote><div style>Right. This is pretty easy, especially if you just look at my last patch that added a new reloc handler for .debug_info.dwo (r171428). I've been meaning to do this, but it hasn't bubbled up to the top of my queue yet.</div>
<div style><br></div><div style>-eric</div></div></div></div>