This is the mail archive of the gdb@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]

GDB shared library tests with remote target


The gdb test suite contains a claim in gdb.exp:skip_shlib_tests
that the shared library tests should work for a variety of remote
targets, including Linux.

When gdb compiles the executable, it uses absolute paths to the
shared libraries.  The linker is passed "-rpath $ORIGIN" which
effectively adds the directory containing the executable to the
library search path at run time.

When run on a remote system, the test fails to load the shared
library because the loader has an absolute path to the shared
library and does not search for it.

It doesn't look to me like this could ever work.  The only way
(AFAIK) to have the linker put in a relative path to the shared
library is to run the link step in the build directory and use
a relative path, not an absolute path.

Q.  Is there any option to tell the linker not to put a full
    path in DT_NEEDED?

Q. Did this ever work? If yes, how and how do I make it work now?

--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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