From: "Arne H. Juul" <arnej@pvv.unit.no>
To: gas2@cygnus.com
Subject: patches to add mips-dec-netbsd configuration
Date: Mon, 18 Sep 1995 02:02:00 -0000 [thread overview]
Message-ID: <9509180901.AA17584@datter.pvv.unit.no> (raw)
For some time now I've been using binutils snapshots successfully on
NetBSD/pmax, aka mips-dec-netbsd. These patches are against 950909 but
should work with the current version as well.
Most of the patches only add recognizing the name to be handled
like mips*el-*-elf.
However, there is one patch to elf.c that modifies ld behaviour on
linking: don't merge together readonly and writable object sections
into one program segment. I think this patch is OK on other systems
as well, but in the long term better control on the relationship
between sections and segments is probably desirable. If you don't
like this part I hope you will merge in the rest anyway - the elf.c
part is only needed to link the NetBSD kernel.
Yours,
- Arne H. J.
diff -ru gas-950909.orig/bfd/elf.c ./bfd/elf.c
--- gas-950909.orig/bfd/elf.c Sat Sep 9 10:18:17 1995
+++ ./bfd/elf.c Sat Sep 16 21:56:26 1995
@@ -1706,7 +1706,9 @@
if (phdr->p_type != PT_NULL
&& (hdr->sh_offset - (phdr->p_offset + phdr->p_memsz)
== hdr->sh_addr - (phdr->p_vaddr + phdr->p_memsz))
- && (last_type != SHT_NOBITS || hdr->sh_type == SHT_NOBITS))
+ && (last_type != SHT_NOBITS || hdr->sh_type == SHT_NOBITS)
+ && ((phdr->p_flags & PF_W ) || !(hdr->sh_flags & SHF_WRITE)))
+
{
bfd_size_type adjust;
diff -ru gas-950909.orig/bfd/config.bfd ./bfd/config.bfd
--- gas-950909.orig/bfd/config.bfd Sat Sep 9 10:18:14 1995
+++ ./bfd/config.bfd Sat Sep 16 21:56:26 1995
@@ -271,6 +271,10 @@
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
+ mips-dec-netbsd*)
+ targ_defvec=bfd_elf32_littlemips_vec
+ targ_selvecs=bfd_elf32_bigmips_vec
+ ;;
mips*-dec-bsd*)
targ_defvec=aout_mips_little_vec
targ_underscore=yes
diff -ru gas-950909.orig/bfd/configure ./bfd/configure
--- gas-950909.orig/bfd/configure Sat Sep 9 10:18:16 1995
+++ ./bfd/configure Sat Sep 16 21:56:26 1995
@@ -1052,6 +1052,8 @@
EOF
;;
+ mips-dec-netbsd*)
+ ;;
mips-dec-*)
COREFILE=trad-core.o
cat >> confdefs.h <<\EOF
diff -ru gas-950909.orig/bfd/configure.host ./bfd/configure.host
--- gas-950909.orig/bfd/configure.host Thu Sep 7 00:50:36 1995
+++ ./bfd/configure.host Sat Sep 16 21:56:26 1995
@@ -53,6 +53,7 @@
RANLIB=${RANLIB-i386-win32-ranlib}
;;
+mips-dec-netbsd*) ;;
mips-dec-*) HDEFINES="-G 4" ;;
mips-sgi-irix3*) HDEFINES="-G 4"
test -z "$LDFLAGS" && LDFLAGS=-lmalloc
diff -ru gas-950909.orig/bfd/configure.in ./bfd/configure.in
--- gas-950909.orig/bfd/configure.in Sat Sep 9 10:18:15 1995
+++ ./bfd/configure.in Sat Sep 16 21:56:26 1995
@@ -158,6 +158,8 @@
COREFILE=trad-core.o
AC_DEFINE(TRAD_HEADER,"hosts/mipsmach3.h")
;;
+ mips-dec-netbsd*)
+ ;;
mips-dec-*)
COREFILE=trad-core.o
AC_DEFINE(TRAD_HEADER,"hosts/decstation.h")
diff -ru gas-950909.orig/gas/configure ./gas/configure
--- gas-950909.orig/gas/configure Sat Sep 9 10:22:20 1995
+++ ./gas/configure Sat Sep 16 21:56:26 1995
@@ -729,6 +729,7 @@
m88k-*-coff*) fmt=coff targ=m88kcoff ;;
# don't change em like *-*-bsd does
+ mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
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 -ru gas-950909.orig/gas/configure.in ./gas/configure.in
--- gas-950909.orig/gas/configure.in Sat Sep 9 10:22:19 1995
+++ ./gas/configure.in Sat Sep 16 21:56:26 1995
@@ -202,6 +202,7 @@
m88k-*-coff*) fmt=coff targ=m88kcoff ;;
# don't change em like *-*-bsd does
+ mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
mips-dec-bsd*) fmt=aout targ=mips-lit ;;
mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
diff -ru gas-950909.orig/ld/configure.tgt ./ld/configure.tgt
--- gas-950909.orig/ld/configure.tgt Sat Sep 9 10:24:55 1995
+++ ./ld/configure.tgt Sat Sep 16 21:56:26 1995
@@ -95,6 +95,7 @@
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
mips*-*-ecoff*) targ_emul=mipsidt ;;
mips*-dec-bsd*) targ_emul=mipsbsd ;;
+mips-dec-netbsd*) targ_emul=elf32lmip ;;
mips*-*-bsd*) targ_emul=mipsbig ;;
mips*vr4300el-*-elf*) targ_emul=elf32vr4300el ;;
mips*vr4300-*-elf*) targ_emul=elf32vr4300 ;;
next reply other threads:[~1995-09-18 2:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-09-18 2:02 Arne H. Juul [this message]
1995-09-18 11:48 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9509180901.AA17584@datter.pvv.unit.no \
--to=arnej@pvv.unit.no \
--cc=gas2@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).