[LLVMdev] gold plugin example
Sangmin Park
sangmin.park at gmail.com
Mon Mar 21 18:13:16 PDT 2011
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)
/usr/bin/ld: /usr/lib/crt1.o:(.text+0x18): error: undefined reference to
'main'
/usr/bin/ld: b.o: in function foo1:b.c(.text+0x4): error: undefined
reference to 'foo2'
collect2: ld returned 1 exit status
I followed the instructions from the previous thread below, but I still have
the problem.
http://old.nabble.com/llvm-gold-plugin-example-td28140005.html
I got the error with both 2.7 and 2.8.
Here are my settings:
LLVMgold.so in (with LLVM 2.8)
- $HOME/llvm-gcc-4.2-2.8-i686-linux/libexec/gcc/i686-pc-linux-gnu/4.2.1/LLVMgold.so
- $HOME/llvm-gcc-4.2-2.8-i686-linux/lib/bfd-plugins/LLVMgold.so
- /usr/lib/bfd-plugins/LLVMgold.so
libLLVMgold.so in (with LLVM 2.7)
- $HOME/llvm-gcc-4.2-2.7-i686-linux/libexec/gcc/i686-pc-linux-gnu/4.2.1/libLLVMgold.so
- $HOME/llvm-gcc-4.2-2.7-i686-linux/lib/bfd-plugins/libLLVMgold.so
- /usr/lib/bfd-plugins/libLLVMgold.so
Compiled ld-new, ar, nm-new are linked to /usr/bin/ld, /usr/bin/ar,
/uar/bin/nm, respectively.
sangmin at sangmin-desktop:/tmp$ ld -v
GNU gold (GNU Binutils 2.21.51.20110316) 1.11
Thanks in advance for your help.
Sangmin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110321/40b27f1f/attachment.html>
More information about the llvm-dev
mailing list