This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: adding rpath to existing executable
> I've never known anybody to want to change the RPATH of a linked
> executable. Mostly, people just run a shell script which sets
> LD_LIBRARY_PATH.
I am on a system which has glibc-2.0, but I _need_ glibc-2.1 for my
own programs (because glibc-2.0 contains a fatal bug that my program
is triggering). If I set LD_LIBRARY_PATH to point to my glibc-2.1
directory, the glibc-2.0 dynamic linker prefers the glibc-2.1
libraries over the glibc-2.0 ones and (of course) fails.
I don't want to wrap all of my stuff in scripts, and I can't really
either, since some of them are dynamically loaded modules themselves
while others call old glibc-2.0 ones. It's going to be a mess that
way.
> Otherwise, they rebuild the program, or in extreme
> cases they hack the dynamic linker.
I could modify the dynamic linker for glibc-2.1 to look at
LD_LIBRARY_PAT2 instead of LD_LIBRARY_PATH. Guess that's the easiest
way out.
Kasper