[LLVMdev] Linking problem
Rinaldini Julien
julien.rinaldini at heig-vd.ch
Wed Mar 26 10:51:42 PDT 2014
Hi,
I'm writing a pass that implements a jump table with an array of
blockaddress and an indirectbr instruction.
It get a blockaddress in the array (via getelementptr and an index) and
then jump to this basicblock via the indirectbr.
I tried to compile several libraries to test my pass and the run their
test-suite. It works fine with, for e.g, libTomCrypt (in -O0,1,2,3).
With GMP or ImageMagick it works fine in -O0, but whenever I try in
-O1,2,3 it fail and I get a tons of errors like (note that the
compilation/link of the libs itself works, it fails when I make a 'make
check'):
...
./.libs/libtests.a(misc.o):(.rodata+0x5b0): undefined reference to
`.Ltmp491'
./.libs/libtests.a(misc.o):(.rodata+0x5b8): undefined reference to
`.Ltmp492'
./.libs/libtests.a(misc.o):(.rodata+0x5c0): undefined reference to
`.Ltmp493'
./.libs/libtests.a(misc.o):(.rodata+0x5c8): undefined reference to
`.Ltmp494'
...
I tried to modify my pass, call my pass in the PassManagerBuilder at
different places,... But I still got the same errors each time.
I ran out of ideas where to look :( I got this problem both on Linux and
OSX.
Any idea which pass could cause this problem ? Maybe it's a pass in the
backend ?
Cheers !
More information about the llvm-dev
mailing list