readelf patchelf
#查看rpath:
readelf -d $bin
#设置rpath
patchelf --set-rpath 'path' $bin
patchelf --set-rpath '$ORIGIN/../lib' $bin
#设置 dynamic linker
patchelf --set-interpreter /opt/compiler/gcc-4.8.2/lib64/ld-linux-x86-64.so.2 $bin
#查看rpath:
readelf -d $bin
#设置rpath
patchelf --set-rpath 'path' $bin
patchelf --set-rpath '$ORIGIN/../lib' $bin
#设置 dynamic linker
patchelf --set-interpreter /opt/compiler/gcc-4.8.2/lib64/ld-linux-x86-64.so.2 $bin