[LLVMdev] Difficulties in using gold plugin. ("ar" not working properly)
Rafael Avila de Espindola
rafael.espindola at gmail.com
Wed Jun 15 11:10:36 PDT 2011
On 11-06-15 09:03 AM, Istvan Haller wrote:
> Dear all,
> I'm trying to use the gold plugin to make it easier to generate LLVM bitcode
> from complex applications. I did the steps mentioned on
> "http://llvm.org/docs/GoldPlugin.html". Both linking and LLVM generation seem to
> work properly, however when using the tool ar, the symbol table is lost. "no
> archive symbol table (run ranlib)".
>
> I'm using LLVM 2.9, Ubuntu 10.10, binutils 2.20.51 both from the repository and
> hand built (with -enable-gold and -enable-plugins).
>
> Both LLVMgold.so and libLTO.so are located in:
> ~/tools/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/
> ~/lib/bfd-plugins
> /usr/lib/bfd-plugins
>
> The following are the build commands:
> llvm-g++ -use-gold-plugin -flto $test.cpp -c -o test.o
> ar --plugin /usr/lib/bfd-plugins/LLVMgold.so crs test.a test.o
> llvm-g++ -use-gold-plugin -Wl,-plugin-opt=also-emit-llvm test.a libstdc++.a -o
>
> Maybe its just me doing some small error, but I can't see it..
Can you run nm on an IL file? What if you pass an explicit -plugin
option to nm?
> Thanks for the help,
> Istvan
Cheers,
Rafael
More information about the llvm-dev
mailing list