public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Michael Eager <eager@eagerm.com>
Cc: gdb@sourceware.org
Subject: Re: GDB shared library tests with remote target
Date: Sun, 22 Apr 2012 19:30:00 -0000	[thread overview]
Message-ID: <m2k417y36v.fsf@igel.home> (raw)
In-Reply-To: <4F944677.2030504@eagerm.com> (Michael Eager's message of "Sun,	22 Apr 2012 10:57:11 -0700")

Michael Eager <eager@eagerm.com> writes:

> When gdb compiles the executable, it uses absolute paths to the
> shared libraries.  The linker is passed "-rpath $ORIGIN" which

It is passed "-rpath \$ORIGIN" which puts $ORIGIN verbatim in the RPATH.

> effectively adds the directory containing the executable to the
> library search path at run time.

$ORIGIN is expanded *at run time*, pointing to the directory the
executable is located when executed.

> 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.

If the shared library is located in the same directory as the executable
then it will be found due to $ORIGIN.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2012-04-22 19:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-22 17:57 Michael Eager
2012-04-22 19:30 ` Andreas Schwab [this message]
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=m2k417y36v.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).