Re: [patch] Fixed occasional failure to load a custom shared library

Jan Kratochvil
2006-10-09T22:51:01Z

Hi Daniel,

On Mon, 09 Oct 2006 22:17:47 +0200, Daniel Jacobowitz wrote:
> On Fri, Jul 21, 2006 at 08:38:29PM +0200, Jan Kratochvil wrote:
...
> > 2006-07-21 Jan Kratochvil <jan.kratochvil@redhat.com>
> >
> > * solib.c (solib_open): Fixed NULL vs. "" refusal to load inferior
> > shared libraries.
>
> I have committed this for you, after fixing separately the inferior
> segfault.
>
> I tried to reproduce the actual problem you were having, but I
> couldn't. No matter what I put in LD_LIBRARY_PATH or rpath, glibc
> filled in the full path to the shared library. Maybe I have a
> newer runtime loader than you do, or something similar. Anyway,
> that's unimportant.

If you would use `-Wl,-rpath,$ORIGIN' or relative pathname for $LD_LIBRARY_PATH.
The latter case was testcased in:
http://sourceware.org/ml/gdb-patches/2006-09/msg00009.html

Thanks,
Jan