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: Understanding the default dynamic interpreter used by binutils/gcc....


"Steven J. Hill" <sjhill@realitydiluted.com> writes:

> Would someone please just give me a quick explanation of the mechanism
> that places the final interpreter path/pathname into the output binary's
> '.interp' section. Thanks so much.

The -dynamic-linker option passed to ld overrides ld's default value
for the dynamic linker.

If gcc does not pass a -dynamic-linker option, the default will come
from ELF_INTERPRETER_NAME in the linker emulation, if it is defined.
In the sources this will be seen in the ld/emulparams file.  Only a
couple of emulations define this.

Otherwise, the default will come from ELF_DYNAMIC_INTERPRETER defined
in bfd.  This value is normally specified in the ELF processor
supplement, when there is one.  Most free operating systems use
different values, and typically arrange for gcc to pass the right
value using the -dynamic-linker option.

Ian


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