This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [PATCH] Open shared libraries from the current directory


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


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