This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: New backend for VAX BSD and Ultrix
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: binutils at sources dot redhat dot com
- Cc: amodra at bigpond dot net dot au
- Date: Sun, 30 Jun 2002 21:25:02 -2800 (EDT)
- Subject: PATCH: New backend for VAX BSD and Ultrix
I tried last week to build a cross tools for vax-ultrix. This didn't
work because the target parameters for host_aout_vec don't get defined.
So, I built gen-aout and integrated the result as follows.
The testsuite results are identical to the last native build that I
did a couple of weeks ago for vax-ultrix. I have also tested the cross
with a cross build of gcc-vax-ultrix.
Please install if ok.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2002-06-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
* vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
* config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
host_aout_vec.
* configure.in (vaxbsd_vec): Add.
* targets.c (vaxbsd_vec): Add.
* Makefile.in: Rebuild.
* configure: Rebuild.
* emulparams/vax.sh (OUTPUT_FORMAT): Use a.out-vax-bsd format.
--- /dev/null Sun Jun 30 18:15:05 2002
+++ bfd/vaxbsd.c Fri Jun 28 17:37:51 2002
@@ -0,0 +1,39 @@
+/* BFD back-end for BSD and Ultrix/VAX (1K page size) a.out-ish binaries.
+ Copyright 2002 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define N_HEADER_IN_TEXT(x) 0
+#define BYTES_IN_WORD 4
+#define ENTRY_CAN_BE_ZERO
+#define N_SHARED_LIB(x) 0 /* Avoids warning */
+#define TEXT_START_ADDR 0
+#define TARGET_PAGE_SIZE 1024
+#define SEGMENT_SIZE TARGET_PAGE_SIZE
+#define DEFAULT_ARCH bfd_arch_vax
+
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not remove whitespace added here, and thus will fail to concatenate the tokens. */
+#define MY(OP) CONCAT2 (vaxbsd_,OP)
+
+#define TARGETNAME "a.out-vax-bsd"
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "libaout.h"
+
+#include "aout-target.h"
Index: bfd/Makefile.am
===================================================================
RCS file: /cvs/src/src/bfd/Makefile.am,v
retrieving revision 1.91
diff -u -3 -p -r1.91 Makefile.am
--- bfd/Makefile.am 18 Jun 2002 21:10:46 -0000 1.91
+++ bfd/Makefile.am 1 Jul 2002 00:48:38 -0000
@@ -297,6 +297,7 @@ BFD32_BACKENDS = \
sunos.lo \
vaxnetbsd.lo \
vax1knetbsd.lo \
+ vaxbsd.lo \
versados.lo \
vms.lo \
vms-gsd.lo \
@@ -451,6 +452,7 @@ BFD32_BACKENDS_CFILES = \
sunos.c \
vaxnetbsd.c \
vax1knetbsd.c \
+ vaxbsd.c \
versados.c \
vms.c \
vms-gsd.c \
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.104
diff -u -3 -p -r1.104 config.bfd
--- bfd/config.bfd 25 Jun 2002 17:29:53 -0000 1.104
+++ bfd/config.bfd 1 Jul 2002 00:48:38 -0000
@@ -1097,12 +1097,6 @@ case "${targ}" in
v850ea-*-*)
targ_defvec=bfd_elf32_v850_vec
;;
-#if HAVE_host_aout_vec
- vax-*-bsd* | vax-*-ultrix*)
- targ_defvec=host_aout_vec
- targ_underscore=yes
- ;;
-#endif
vax-*-netbsdelf*)
targ_defvec=bfd_elf32_vax_vec
@@ -1112,6 +1106,11 @@ case "${targ}" in
vax-*-netbsdaout* | vax-*-netbsd*)
targ_defvec=vaxnetbsd_vec
targ_selvecs="bfd_elf32_vax_vec vax1knetbsd_vec"
+ targ_underscore=yes
+ ;;
+
+ vax-*-bsdaout* | vax-*-bsd* | vax-*-ultrixaout* | vax-*-ultrix*)
+ targ_defvec=vaxbsd_vec
targ_underscore=yes
;;
Index: bfd/configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.104
diff -u -3 -p -r1.104 configure.in
--- bfd/configure.in 26 Jun 2002 03:10:19 -0000 1.104
+++ bfd/configure.in 1 Jul 2002 00:48:40 -0000
@@ -739,6 +739,7 @@ do
tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;;
vax1knetbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;;
+ vaxbsd_vec) tb="$tb vaxbsd.lo aout32.lo" ;;
versados_vec) tb="$tb versados.lo" ;;
vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
Index: bfd/targets.c
===================================================================
RCS file: /cvs/src/src/bfd/targets.c,v
retrieving revision 1.69
diff -u -3 -p -r1.69 targets.c
--- bfd/targets.c 25 Jun 2002 10:05:05 -0000 1.69
+++ bfd/targets.c 1 Jul 2002 00:48:40 -0000
@@ -679,6 +679,7 @@ extern const bfd_target tic54x_coff1_vec
extern const bfd_target tic54x_coff2_beh_vec;
extern const bfd_target tic54x_coff2_vec;
extern const bfd_target tic80coff_vec;
+extern const bfd_target vaxbsd_vec;
extern const bfd_target vaxnetbsd_vec;
extern const bfd_target vax1knetbsd_vec;
extern const bfd_target versados_vec;
@@ -993,6 +994,7 @@ static const bfd_target * const _bfd_tar
&tic54x_coff2_beh_vec,
&tic54x_coff2_vec,
&tic80coff_vec,
+ &vaxbsd_vec,
&vaxnetbsd_vec,
&vax1knetbsd_vec,
&versados_vec,
Index: ld/emulparams/vax.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/vax.sh,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 vax.sh
--- ld/emulparams/vax.sh 3 May 1999 07:29:07 -0000 1.1.1.1
+++ ld/emulparams/vax.sh 1 Jul 2002 00:48:47 -0000
@@ -1,5 +1,5 @@
SCRIPT_NAME=aout
-OUTPUT_FORMAT="a.out"
+OUTPUT_FORMAT="a.out-vax-bsd"
TEXT_START_ADDR=0
TARGET_PAGE_SIZE=1024
ARCH=vax