From 01dd1b2b474c599efacfa7e6740172e4db0f0ee4 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Mon, 28 Oct 1991 01:08:51 +0000 Subject: Sun Oct 27 16:56:58 1991 Steve Chamberlain (steve at cygnus.com) * configure.in: add motorola delta88 cases * libbfd.h, libbfd-in.h, archive.c, ieee.c, elf.c, srec.c: fix write_armap prototype * libbfd.c: add doc on bfd_write_bigendian_4byte_int --- bfd/ChangeLog | 7 +++++++ bfd/configure.in | 7 +++++++ bfd/ieee.c | 16 ++++++++-------- bfd/libbfd-in.h | 16 +++++++++++++--- bfd/libbfd.h | 37 +++++++++++++++++++++++++++---------- 5 files changed, 62 insertions(+), 21 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1916fef..b0b7e17 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +Sun Oct 27 16:56:58 1991 Steve Chamberlain (steve at cygnus.com) + + * configure.in: add motorola delta88 cases + * libbfd.h, libbfd-in.h, archive.c, ieee.c, elf.c, srec.c: fix + write_armap prototype + * libbfd.c: add doc on bfd_write_bigendian_4byte_int + Fri Oct 25 02:48:19 1991 John Gilmore (gnu at cygnus.com) * Rename COFF-related files in `coff-ARCH.c' form. diff --git a/bfd/configure.in b/bfd/configure.in index b1c241b..138a467 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -22,6 +22,8 @@ mips) m88k) case "${host_vendor}" in + motorola) + my_host=delta88 ;; *) case "${host_os}" in dgux) my_host=dgux ;; @@ -178,6 +180,11 @@ none|nyu|sco) tahoe | vax) bfd_target=${target_cpu} ;; esac ;; +motorola) + case "${target_cpu}" in + m88k) bfd_target=m88kbcs ;; + esac + ;; *) case "${target_cpu}" in tahoe | vax) bfd_target=${target_cpu} ;; diff --git a/bfd/ieee.c b/bfd/ieee.c index d6ed3ad..b433027 100644 --- a/bfd/ieee.c +++ b/bfd/ieee.c @@ -22,8 +22,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ token (which is one byte in this lexicon) lookahead recursive decent parser. */ -#include #include "bfd.h" +#include "sysdep.h" #include "libbfd.h" #include "ieee.h" #include "libieee.h" @@ -1110,7 +1110,7 @@ DEFUN(ieee_object_p,(abfd), /* Determine the architecture and machine type of the object file. */ { - bfd_arch_info_struct_type *arch = bfd_scan_arch(processor); + bfd_arch_info_type *arch = bfd_scan_arch(processor); if (arch == 0) goto fail; abfd->arch_info = arch; } @@ -1174,22 +1174,22 @@ DEFUN(ieee_print_symbol,(ignore_abfd, afile, symbol, how), bfd *ignore_abfd AND PTR afile AND asymbol *symbol AND - bfd_print_symbol_enum_type how) + bfd_print_symbol_type how) { FILE *file = (FILE *)afile; switch (how) { - case bfd_print_symbol_name_enum: + case bfd_print_symbol_name: fprintf(file,"%s", symbol->name); break; - case bfd_print_symbol_type_enum: + case bfd_print_symbol_more: #if 0 fprintf(file,"%4x %2x",aout_symbol(symbol)->desc & 0xffff, aout_symbol(symbol)->other & 0xff); #endif BFD_FAIL(); break; - case bfd_print_symbol_all_enum: + case bfd_print_symbol_all: { CONST char *section_name = symbol->section == (asection *)NULL ? "*abs" : symbol->section->name; @@ -2905,7 +2905,7 @@ DEFUN(ieee_bfd_debug_info_accumulate,(abfd, section), #define ieee_slurp_armap bfd_true #define ieee_slurp_extended_name_table bfd_true #define ieee_truncate_arname (void (*)())bfd_nullvoidptr -#define ieee_write_armap (FOO( boolean, (*),(bfd *, unsigned int, struct orl *, int, int))) bfd_nullvoidptr +#define ieee_write_armap (FOO( boolean, (*),(bfd *, unsigned int, struct orl *, unsigned int, int))) bfd_nullvoidptr #define ieee_get_lineno (struct lineno_cache_entry *(*)())bfd_nullvoidptr #define ieee_close_and_cleanup bfd_generic_close_and_cleanup #define ieee_set_arch_mach bfd_default_set_arch_mach @@ -2914,7 +2914,7 @@ DEFUN(ieee_bfd_debug_info_accumulate,(abfd, section), bfd_target ieee_vec = { "ieee", /* name */ - bfd_target_ieee_flavour_enum, + bfd_target_ieee_flavour, true, /* target byte order */ true, /* target headers byte order */ (HAS_RELOC | EXEC_P | /* object flags */ diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h index 57d8f7e..3114d05 100644 --- a/bfd/libbfd-in.h +++ b/bfd/libbfd-in.h @@ -21,6 +21,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. */ +#define ALIGN(this, boundary) \ + ((( (this) + ((boundary) -1)) & (~((boundary)-1)))) + /* If you want to read and write large blocks, you might want to do it in quanta of this amount */ #define DEFAULT_BUFFERSIZE 8192 @@ -129,10 +134,10 @@ PROTO (void, bfd_gnu_truncate_arname, (bfd *abfd, CONST char *filename, char *hdr)); PROTO (boolean, bsd_write_armap, (bfd *arch, unsigned int elength, - struct orl *map, int orl_count, int stridx)); + struct orl *map, unsigned int orl_count, int stridx)); PROTO (boolean, coff_write_armap, (bfd *arch, unsigned int elength, - struct orl *map, int orl_count, int stridx)); + struct orl *map, unsigned int orl_count, int stridx)); PROTO (bfd *, bfd_generic_openr_next_archived_file, (bfd *archive, bfd *last_file)); @@ -140,7 +145,12 @@ PROTO (bfd *, bfd_generic_openr_next_archived_file, (bfd *archive, PROTO(int, bfd_generic_stat_arch_elt, (bfd *, struct stat *)); PROTO(boolean, bfd_generic_get_section_contents, - (bfd *abfd, sec_ptr section, PTR location, file_ptr offset, bfd_size_type count)); + (bfd *abfd, sec_ptr section, PTR location, file_ptr offset, + bfd_size_type count)); + +PROTO(boolean, bfd_generic_set_section_contents, + (bfd *abfd, sec_ptr section, PTR location, file_ptr offset, + bfd_size_type count)); /* Macros to tell if bfds are read or write enabled. diff --git a/bfd/libbfd.h b/bfd/libbfd.h index c358a9b..5dd471d 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -21,6 +21,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Align an address upward to a boundary, expressed as a number of bytes. + E.g. align to an 8-byte boundary with argument of 8. */ +#define ALIGN(this, boundary) \ + ((( (this) + ((boundary) -1)) & (~((boundary)-1)))) + /* If you want to read and write large blocks, you might want to do it in quanta of this amount */ #define DEFAULT_BUFFERSIZE 8192 @@ -129,10 +134,10 @@ PROTO (void, bfd_gnu_truncate_arname, (bfd *abfd, CONST char *filename, char *hdr)); PROTO (boolean, bsd_write_armap, (bfd *arch, unsigned int elength, - struct orl *map, int orl_count, int stridx)); + struct orl *map, unsigned int orl_count, int stridx)); PROTO (boolean, coff_write_armap, (bfd *arch, unsigned int elength, - struct orl *map, int orl_count, int stridx)); + struct orl *map, unsigned int orl_count, int stridx)); PROTO (bfd *, bfd_generic_openr_next_archived_file, (bfd *archive, bfd *last_file)); @@ -140,7 +145,12 @@ PROTO (bfd *, bfd_generic_openr_next_archived_file, (bfd *archive, PROTO(int, bfd_generic_stat_arch_elt, (bfd *, struct stat *)); PROTO(boolean, bfd_generic_get_section_contents, - (bfd *abfd, sec_ptr section, PTR location, file_ptr offset, bfd_size_type count)); + (bfd *abfd, sec_ptr section, PTR location, file_ptr offset, + bfd_size_type count)); + +PROTO(boolean, bfd_generic_set_section_contents, + (bfd *abfd, sec_ptr section, PTR location, file_ptr offset, + bfd_size_type count)); /* Macros to tell if bfds are read or write enabled. @@ -194,7 +204,14 @@ bfd_init has been called. */ /*:libbfd.c*/ -/* *i bfd_log2 +/* bfd_write_bigendian_4byte_int +*/ + + PROTO(void, bfd_write_bigendian_4byte_int,( bfd *abfd, int i)); + +/* + +*i bfd_log2 Return the log base 2 of the value supplied, rounded up. eg an arg of 1025 would return 11. */ @@ -285,7 +302,7 @@ one first, to avoid running out of file descriptors. What bfds are seeded with */ -extern bfd_arch_info_struct_type bfd_default_arch_struct; +extern bfd_arch_info_type bfd_default_arch_struct; /* bfd_default_set_arch_mach @@ -313,7 +330,7 @@ all installed architecture packages and getting them to poke around. Link the provided arch info structure into the list */ - void EXFUN(bfd_arch_linkin,(bfd_arch_info_struct_type *)); + void EXFUN(bfd_arch_linkin,(bfd_arch_info_type *)); /* @@ -322,9 +339,9 @@ Link the provided arch info structure into the list The default function for testing for compatibility */ - CONST bfd_arch_info_struct_type *EXFUN(bfd_default_compatible, - (CONST bfd_arch_info_struct_type *a, - CONST bfd_arch_info_struct_type *b)); + CONST bfd_arch_info_type *EXFUN(bfd_default_compatible, + (CONST bfd_arch_info_type *a, + CONST bfd_arch_info_type *b)); /* @@ -333,7 +350,7 @@ The default function for working out whether this is an architecture hit and a machine hit */ - boolean EXFUN(bfd_default_scan,(CONST struct bfd_arch_info_struct *, CONST char *)); + boolean EXFUN(bfd_default_scan,(CONST struct bfd_arch_info *, CONST char *)); /* */ -- cgit v1.1