1、soname,可以使不同版本号的共享库共存,保证升级时不需要升级程 序文件。
2、realname, 共享库文件名字,文件控制信息中保存有soname。readelf -d 可查看soname
3、ld -llibfile, 程序加载时会根据libfile的soname查找依赖库。
如: soname : libtest-1.so
realname : libtest-1-2.so, libtest-1-3.so
gcc -fPIC -shared -Wl,soname,libhello.so.1 -o libhello.so.1.2 hello.c