This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Open shared libraries from the current directory
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Tue, 28 Nov 2006 12:44:51 -0500
- Subject: Re: [PATCH] Open shared libraries from the current directory
- References: <4548D140.7020202@st.com>
On Wed, Nov 01, 2006 at 04:54:24PM +0000, Andrew STUBBS wrote:
> The problem, as I see it, is that solib_open does not find shared
> libraries even though add-symbol-file with the same name would work
> correctly. To my mind a bare file name is the simplest relative path
> name, but apparently the code disagrees. The comment says it should do
> what I think it should do, however.
I would guess that the current behavior is somehow related to the
equivalent ELF behavior; DT_NEEDED foo.so means "search the library path
for foo.so", which does not try $PWD. DT_NEEDED ./foo.so means "try
./foo.so relative to $PWD" and IIRC does not ever search the library
path.
Fortunately, most svr4 loaders seem to fill in the absolute path, so
this won't make a difference. I think there's one that doesn't,
but I don't find the new behavior especially problematic.
> 2006-11-01 Andrew Stubbs <andrew.stubbs@st.com>
>
> * solib.c (solib_open): Treat bare file names as relative paths.
:REVIEWMAIL:
OK.
--
Daniel Jacobowitz
CodeSourcery