Overriding a DT_SONAME

Mike Hearn mike@navi.cx
Wed Apr 13 23:35:00 GMT 2005


Hi,

I would like to link against a library, say libfoo with soname
libfoo.so.0, but in my executable I'd like the DT_NEEDED entry to be
recorded as some other name, eg libfoo.myapp.so.0 so at install time I can
use a symlink to point the executable somewhere else.

Is there a way to make ld link against a given library, but break the
DT_NEEDED == DT_SONAME relationship without actually recompiling the
target library with a custom soname? Or does it involve binary edits?

thanks -mike



More information about the Binutils mailing list