This is the mail archive of the binutils@sourceware.cygnus.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: ELF_DYNAMIC_INTERPRETER changes for FreeBSD


On Tue, Apr 11, 2000 at 11:54:45PM -0700, David O'Brien wrote:
> On Tue, Apr 11, 2000 at 11:31:08PM -0700, Ian Lance Taylor wrote:
> > BFD uses the dynamic interpreters specified in the ELF ABI.  I don't
> > see any reason for it to do anything else by default.
> 
> Does the ELF ABI really specify different names and places for different
> architctures?

Yes, at least for most of them (e.g. SPARC psABI specifies exactly the two
values you see here).
If you wanted to change the default, you'd either have to come up with a new target
(elf32freebsd_i386 or whatever) or identify FreeBSD ABI binaries (e.g. with
.note.ABI-tag), read that and do something what elf32-mips already does in
ELF_DYNAMIC_INTERPRETER for different ABI binaries.
But IMHO you really should teach all your compilers to invoke ld properly
and if somebody is doing final link of dynamically linked executables with
ld by hand, he should roll his own.

> 
> $ egrep 'define.*ELF_DYNAMIC_INTERPRETER' *
> 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-sparc.c:#define ELF_DYNAMIC_INTERPRETER "/usr/lib/sparcv9/ld.so.1"
> 
> -- 
> -- David    (obrien@NUXI.com)

	Jakub

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