[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    Re: HPUX-DEVTOOLS: changing the shared library lookup.
From:       Mike Stroyan <stroyan () hpstryn ! fc ! hp ! com>
Date:       2001-05-21 20:13:25
[Download RAW message or body]


| > If you want to remap the names at link time, you can use:
| >    +cdp oldpath:newpath
| 
| Well this isn't feasible because of the number of files it needs to be
| done for, and oldpath varies for every file.
| 
| What I'm looking for is something that will let me change the
| hardcoded path in the binary file itself.  I'm was thinking of
| creating a script that will let med do the change I've described
| above, but the implications of the fixed pathlength is horrendous.  So
| for now I just have to avoid the make clean, which results in the kde2
| basic installation to consume about 1GB of diskspace, not very
| suitable for redistribution...

  There is another approach that involves rebuilding the libraries and
executables, but it would require fewer makefile changes than the +cdp
approach.  If you set the internal name of a shared library to an absolute
path from "/" then the linker will record that internal name when linking
against the library.  So, add a +h option to the link of each shared
library.

 ld -b -o libsum1.sl.1 +h /store/opt/kde2/lib/libsum1.sl.1 sum1.o

Then when executables and other shared libraries link with libsum1.sl.1
the linker will always tell dld.sl to look for it at
/store/opt/kde2/lib/libsum1.sl.1 even though it was linked from a build tree.

Mike Stroyan, mike_stroyan@fc.hp.com
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic