Hi, Duncan,<br><br>Thank you very much for your reply. <br>I see. But actually I don't need the optimization because I just want to do static analysis upon the bitcode file. :-)<br><br>Best regards,<br>Tianyin<br><br><div class="gmail_quote">
On Wed, Jun 27, 2012 at 12:50 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div class="im"><br>
> I got your point! Thanks a lot, Rafael!<br>
<br>
</div>one big difference is that llvm-link doesn't do any optimization, while the gold<br>
linker does. You can get something similar to gold by using llvm-link, and then<br>
running "opt -std-link-opts" on the linked bitcode file. However all symbols<br>
will be internalized by default (you can adjust this on the command line) while<br>
the gold linker is more sophisticated about what is internalized as Rafael<br>
mentioned.<br>
<br>
Ciao, Duncan.<br>
<div class="im"><br>
><br>
> Best,<br>
> Tianyin<br>
><br>
> On Tue, Jun 26, 2012 at 4:12 PM, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a><br>
</div><div class="im">> <mailto:<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>>> wrote:<br>
><br>
> > Could you explain a bit more (sorry I'm not from a compiler background)? So,<br>
> > what's the difference in the analysis perspective? What does "reading ELF<br>
> > files and archives" and "creating a list of symbols passed to llvm's<br>
> > internalize pass" do?<br>
> ><br>
> > I checked a little bit the corresponding .ll file generated according to the<br>
> > .bc file. It seems that symbols like struct and function names are<br>
> > preserved. What is missing here? Is it possible for you to give an simple<br>
> > example?<br>
><br>
> There is an example in<br>
><br>
> <a href="http://llvm.org/docs/GoldPlugin.html#example1" target="_blank">http://llvm.org/docs/GoldPlugin.html#example1</a><br>
><br>
> Where some files are native ELF files and some are IL. Gold is able to<br>
> handle it, llvm-link will just tell you that it doesn't know about the<br>
> ELF format.<br>
><br>
> > Thanks a lot!<br>
> > Tianyin<br>
><br>
><br>
> Cheers,<br>
> Rafael<br>
><br>
><br>
><br>
</div>> _______________________________________________<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>
<br>
<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>
</blockquote></div>