On Sun, Jun 10, 2001 at 05:40:38PM +0100, Matthew Robinson wrote:
> Apologies in advance if I have missed something blindingly obvious :)
>
> I need to change the default library paths in a compiled copy of perl.
> Basically, I want to move /usr/lib/perl5 into /usr/local/lib/perl5. I am
> unable to recompile perl as it is compiled for arm-linux and I don't have
> either the cross-compiler or the correct configuration to get perl to build
> for this architecture.
>
> Currently, I am using a soft link from my /usr/lib to /usr/local/lib.
> However, I would prefer to keep the whole installation on /usr/local as this
> is mounted from a removable disk and I would prefer not to have dangling
> links when the device is removed.
>
> Any suggestions, or am I stuck with the link in /usr/lib.
You're very probably stuck. Whilst you can use a hex editor to change
strings in the binary, you can't expand the length of those strings,
only contract them or retain the same length.
However, a solution would be to change the perl binary to use /opt/lib
instead of /usr/lib and make /opt a symlink to /usr/local.
There's a couple of reasonable hex editors out there, but I usually just
tend to use M-x hexl-find-file in emacs. If you're a vim user, see
xxd(1).
-Dom
--
| Semantico: creators of major online resources |
| URL: http://www.semantico.com/ |
| Tel: +44 (1273) 722222 |
| Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |