<div class="gmail_quote">2009/7/19 Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="WORD-WRAP: break-word"><br>
<div>
<div class="im">
<div>On Jul 19, 2009, at 8:35 AM, Aaron Gray wrote:</div><br>
<blockquote type="cite">
<div>I am getting a simular problem with ___main appearing if <a href="mailto:'@main'" target="_blank">'@main'</a> is used but there is no instance of it in the Module iterators, only in the relocations.</div>


<div> </div>
<div>Is it possible to do something about these 'ghost symbols' and have them defined in Module. Rather than having to check for them and pick them up when processing relocations.</div></blockquote><br></div>You should not be walking the module.</div>

</div></blockquote>
<div> </div>
<div>How else do you get the right symbol info ?</div>
<div> </div>
<div>But as I have said lowering functions donot generate there substitute value symbols in the Module. They just magically appear in the relocations without being in the module. This is a design flaw in LLVM.</div>
<div> </div>
<div>I have done a hack in the COFF writer's relocation code to get round this for now. But it does not work very well with symbol indexes.</div>
<div> </div>
<div>But am thinking of doing a cleanup pass, or walk the module to get this info.</div>
<div> </div>
<div>What do you mean "You should not be walking the module." ?</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Aaron</div>
<div> </div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="WORD-WRAP: break-word">
<div><span id=""></span><br></div><font color="#888888">
<div>-Chris</div></font></div><br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>

<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br><br></blockquote></div><br>