relocation R_X86_64_32S can not be used when making a shared object; recompile with
Hi Linux geeks,
I am trying to create a .so file using GCC. When i try to run make file i am getting the below error
"relocation R_X86_64_32S can not be used when making a shared object;
recompile with -fPIC"
What is the reason for this error ? As it said to recompile with -fpic, i did but the error is same. What is the solution for this error. What is the reason for this type of error.
Below are the flags which i have set.
the compiler options.
-m64 -fexceptions -Wall -O2 -Dunix -DLinux
-s -o$(TARGET) -Wl,-shared
Note: this machine is a 64 bit machine
gcc version :
Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-42)
Thanks in advance