Subject: Re: sneak preview: hp700
To: Matt Fredette <fredette@theory.lcs.mit.edu>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-hp700
Date: 02/01/2002 15:18:59
--4SFOXa2GPu3tIq4H
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Feb 01, 2002 at 09:04:57AM -0800, Jason R Thorpe wrote:

 > (I suppose I should try and get an hppa-netbsd ELF target into binutils
 > before 2.12 ships :-)

Piece of cake :-)

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

--4SFOXa2GPu3tIq4H
Content-Type: text/plain; charset=us-ascii
Content-Description: hppa-nbsd-patch
Content-Disposition: attachment; filename=hppa-nbsd-patch

Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.83
diff -u -r1.83 config.bfd
--- config.bfd	2002/02/01 05:47:13	1.83
+++ config.bfd	2002/02/01 23:09:25
@@ -302,7 +302,7 @@
     targ_defvec=bfd_elf32_hppa_linux_vec
     targ_selvecs=bfd_elf32_hppa_vec
     ;;
-  hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems*)
+  hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-netbsd* | hppa*-*-sysv4* | hppa*-*-rtems*)
     targ_defvec=bfd_elf32_hppa_vec
     targ_selvecs=bfd_elf32_hppa_linux_vec
     ;;
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.94
diff -u -r1.94 configure.in
--- configure.in	2002/01/31 17:33:00	1.94
+++ configure.in	2002/02/01 23:12:14
@@ -222,6 +222,7 @@
 			    esac ;;
       hppa-*-*elf*)         fmt=elf em=hppa ;;
       hppa-*-lites*)        fmt=elf em=hppa ;;
+      hppa-*-netbsd*)       fmt=elf em=nbsd ;;
       hppa-*-osf*)          fmt=som em=hppa ;;
       hppa-*-rtems*)        fmt=elf em=hppa ;;
       hppa-*-hpux11*)	    case ${cpu} in
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.85
diff -u -r1.85 Makefile.am
--- Makefile.am	2002/01/31 17:33:06	1.85
+++ Makefile.am	2002/02/01 23:13:09
@@ -184,6 +184,7 @@
 	ehp3hpux.o \
 	ehppaelf.o \
 	ehppalinux.o \
+	ehppanbsd.o \
 	ei386aout.o \
 	ei386beos.o \
 	ei386bsd.o \
@@ -662,6 +663,11 @@
   $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
+ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
+  $(srcdir)/emulparams/hppaelf.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
 ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
Index: ld/Makefile.in
===================================================================
RCS file: /cvs/src/src/ld/Makefile.in,v
retrieving revision 1.92
diff -u -r1.92 Makefile.in
--- Makefile.in	2002/01/31 17:33:06	1.92
+++ Makefile.in	2002/02/01 23:13:36
@@ -293,6 +293,7 @@
 	ehp3hpux.o \
 	ehppaelf.o \
 	ehppalinux.o \
+	ehppanbsd.o \
 	ei386aout.o \
 	ei386beos.o \
 	ei386bsd.o \
@@ -1383,6 +1384,11 @@
   $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
+ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
+  $(srcdir)/emulparams/hppaelf.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
 ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.78
diff -u -r1.78 configure.tgt
--- configure.tgt	2002/01/31 17:33:06	1.78
+++ configure.tgt	2002/02/01 23:13:42
@@ -304,6 +304,7 @@
 hppa*-*-linux-gnu*)	targ_emul=hppalinux ;;
 hppa*-*-*elf*)		targ_emul=hppaelf ;;
 hppa*-*-lites*)		targ_emul=hppaelf ;;
+hppa*-*-netbsd*)	targ_emul=hppanbsd ;;
 hppa*-*-rtems*)		targ_emul=hppaelf ;;
 vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
 mips*-*-pe)		targ_emul=mipspe ;
Index: ld/emulparams/hppaelf.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/hppaelf.sh,v
retrieving revision 1.3
diff -u -r1.3 hppaelf.sh
--- hppaelf.sh	2000/07/28 01:33:14	1.3
+++ hppaelf.sh	2002/02/01 23:13:45
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# hppanbsd.sh
+
 SCRIPT_NAME=hppaelf
 OUTPUT_FORMAT="elf32-hppa"
 TEXT_START_ADDR=0x1000
Index: ld/emulparams/hppanbsd.sh
===================================================================
RCS file: hppanbsd.sh
diff -N hppanbsd.sh
--- /dev/null	Tue May  5 13:32:27 1998
+++ hppanbsd.sh	Fri Feb  1 15:13:45 2002
@@ -0,0 +1,15 @@
+. ${srcdir}/emulparams/hppaelf.sh
+
+SCRIPT_NAME=elf
+
+TEXT_START_ADDR=0x10000
+TARGET_PAGE_SIZE=0x10000
+MAXPAGESIZE=0x10000
+
+ENTRY=_start
+
+OTHER_READONLY_SECTIONS="
+  .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
+DATA_START_SYMBOLS='PROVIDE ($global$ = .);'
+DATA_PLT=
+GENERATE_SHLIB_SCRIPT=yes

--4SFOXa2GPu3tIq4H--