Operating System - HP-UX
1846323 Members
3795 Online
110256 Solutions
New Discussion

Re: Changing shared libs at runtime

 
Tovo  RAMARO
Occasional Contributor

Changing shared libs at runtime

Hi people,
From the output of ldd: ldd a_binary
libc.2 => /usr/lib/pa20_64/libc.2
libdl.1 => /usr/lib/pa20_64/libdl.1
We would like to change the path of libdl.1 to point to a newer shared lib at say /tmp/lib/newlibdl.1

Is that possible, how do we go about that?
Thank You.
1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: Changing shared libs at runtime

Why not install the dld patch in the official location?

If your executable was linked with +s (the default for PA64), you can simply do:
$ export LD_LIBRARY_PATH=/tmp/lib

If not, you must do:
$ chatr +s enable a_binary