I have a legacy AIX ppc64 library mylib.so
.
Inspecting dump -Tv
output, I noticed it expects that Foo
symbol would be present in even older library oldfoo.so
. However, it seems after new foo release, they moved Foo
symbol to other soname: foocommon.so
and oldfoo.so
is no longer exports it, but rather just imports from foocommon.so
.
And mylib.so
is thus broken, dynamic linker refuses to work with binary linked with mylib.so
, saying that Foo
is not exported from oldfoo.so
.
It isn't indeed, it is now resides in foocommon.so
. Can I somehow edit binary mylib.so
, changing name of actual location of Foo
symbol or otherwise tell dynamic linker where to look?
I have tried setting environment variables:
export LDR_PRELOAD=foocommon.so
export LDR_PRELOAD64=foocommon.so
hoping that regular Linux approach would work, but that didn't changed the error produced by linker, still refusing to run my executable, as Foo
symbols is not exported by oldfoo.so
.
This is especialy obscure, since it is not clear of anyone still has mylib.so
sources to re-comple and re-link it properly.
mylib.so
. Hope you don't mind, I used your question as an example in a FAQ-entry: web.axelero.hu/lzsiga/aix-linking.html#Q0038-d64
forld
as well, otherwise it'll refuse to extract object file and link it back in, complaining about function unavailability in 32-bit mode. Also don't forget to post full copy of awk script converting symbols description fromdump
format told
one, just in case link will perish sooner than serverfault will, and script is really short.