This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: runtime linker path
- From: Ivan Popov <pin at math dot chalmers dot se>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Sat, 26 Apr 2003 11:21:41 +0200 (MET DST)
- Subject: Re: runtime linker path
Thanks Ian,
> You can replace the interpreter section in a linked executable with a
> name of the same length of shorter, but not a longer one.
it is exactly my problem, as the default name say "/lib/ld-linux.so.2"
is too short to substitute with the actual path, usually a long one...
> Use objdump -p to find the file offset (labelled ``off'') of the
> PT_INTERP segment. Use an editor capable of handling binary files
Well, done it for some very troublesome programs (binary only, linked to a
different glibc version, re-exec-ing themselves directly via full paths,
reading their /proc/<pid>/cmdline)
but it needs manual intervention on each host they are going to run on,
to provide links like /lib/ld-OTHER.so.2 -> /somewhere....
Explicit runtime linker run is a great glibc feature and it helps a lot
otherwise but not with programs like above, neither on *BSD Linux
emulation that does not support explicit loader run.
I hoped it is possible to recreate just one section of the executable
without destroying the rest... Doesn't look like that?..
Thanks again!
--
Ivan