From c50852d9b59375aebea08d6c51268685e99b9010 Mon Sep 17 00:00:00 2001 From: pefo Date: Sun, 13 Apr 1997 21:06:53 +0000 Subject: [PATCH] More consistent MIPS config --- gnu/usr.bin/binutils/gas/configure | 7 ++++- gnu/usr.bin/binutils/ld/Makefile.in | 12 ++++++--- gnu/usr.bin/binutils/ld/configure.tgt | 4 +-- .../binutils/ld/emulparams/mipseb_obsd.sh | 27 +++++++++++++++++++ .../binutils/ld/emulparams/mipsel_obsd.sh | 27 +++++++++++++++++++ .../ld/emultempl/{elfarc.em => elfobsd.em} | 0 6 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 gnu/usr.bin/binutils/ld/emulparams/mipseb_obsd.sh create mode 100644 gnu/usr.bin/binutils/ld/emulparams/mipsel_obsd.sh rename gnu/usr.bin/binutils/ld/emultempl/{elfarc.em => elfobsd.em} (100%) diff --git a/gnu/usr.bin/binutils/gas/configure b/gnu/usr.bin/binutils/gas/configure index 7ad68d81fcc..1b2484db4e2 100644 --- a/gnu/usr.bin/binutils/gas/configure +++ b/gnu/usr.bin/binutils/gas/configure @@ -843,7 +843,12 @@ for this_target in $target $canon_targets ; do # don't change em like *-*-bsd does mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;; - mips-*-openbsd*) fmt=elf targ=mips-lit endian=little ;; + mips-*-openbsd*) fmt=elf + case "$endian" in + big) targ=mips-big ;; + *) targ=mips-lit ;; + esac + ;; mips-dec-bsd*) fmt=aout targ=mips-lit ;; mips-sony-bsd*) fmt=ecoff targ=mips-big ;; mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;; diff --git a/gnu/usr.bin/binutils/ld/Makefile.in b/gnu/usr.bin/binutils/ld/Makefile.in index bb1781003da..50e26548648 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.in +++ b/gnu/usr.bin/binutils/ld/Makefile.in @@ -213,7 +213,6 @@ ALL_EMULATIONS = \ edelta68.o \ eebmon29k.o \ eelf32_sparc.o \ - eelf32arc.o \ eelf32b4300.o \ eelf32bmip.o \ eelf32ebmip.o \ @@ -263,6 +262,8 @@ ALL_EMULATIONS = \ em88kbcs.o \ emipsbig.o \ emipsbsd.o \ + emipsel_obsd.o \ + emipseb_obsd.o \ emipsidt.o \ emipsidtl.o \ emipslit.o \ @@ -397,9 +398,6 @@ eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \ eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)" -eelf32arc.c: $(srcdir)/emulparams/elf32arc.sh \ - $(srcdir)/emultempl/elfarc.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS} - ${GENSCRIPTS} elf32arc "$(tdir_elf32arc)" eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)" @@ -550,6 +548,12 @@ emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \ emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS} ${GENSCRIPTS} mipsbsd +emipsel_obsd.c: $(srcdir)/emulparams/mipsel_obsd.sh \ + $(srcdir)/emultempl/elfobsd.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS} + ${GENSCRIPTS} mipsel_obsd "$(tdir_mipsel_obsd)" +emipseb_obsd.c: $(srcdir)/emulparams/mipseb_obsd.sh \ + $(srcdir)/emultempl/elfarc.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS} + ${GENSCRIPTS} mipseb_obsd "$(tdir_mipseb_obsd)" emipsidt.c: $(srcdir)/emulparams/mipsidt.sh \ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS} ${GENSCRIPTS} mipsidt "$(tdir_mipsidt)" diff --git a/gnu/usr.bin/binutils/ld/configure.tgt b/gnu/usr.bin/binutils/ld/configure.tgt index 4260419a0c7..6f9f16570a6 100644 --- a/gnu/usr.bin/binutils/ld/configure.tgt +++ b/gnu/usr.bin/binutils/ld/configure.tgt @@ -126,8 +126,8 @@ mips*el-*-ecoff*) targ_emul=mipsidtl ;; mips*-*-ecoff*) targ_emul=mipsidt ;; mips*-dec-bsd*) targ_emul=mipsbsd ;; mips*-dec-netbsd*) targ_emul=elf32lmip ;; -mips*-*-openbsd*) targ_emul=elf32arc ;; -mips-heurikon-openbsd*) targ_emul=elf32bmip ;; +mips*el-*-openbsd*) targ_emul=mipsel_obsd ;; +mips*-*-openbsd*) targ_emul=mipseb_obsd ;; # mips*-dec-openbsd*) targ_emul=elf32lmip ;; mips*-*-bsd*) targ_emul=mipsbig ;; mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;; diff --git a/gnu/usr.bin/binutils/ld/emulparams/mipseb_obsd.sh b/gnu/usr.bin/binutils/ld/emulparams/mipseb_obsd.sh new file mode 100644 index 00000000000..25cf9418cf3 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/mipseb_obsd.sh @@ -0,0 +1,27 @@ +SCRIPT_NAME=elfmips +OUTPUT_FORMAT="elf32-bigmips" +BIG_OUTPUT_FORMAT="elf32-bigmips" +LITTLE_OUTPUT_FORMAT="elf32-littlemips" +TEXT_START_ADDR=0x0400000 +DATA_ADDR=0x10000000 +MAXPAGESIZE=0x40000 +NONPAGED_TEXT_START_ADDR=0x0400000 +SHLIB_TEXT_START_ADDR=0x5ffe0000 +OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' +OTHER_GOT_SYMBOLS=' + _gp = ALIGN(16) + 0x7ff0; +' +OTHER_READWRITE_SECTIONS=' + .lit8 : { *(.lit8) } + .lit4 : { *(.lit4) } +' +TEXT_START_SYMBOLS='_ftext = . ;' +DATA_START_SYMBOLS='_fdata = . ;' +OTHER_BSS_SYMBOLS='_fbss = .;' +OTHER_SECTIONS=' + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +' +ARCH=mips +TEMPLATE_NAME=elfobsd +GENERATE_SHLIB_SCRIPT=yes diff --git a/gnu/usr.bin/binutils/ld/emulparams/mipsel_obsd.sh b/gnu/usr.bin/binutils/ld/emulparams/mipsel_obsd.sh new file mode 100644 index 00000000000..a6ca46dfa4e --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/mipsel_obsd.sh @@ -0,0 +1,27 @@ +SCRIPT_NAME=elfmips +OUTPUT_FORMAT="elf32-littlemips" +BIG_OUTPUT_FORMAT="elf32-bigmips" +LITTLE_OUTPUT_FORMAT="elf32-littlemips" +TEXT_START_ADDR=0x0400000 +DATA_ADDR=0x10000000 +MAXPAGESIZE=0x40000 +NONPAGED_TEXT_START_ADDR=0x0400000 +SHLIB_TEXT_START_ADDR=0x5ffe0000 +OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' +OTHER_GOT_SYMBOLS=' + _gp = ALIGN(16) + 0x7ff0; +' +OTHER_READWRITE_SECTIONS=' + .lit8 : { *(.lit8) } + .lit4 : { *(.lit4) } +' +TEXT_START_SYMBOLS='_ftext = . ;' +DATA_START_SYMBOLS='_fdata = . ;' +OTHER_BSS_SYMBOLS='_fbss = .;' +OTHER_SECTIONS=' + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +' +ARCH=mips +TEMPLATE_NAME=elfobsd +GENERATE_SHLIB_SCRIPT=yes diff --git a/gnu/usr.bin/binutils/ld/emultempl/elfarc.em b/gnu/usr.bin/binutils/ld/emultempl/elfobsd.em similarity index 100% rename from gnu/usr.bin/binutils/ld/emultempl/elfarc.em rename to gnu/usr.bin/binutils/ld/emultempl/elfobsd.em -- 2.20.1