Sorry for not explaining well.<br><br>After compiling with g++-cross<br>g++-cross -c a.c<br><br>I do link using this command<br>/gold_binutils/build/gold/ld-new -plugin ~/Desktop/Sanjeev/LLVM/llvm-2.7/Release/lib/libLLVMgold.so --eh-frame-hdr -melf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o<br>
/usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0/crtbegin.o -L/usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0 -L/usr/local/lib -lgcc<br>--as-needed -lgcc_s --no-as-needed -lc -lgcc -lpthread -lrt --as-needed -lgcc_s --no-as-needed /usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0/crtend.o<br>
/usr/lib/crtn.o a.o -o sanjeevtest<br><br><div class="gmail_quote">On Mon, Jul 12, 2010 at 7:03 PM, Anton Korobeynikov <span dir="ltr"><<a href="mailto:anton@korobeynikov.info">anton@korobeynikov.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">> Yes, I'm following this page only and did whatever is mentioned there.<br>
</div>It doesn't seem so. E.g. it contains the following line:<br>
"The linker takes a -plugin option that points to the path of the<br>
plugin .so file."<br>
and<br>
"Replace that with ld-new -plugin /path/to/libLLVMgold.so to test it out."<br>
<br>
At least you are not telling ld-new to use any plugin. Thus ld-new<br>
does not know how to deal with LLVM IR inside .o and you obtain:<br>
<div class="im">>ld-new libs a.o -o binary<br>
>a.o : incompatible object file<br>
<br>
</div>--<br>
<div><div></div><div class="h5">With best regards, Anton Korobeynikov<br>
Faculty of Mathematics and Mechanics, Saint Petersburg State University<br>
</div></div></blockquote></div><br>