首页 > 技术文章 > readelf patchelf

stdpain 2020-11-13 11:15 原文

#查看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

推荐阅读