This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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