This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: ld.so's LD_LIBRARY_PATH/LD_PRELOAD in mixed 32bit and 64bit environment
On Mon, Aug 22, 2011 at 9:06 AM, Alon Bar-Lev <alon.barlev@gmail.com> wrote:
>
> On Mon, Aug 22, 2011 at 4:02 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Sunday, August 21, 2011 07:51:35 Alon Bar-Lev wrote:
> >> In an environment where 32bit application forks 64bit application,
> >> there can be no common LD_LIBRARY_PATH/LD_PRELOAD.
> >
> > try using $LIB. Âit should expand into "lib64" with 64bit libs for example.
> > -mike
> >
>
> Thank you so much!
> I missed this part in code.
>
> Variables: ORIGIN, PLATFORM, LIB.
>
> But there is no documentation for this, it should appear in ld.so(8).
> I will prepare a patch for documentation.
>
> Alon.
I can see that LD_LIBRARY_PATH is substituted, but LD_PRELOAD is not.
What do you think of adding call to expand_dynamic_string_token() in
./elf/rtld.c::do_preload() to add this behavior to LD_PRELOAD as well?
Thanks,
Alon.