This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: changing embedded RPATH in existing executables.


The easiest way to do this is to make a new copy of the
executable/library, and change what you want changed while you are about
it.  Bear in mind, though, that RedHat might have had a _reason_ for
changing the soname - possibly their libstdc++.so.2.9.0 is incompatible
in some way?  I'd look in the patchfiles (They're included in the SRPM)
and see if they give or imply any reason any reason they changed it - at
least before distributing libraries with modified sonames. :-)

Lawson
	  >< Microsoft free environment

This mail client runs on Wine.  Your mileage may vary.


On Wed, 28 Apr 1999 peeterj@ca.ibm.com wrote:

> 
> 
> Hello,
> 
> I would like to be able to change the embedded rpath in executable and
> shared libraries using libbfd.  The development platform in question
here
> is linux/i386.
> 
> [ I was also thinking of using something similar (presuming it's
possible)
> to change the NEEDED tags for redhat glibc-2.1 built executables so
that
> they can be run on non-redhat glibc-2.1 distributions.   Redhat 6.0 has
> used a different SONAME for it's glibc-2.1 built libstdc++.so.2.9.0
then
> any of the other glibc-2.1distributions, so ISVs and other external
package
> creators will have to build separate executables/packages for redhat
> glibc-2.1 and for any other glibc-2.1 based distributions if they use
C++.
> The other possibilty would be for everybody to ship their own libstdc++
> (and use -Wl,-rpath to force it to be used instead of the system one)
so
> that their binaries will work on different distributions.  However, I
am
> not sure this is feasable because of the GPL. ]
> 
> Based on objdump, and some of the libbfd elf code I wrote the program
below
> that can be used to find the RPATH start in the ELF .dynamic section,
but
> now that I have found it I don't know how to write modifications back
into
> the section.  I tried bfd_openw instead of bfd_openr, but the code to
find
> the RPATH doesn't work after doing that (the bfd_check_format_matches
call
> fails).
> 
> Can anybody provide me with some hints for the next step.
> 
> Peeter




___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]