public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB shared library tests with remote target
@ 2012-04-22 17:57 Michael Eager
  2012-04-22 19:30 ` Andreas Schwab
  2012-04-23 17:40 ` Daniel Jacobowitz
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Eager @ 2012-04-22 17:57 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-23 17:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-22 17:57 GDB shared library tests with remote target Michael Eager
2012-04-22 19:30 ` Andreas Schwab
2012-04-22 19:40   ` Michael Eager
2012-04-22 21:07     ` Andreas Schwab
2012-04-23 17:40 ` Daniel Jacobowitz
2012-04-23 17:58   ` Michael Eager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).