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]

Re: default ELF dynamic linker can be wrong.


matthew green <mrg@cygnus.com> wrote:

> i've noticed that the default dynamic on many architectures
> is hard coded to a particular platform.  eg, i see:
>
> elf32-arm.h:#define ELF_DYNAMIC_INTERPRETER     "/usr/lib/ld.so.1"
> elf32-i370.c:#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so"
> elf32-i386.c:#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
> elf32-m68k.c:#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
> elf32-mips.c:#define ELF_DYNAMIC_INTERPRETER(abfd)              \
> elf32-ppc.c:#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
> elf32-sparc.c:#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
> elf64-alpha.c:#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
> elf64-hppa.c:#define ELF_DYNAMIC_INTERPRETER "/usr/lib/pa20_64/dld.sl"
> elf64-ia64.c:#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
> elf64-sparc.c:#define ELF_DYNAMIC_INTERPRETER "/usr/lib/sparcv9/ld.so.1"
>
> [...]
>
> what is the best way to fix this?

Something can be fixed only when it is a bug. This isn't. Ian Lance Taylor
already answered this one a few months ago on this list, you may want to search
the archives. ELF is a rigorous standard and has a formal ABI spec that GNU
Binutils are supposed to fully comply with. This spec has a processor-
independent part and many processor supplements. The standard dynamic
interpreter is specified in the processor supplement. Different processor
supplements have been written by different folks who had their ld.so's in
different locations.

The standard way for different OSes and environments to deal with this is to
set the needed dynamic linker in the gcc specs.

--
Michael Sokolov		Harhan Engineering Laboratory
Public Service Agent	International Free Computing Task Force
			International Engineering and Science Task Force
			615 N GOOD LATIMER EXPY STE #4
			DALLAS TX 75204-5852 USA

Phone: +1-214-824-7693 (Harhan Eng Lab office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)

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