gcc --shared -fpic -o mod_heartmonitor.so mod_heartmonitor.o
之后提示錯(cuò)誤:
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: mod_heartmonitor.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
mod_heartmonitor.o: could not read symbols: Bad value
collect2: ld returned 1 exit status