[LLVMdev] fPIC in llvm 2.6
Ryan M. Lefever
lefever at illinois.edu
Sat Oct 2 18:59:04 PDT 2010
Is fPIC broken on x86_64 in LLVM 2.6? I looked through the release
notes but did not see anything mentioned. When I try:
-------------------
> llvm-gcc -Iinclude -emit-llvm -fPIC -O3 -c -o file.opt.bc file.c
> llvm-ld -native -Xlinker=-shared -Xlinker=-Wl,-soname,libtest.so -o
file.so file.opt.bc
-------------------
on an x86 machine it works fine. When I try it on x86_64, the linking
command complains with:
-------------------
/usr/bin/ld: /tmp/ccjE1tcG.o: relocation R_X86_64_32S against `.bss' can
not be used when making a shared object; recompile with -fPIC
/tmp/ccjE1tcG.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
llvm-ld:
-------------------
Thanks,
Ryan
More information about the llvm-dev
mailing list