FYI, link/bind change 3.2x ->4.1
Posted in 1996
Topics: Platform-Specific Issues
Hi, FYI, Earlier I had posted a question about dealing with third party supplied shared libraries, on AIX 4.1. These libs were not built in the traditional AIX style, that is shared objects archived into lib??.a. Rather they are just shared objects that were named ".so". The problem was there was no way to link with these libs without passing the full pathname to the linker. This in turn caused the pathname to the lib to be put into the dynamic header of the executable, which means LIBPATH was not used to locate this shared lib. It turns out the bind command has been changed for 4.1. On 3.2.x if I pass in the path to the libs, the bind command would strip off the pathname such that LIBPATH would be used. For 4.1 this appears to only be done for those libs that end in ".a". There are a few work-arounds that can be used if you are faced with this situation. ( these "should" work ) 1. remake the shared lib so it is not AIX traditional 2. copy/link the libs to the current directory when binding the executable. thus there is no pathname component to be put in the header. 3. link with export files created from the shared libs. 4. provide a custom bind command file that uses the "lib" subcommand to read the shared lib rather than "insert". see ld man page for user exits -b:ex1-2 5. there are probably more. Hope this helps. Bye, Leroy -- Leroy Levin Texas Instruments: email levin@ief.itg.ti.com