This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
default ELF dynamic linker can be wrong.
- To: binutils at sources dot redhat dot com
- subject: default ELF dynamic linker can be wrong.
- From: matthew green <mrg at cygnus dot com>
- Date: Mon, 07 Aug 2000 01:08:47 +1000
- organisation: Red Hat, Inc.
hi folks.
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"
under NetBSD, which has ELF ports to 6 of those architectures, and
at least 3 more coming, all of those defaults are wrong. the ELF
dynamic linker is located in /usr/libexec/ld.elf_so under NetBSD.
(i386, mips, ppc, elf{32,64}sparc, alpha are the current ports, with
ELF arm, m68k & hppa coming shortly far away, either).
the GCC configurations does, of course, pass the correct
-dynamic-linker option which is why this isn't a major issue for
NetBSD. however, it does mean that users calling ld(1) by hand
maybe (will be) in for a surprise.
what is the best way to fix this? i don't see any easy way to
fit this information into the existing structure.
thanks,
.mrg.