This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Changing SONAME of existing binary .so library
- From: "Filipe Brandenburger" <filbranden at gmail dot com>
- To: binutils at sourceware dot org
- Date: Sun, 14 Dec 2008 20:35:59 -0500
- Subject: Changing SONAME of existing binary .so library
Hello,
There is a library of which I would like to keep multiple versions in
my system, however I can only download it in binary format, and the
package only includes a lib*.so file (and not a lib*.so.x.y.z with the
version) which does not allow me to easily keep different versions the
same way I do with other libraries.
I tried just renaming it but it didn't work. I googled for it and I
found out that I can use "objdump -p" and I will find a field "SONAME"
with the name used when that library is linked to, and that is the
name that will be looked for.
I was wondering if there is any way to change the SONAME of a binary
library file without altering the other contents. I thought maybe
"objcopy" could do this trick (since I've seen similar tricks done
with it), but I read the documentation and didn't find anything...
Is there any way to change the library using "objcopy" or any other
tool to accomplish this task of changing the SONAME? What would be the
appropriate command syntax to do that?
By the way, I'm on Linux 2.6.18 on a CentOS 5, with binutils
2.17.50.0.6 and glibc 2.5.
TIA,
Filipe