public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Marty Leisner" <leisner@rochester.rr.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: <199906210453.AAA21334@rochester.rr.com> (raw)
In-Reply-To: <14189.24404.190234.153358@hopf.amtp.cam.ac.uk>

> 
> >    Is there a simple way to add an RPATH to an already existing
> >    executable using binutils?  (this is on i386 elf)
> > 
> > No.
> 
> Ok, let me ask this in a different way ;-)
> 
> Is there a _complicated_ way to add an RPATH to an already existing
> executable using binutils? 
> 
> I looked at libbfd for half an hour, and it seems like I could just
> read the executable file using bfd_openr and friends, add the rpath to
> the private data and write it back. But I find it hard to believe that
> nobody else has had a need for such a program before. 
> 
> Is libbfd capable of doing this or is more trickery involved that I am
> not aware of?
> 
> Kasper

I would find such a program to be very useful.  But I get around it
with aliases/shell scripts with play with LD_LIBRARY_PATH)

On another note, is there any documentation for how the dynamic linker for elf
works?

Reading rtld.c, there's:
Valid options for the LD_DEBUG environment variable are:\n\
\n\
  bindings  display information about symbol binding\n\
  files     display processing of files and libraries\n\
  help      display this help message and exit\n\
  libs      display library search paths\n\
  reloc     display relocation processing\n\
  symbols   display symbol table processing\n\
  versions  display version dependencies\n\
\n\

This seems very useful, it is documented anyplace?

Marty Leisner



-- 
marty
leisner@rochester.rr.com  
The Feynman problem solving Algorithm
        1) Write down the problem
        2) Think real hard
        3) Write down the answer
                Murray Gell-mann in the NY Times




  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     ` Richard Henderson
1999-07-01  0:00     ` Marty Leisner [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=199906210453.AAA21334@rochester.rr.com \
    --to=leisner@rochester.rr.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).