Error "relocation R_X86_64_32S against `.rodata'" occured while linking to gcc library

陳韋任 chenwj@iis.sinica.edu.tw
Mon May 16 10:46:00 GMT 2011


Hi, all

  I am trying to use a gcc plugin, gcc-vcg-plugin
(http://code.google.com/p/gcc-vcg-plugin/), but I
have a problem with building the plugin.

  Error messgae belows,

-------------------------------------------------------------------------------
/usr/bin/ld: /tmp/chenwj/install/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib64/libiberty.a(hashtab.o):
relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/chenwj/install/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib64/libiberty.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
-------------------------------------------------------------------------------

  And here is my gcc configuration,

-------------------------------------------------------------------------------
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/tmp/chenwj/install/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.6.0/configure --prefix=/tmp/chenwj/install --enable-languages=c,c++ --enable-plugin
Thread model: posix
gcc version 4.6.0 (GCC)
-------------------------------------------------------------------------------

  Any suggestion appreciated. 

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667



More information about the Gcc-help mailing list