cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
UmarIqbal-RS
Level 3

relocation R_X86_64_32 against

Hi  I am still facing issue of 
relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status.
Let me tell you what I did.
step1:
I have created two classes where i have called Flexible APIs.
step2:
Then I have created a top main function where I have called that class.
step 3:
I run 
make lm_new.o
step 4: 
./lmnewgen demo -o lm_new.c
cc -c lm_new.c -o lm_new.o
step 5:
g++ ../machind/lmflex.cpp ../machind/License_manager.cpp -o lmflexx.o -L /home/users/umar.iqbal/install_DIr/x64_lsb-11.19.1.0_v6/x64_lsb liblmgr_trl.a libcrvs.a libsb.a activation/lib/libnoact.a  liblmgr_dongle.a  -Wl,--dynamic-linker=/lib64/ld-lsb-x86-64.so.3 -fPIC

Can you have look and tell me how can i come out from this issue.
0 Kudos
(2) Replies
abhayparashar
Level 5

I believe the default FNP toolkit comes with compiler options for "-fpic" defined as "CFLAGS". You can use the CFLAGS during compiler time (through makefile) and get the pic version for object files.

0 Kudos
UmarIqbal-RS
Level 3

when we are going to build new application we should use -fpic flag ?

0 Kudos