...you can have as many versions of a given library. For 32-bit, they are all shared. For 64-bit, it can be privately loaded (and loader domain becomes irrelevant).
Whether you load mylib.so from /usr/local/lib or /usr/lib is NOT relevant. What is relevant is that the shared text for mylib.so has been loaded and will be accessed by any process that may require it in future. If you have 2 loader domains, you can have 2 versions of mylib.so (maybe from the same directory bgecause you rebuilt mylib.so) each in a different domain.
If you are running in 64-bit, it is pretty clean. The libraries of which you want a personal copy, can be loaded as private modules. The ones of which you want a systemwide copy can be loaded as shared text. 32-bit address space has its constraints because of which IBM resorted to all kinds of hacks like maxdata.
By default, libraries "stick" in memory -- once loaded, you must reboot the system or perform slibclean(1). This often causes problems in development -- you rebuild the library but the changes do not take effect. The "standard" workaround is to remove read and execute permission for 'other' from the library. Since it is now not world-readable, the library will be loaded into "private" memory segment, and will be unloaded as soon as the last process referencing it terminates.
What this does is that only when you require a function within a library, a lookup is done using the procedure link table (plt), and then the resolved function is called. this way, you can keep updating shared libraries which programs are running and still expect them to use the latest functionality.
If you require more than one library by the same name, then you'll probably either want to recompile the binaries that you require that need non-AIX libraries that also have AIX versions, specifying a different loader domain for these programs using -L. Or alternatively, if you have binary-only applications, or don't want to compile your own binaries, then you probably want to specify an alternative loader domain for these programs with the $LIBPATH environment variable.
You -might- end up with a loader domain for every application requiring a given set of conflicting libraries, rather than just one for non-AIX libraries, but the latter approach MIGHT be facilitated by writing a program that loads all of the shared objects for non-AIX libraries that conflict with AIX libraries, into a common loader domain - assuming you have sufficient VM available on your system(s) to stack the odds in this way.
Also, it appears that you can get a peek at a binary's compiled-in library path with "dump -n /usr/local/bin/ncview". Unfortunately, this appears to be a human-readable report, more than a machine-readable report.
You can e-mail the author with questions or comments: