* emulparams/elf32bmipn32-defs.sh: Set ELFSIZE according to
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 22 Oct 2002 22:13:26 +0000 (22:13 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 22 Oct 2002 22:13:26 +0000 (22:13 +0000)
emulation name.  Set LIB_PATH only for native tools, and
search the ABI-specific versions of NATIVE_LIB_DIRS before the
.../lib variants, not instead of them.  Mostly copied from...
* emulparams/elf32ppc.sh: ... here.  Fixed typo.
* emulparams/elf64bmip-defs.sh: Backed out.
* emulparams/elf64bmip.sh: Import elf32bmipn32-defs.sh again.
* emulparams/elf64btsmip.sh: Likewise.
(DATA_ADDR, NONPAGED_TEXT_START_ADDR, SHLIB_TEXT_START_ADDR,
TEXT_DYNAMIC): Removed.

ld/ChangeLog
ld/emulparams/elf32bmipn32-defs.sh
ld/emulparams/elf32ppc.sh
ld/emulparams/elf64bmip-defs.sh [deleted file]
ld/emulparams/elf64bmip.sh
ld/emulparams/elf64btsmip.sh

index a5bd56c93dbf75dbee33ee740f88cb4768512df0..93e37d9cd98816dba8fe89288cbc18eecfe43776 100644 (file)
@@ -1,3 +1,16 @@
+2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
+
+       * emulparams/elf32bmipn32-defs.sh: Set ELFSIZE according to
+       emulation name.  Set LIB_PATH only for native tools, and
+       search the ABI-specific versions of NATIVE_LIB_DIRS before the
+       .../lib variants, not instead of them.  Mostly copied from...
+       * emulparams/elf32ppc.sh: ... here.  Fixed typo.
+       * emulparams/elf64bmip-defs.sh: Backed out.
+       * emulparams/elf64bmip.sh: Import elf32bmipn32-defs.sh again.
+       * emulparams/elf64btsmip.sh: Likewise.
+       (DATA_ADDR, NONPAGED_TEXT_START_ADDR, SHLIB_TEXT_START_ADDR,
+       TEXT_DYNAMIC): Removed.
+
 2002-10-17  Alexandre Oliva  <aoliva@redhat.com>
 
        * emulparams/elf32bmipn32-defs.sh (LIB_PATH): Set to /usr/lib32.
index 7592d6855922f478c88c5f136ea5c219b8e5a5f7..deccadd674434d7b262095727ea8f1ea23ab9561 100644 (file)
@@ -11,7 +11,28 @@ BIG_OUTPUT_FORMAT="elf32-bigmips"
 LITTLE_OUTPUT_FORMAT="elf32-littlemips"
 
 TEMPLATE_NAME=elf32
-LIB_PATH=/usr/lib32
+
+case "$EMULATION_NAME" in
+elf32*n32*) ELFSIZE=32 ;;
+elf64*) ELFSIZE=64 ;;
+*) echo $0: unhandled emulation $EMULATION_NAME >&2; exit 1 ;;
+esac
+
+if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
+  case " $EMULATION_LIBPATH " in
+    *" ${EMULATION_NAME} "*)
+      LIB_PATH=${libdir}
+      for lib in ${NATIVE_LIB_DIRS}; do
+       case :${LIB_PATH}: in
+         *:${lib}:*) ;;
+         *) LIB_PATH=${LIB_PATH}:${lib} ;;
+       esac
+      done
+      # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+      LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,$ELFSIZE:,g`$LIB_PATH
+    ;;
+  esac
+fi
 
 GENERATE_SHLIB_SCRIPT=yes
 
index 98c3f4e948e640b010f534348009e6b378a01d77..d1caf58b4ecaf07f5588a15dae964132de2b142f 100644 (file)
@@ -38,5 +38,6 @@ if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
        case "$EMULATION_NAME" in
          *64*) LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,64:,g`$LIB_PATH
        esac
+        ;;
     esac
 fi
diff --git a/ld/emulparams/elf64bmip-defs.sh b/ld/emulparams/elf64bmip-defs.sh
deleted file mode 100644 (file)
index 510a85f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# If you change this file, please also look at files which source this one:
-# elf64bmip.sh and elf64btsmip.sh
-
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
-ELFSIZE=64
-LIB_PATH=/usr/lib64
index bb3326948774cee35a7e6bbdd9fdf6de2d1fce48..7078a788af96a766515ce2ee650d04cfd4ac1009 100755 (executable)
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf64bmip-defs.sh
+. ${srcdir}/emulparams/elf32bmipn32-defs.sh
 OUTPUT_FORMAT="elf64-bigmips"
 BIG_OUTPUT_FORMAT="elf64-bigmips"
 LITTLE_OUTPUT_FORMAT="elf64-littlemips"
index abd3da648a73dd9ed10585db8f33811dc18de82b..8aa079328b44c97909a1d6b0d42840d9a9fefea8 100644 (file)
@@ -1,16 +1,11 @@
 # If you change this file, please also look at files which source this one:
 # elf64ltsmip.sh
 
-. ${srcdir}/emulparams/elf64bmip-defs.sh
+. ${srcdir}/emulparams/elf32bmipn32-defs.sh
 OUTPUT_FORMAT="elf64-tradbigmips"
 BIG_OUTPUT_FORMAT="elf64-tradbigmips"
 LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
 
-DATA_ADDR=0x0400000000
-NONPAGED_TEXT_START_ADDR=0x10000000
-SHLIB_TEXT_START_ADDR=0
-TEXT_DYNAMIC=
-
 # Magic sections.
 INITIAL_READONLY_SECTIONS='.MIPS.options : { *(.MIPS.options) }'
 OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'