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] MIPS bfd: irix script support


elf32bmipn32.sh was both being used by irix and also included by
elf32btsmipn32.sh, elf64bmip.sh, and elf64btsmip.sh.  This patch
creates a common include file elf32bimipn32.sh.
1. rename elf32bmipn32.sh to elf32bimipn32.sh 
2. change elf32bmipn32.sh to include elf32bimipn32.sh
3. have elf32btsmipn32.sh, elf64bmip.sh, and elf64btsmip.sh include
   elf32bimipn32.sh
4. Include a couple changes for glibc

	* emulparams/elf32bimipn32.sh: Equivalent to elf32bmipn32.sh.
        * emulparams/elf32bmipn32.sh: Use only for irix.
        * emulparams/elf32btsmipn32.sh: Include elf32bimipn32.sh.
        (SHLIB_TEXT_START_ADDR): Unset.
        * emulparams/elf64bmip.sh: Include elf32bimipn32.sh.
        (LIB_PATH): Set.
        * emulparams/elf64btsmip.sh: Include elf32bimipn32.sh.

Index: emulparams/elf32bimipn32.sh
===================================================================
RCS file: emulparams/elf32bimipn32.sh
diff -N emulparams/elf32bimipn32.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ emulparams/elf32bimipn32.sh	29 Aug 2002 19:22:58 -0000
@@ -0,0 +1,71 @@
+# If you change this file, please also look at files which source this one:
+# elf64bmip.sh elf64btsmip.sh elf32btsmipn32.sh elf32bmipn32.sh
+
+# This is an ELF platform.
+SCRIPT_NAME=elf
+
+# Handle both big- and little-ended 32-bit MIPS objects.
+ARCH=mips
+OUTPUT_FORMAT="elf32-bigmips"
+BIG_OUTPUT_FORMAT="elf32-bigmips"
+LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+
+TEMPLATE_NAME=elf32
+
+TEXT_START_ADDR=0x10000000
+MAXPAGESIZE=0x100000
+ENTRY=__start
+
+# GOT-related settings.  
+OTHER_GOT_SYMBOLS='
+  _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_SDATA_SECTIONS="
+  .lit8         ${RELOCATING-0} : { *(.lit8) }
+  .lit4         ${RELOCATING-0} : { *(.lit4) }
+  .srdata       ${RELOCATING-0} : { *(.srdata) }
+"
+
+# Magic symbols.
+TEXT_START_SYMBOLS='_ftext = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+OTHER_BSS_SYMBOLS='_fbss = .;'
+# IRIX6 defines these symbols.  0x34 is the size of the ELF header.
+EXECUTABLE_SYMBOLS="
+  __dso_displacement = 0;
+  __elf_header = ${TEXT_START_ADDR};
+  __program_header_table = ${TEXT_START_ADDR} + 0x34;
+"
+
+# There are often dynamic relocations against the .rodata section.
+# Setting DT_TEXTREL in the .dynamic section does not convince the
+# IRIX6 linker to permit relocations against the text segment.
+# Following the IRIX linker, we simply put .rodata in the data
+# segment.
+WRITABLE_RODATA=
+
+OTHER_SECTIONS="
+  .MIPS.events.text ${RELOCATING-0} :
+    {
+       *(.MIPS.events.text${RELOCATING+ .MIPS.events.gnu.linkonce.t*})
+    }
+  .MIPS.content.text ${RELOCATING-0} : 
+    {
+       *(.MIPS.content.text${RELOCATING+ .MIPS.content.gnu.linkonce.t*})
+    }
+  .MIPS.events.data ${RELOCATING-0} :
+    {
+       *(.MIPS.events.data${RELOCATING+ .MIPS.events.gnu.linkonce.d*})
+    }
+  .MIPS.content.data ${RELOCATING-0} :
+    {
+       *(.MIPS.content.data${RELOCATING+ .MIPS.content.gnu.linkonce.d*})
+    }
+  .MIPS.events.rodata ${RELOCATING-0} :
+    {
+       *(.MIPS.events.rodata${RELOCATING+ .MIPS.events.gnu.linkonce.r*})
+    }
+  .MIPS.content.rodata ${RELOCATING-0} :
+    {
+       *(.MIPS.content.rodata${RELOCATING+ .MIPS.content.gnu.linkonce.r*})
+    }"
Index: emulparams/elf32bmipn32.sh
===================================================================
RCS file: /cvs/uberbaum/./ld/emulparams/elf32bmipn32.sh,v
retrieving revision 1.5
diff -u -2 -p -r1.5 elf32bmipn32.sh
--- emulparams/elf32bmipn32.sh	30 Jul 2002 23:48:30 -0000	1.5
+++ emulparams/elf32bmipn32.sh	29 Aug 2002 19:22:58 -0000
@@ -1,71 +1,6 @@
-# If you change this file, please also look at files which source this one:
-# elf64bmip.sh elf64btsmip.sh elf32btsmipn32.sh
-
-# This is an ELF platform.
-SCRIPT_NAME=elf
-
-# Handle both big- and little-ended 32-bit MIPS objects.
-ARCH=mips
-OUTPUT_FORMAT="elf32-bigmips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-
-TEMPLATE_NAME=elf32
-
-TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x100000
-ENTRY=__start
-
-# GOT-related settings.  
-OTHER_GOT_SYMBOLS='
-  _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS="
-  .lit8         ${RELOCATING-0} : { *(.lit8) }
-  .lit4         ${RELOCATING-0} : { *(.lit4) }
-  .srdata       ${RELOCATING-0} : { *(.srdata) }
-"
-
-# Magic symbols.
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-# IRIX6 defines these symbols.  0x34 is the size of the ELF header.
-EXECUTABLE_SYMBOLS="
-  __dso_displacement = 0;
-  __elf_header = ${TEXT_START_ADDR};
-  __program_header_table = ${TEXT_START_ADDR} + 0x34;
-"
-
-# There are often dynamic relocations against the .rodata section.
-# Setting DT_TEXTREL in the .dynamic section does not convince the
-# IRIX6 linker to permit relocations against the text segment.
-# Following the IRIX linker, we simply put .rodata in the data
-# segment.
-WRITABLE_RODATA=
-
-OTHER_SECTIONS="
-  .MIPS.events.text ${RELOCATING-0} :
-    {
-       *(.MIPS.events.text${RELOCATING+ .MIPS.events.gnu.linkonce.t*})
-    }
-  .MIPS.content.text ${RELOCATING-0} : 
-    {
-       *(.MIPS.content.text${RELOCATING+ .MIPS.content.gnu.linkonce.t*})
-    }
-  .MIPS.events.data ${RELOCATING-0} :
-    {
-       *(.MIPS.events.data${RELOCATING+ .MIPS.events.gnu.linkonce.d*})
-    }
-  .MIPS.content.data ${RELOCATING-0} :
-    {
-       *(.MIPS.content.data${RELOCATING+ .MIPS.content.gnu.linkonce.d*})
-    }
-  .MIPS.events.rodata ${RELOCATING-0} :
-    {
-       *(.MIPS.events.rodata${RELOCATING+ .MIPS.events.gnu.linkonce.r*})
-    }
-  .MIPS.content.rodata ${RELOCATING-0} :
-    {
-       *(.MIPS.content.rodata${RELOCATING+ .MIPS.content.gnu.linkonce.r*})
-    }"
+. ${srcdir}/emulparams/elf32bimipn32.sh
+OUTPUT_FORMAT="elf32-nbigmips"
+BIG_OUTPUT_FORMAT="elf32-nbigmips"
+LITTLE_OUTPUT_FORMAT="elf32-nlittlemips"
+GENERATE_SHLIB_SCRIPT=yes
+SHLIB_TEXT_START_ADDR=0x5ffe0000
Index: emulparams/elf32btsmipn32.sh
===================================================================
RCS file: /cvs/uberbaum/./ld/emulparams/elf32btsmipn32.sh,v
retrieving revision 1.1
diff -u -2 -p -r1.1 elf32btsmipn32.sh
--- emulparams/elf32btsmipn32.sh	30 Jul 2002 23:48:30 -0000	1.1
+++ emulparams/elf32btsmipn32.sh	29 Aug 2002 19:22:58 -0000
@@ -2,5 +2,5 @@
 # elf32ltsmipn32.sh
 
-. ${srcdir}/emulparams/elf32bmipn32.sh
+. ${srcdir}/emulparams/elf32bimipn32.sh
 OUTPUT_FORMAT="elf32-ntradbigmips"
 BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
@@ -9,4 +9,5 @@ LITTLE_OUTPUT_FORMAT="elf32-ntradlittlem
 unset EXECUTABLE_SYMBOLS
 unset WRITABLE_RODATA
+unset SHLIB_TEXT_START_ADDR
 
 # Magic sections.
Index: emulparams/elf64bmip.sh
===================================================================
RCS file: /cvs/uberbaum/./ld/emulparams/elf64bmip.sh,v
retrieving revision 1.4
diff -u -2 -p -r1.4 elf64bmip.sh
--- emulparams/elf64bmip.sh	22 Nov 2001 09:08:04 -0000	1.4
+++ emulparams/elf64bmip.sh	29 Aug 2002 19:22:58 -0000
@@ -1,7 +1,8 @@
-. ${srcdir}/emulparams/elf32bmipn32.sh
+. ${srcdir}/emulparams/elf32bimipn32.sh
 OUTPUT_FORMAT="elf64-bigmips"
 BIG_OUTPUT_FORMAT="elf64-bigmips"
 LITTLE_OUTPUT_FORMAT="elf64-littlemips"
 ELFSIZE=64
+LIB_PATH=/usr/lib64
 
 # IRIX6 defines these symbols.  0x40 is the size of the ELF header.
Index: emulparams/elf64btsmip.sh
===================================================================
RCS file: /cvs/uberbaum/./ld/emulparams/elf64btsmip.sh,v
retrieving revision 1.5
diff -u -2 -p -r1.5 elf64btsmip.sh
--- emulparams/elf64btsmip.sh	4 Apr 2002 07:21:39 -0000	1.5
+++ emulparams/elf64btsmip.sh	29 Aug 2002 19:22:58 -0000
@@ -2,5 +2,5 @@
 # elf64ltsmip.sh
 
-. ${srcdir}/emulparams/elf32bmipn32.sh
+. ${srcdir}/emulparams/elf32bimipn32.sh
 OUTPUT_FORMAT="elf64-tradbigmips"
 BIG_OUTPUT_FORMAT="elf64-tradbigmips"

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