This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld.so's LD_LIBRARY_PATH/LD_PRELOAD in mixed 32bit and 64bitenvironment


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]