Hi all,
<div><br></div><div>I got an error from the gold plugin example in the following link:</div><div><a href="http://llvm.org/docs/GoldPlugin.html#example1">http://llvm.org/docs/GoldPlugin.html#example1</a></div><div><br></div>

<div>Here is the error message:</div><div><br></div><div><div>sangmin@sangmin-desktop:/tmp$ llvm-gcc -use-gold-plugin a.a b.o -o main </div><div>/usr/bin/ld: error: a.a: no archive symbol table (run ranlib)</div><div>/usr/bin/ld: /usr/lib/crt1.o:(.text+0x18): error: undefined reference to 'main'</div>

<div>/usr/bin/ld: b.o: in function foo1:b.c(.text+0x4): error: undefined reference to 'foo2'</div><div>collect2: ld returned 1 exit status</div></div><div><br></div><div>I followed the instructions from the previous thread below, but I still have the problem.</div>

<div><a href="http://old.nabble.com/llvm-gold-plugin-example-td28140005.html">http://old.nabble.com/llvm-gold-plugin-example-td28140005.html</a></div><div><br></div><div>I got the error with both 2.7 and 2.8. </div><div>
Here are my settings:</div>
<div><br></div><div>LLVMgold.so in  (with LLVM 2.8)</div><div>- $HOME/llvm-gcc-4.2-2.8-i686-linux/libexec/gcc/i686-pc-linux-gnu/4.2.1/LLVMgold.so</div><div>- $HOME/llvm-gcc-4.2-2.8-i686-linux/lib/bfd-plugins/LLVMgold.so</div>

<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>- /usr/lib/bfd-plugins/LLVMgold.so</div><div><br></div><div>libLLVMgold.so in (with LLVM 2.7)</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>

- $HOME/llvm-gcc-4.2-2.7-i686-linux/libexec/gcc/i686-pc-linux-gnu/4.2.1/libLLVMgold.so</div><div>- $HOME/llvm-gcc-4.2-2.7-i686-linux/lib/bfd-plugins/libLLVMgold.so</div><div>- /usr/lib/bfd-plugins/libLLVMgold.so</div></div>

<div><br></div><div>Compiled ld-new, ar, nm-new are linked to /usr/bin/ld, /usr/bin/ar, /uar/bin/nm, respectively.</div><div><br></div><div><div>sangmin@sangmin-desktop:/tmp$ ld -v</div><div>GNU gold (GNU Binutils 2.21.51.20110316) 1.11</div>

</div><div><br></div><div><br></div><div>Thanks in advance for your help.</div><div><br></div><div>Sangmin</div>