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


Ivan Popov <pin at math dot chalmers dot 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


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