My program depends on libcurl.so.3
, but in RHEL6 there is no symbolic link libcurl.so.3 ⇾ libcurl.so.4
(my program can run smoothly when I create this link). However, there is symbolic link libcurl.so ⇾ libcurl.so.4
.
I would like to modify the SONAME
embedded in libcurl.so.3.0.0.0
file from libcurl.so.3
to libcurl.so
so that I could run my program on RHEL 6 without creating a symbolic link.
My solution could not be optimal but I think learning how to modify the binary directly is valuable.
$readelf -d libcurl.so.3.0.0
Dynamic segment at offset 0x303cc contains 25 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libssl.so.2]
0x0000000e (SONAME) Library soname: [libcurl.so.3]
I would like to change libcurl.so.3
above to libcurl.so
.