[LLVMdev] What's the difference between using llvm-link and using llvm gold plugin?

Duncan Sands baldrick at free.fr
Wed Jun 27 00:50:15 PDT 2012


Hi,

> I got your point! Thanks a lot, Rafael!

one big difference is that llvm-link doesn't do any optimization, while the gold
linker does.  You can get something similar to gold by using llvm-link, and then
running "opt -std-link-opts" on the linked bitcode file.  However all symbols
will be internalized by default (you can adjust this on the command line) while
the gold linker is more sophisticated about what is internalized as Rafael
mentioned.

Ciao, Duncan.

>
> Best,
> Tianyin
>
> On Tue, Jun 26, 2012 at 4:12 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> <mailto:rafael.espindola at gmail.com>> wrote:
>
>      > Could you explain a bit more (sorry I'm not from a compiler background)? So,
>      > what's the difference in the analysis perspective? What does "reading ELF
>      > files and archives" and "creating a list of symbols passed to llvm's
>      > internalize pass" do?
>      >
>      > I checked a little bit the corresponding .ll file generated according to the
>      > .bc file. It seems that symbols like struct and function names are
>      > preserved. What is missing here? Is it possible for you to give an simple
>      > example?
>
>     There is an example in
>
>     http://llvm.org/docs/GoldPlugin.html#example1
>
>     Where some files are native ELF files and some are IL. Gold is able to
>     handle it, llvm-link will just tell you that it doesn't know about the
>     ELF format.
>
>      > Thanks a lot!
>      > Tianyin
>
>
>     Cheers,
>     Rafael
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>





More information about the llvm-dev mailing list