runtime linker path

Ian Lance Taylor ian@airs.com
Sat Apr 26 00:23:00 GMT 2003


Ivan Popov <pin@math.chalmers.se> writes:

> sorry if it is a wrong question or a wrong place to ask:
> 
>  - is it possible to replace the interpreter section of an existing
> stripped elf executable - to let it use a different dynamic linker,
> without relinking from the original object files ?
> 
>  - if yes, then how ?

You can replace the interpreter section in a linked executable with a
name of the same length of shorter, but not a longer one.

Use objdump -p to find the file offset (labelled ``off'') of the
PT_INTERP segment.  Use an editor capable of handling binary files
(e.g., emacs) and replace the string with whatever you like.  End with
a null byte.  Don't change any bytes past the null byte of the
original string.

Ian



More information about the Binutils mailing list