This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] allow easier overriding of ELF_DYNAMIC_INTERPRETER
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- To: GNU Binutils mailing list <binutils at sources dot redhat dot com>
- Date: Sat, 26 Jan 2002 11:13:45 +0100
- Subject: Re: [PATCH] allow easier overriding of ELF_DYNAMIC_INTERPRETER
- References: <20020125234343.A66746@dragon.nuxi.com>
David O'Brien wrote:
> This patch would help out the OS porters who do not follow the psABI's to
> the letter -- say to be consistent across the OS. I know this can be
> tricked thru complicated linker scripts, but why not allow it in an
> easier fashion and what does this patch really hurt? It would certainly
> reduce maintenance costs for the BSD's.
AFAICS the ELF_DYNAMIC_INTERPRETER strings are different, so
it's more stable code to generally #undef any preceeding one.
[snip]
> diff -u -r1.139 elf32-mips.c
> --- elf32-mips.c 2002/01/21 10:29:09 1.139
> +++ elf32-mips.c 2002/01/26 07:33:13
> @@ -7681,10 +7681,12 @@
> /* The name of the dynamic interpreter. This is put in the .interp
> section. */
>
> +#ifndef ELF_DYNAMIC_INTERPRETER
> #define ELF_DYNAMIC_INTERPRETER(abfd) \
> (ABI_N32_P (abfd) ? "/usr/lib32/libc.so.1" \
> : ABI_64_P (abfd) ? "/usr/lib64/libc.so.1" \
> : "/usr/lib/libc.so.1")
> +#endif
Especially in this case I doubt it is correct if
ELF_DYNAMIC_INTERPRETER was already defined.
Thiemo