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]

[PATCH] allow ELF_DYNAMIC_INTERPRETER override


I would like to commit this patch to allow ELF_DYNAMIC_INTERPRETER
override (w/suitable ChangeLog entry of course).  I currently have to
edit these files when I import Binutils sources into FreeBSD to specify
the name of the FreeBSD ld.so.  There surely must be others that need to
do the same.  

[yes I know about -dynamic-linker, but requiring FreeBSD `ld' users to
specify "-dynamic-linker /usr/libexec/ld-elf.so.1" just because FreeBSD
isn't the hardware vendor (thus psABI author) isn't fair and it is easy
to make things simple for my users]

I would like to add --elf_dynamic_interpreter=/foo.so as a configure
option, but I am having trouble figuring out how to get it seen down in
bfd/.  Any help here would be appreciated.

-- 
-- David  (obrien@FreeBSD.org)


Index: elf32-arm.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.h,v
retrieving revision 1.50
diff -u -r1.50 elf32-arm.h
--- elf32-arm.h	2001/05/04 08:32:21	1.50
+++ elf32-arm.h	2001/05/23 19:17:03
@@ -69,7 +69,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.6
diff -u -r1.6 elf32-cris.c
--- elf32-cris.c	2001/04/17 12:32:30	1.6
+++ elf32-cris.c	2001/05/23 19:17:03
@@ -459,7 +459,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.33
diff -u -r1.33 elf32-hppa.c
--- elf32-hppa.c	2001/05/18 03:11:13	1.33
+++ elf32-hppa.c	2001/05/23 19:17:04
@@ -116,7 +116,9 @@
 #define PLT_ENTRY_SIZE 8
 #define PLABEL_PLT_ENTRY_SIZE PLT_ENTRY_SIZE
 #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.8
diff -u -r1.8 elf32-i370.c
--- elf32-i370.c	2001/03/08 21:03:59	1.8
+++ elf32-i370.c	2001/05/23 19:17:05
@@ -342,7 +342,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.26
diff -u -r1.26 elf32-i386.c
--- elf32-i386.c	2001/05/23 08:23:27	1.26
+++ elf32-i386.c	2001/05/23 19:17:05
@@ -299,7 +299,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.23
diff -u -r1.23 elf32-m68k.c
--- elf32-m68k.c	2001/03/20 10:11:07	1.23
+++ elf32-m68k.c	2001/05/23 19:17:05
@@ -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.97
diff -u -r1.97 elf32-mips.c
--- elf32-mips.c	2001/05/23 17:26:35	1.97
+++ elf32-mips.c	2001/05/23 19:17:07
@@ -7163,10 +7163,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.22
diff -u -r1.22 elf32-ppc.c
--- elf32-ppc.c	2001/03/08 21:04:00	1.22
+++ elf32-ppc.c	2001/05/23 19:17:07
@@ -113,7 +113,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.2
diff -u -r1.2 elf32-s390.c
--- elf32-s390.c	2001/03/08 21:04:00	1.2
+++ elf32-s390.c	2001/05/23 19:17:08
@@ -195,7 +195,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: elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.29
diff -u -r1.29 elf32-sh.c
--- elf32-sh.c	2001/05/23 16:38:36	1.29
+++ elf32-sh.c	2001/05/23 19:17:09
@@ -76,7 +76,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.19
diff -u -r1.19 elf32-sparc.c
--- elf32-sparc.c	2001/03/08 21:04:00	1.19
+++ elf32-sparc.c	2001/05/23 19:17:09
@@ -314,7 +314,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.26
diff -u -r1.26 elf64-alpha.c
--- elf64-alpha.c	2001/05/23 08:23:27	1.26
+++ elf64-alpha.c	2001/05/23 19:17:10
@@ -1715,7 +1715,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.12
diff -u -r1.12 elf64-hppa.c
--- elf64-hppa.c	2001/01/31 13:28:50	1.12
+++ elf64-hppa.c	2001/05/23 19:17:10
@@ -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.2
diff -u -r1.2 elf64-s390.c
--- elf64-s390.c	2001/03/08 21:04:00	1.2
+++ elf64-s390.c	2001/05/23 19:17:11
@@ -222,7 +222,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-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sparc.c,v
retrieving revision 1.27
diff -u -r1.27 elf64-sparc.c
--- elf64-sparc.c	2001/05/23 08:23:27	1.27
+++ elf64-sparc.c	2001/05/23 19:17:11
@@ -847,7 +847,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.15
diff -u -r1.15 elf64-x86-64.c
--- elf64-x86-64.c	2001/04/30 10:30:05	1.15
+++ elf64-x86-64.c	2001/05/23 19:17:12
@@ -190,7 +190,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.16
diff -u -r1.16 elfxx-ia64.c
--- elfxx-ia64.c	2001/05/11 12:36:46	1.16
+++ elfxx-ia64.c	2001/05/23 19:17:12
@@ -565,7 +565,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]