ld.so's LD_LIBRARY_PATH/LD_PRELOAD in mixed 32bit and 64bit environment
Jakub Jelinek
jakub@redhat.com
Mon Aug 22 19:10:00 GMT 2011
On Mon, Aug 22, 2011 at 12:03:31PM -0500, Peter Bergner wrote:
> On Mon, 2011-08-22 at 11:54 -0400, Mike Frysinger 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 ","
>
> There also seems to be a double space between "and" and "$PLATFORM" too.
>
>
>
> > > + ORIGIN is expanded to the location of the binary which is
>
> Ditto here between "ORIGIN" and "is" and "is" and "expanded".
Note that glibc doesn't include man pages, those are in the man-pages
package, so talking here about the man page wording isn't interesting.
And $LIB is certainly expanded even in LD_PRELOAD, just try
strace -E LD_PRELOAD='/$LIB/libfoo.so' /bin/echo
and you'll see it attempts to open /lib64/libfoo.so (or /lib/libfoo.so).
Also note that $LIB doesn't expand only to lib or lib64, but to whatever
multilib lib directory the current architecture uses (e.g. mips uses more
than two, H.J.'s -mx32 uses libx32 I think, etc.).
Jakub
More information about the Libc-alpha
mailing list