adding rpath to existing executable

Kasper Peeters K.Peeters@damtp.cam.ac.uk
Thu Jul 1 00:00:00 GMT 1999


>    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


More information about the Binutils mailing list