ld.so's LD_LIBRARY_PATH/LD_PRELOAD in mixed 32bit and 64bit environment
Alon Bar-Lev
alon.barlev@gmail.com
Mon Aug 22 16:22:00 GMT 2011
On Mon, Aug 22, 2011 at 6:54 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Monday, August 22, 2011 05:46:30 Alon Bar-Lev wrote:
>> + ld.so understands the strings $ORIGIN , $LIB and $PLATFORM
>
> no space before the ","
Found the way to do it!
>> (or + equivalently ${var}) in a LD_LIBRARY_PATH string.
>> +
>> + LIB is expanded to lib or lib64 based on the architecture.
>> +
>> + ORIGIN is expanded to the location of the binary which is
>> cur‐ + rently loaded.
>> +
>> + PLATFORM is expanded to the running platform.
>
> i think you need to doubly-clarify that you want to use a literal '$LIB' in
> the settings ...
I tried.
New text, how is that?
If you have better text please feel free to suggest.
Alon
---
ld.so understands the strings $ORIGIN, $LIB and $PLATFORM (or
equivalently ${var}) in a LD_LIBRARY_PATH string.
LIB is expanded to lib or lib64 based on the architecture. Use
when mixed environment (32bit and 64bit) searches for same
libraries names.
ORIGIN is expanded to the location of the binary which is cur‐
rently loaded.
PLATFORM is expanded to the running platform.
The following example will allow single LD_LIBRARY_PATH to be
used by 32bit and 64bit applications that searching for
'liba.so', which resides at /opt/my/lib and /opt/my/lib64.
export LD_LIBRARY_PATH="/opt/my/\${LIB}:${LD_LIBRARY_PATH}"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: man-pages-master-ld.so.8-vars.diff
Type: plain/text
Size: 977 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20110822/fa865261/attachment.bin>
More information about the Libc-alpha
mailing list