From 3ffe58d945bfbafd5162eab54e101681854b9882 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 22 Oct 2002 22:13:26 +0000 Subject: [PATCH] * 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. --- ld/ChangeLog | 13 +++++++++++++ ld/emulparams/elf32bmipn32-defs.sh | 23 ++++++++++++++++++++++- ld/emulparams/elf32ppc.sh | 1 + ld/emulparams/elf64bmip-defs.sh | 6 ------ ld/emulparams/elf64bmip.sh | 2 +- ld/emulparams/elf64btsmip.sh | 7 +------ 6 files changed, 38 insertions(+), 14 deletions(-) delete mode 100644 ld/emulparams/elf64bmip-defs.sh diff --git a/ld/ChangeLog b/ld/ChangeLog index a5bd56c93db..93e37d9cd98 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,16 @@ +2002-10-22 Alexandre Oliva + + * 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 * emulparams/elf32bmipn32-defs.sh (LIB_PATH): Set to /usr/lib32. diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh index 7592d685592..deccadd6744 100644 --- a/ld/emulparams/elf32bmipn32-defs.sh +++ b/ld/emulparams/elf32bmipn32-defs.sh @@ -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 diff --git a/ld/emulparams/elf32ppc.sh b/ld/emulparams/elf32ppc.sh index 98c3f4e948e..d1caf58b4ec 100644 --- a/ld/emulparams/elf32ppc.sh +++ b/ld/emulparams/elf32ppc.sh @@ -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 index 510a85f154f..00000000000 --- a/ld/emulparams/elf64bmip-defs.sh +++ /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 diff --git a/ld/emulparams/elf64bmip.sh b/ld/emulparams/elf64bmip.sh index bb332694877..7078a788af9 100755 --- a/ld/emulparams/elf64bmip.sh +++ b/ld/emulparams/elf64bmip.sh @@ -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" diff --git a/ld/emulparams/elf64btsmip.sh b/ld/emulparams/elf64btsmip.sh index abd3da648a7..8aa079328b4 100644 --- a/ld/emulparams/elf64btsmip.sh +++ b/ld/emulparams/elf64btsmip.sh @@ -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.*)' -- 2.30.2