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]

Re: [PATCH] allow easier overriding of ELF_DYNAMIC_INTERPRETER


On Wed, Feb 13, 2002 at 08:35:47PM +0000, Nick Clifton wrote:
> > If so that still will not allow easy overriding of
> > ELF_DYNAMIC_INTERPRETER.  How about we just move that macro into its
> > own header?  It would be very easy to provide an alternate header
> > via ``configure''.
> 
> OK - that seems reasonable.

This is the basic patch I have to do this.  In general, does this look
OK?  Are there issues with the length of the header file names?


Index: elf32-arm-dyn.h
===================================================================
RCS file: elf32-arm-dyn.h
diff -N elf32-arm-dyn.h
--- /dev/null	Tue May  5 13:32:27 1998
+++ elf32-arm-dyn.h	Sun Feb 17 00:04:06 2002
@@ -0,0 +1,22 @@
+/* 32-bit ELF support for ARM
+   Copyright 2002 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+/* The name of the dynamic interpreter.  This is put in the .interp
+   section.  */
+#define ELF_DYNAMIC_INTERPRETER     "/usr/lib/ld.so.1"
Index: elf32-arm.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.h,v
retrieving revision 1.75
diff -u -r1.75 elf32-arm.h
--- elf32-arm.h	2002/02/08 19:18:35	1.75
+++ elf32-arm.h	2002/02/17 08:04:06
@@ -17,6 +17,8 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+#include "elf32-arm-dyn.h"
+
 typedef unsigned long int insn32;
 typedef unsigned short int insn16;
 
@@ -105,10 +107,6 @@
 
 #define ARM2THUMB_GLUE_SECTION_NAME ".glue_7"
 #define ARM2THUMB_GLUE_ENTRY_NAME   "__%s_from_arm"
-
-/* The name of the dynamic interpreter.  This is put in the .interp
-   section.  */
-#define ELF_DYNAMIC_INTERPRETER     "/usr/lib/ld.so.1"
 
 /* The size in bytes of an entry in the procedure linkage table.  */
 #define PLT_ENTRY_SIZE 16

Index: elf32-cris-dyn.h
===================================================================
RCS file: elf32-cris-dyn.h
diff -N elf32-cris-dyn.h
--- /dev/null	Tue May  5 13:32:27 1998
+++ elf32-cris-dyn.h	Sun Feb 17 00:04:06 2002
@@ -0,0 +1,26 @@
+/* CRIS-specific support for 32-bit ELF.
+   Copyright 2002 Free Software Foundation, Inc.
+   Contributed by Axis Communications AB.
+   Written by Hans-Peter Nilsson, based on elf32-fr30.c
+   PIC and shlib bits based primarily on elf32-m68k.c and elf32-i386.c.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+/* The name of the dynamic interpreter.  This is put in the .interp
+   section.  */
+
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
Index: elf32-cris.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-cris.c,v
retrieving revision 1.25
diff -u -r1.25 elf32-cris.c
--- elf32-cris.c	2002/01/31 10:46:24	1.25
+++ elf32-cris.c	2002/02/17 08:04:07
@@ -25,6 +25,7 @@
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/cris.h"
+#include "elf32-cris-dyn.h"
 
 /* Forward declarations.  */
 static reloc_howto_type * cris_reloc_type_lookup
@@ -533,11 +534,6 @@
   return true;
 }
 
-/* The name of the dynamic interpreter.  This is put in the .interp
-   section.  */
-
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
-
 /* The size in bytes of an entry in the procedure linkage table.  */
 
 #define PLT_ENTRY_SIZE 20


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