diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-10-06 19:40:38 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-10-06 19:40:38 +0000 |
commit | df24801a5f097731470ff8835f5c8de5eb2d3b77 (patch) | |
tree | 1549674de068cee75c1c7d1122366397949bfd1e /gnu/usr.bin/binutils/bfd | |
parent | 92f1c99ecf1f56af47848c4531b876e2ce2a75a5 (diff) |
Alpha support based on Chris Demetriou's <cgd@cs.cmu.edu> work
Diffstat (limited to 'gnu/usr.bin/binutils/bfd')
-rw-r--r-- | gnu/usr.bin/binutils/bfd/coff-alpha.c | 42 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/bfd/config.bfd | 8 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/bfd/configure | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/bfd/configure.in | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/bfd/ecoff.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/bfd/targets.c | 4 |
6 files changed, 61 insertions, 1 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. */ |