runtime linker path
Ivan Popov
pin@math.chalmers.se
Sat Apr 26 09:21:00 GMT 2003
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
More information about the Binutils
mailing list