[PATCH] allow easier overriding of ELF_DYNAMIC_INTERPRETER

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Sat Jan 26 02:27:00 GMT 2002


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



More information about the Binutils mailing list