1

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.

4
  • 1
    What version of AIX is this? From 6.1 onwards LDR_PRELOAD won't work unless you disable RBAC first.. Oct 8, 2018 at 18:48
  • It is exactly 6.1 thanks for the pointer to RBAC. Not sure if would help, but i'll try reading on it. Oct 9, 2018 at 14:18
  • It won't work, unless you relink 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 Oct 12, 2018 at 9:21
  • 1
    Wow, thats nice! Consider making an answer with excerpt and link to your FAQ, it actually solves my problem, would be nice if i could accept it in your favor. One addition though: at least on 64bit aix, you have to pass -d64 for ld 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 from dump format to ld one, just in case link will perish sooner than serverfault will, and script is really short. Oct 13, 2018 at 16:40

0

You must log in to answer this question.

Browse other questions tagged .