summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-06 19:40:38 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-06 19:40:38 +0000
commitdf24801a5f097731470ff8835f5c8de5eb2d3b77 (patch)
tree1549674de068cee75c1c7d1122366397949bfd1e /gnu
parent92f1c99ecf1f56af47848c4531b876e2ce2a75a5 (diff)
Alpha support based on Chris Demetriou's <cgd@cs.cmu.edu> work
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/bfd/coff-alpha.c42
-rw-r--r--gnu/usr.bin/binutils/bfd/config.bfd8
-rw-r--r--gnu/usr.bin/binutils/bfd/configure2
-rw-r--r--gnu/usr.bin/binutils/bfd/configure.in2
-rw-r--r--gnu/usr.bin/binutils/bfd/ecoff.c4
-rw-r--r--gnu/usr.bin/binutils/bfd/targets.c4
-rw-r--r--gnu/usr.bin/binutils/include/coff/alpha.h3
-rw-r--r--gnu/usr.bin/binutils/include/coff/ecoff.h1
8 files changed, 64 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils/bfd/coff-alpha.c b/gnu/usr.bin/binutils/bfd/coff-alpha.c
index 5323de404d3..b7a41b572c4 100644
--- a/gnu/usr.bin/binutils/bfd/coff-alpha.c
+++ b/gnu/usr.bin/binutils/bfd/coff-alpha.c
@@ -2397,3 +2397,45 @@ const bfd_target ecoffalpha_little_vec =
(PTR) &alpha_ecoff_backend_data
};
+
+const bfd_target bsd_ecoffalpha_little_vec =
+{
+ "bsd-ecoff-littlealpha", /* name */
+ bfd_target_ecoff_flavour,
+ BFD_ENDIAN_LITTLE, /* data byte order is little */
+ BFD_ENDIAN_LITTLE, /* header byte order is little */
+
+ (HAS_RELOC | EXEC_P | /* object flags */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
+ 0, /* leading underscore */
+ ' ', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+
+ {_bfd_dummy_target, alpha_ecoff_object_p, /* bfd_check_format */
+ _bfd_ecoff_archive_p, _bfd_dummy_target},
+ {bfd_false, _bfd_ecoff_mkobject, /* bfd_set_format */
+ _bfd_generic_mkarchive, bfd_false},
+ {bfd_false, _bfd_ecoff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
+ BFD_JUMP_TABLE_COPY (_bfd_ecoff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (alpha_ecoff),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
+ BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
+ BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
+ BFD_JUMP_TABLE_LINK (_bfd_ecoff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ (PTR) &alpha_ecoff_backend_data
+};
diff --git a/gnu/usr.bin/binutils/bfd/config.bfd b/gnu/usr.bin/binutils/bfd/config.bfd
index ab2472f15e1..0ba80caf4d4 100644
--- a/gnu/usr.bin/binutils/bfd/config.bfd
+++ b/gnu/usr.bin/binutils/bfd/config.bfd
@@ -47,6 +47,14 @@ case "${targ}" in
targ_defvec=ecoffalpha_little_vec
targ_selvecs=nlm32_alpha_vec
;;
+ alpha-*-netbsd*)
+ targ_defvec=bsd_ecoffalpha_little_vec
+ targ_selvecs=ecoffalpha_little_vec
+ ;;
+ alpha-*-openbsd*)
+ targ_defvec=bsd_ecoffalpha_little_vec
+ targ_selvecs=ecoffalpha_little_vec
+ ;;
alpha-*-linuxecoff*)
targ_defvec=ecoffalpha_little_vec
targ_selvecs=bfd_elf64_alpha_vec
diff --git a/gnu/usr.bin/binutils/bfd/configure b/gnu/usr.bin/binutils/bfd/configure
index 1e56e87bd28..3c55f395105 100644
--- a/gnu/usr.bin/binutils/bfd/configure
+++ b/gnu/usr.bin/binutils/bfd/configure
@@ -1947,6 +1947,8 @@ do
target64=true ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.o elf64.o $elf"
target64=true ;;
+ bsd_ecoffalpha_little_vec) tb="$tb coff-alpha.o ecoff.o ecofflink.o"
+ target64=true ;;
cisco_core_vec) tb="$tb cisco-core.o" ;;
demo_64_vec) tb="$tb demo64.o aout64.o"
target64=true ;;
diff --git a/gnu/usr.bin/binutils/bfd/configure.in b/gnu/usr.bin/binutils/bfd/configure.in
index 19d37ff0585..180aba21699 100644
--- a/gnu/usr.bin/binutils/bfd/configure.in
+++ b/gnu/usr.bin/binutils/bfd/configure.in
@@ -474,6 +474,8 @@ do
target64=true ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.o elf64.o $elf"
target64=true ;;
+ bsd_ecoffalpha_little_vec) tb="$tb coff-alpha.o ecoff.o ecofflink.o"
+ target64=true ;;
cisco_core_vec) tb="$tb cisco-core.o" ;;
demo_64_vec) tb="$tb demo64.o aout64.o"
target64=true ;;
diff --git a/gnu/usr.bin/binutils/bfd/ecoff.c b/gnu/usr.bin/binutils/bfd/ecoff.c
index 63fed728750..90928c7b463 100644
--- a/gnu/usr.bin/binutils/bfd/ecoff.c
+++ b/gnu/usr.bin/binutils/bfd/ecoff.c
@@ -209,6 +209,7 @@ _bfd_ecoff_set_arch_mach_hook (abfd, filehdr)
break;
case ALPHA_MAGIC:
+ case ALPHA_MAGIC_BSD:
arch = bfd_arch_alpha;
mach = 0;
break;
@@ -257,7 +258,8 @@ ecoff_get_magic (abfd)
return bfd_big_endian (abfd) ? big : little;
case bfd_arch_alpha:
- return ALPHA_MAGIC;
+ return (abfd->xvec == &bsd_ecoffalpha_little_vec
+ ? ALPHA_MAGIC_BSD : ALPHA_MAGIC);
default:
abort ();
diff --git a/gnu/usr.bin/binutils/bfd/targets.c b/gnu/usr.bin/binutils/bfd/targets.c
index 99a39dc7558..857265c44a9 100644
--- a/gnu/usr.bin/binutils/bfd/targets.c
+++ b/gnu/usr.bin/binutils/bfd/targets.c
@@ -501,6 +501,7 @@ extern const bfd_target bfd_elf32_sparc_vec;
extern const bfd_target bfd_elf64_big_generic_vec;
extern const bfd_target bfd_elf64_little_generic_vec;
extern const bfd_target bfd_elf64_sparc_vec;
+extern const bfd_target bsd_ecoffalpha_little_vec;
extern const bfd_target demo_64_vec;
extern const bfd_target ecoff_big_vec;
extern const bfd_target ecoff_little_vec;
@@ -649,6 +650,9 @@ const bfd_target * const bfd_target_vector[] = {
#if 0
&bfd_elf64_sparc_vec,
#endif
+#if 0
+ &bsd_ecoffalpha_little_vec,
+#endif
/* We don't include cisco_core_vec. Although it has a magic number,
the magic number isn't at the beginning of the file, and thus
might spuriously match other kinds of files. */
diff --git a/gnu/usr.bin/binutils/include/coff/alpha.h b/gnu/usr.bin/binutils/include/coff/alpha.h
index b4466928905..438a8fca81d 100644
--- a/gnu/usr.bin/binutils/include/coff/alpha.h
+++ b/gnu/usr.bin/binutils/include/coff/alpha.h
@@ -14,7 +14,8 @@ struct external_filehdr {
};
/* Magic numbers are defined in coff/ecoff.h. */
-#define ALPHA_ECOFF_BADMAG(x) ((x).f_magic!=ALPHA_MAGIC)
+#define ALPHA_ECOFF_BADMAG(x) \
+ ((x).f_magic != ALPHA_MAGIC && (x).f_magic != ALPHA_MAGIC_BSD)
/* The object type is encoded in the f_flags. */
#define F_ALPHA_OBJECT_TYPE_MASK 0x3000
diff --git a/gnu/usr.bin/binutils/include/coff/ecoff.h b/gnu/usr.bin/binutils/include/coff/ecoff.h
index 3710c7329e5..9e4202e4757 100644
--- a/gnu/usr.bin/binutils/include/coff/ecoff.h
+++ b/gnu/usr.bin/binutils/include/coff/ecoff.h
@@ -24,6 +24,7 @@
/* Alpha magic numbers used in filehdr. */
#define ALPHA_MAGIC 0x183
+#define ALPHA_MAGIC_BSD 0x185
/* Magic numbers used in a.out header. */
#define ECOFF_AOUT_OMAGIC 0407 /* not demand paged (ld -N). */