diff options
-rw-r--r-- | ld/ChangeLog | 13 | ||||
-rw-r--r-- | ld/emulparams/elf32bmipn32-defs.sh | 23 | ||||
-rw-r--r-- | ld/emulparams/elf32ppc.sh | 1 | ||||
-rw-r--r-- | ld/emulparams/elf64bmip-defs.sh | 6 | ||||
-rwxr-xr-x | ld/emulparams/elf64bmip.sh | 2 | ||||
-rw-r--r-- | ld/emulparams/elf64btsmip.sh | 7 |
6 files changed, 38 insertions, 14 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index a5bd56c..93e37d9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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. diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh index 7592d68..deccadd 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 98c3f4e..d1caf58 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 510a85f..0000000 --- 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 bb33269..7078a78 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 abd3da6..8aa0793 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.*)' |