SO_NAME

I own a shared library built with unix makefiles and for which there is
no SO_NAME declared in the .so file.
I cannot rebuild the library but as I want to make a package with it, I
need the SO_NAME for that packager operates correctly.
Is there any possibility to add this information in the .so file now?

Thanks,
Alain.

To insert the SO_NAME into a shared object, would require you to edit the
elf file either using a hex editor or write a quick app to do the
modification for you (the second is probably easiest, as editing by hand is
error prone).

Your shared object should contain a segment with a .dynamic section. This
section should have an array of Elf32_Dyn types (which you can look in the
elf.h file). You need to add an element with the tag of DT_SONAME, and set
the d_val to be the string table offset of the null-terminated string (which
you’ll also need to add) name of the shared object.


Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>
“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message
news:3C3EAE4D.1663E539@icbt.com

I own a shared library built with unix makefiles and for which there is
no SO_NAME declared in the .so file.
I cannot rebuild the library but as I want to make a package with it, I
need the SO_NAME for that packager operates correctly.
Is there any possibility to add this information in the .so file now?

Thanks,
Alain.