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]
Other format: [Raw text]

[PATCH] allow easier overriding of ELF_DYNAMIC_INTERPRETER


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.


2002-01-25  David O'Brien  <obrien@FreeBSD.org>

	* elf32-arm.h (ELF_DYNAMIC_INTERPRETER): Only define if not already
	defined.
	* elf32-cris.c: Likewise.
	* elf32-hppa.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf32-i386.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mips.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-s390.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-sparc.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-hppa.c: Likewise.
	* elf64-s390.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* elfxx-ia64.c: Likewise.


Index: elf32-arm.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.h,v
retrieving revision 1.71
diff -u -r1.71 elf32-arm.h
--- elf32-arm.h	2002/01/16 13:01:54	1.71
+++ elf32-arm.h	2002/01/26 07:33:08
@@ -108,7 +108,9 @@
 
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER     "/usr/lib/ld.so.1"
+#endif
 
 /* The size in bytes of an entry in the procedure linkage table.  */
 #define PLT_ENTRY_SIZE 16
Index: elf32-cris.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-cris.c,v
retrieving revision 1.24
diff -u -r1.24 elf32-cris.c
--- elf32-cris.c	2002/01/21 21:57:48	1.24
+++ elf32-cris.c	2002/01/26 07:33:09
@@ -536,7 +536,9 @@
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#endif
 
 /* The size in bytes of an entry in the procedure linkage table.  */
 
Index: elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.69
diff -u -r1.69 elf32-hppa.c
--- elf32-hppa.c	2002/01/21 10:29:08	1.69
+++ elf32-hppa.c	2002/01/26 07:33:10
@@ -115,7 +115,9 @@
 
 #define PLT_ENTRY_SIZE 8
 #define GOT_ENTRY_SIZE 4
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#endif
 
 static const bfd_byte plt_stub[] =
 {
Index: elf32-i370.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i370.c,v
retrieving revision 1.18
diff -u -r1.18 elf32-i370.c
--- elf32-i370.c	2002/01/16 05:37:10	1.18
+++ elf32-i370.c	2002/01/26 07:33:10
@@ -346,7 +346,9 @@
 /* The name of the dynamic interpreter.  This is put in the .interp
     section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/lib/ld.so"
+#endif
 
 /* Set the howto pointer for an i370 ELF reloc.  */
 
Index: elf32-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.62
diff -u -r1.62 elf32-i386.c
--- elf32-i386.c	2001/12/20 20:22:17	1.62
+++ elf32-i386.c	2002/01/26 07:33:11
@@ -401,7 +401,9 @@
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
+#endif
 
 /* The size in bytes of an entry in the procedure linkage table.  */
 
Index: elf32-m68k.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68k.c,v
retrieving revision 1.34
diff -u -r1.34 elf32-m68k.c
--- elf32-m68k.c	2001/12/18 17:59:58	1.34
+++ elf32-m68k.c	2002/01/26 07:33:11
@@ -188,7 +188,9 @@
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
+#endif
 
 /* The size in bytes of an entry in the procedure linkage table.  */
 
Index: elf32-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-mips.c,v
retrieving revision 1.139
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
 
 /* Create dynamic sections when linking against a dynamic object.  */
 
Index: elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.39
diff -u -r1.39 elf32-ppc.c
--- elf32-ppc.c	2001/12/18 17:59:59	1.39
+++ elf32-ppc.c	2002/01/26 07:33:14
@@ -121,7 +121,9 @@
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#endif
 
 /* The size in bytes of an entry in the procedure linkage table.  */
 #define PLT_ENTRY_SIZE 12
Index: elf32-s390.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-s390.c,v
retrieving revision 1.18
diff -u -r1.18 elf32-s390.c
--- elf32-s390.c	2001/12/18 16:21:38	1.18
+++ elf32-s390.c	2002/01/26 07:33:14
@@ -216,7 +216,9 @@
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#endif
 
 /* The size in bytes of the first entry in the procedure linkage table.  */
 #define PLT_FIRST_ENTRY_SIZE 32
Index: elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.41
diff -u -r1.41 elf32-sh.c
--- elf32-sh.c	2001/12/17 00:52:35	1.41
+++ elf32-sh.c	2002/01/26 07:33:15
@@ -89,7 +89,9 @@
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
+#endif
 
 static reloc_howto_type sh_elf_howto_table[] =
 {
Index: elf32-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sparc.c,v
retrieving revision 1.35
diff -u -r1.35 elf32-sparc.c
--- elf32-sparc.c	2001/12/21 22:35:23	1.35
+++ elf32-sparc.c	2002/01/26 07:33:16
@@ -325,7 +325,9 @@
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#endif
 
 /* The nop opcode we use.  */
 
Index: elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.54
diff -u -r1.54 elf64-alpha.c
--- elf64-alpha.c	2002/01/23 21:51:53	1.54
+++ elf64-alpha.c	2002/01/26 07:33:16
@@ -1629,7 +1629,9 @@
 
 #define MAX_GOT_ENTRIES		(64*1024 / 8)
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
+#endif
 
 /* Handle an Alpha specific section when reading an object file.  This
    is called when elfcode.h finds a section with an unknown type.
Index: elf64-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-hppa.c,v
retrieving revision 1.17
diff -u -r1.17 elf64-hppa.c
--- elf64-hppa.c	2001/12/17 00:52:35	1.17
+++ elf64-hppa.c	2002/01/26 07:33:17
@@ -31,7 +31,9 @@
 #define DLT_ENTRY_SIZE 0x8
 #define OPD_ENTRY_SIZE 0x20
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/pa20_64/dld.sl"
+#endif
 
 /* The stub is supposed to load the target address and target's DP
    value out of the PLT, then do an external branch to the target
Index: elf64-s390.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-s390.c,v
retrieving revision 1.17
diff -u -r1.17 elf64-s390.c
--- elf64-s390.c	2001/12/18 16:21:38	1.17
+++ elf64-s390.c	2002/01/26 07:33:18
@@ -243,7 +243,9 @@
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#endif
 
 /* The size in bytes of the first entry in the procedure linkage table.  */
 #define PLT_FIRST_ENTRY_SIZE 32
Index: elf64-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sparc.c,v
retrieving revision 1.47
diff -u -r1.47 elf64-sparc.c
--- elf64-sparc.c	2001/12/21 22:35:23	1.47
+++ elf64-sparc.c	2002/01/26 07:33:18
@@ -866,7 +866,10 @@
 #define LARGE_PLT_THRESHOLD	32768
 #define GOT_RESERVED_ENTRIES	1
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/sparcv9/ld.so.1"
+#endif
+
 
 /* Fill in the .plt section.  */
 
Index: elf64-x86-64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-x86-64.c,v
retrieving revision 1.34
diff -u -r1.34 elf64-x86-64.c
--- elf64-x86-64.c	2001/12/17 00:52:35	1.34
+++ elf64-x86-64.c	2002/01/26 07:33:19
@@ -202,7 +202,9 @@
 /* The name of the dynamic interpreter.	 This is put in the .interp
    section.  */
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/lib/ld64.so.1"
+#endif
 
 /* The size in bytes of an entry in the global offset table.  */
 
Index: elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.43
diff -u -r1.43 elfxx-ia64.c
--- elfxx-ia64.c	2002/01/25 16:41:37	1.43
+++ elfxx-ia64.c	2002/01/26 07:33:19
@@ -598,7 +598,9 @@
   0x60, 0x00, 0x80, 0x00               /*               br.few b6;;        */
 };
 
+#ifndef ELF_DYNAMIC_INTERPRETER
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#endif
 #define AIX_DYNAMIC_INTERPRETER "/usr/lib/ia64l64/libc.so.1"
 #define DYNAMIC_INTERPRETER(abfd) \
   (elfNN_ia64_aix_vec (abfd->xvec) ? AIX_DYNAMIC_INTERPRETER : ELF_DYNAMIC_INTERPRETER)


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