develooper Front page | perl.perl5.porters | Postings from May 2001

Re: Relocatable perl

Thread Previous | Thread Next
From:
sfink
Date:
May 1, 2001 10:37
Subject:
Re: Relocatable perl
Message ID:
3AEEF467.6E987713@digital-integrity.com
Alan Burlison wrote:
> 
> Andy Dougherty wrote:
> 
> > > Is this really worth the effort?
> >
> > It's certainly often requested. :-).
> 
> It would however only work on Solaris, unless other platforms have a way of
> reliably finding the path to the executable.

Unless I'm missing some nuance, Linux does as long as the proc
filesystem is mounted at /proc (it is in every distribution I've seen):
readlink("/proc/self/exe",...). And relative shared libs appear to work
fine:

% ldd main
        ./gork/liblib.so => ./gork/liblib.so (0x40015000)
        libc.so.6 => /lib/libc.so.6 (0x4001d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About