public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@cygnus.com>
To: Kasper Peeters <K.Peeters@damtp.cam.ac.uk>
Cc: binutils@sourceware.cygnus.com, Ian Lance Taylor <ian@zembu.com>
Subject: Re: adding rpath to existing executable
Date: Thu, 01 Jul 1999 00:00:00 -0000	[thread overview]
Message-ID: <19990620165749.C4699@cygnus.com> (raw)
In-Reply-To: <14189.24404.190234.153358@hopf.amtp.cam.ac.uk>

On Sun, Jun 20, 1999 at 10:38:28PM +0100, Kasper Peeters wrote:
> Is there a _complicated_ way to add an RPATH to an already existing
> executable using binutils? 

I don't think so.

> But I find it hard to believe that
> nobody else has had a need for such a program before. 

I've seen such a program before, but it was written to directly
manipulate the ELF file structures.

> Is libbfd capable of doing this or is more trickery involved that I am
> not aware of?

There has to be room in one of the existing loadable segments
(usually at the end of the readonly segment containing .text),
and if there isn't, you have to add a new loadable segment
somewhere in the address space.  This can also mean shifting the
loadable segments around in the executable image to make room.

The general case is exceedingly ugly.


r~

  parent reply	other threads:[~1999-07-01  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-01  0:00 Kasper Peeters
1999-07-01  0:00 ` Ian Lance Taylor
1999-07-01  0:00   ` Kasper Peeters
1999-07-01  0:00     ` Marty Leisner
1999-07-01  0:00     ` Richard Henderson [this message]
1999-07-01  0:00     ` Ian Lance Taylor
1999-07-01  0:00       ` Kasper Peeters

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=19990620165749.C4699@cygnus.com \
    --to=rth@cygnus.com \
    --cc=K.Peeters@damtp.cam.ac.uk \
    --cc=binutils@sourceware.cygnus.com \
    --cc=ian@zembu.com \
    /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).