Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Eager <eager@eagerm.com>
To: gdb@sourceware.org
Subject: GDB shared library tests with remote target
Date: Sun, 22 Apr 2012 17:57:00 -0000	[thread overview]
Message-ID: <4F944677.2030504@eagerm.com> (raw)

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


             reply	other threads:[~2012-04-22 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-22 17:57 Michael Eager [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F944677.2030504@eagerm.com \
    --to=eager@eagerm.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox