[LLVMdev] gold plugin example

Rafael Avila de Espindola rafael.espindola at gmail.com
Tue Mar 22 06:19:02 PDT 2011


On 11-03-21 10:35 PM, Sangmin Park wrote:
> Hi,
>
> I fixed error by using different version of ld with LLVM 2.7.
> I used ld.gold that comes with Ubuntu 10.04.
> Here is the version info:
>
> sangmin at sangmin-desktop:/tmp$ ld -v
> GNU gold (GNU Binutils for Ubuntu 2.20.1-system.20100303) 1.9
>
> My experience of gold plugin is as follows:
>
> LLVM 2.7 (with libLLVMgold.so) + ld 2.20.1 (from Ubuntu 10.04) : O
> LLVM 2.7 (with libLLVMgold.so) + ld 2.21.51 (manually compiled) : X
> LLVM 2.8 (with LLVMgold.so) + ld 2.20.1 (from Ubuntu 10.04): X
> LLVM 2.8 (with LLVMgold.so) + ld 2.21.51 (manually compiled): X
>
> When compiling (lib)LLVMgold.so file, I used the source file from ld
> 2.21.51.
>
> I can work with LLVM 2.7 and ld 2.20.1 now, but am curious with the result.
> Can you explain what part I did wrong?
>
> Thanks,
> Sangmin
>
>
>
> On Mon, Mar 21, 2011 at 9:13 PM, Sangmin Park <sangmin.park at gmail.com
> <mailto:sangmin.park at gmail.com>> wrote:
>
>     Hi all,
>
>     I got an error from the gold plugin example in the following link:
>     http://llvm.org/docs/GoldPlugin.html#example1
>
>     Here is the error message:
>
>     sangmin at sangmin-desktop:/tmp$ llvm-gcc -use-gold-plugin a.a b.o -o main
>     /usr/bin/ld: error: a.a: no archive symbol table (run ranlib)

Looks like ar is not using the plugin. Have you created the links in 
bfd-plugins? Can you run nm in a IL file?

Cheers,
Rafael



More information about the llvm-dev mailing list