diff -upr --new-file binutils-2.9.5.0.31/ChangeLog binutils-2.9.5.0.32/ChangeLog --- binutils-2.9.5.0.31/ChangeLog Sun Mar 12 09:31:32 2000 +++ binutils-2.9.5.0.32/ChangeLog Fri Mar 31 09:16:04 2000 @@ -1,3 +1,7 @@ +2000-03-29 Jason Merrill + + * configure.in: -linux-gnu*, not -linux-gnu. + 2000-03-10 H.J. Lu * Makefile.in (all-gcc): Backed out the last change. @@ -44,6 +48,11 @@ Thu Feb 24 16:15:56 2000 Andrew Cagney 2000-02-20 Christopher Faylor * config.guess: Guess "cygwin" rather than "cygwin32". + +2000-02-16 Kaveh R. Ghazi + + * configure (gcc_version): When setting, narrow search to + lines containing `version_string'. 2000-01-06 Geoff Keating diff -upr --new-file binutils-2.9.5.0.31/bfd/ChangeLog binutils-2.9.5.0.32/bfd/ChangeLog --- binutils-2.9.5.0.31/bfd/ChangeLog Sun Mar 19 11:54:20 2000 +++ binutils-2.9.5.0.32/bfd/ChangeLog Fri Mar 31 09:16:15 2000 @@ -1,3 +1,50 @@ +2000-03-31 Thomas de Lellis + + * srec.c : Set CHUNK size to 16 bytes to prevent download failures + on some targets. + * ihex.c : Ditto. + +Wed Mar 30 15:28:00 2000 Donald Lindsay + + * elf32-m32r.c (m32r_elf_generic_reloc): new function. All + HOWTO references to bfd_elf_generic_reloc, that have + partial_inplace == true, now use the new function. The function + is based on the recent rewrite of m32r_elf_lo16_reloc(), and + extends its fixes to the R_M32R_{16,24,32} relocs. + The new logic in m32r_elf_lo16_reloc() has been removed, and + it instead calls the new routine to obtain that functionality. + +2000-03-27 Alan Modra + + * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook, + elf32_avr_check_relocs, avr_final_link_relocate, + elf32_avr_relocate_section, bfd_elf_avr_final_write_processing, + elf32_avr_object_p): Add prototypes. + (elf32_avr_gc_mark_hook): Add default for h->root.type. + (bfd_elf_avr_final_write_processing): Make static. + +2000-03-27 Denis Chertykov + + * cpu-avr.c: New file. BFD support routines for AVR architecture. + * archures.c (bfd_architecture): Add AVR architecture. + (bfd_archures_list): Add reference to AVR architecture info. + * elf.c (prep_headers): Handle bfd_arch_avr. + * reloc.c: Add various AVR relocation enums. + * targets.c (bfd_elf32_avr_vec): Declare and add to target vector + list. + * Makefile.am: Add support for AVR elf. + * configure.in: Likewise. + * config.bfd: Likewise. + * Makefile.in: Regenerate. + * configure: This too. + * bfd-in2.h: And this. + * libbfd.h: And this. + +2000-03-24 H.J. Lu + + * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype. + (elf64_alpha_find_reloc_at_ofs): Likewise. + 2000-03-17 Alan Modra * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield, @@ -381,6 +428,30 @@ Fri Feb 25 18:39:26 2000 Rodney Brown ( * coff-rs6000.c (xcoff_howto_table_16): New variable. (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs. + +2000-02-18 Ulrich Drepper + + * coff-rs6000.c (XCOFFARMAGBIG): New macro. + (xcoff_ar_file_hdr_big): New structure. + (SIZEOF_AR_FILE_HDR_BIG): New macro. + (xcoff_ar_hdr_big): New structure. + (SIZEOF_AR_HDR_BIG): New macro. + (xcoff_big_format_p): New macro. + (xcoff_ardata_big): New macro. + (arch_xhdr_big): New macro. + (xcoff_slurp_armap): Handle large archives. + (xcoff_archive_p): Detect large archives. + (xcoff_read_ar_hdr): Handle large archives. + (xcoff_openr_next_archived_file): Handle large archives. + (xcoff_generic_stat_arch_elt): Handle large archives. + (xcoff_write_armap_old): Rename from xcoff_write_armap. + (xcoff_write_armap_big): New function. + (xcoff_write_armap): New function, dispatch to _old or _big. + (xcoff_write_archive_contents_old): Rename from + xcoff_write_archive_contents. + (xcoff_write_archive_contents_big): New function. + (xcoff_write_archive_contents): New function, dispatch to _old or + _big. 2000-02-18 Richard Henderson diff -upr --new-file binutils-2.9.5.0.31/bfd/ChangeLog.linux binutils-2.9.5.0.32/bfd/ChangeLog.linux --- binutils-2.9.5.0.31/bfd/ChangeLog.linux Sun Mar 19 11:52:01 2000 +++ binutils-2.9.5.0.32/bfd/ChangeLog.linux Fri Mar 31 09:28:45 2000 @@ -1,3 +1,8 @@ +2000-03-22 H.J. Lu + + * cache.c (bfd_open_file): Unlink the output file only if + it has none zero size. + 2000-03-10 Ken Block USG * elf64-alpha.c (elf64_alpha_check_relocs): Don't count the diff -upr --new-file binutils-2.9.5.0.31/bfd/Makefile.am binutils-2.9.5.0.32/bfd/Makefile.am --- binutils-2.9.5.0.31/bfd/Makefile.am Tue Feb 29 11:15:14 2000 +++ binutils-2.9.5.0.32/bfd/Makefile.am Fri Mar 31 09:28:45 2000 @@ -41,6 +41,7 @@ ALL_MACHINES = \ cpu-alpha.lo \ cpu-arc.lo \ cpu-arm.lo \ + cpu-avr.lo \ cpu-d10v.lo \ cpu-d30v.lo \ cpu-fr30.lo \ @@ -77,6 +78,7 @@ ALL_MACHINES_CFILES = \ cpu-alpha.c \ cpu-arc.c \ cpu-arm.c \ + cpu-avr.c \ cpu-d10v.c \ cpu-d30v.c \ cpu-fr30.c \ @@ -157,6 +159,7 @@ BFD32_BACKENDS = \ elf32-arc.lo \ elfarm-oabi.lo \ elfarm-nabi.lo \ + elf32-avr.lo \ elf32-d10v.lo \ elf32-d30v.lo \ elf32-fr30.lo \ @@ -286,6 +289,7 @@ BFD32_BACKENDS_CFILES = \ elf32-arc.c \ elfarm-oabi.c \ elfarm-nabi.c \ + elf32-avr.c \ elf32-d10v.c \ elf32-d30v.c \ elf32-fr30.c \ @@ -693,6 +697,7 @@ cpu-a29k.lo: cpu-a29k.c cpu-alpha.lo: cpu-alpha.c cpu-arc.lo: cpu-arc.c cpu-arm.lo: cpu-arm.c +cpu-avr.lo: cpu-avr.c cpu-d10v.lo: cpu-d10v.c cpu-d30v.lo: cpu-d30v.c cpu-fr30.lo: cpu-fr30.c @@ -851,6 +856,9 @@ elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-arm.h \ elf32-target.h +elf32-avr.lo: elf32-avr.c elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-d10v.lo: elf32-d10v.c elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ elf32-target.h diff -upr --new-file binutils-2.9.5.0.31/bfd/Makefile.in binutils-2.9.5.0.32/bfd/Makefile.in --- binutils-2.9.5.0.31/bfd/Makefile.in Tue Feb 29 11:15:14 2000 +++ binutils-2.9.5.0.32/bfd/Makefile.in Fri Mar 31 09:28:45 2000 @@ -156,6 +156,7 @@ ALL_MACHINES = \ cpu-alpha.lo \ cpu-arc.lo \ cpu-arm.lo \ + cpu-avr.lo \ cpu-d10v.lo \ cpu-d30v.lo \ cpu-fr30.lo \ @@ -193,6 +194,7 @@ ALL_MACHINES_CFILES = \ cpu-alpha.c \ cpu-arc.c \ cpu-arm.c \ + cpu-avr.c \ cpu-d10v.c \ cpu-d30v.c \ cpu-fr30.c \ @@ -274,6 +276,7 @@ BFD32_BACKENDS = \ elf32-arc.lo \ elfarm-oabi.lo \ elfarm-nabi.lo \ + elf32-avr.lo \ elf32-d10v.lo \ elf32-d30v.lo \ elf32-fr30.lo \ @@ -404,6 +407,7 @@ BFD32_BACKENDS_CFILES = \ elf32-arc.c \ elfarm-oabi.c \ elfarm-nabi.c \ + elf32-avr.c \ elf32-d10v.c \ elf32-d30v.c \ elf32-fr30.c \ @@ -1221,6 +1225,7 @@ cpu-a29k.lo: cpu-a29k.c cpu-alpha.lo: cpu-alpha.c cpu-arc.lo: cpu-arc.c cpu-arm.lo: cpu-arm.c +cpu-avr.lo: cpu-avr.c cpu-d10v.lo: cpu-d10v.c cpu-d30v.lo: cpu-d30v.c cpu-fr30.lo: cpu-fr30.c @@ -1379,6 +1384,9 @@ elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-arm.h \ elf32-target.h +elf32-avr.lo: elf32-avr.c elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-d10v.lo: elf32-d10v.c elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ elf32-target.h diff -upr --new-file binutils-2.9.5.0.31/bfd/archures.c binutils-2.9.5.0.32/bfd/archures.c --- binutils-2.9.5.0.31/bfd/archures.c Fri Feb 25 13:39:22 2000 +++ binutils-2.9.5.0.32/bfd/archures.c Fri Mar 31 09:28:45 2000 @@ -199,6 +199,11 @@ DESCRIPTION .#define bfd_mach_fr30 0x46523330 . bfd_arch_mcore, . bfd_arch_pj, +. bfd_arch_avr, {* Atmel AVR microcontrollers *} +.#define bfd_mach_avr1 1 +.#define bfd_mach_avr2 2 +.#define bfd_mach_avr3 3 +.#define bfd_mach_avr4 4 . bfd_arch_last . }; @@ -271,6 +276,7 @@ extern const bfd_arch_info_type bfd_w65_ extern const bfd_arch_info_type bfd_v850_arch; extern const bfd_arch_info_type bfd_fr30_arch; extern const bfd_arch_info_type bfd_mcore_arch; +extern const bfd_arch_info_type bfd_avr_arch; static const bfd_arch_info_type * const bfd_archures_list[] = { @@ -309,7 +315,8 @@ static const bfd_arch_info_type * const &bfd_w65_arch, &bfd_v850_arch, &bfd_fr30_arch, - & bfd_mcore_arch, + &bfd_mcore_arch, + &bfd_avr_arch, #endif 0 }; diff -upr --new-file binutils-2.9.5.0.31/bfd/bfd-in2.h binutils-2.9.5.0.32/bfd/bfd-in2.h --- binutils-2.9.5.0.31/bfd/bfd-in2.h Sun Mar 19 12:07:54 2000 +++ binutils-2.9.5.0.32/bfd/bfd-in2.h Fri Mar 31 09:28:45 2000 @@ -1415,6 +1415,11 @@ enum bfd_architecture #define bfd_mach_fr30 0x46523330 bfd_arch_mcore, bfd_arch_pj, + bfd_arch_avr, /* Atmel AVR microcontrollers */ +#define bfd_mach_avr1 1 +#define bfd_mach_avr2 2 +#define bfd_mach_avr3 3 +#define bfd_mach_avr4 4 bfd_arch_last }; @@ -2302,6 +2307,74 @@ short offset into 11 bits. */ BFD_RELOC_MCORE_PCREL_32, BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2, BFD_RELOC_MCORE_RVA, + +/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative +short offset into 7 bits. */ + BFD_RELOC_AVR_7_PCREL, + +/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative +short offset into 12 bits. */ + BFD_RELOC_AVR_13_PCREL, + +/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually +program memory address) into 16 bits. */ + BFD_RELOC_AVR_16_PM, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually +data memory address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_LO8_LDI, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit +of data memory address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HI8_LDI, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit +of program memory address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HH8_LDI, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(usually data memory address) into 8 bit immediate value of SUBI insn. */ + BFD_RELOC_AVR_LO8_LDI_NEG, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(high 8 bit of data memory address) into 8 bit immediate value of +SUBI insn. */ + BFD_RELOC_AVR_HI8_LDI_NEG, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(most high 8 bit of program memory address) into 8 bit immediate value +of LDI or SUBI insn. */ + BFD_RELOC_AVR_HH8_LDI_NEG, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually +command address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_LO8_LDI_PM, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit +of command address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HI8_LDI_PM, + +/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit +of command address) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_HH8_LDI_PM, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(usually command address) into 8 bit immediate value of SUBI insn. */ + BFD_RELOC_AVR_LO8_LDI_PM_NEG, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(high 8 bit of 16 bit command address) into 8 bit immediate value +of SUBI insn. */ + BFD_RELOC_AVR_HI8_LDI_PM_NEG, + +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value +(high 6 bit of 22 bit command address) into 8 bit immediate +value of SUBI insn. */ + BFD_RELOC_AVR_HH8_LDI_PM_NEG, + +/* This is a 32 bit reloc for the AVR that stores 23 bit value +into 22 bits. */ + BFD_RELOC_AVR_CALL, /* These two relocations are used by the linker to determine which of the entries in a C++ virtual function table are actually used. When diff -upr --new-file binutils-2.9.5.0.31/bfd/cache.c binutils-2.9.5.0.32/bfd/cache.c --- binutils-2.9.5.0.31/bfd/cache.c Thu Jun 3 11:01:52 1999 +++ binutils-2.9.5.0.32/bfd/cache.c Fri Mar 31 09:28:45 2000 @@ -287,8 +287,11 @@ bfd_open_file (abfd) { /* Create the file. Unlink it first, for the convenience of operating systems which worry about overwriting running - binaries. */ - unlink (abfd->filename); + binaries. For security reasons, unlink the output file + only if it has none zero size. */ + struct stat buf; + if (stat (abfd->filename, &buf) == 0 && buf.st_size != 0) + unlink (abfd->filename); abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WB); abfd->opened_once = true; } diff -upr --new-file binutils-2.9.5.0.31/bfd/config.bfd binutils-2.9.5.0.32/bfd/config.bfd --- binutils-2.9.5.0.31/bfd/config.bfd Tue Feb 29 11:15:14 2000 +++ binutils-2.9.5.0.32/bfd/config.bfd Fri Mar 31 09:28:45 2000 @@ -175,6 +175,10 @@ case "${targ}" in targ_underscore=yes ;; + avr-*-*) + targ_defvec=bfd_elf32_avr_vec + ;; + c30-*-*aout* | tic30-*-*aout*) targ_defvec=tic30_aout_vec ;; diff -upr --new-file binutils-2.9.5.0.31/bfd/configure binutils-2.9.5.0.32/bfd/configure --- binutils-2.9.5.0.31/bfd/configure Sun Mar 19 12:07:25 2000 +++ binutils-2.9.5.0.32/bfd/configure Fri Mar 31 09:29:15 2000 @@ -1061,7 +1061,7 @@ fi PACKAGE=bfd -VERSION=2.9.5.0.31 +VERSION=2.9.5.0.32 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -5080,6 +5080,7 @@ do b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf" target64=true ;; + bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; @@ -5297,17 +5298,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5301: checking for $ac_hdr" >&5 +echo "configure:5302: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5336,12 +5337,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5340: checking for $ac_func" >&5 +echo "configure:5341: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5389,7 +5390,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:5393: checking for working mmap" >&5 +echo "configure:5394: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5397,7 +5398,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -5562,12 +5563,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5566: checking for $ac_func" >&5 +echo "configure:5567: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff -upr --new-file binutils-2.9.5.0.31/bfd/configure.in binutils-2.9.5.0.32/bfd/configure.in --- binutils-2.9.5.0.31/bfd/configure.in Sun Mar 19 12:07:25 2000 +++ binutils-2.9.5.0.32/bfd/configure.in Fri Mar 31 09:29:15 2000 @@ -7,7 +7,7 @@ AC_INIT(libbfd.c) AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(bfd, 2.9.5.0.31) +AM_INIT_AUTOMAKE(bfd, 2.9.5.0.32) dnl These must be called before AM_PROG_LIBTOOL, because it may want dnl to call AC_CHECK_PROG. @@ -439,6 +439,7 @@ do b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf" target64=true ;; + bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; diff -upr --new-file binutils-2.9.5.0.31/bfd/cpu-avr.c binutils-2.9.5.0.32/bfd/cpu-avr.c --- binutils-2.9.5.0.31/bfd/cpu-avr.c Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/bfd/cpu-avr.c Fri Mar 31 09:16:47 2000 @@ -0,0 +1,89 @@ +/* BFD library support routines for the AVR architecture. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Contributed by Denis Chertykov + +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. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" + + +static const bfd_arch_info_type *compatible + PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); + + +#define N(addr_bits, machine, print, default, next) \ +{ \ + 8, /* 8 bits in a word */ \ + addr_bits, /* bits in an address */ \ + 8, /* 8 bits in a byte */ \ + bfd_arch_avr, \ + machine, /* machine */ \ + "avr", /* arch_name */ \ + print, /* printable name */ \ + 1, /* section align power */ \ + default, /* the default machine */ \ + compatible, \ + bfd_default_scan, \ + next \ +} + +static const bfd_arch_info_type arch_info_struct[] = +{ + /* AT90S1200 */ + N (16, bfd_mach_avr1, "avr:1", false, & arch_info_struct[1]), + + /* AT90S2xxx, AT90S4xxx, AT90S81xx, ATtiny22 */ + N (16, bfd_mach_avr2, "avr:2", false, & arch_info_struct[2]), + + /* ATmega103, ATmega603 */ + N (22, bfd_mach_avr3, "avr:3", false, & arch_info_struct[3]), + + /* ATmega161 */ + N (16, bfd_mach_avr4, "avr:4", false, NULL) +}; + +const bfd_arch_info_type bfd_avr_arch = + N (16, bfd_mach_avr2, "avr", true, & arch_info_struct[0]); + +/* This routine is provided two arch_infos and works out which AVR + machine which would be compatible with both and returns a pointer + to its info structure. */ + +static const bfd_arch_info_type * +compatible (a,b) + const bfd_arch_info_type * a; + const bfd_arch_info_type * b; +{ + /* If a & b are for different architectures we can do nothing. */ + if (a->arch != b->arch) + return NULL; + + /* Special case for ATmega[16]03 (avr:3) and ATmega161 (avr:4). */ + if ((a->mach == 3 && b->mach == 4) + || (a->mach == 4 && b->mach == 3)) + return NULL; + + /* So far all newer AVR architecture cores are supersets of previous + cores. */ + if (a->mach <= b->mach) + return b; + + /* Never reached! */ + return NULL; +} diff -upr --new-file binutils-2.9.5.0.31/bfd/elf.c binutils-2.9.5.0.32/bfd/elf.c --- binutils-2.9.5.0.31/bfd/elf.c Sun Mar 12 09:40:13 2000 +++ binutils-2.9.5.0.32/bfd/elf.c Fri Mar 31 09:28:45 2000 @@ -3276,6 +3276,9 @@ prep_headers (abfd) case bfd_arch_mcore: i_ehdrp->e_machine = EM_MCORE; break; + case bfd_arch_avr: + i_ehdrp->e_machine = EM_AVR; + break; case bfd_arch_v850: switch (bfd_get_mach (abfd)) { diff -upr --new-file binutils-2.9.5.0.31/bfd/elf32-avr.c binutils-2.9.5.0.32/bfd/elf32-avr.c --- binutils-2.9.5.0.31/bfd/elf32-avr.c Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/bfd/elf32-avr.c Fri Mar 31 09:16:47 2000 @@ -0,0 +1,963 @@ +/* AVR-specific support for 32-bit ELF + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Contributed by Denis Chertykov + +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. */ + + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" +#include "elf-bfd.h" +#include "elf/avr.h" + +static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup + PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); +static void avr_info_to_howto_rela + PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *)); +static asection *elf32_avr_gc_mark_hook + PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, + struct elf_link_hash_entry *, Elf_Internal_Sym *)); +static boolean elf32_avr_gc_sweep_hook + PARAMS ((bfd *, struct bfd_link_info *, asection *, + const Elf_Internal_Rela *)); +static boolean elf32_avr_check_relocs + PARAMS ((bfd *, struct bfd_link_info *, asection *, + const Elf_Internal_Rela *)); +static bfd_reloc_status_type avr_final_link_relocate + PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *, bfd_vma)); +static boolean elf32_avr_relocate_section + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); +static void bfd_elf_avr_final_write_processing PARAMS ((bfd *, boolean)); +static boolean elf32_avr_object_p PARAMS ((bfd *)); + + +/* Use RELA instead of REL */ +#undef USE_REL + +static reloc_howto_type elf_avr_howto_table[] = +{ + HOWTO (R_AVR_NONE, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_NONE", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + + HOWTO (R_AVR_32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_32", /* name */ + false, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A 7 bit PC relative relocation. */ + HOWTO (R_AVR_7_PCREL, /* type */ + 1, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 7, /* bitsize */ + true, /* pc_relative */ + 3, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_7_PCREL", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A 13 bit PC relative relocation. */ + HOWTO (R_AVR_13_PCREL, /* type */ + 1, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 13, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_13_PCREL", /* name */ + false, /* partial_inplace */ + 0xfff, /* src_mask */ + 0xfff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A 16 bit absolute relocation. */ + HOWTO (R_AVR_16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_16", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A 16 bit absolute relocation for command address. */ + HOWTO (R_AVR_16_PM, /* type */ + 1, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_16_PM", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A low 8 bit absolute relocation of 16 bit address. + For LDI command. */ + HOWTO (R_AVR_LO8_LDI, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_LO8_LDI", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A high 8 bit absolute relocation of 16 bit address. + For LDI command. */ + HOWTO (R_AVR_HI8_LDI, /* type */ + 8, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_HI8_LDI", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A high 6 bit absolute relocation of 22 bit address. + For LDI command. */ + HOWTO (R_AVR_HH8_LDI, /* type */ + 16, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_HH8_LDI", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A negative low 8 bit absolute relocation of 16 bit address. + For LDI command. */ + HOWTO (R_AVR_LO8_LDI_NEG, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_LO8_LDI_NEG", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A hegative high 8 bit absolute relocation of 16 bit address. + For LDI command. */ + HOWTO (R_AVR_HI8_LDI_NEG, /* type */ + 8, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_HI8_LDI_NEG", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A hegative high 6 bit absolute relocation of 22 bit address. + For LDI command. */ + HOWTO (R_AVR_HH8_LDI_NEG, /* type */ + 16, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_HH8_LDI_NEG", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A low 8 bit absolute relocation of 24 bit program memory address. + For LDI command. */ + HOWTO (R_AVR_LO8_LDI_PM, /* type */ + 1, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_LO8_LDI_PM", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A high 8 bit absolute relocation of 16 bit program memory address. + For LDI command. */ + HOWTO (R_AVR_HI8_LDI_PM, /* type */ + 9, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_HI8_LDI_PM", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A high 8 bit absolute relocation of 24 bit program memory address. + For LDI command. */ + HOWTO (R_AVR_HH8_LDI_PM, /* type */ + 17, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_HH8_LDI_PM", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A low 8 bit absolute relocation of a negative 24 bit + program memory address. For LDI command. */ + HOWTO (R_AVR_LO8_LDI_PM_NEG, /* type */ + 1, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_LO8_LDI_PM_NEG", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A high 8 bit absolute relocation of a negative 16 bit + program memory address. For LDI command. */ + HOWTO (R_AVR_HI8_LDI_PM_NEG, /* type */ + 9, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_HI8_LDI_PM_NEG", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* A high 8 bit absolute relocation of a negative 24 bit + program memory address. For LDI command. */ + HOWTO (R_AVR_HH8_LDI_PM_NEG, /* type */ + 17, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_HH8_LDI_PM_NEG", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + /* Relocation for CALL command in ATmega. */ + HOWTO (R_AVR_CALL, /* type */ + 1, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 23, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_AVR_CALL", /* name */ + false, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ + false) /* pcrel_offset */ +}; + +/* Map BFD reloc types to AVR ELF reloc types. */ + +struct avr_reloc_map +{ + bfd_reloc_code_real_type bfd_reloc_val; + unsigned int elf_reloc_val; +}; + + static const struct avr_reloc_map avr_reloc_map[] = +{ + { BFD_RELOC_NONE, R_AVR_NONE }, + { BFD_RELOC_32, R_AVR_32 }, + { BFD_RELOC_AVR_7_PCREL, R_AVR_7_PCREL }, + { BFD_RELOC_AVR_13_PCREL, R_AVR_13_PCREL }, + { BFD_RELOC_16, R_AVR_16 }, + { BFD_RELOC_AVR_16_PM, R_AVR_16_PM }, + { BFD_RELOC_AVR_LO8_LDI, R_AVR_LO8_LDI}, + { BFD_RELOC_AVR_HI8_LDI, R_AVR_HI8_LDI }, + { BFD_RELOC_AVR_HH8_LDI, R_AVR_HH8_LDI }, + { BFD_RELOC_AVR_LO8_LDI_NEG, R_AVR_LO8_LDI_NEG }, + { BFD_RELOC_AVR_HI8_LDI_NEG, R_AVR_HI8_LDI_NEG }, + { BFD_RELOC_AVR_HH8_LDI_NEG, R_AVR_HH8_LDI_NEG }, + { BFD_RELOC_AVR_LO8_LDI_PM, R_AVR_LO8_LDI_PM }, + { BFD_RELOC_AVR_HI8_LDI_PM, R_AVR_HI8_LDI_PM }, + { BFD_RELOC_AVR_HH8_LDI_PM, R_AVR_HH8_LDI_PM }, + { BFD_RELOC_AVR_LO8_LDI_PM_NEG, R_AVR_LO8_LDI_PM_NEG }, + { BFD_RELOC_AVR_HI8_LDI_PM_NEG, R_AVR_HI8_LDI_PM_NEG }, + { BFD_RELOC_AVR_HH8_LDI_PM_NEG, R_AVR_HH8_LDI_PM_NEG }, + { BFD_RELOC_AVR_CALL, R_AVR_CALL } +}; + +static reloc_howto_type * +bfd_elf32_bfd_reloc_type_lookup (abfd, code) + bfd *abfd; + bfd_reloc_code_real_type code; +{ + unsigned int i; + + for (i = 0; + i < sizeof (avr_reloc_map) / sizeof (struct avr_reloc_map); + i++) + { + if (avr_reloc_map[i].bfd_reloc_val == code) + return &elf_avr_howto_table[avr_reloc_map[i].elf_reloc_val]; + } + + return NULL; +} + +/* Set the howto pointer for an AVR ELF reloc. */ + +static void +avr_info_to_howto_rela (abfd, cache_ptr, dst) + bfd *abfd; + arelent *cache_ptr; + Elf32_Internal_Rela *dst; +{ + unsigned int r_type; + + r_type = ELF32_R_TYPE (dst->r_info); + BFD_ASSERT (r_type < (unsigned int) R_AVR_max); + cache_ptr->howto = &elf_avr_howto_table[r_type]; +} + +static asection * +elf32_avr_gc_mark_hook (abfd, info, rel, h, sym) + bfd *abfd; + struct bfd_link_info *info; + Elf_Internal_Rela *rel; + struct elf_link_hash_entry *h; + Elf_Internal_Sym *sym; +{ + if (h != NULL) + { + switch (ELF32_R_TYPE (rel->r_info)) + { + default: + switch (h->root.type) + { + case bfd_link_hash_defined: + case bfd_link_hash_defweak: + return h->root.u.def.section; + + case bfd_link_hash_common: + return h->root.u.c.p->section; + + default: + break; + } + } + } + else + { + if (!(elf_bad_symtab (abfd) + && ELF_ST_BIND (sym->st_info) != STB_LOCAL) + && !((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE) + && sym->st_shndx != SHN_COMMON)) + { + return bfd_section_from_elf_index (abfd, sym->st_shndx); + } + } + return NULL; +} + +static boolean +elf32_avr_gc_sweep_hook (abfd, info, sec, relocs) + bfd *abfd; + struct bfd_link_info *info; + asection *sec; + const Elf_Internal_Rela *relocs; +{ + /* We don't use got and plt entries for avr. */ + return true; +} + +/* Look through the relocs for a section during the first phase. + Since we don't do .gots or .plts, we just need to consider the + virtual table relocs for gc. */ + +static boolean +elf32_avr_check_relocs (abfd, info, sec, relocs) + bfd *abfd; + struct bfd_link_info *info; + asection *sec; + const Elf_Internal_Rela *relocs; +{ + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes, **sym_hashes_end; + const Elf_Internal_Rela *rel; + const Elf_Internal_Rela *rel_end; + + if (info->relocateable) + return true; + + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (abfd); + sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym); + if (!elf_bad_symtab (abfd)) + sym_hashes_end -= symtab_hdr->sh_info; + + rel_end = relocs + sec->reloc_count; + for (rel = relocs; rel < rel_end; rel++) + { + struct elf_link_hash_entry *h; + unsigned long r_symndx; + + r_symndx = ELF32_R_SYM (rel->r_info); + if (r_symndx < symtab_hdr->sh_info) + h = NULL; + else + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + } + + return true; +} + +/* Perform a single relocation. By default we use the standard BFD + routines, but a few relocs, we have to do them ourselves. */ + +static bfd_reloc_status_type +avr_final_link_relocate (howto, input_bfd, input_section, + contents, rel, relocation) + reloc_howto_type * howto; + bfd * input_bfd; + asection * input_section; + bfd_byte * contents; + Elf_Internal_Rela * rel; + bfd_vma relocation; +{ + bfd_reloc_status_type r = bfd_reloc_ok; + bfd_vma x; + bfd_signed_vma srel; + + switch (howto->type) + { + case R_AVR_7_PCREL: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation; + srel += rel->r_addend; + srel -= rel->r_offset; + srel -= 2; /* Branch instructions add 2 to the PC... */ + srel -= (input_section->output_section->vma + + input_section->output_offset); + + if (srel & 1) + return bfd_reloc_outofrange; + if (srel > ((1 << 7) - 1) || (srel < - (1 << 7))) + return bfd_reloc_overflow; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xfc07) | (((srel >> 1) << 3) & 0x3f8); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_13_PCREL: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation; + srel += rel->r_addend; + srel -= rel->r_offset; + srel -= 2; /* Branch instructions add 2 to the PC... */ + srel -= (input_section->output_section->vma + + input_section->output_offset); + + if (srel & 1) + return bfd_reloc_outofrange; + + /* AVR addresses commands as words. */ + srel >>= 1; + + /* Check for overflow. */ + if (srel < -2048 || srel > 2047) + { + /* Apply WRAPAROUND if possible. */ + if (bfd_get_mach (input_bfd) == bfd_mach_avr2) + { + if (srel > 2047) + srel -= 4096; + else + srel += 4096; + } + else + return bfd_reloc_overflow; + } + + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf000) | (srel & 0xfff); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_LO8_LDI: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_HI8_LDI: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + srel = (srel >> 8) & 0xff; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_HH8_LDI: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + srel = (srel >> 16) & 0xff; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_LO8_LDI_NEG: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + srel = -srel; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_HI8_LDI_NEG: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + srel = -srel; + srel = (srel >> 8) & 0xff; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_HH8_LDI_NEG: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + srel = -srel; + srel = (srel >> 16) & 0xff; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_LO8_LDI_PM: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + if (srel & 1) + return bfd_reloc_outofrange; + srel = srel >> 1; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_HI8_LDI_PM: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + if (srel & 1) + return bfd_reloc_outofrange; + srel = srel >> 1; + srel = (srel >> 8) & 0xff; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_HH8_LDI_PM: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + if (srel & 1) + return bfd_reloc_outofrange; + srel = srel >> 1; + srel = (srel >> 16) & 0xff; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_LO8_LDI_PM_NEG: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + srel = -srel; + if (srel & 1) + return bfd_reloc_outofrange; + srel = srel >> 1; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_HI8_LDI_PM_NEG: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + srel = -srel; + if (srel & 1) + return bfd_reloc_outofrange; + srel = srel >> 1; + srel = (srel >> 8) & 0xff; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_HH8_LDI_PM_NEG: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + srel = -srel; + if (srel & 1) + return bfd_reloc_outofrange; + srel = srel >> 1; + srel = (srel >> 16) & 0xff; + x = bfd_get_16 (input_bfd, contents); + x = (x & 0xf0f0) | (srel & 0xf) | ((srel << 4) & 0xf00); + bfd_put_16 (input_bfd, x, contents); + break; + + case R_AVR_CALL: + contents += rel->r_offset; + srel = (bfd_signed_vma) relocation + rel->r_addend; + if (srel & 1) + return bfd_reloc_outofrange; + srel = srel >> 1; + x = bfd_get_16 (input_bfd, contents); + x |= ((srel & 0x10000) | ((srel << 3) & 0x1f00000)) >> 16; + bfd_put_16 (input_bfd, x, contents); + bfd_put_16 (input_bfd, srel & 0xffff, contents+2); + break; + + default: + r = _bfd_final_link_relocate (howto, input_bfd, input_section, + contents, rel->r_offset, + relocation, rel->r_addend); + } + + return r; +} + +/* Relocate an AVR ELF section. */ +static boolean +elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section, + contents, relocs, local_syms, local_sections) + bfd *output_bfd; + struct bfd_link_info *info; + bfd *input_bfd; + asection *input_section; + bfd_byte *contents; + Elf_Internal_Rela *relocs; + Elf_Internal_Sym *local_syms; + asection **local_sections; +{ + Elf_Internal_Shdr * symtab_hdr; + struct elf_link_hash_entry ** sym_hashes; + Elf_Internal_Rela * rel; + Elf_Internal_Rela * relend; + + symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (input_bfd); + relend = relocs + input_section->reloc_count; + + for (rel = relocs; rel < relend; rel ++) + { + reloc_howto_type * howto; + unsigned long r_symndx; + Elf_Internal_Sym * sym; + asection * sec; + struct elf_link_hash_entry * h; + bfd_vma relocation; + bfd_reloc_status_type r; + const char * name = NULL; + int r_type; + + r_type = ELF32_R_TYPE (rel->r_info); + r_symndx = ELF32_R_SYM (rel->r_info); + + if (info->relocateable) + { + /* This is a relocateable link. We don't have to change + anything, unless the reloc is against a section symbol, + in which case we have to adjust according to where the + section symbol winds up in the output section. */ + if (r_symndx < symtab_hdr->sh_info) + { + sym = local_syms + r_symndx; + + if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) + { + sec = local_sections [r_symndx]; + rel->r_addend += sec->output_offset + sym->st_value; + } + } + + continue; + } + + /* This is a final link. */ + howto = elf_avr_howto_table + ELF32_R_TYPE (rel->r_info); + h = NULL; + sym = NULL; + sec = NULL; + + if (r_symndx < symtab_hdr->sh_info) + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; + relocation = (sec->output_section->vma + + sec->output_offset + + sym->st_value); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); + name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name; + } + else + { + h = sym_hashes [r_symndx - symtab_hdr->sh_info]; + + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + + name = h->root.root.string; + + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + { + sec = h->root.u.def.section; + relocation = (h->root.u.def.value + + sec->output_section->vma + + sec->output_offset); + } + else if (h->root.type == bfd_link_hash_undefweak) + { + relocation = 0; + } + else + { + if (! ((*info->callbacks->undefined_symbol) + (info, h->root.root.string, input_bfd, + input_section, rel->r_offset, true))) + return false; + relocation = 0; + } + } + + r = avr_final_link_relocate (howto, input_bfd, input_section, + contents, rel, relocation); + + if (r != bfd_reloc_ok) + { + const char * msg = (const char *) NULL; + + switch (r) + { + case bfd_reloc_overflow: + r = info->callbacks->reloc_overflow + (info, name, howto->name, (bfd_vma) 0, + input_bfd, input_section, rel->r_offset); + break; + + case bfd_reloc_undefined: + r = info->callbacks->undefined_symbol + (info, name, input_bfd, input_section, rel->r_offset, true); + break; + + case bfd_reloc_outofrange: + msg = _("internal error: out of range error"); + break; + + case bfd_reloc_notsupported: + msg = _("internal error: unsupported relocation error"); + break; + + case bfd_reloc_dangerous: + msg = _("internal error: dangerous relocation"); + break; + + default: + msg = _("internal error: unknown error"); + break; + } + + if (msg) + r = info->callbacks->warning + (info, msg, name, input_bfd, input_section, rel->r_offset); + + if (! r) + return false; + } + } + + return true; +} + +/* The final processing done just before writing out a AVR ELF object + file. This gets the AVR architecture right based on the machine + number. */ + +static void +bfd_elf_avr_final_write_processing (abfd, linker) + bfd *abfd; + boolean linker ATTRIBUTE_UNUSED; +{ + unsigned long val; + + switch (bfd_get_mach (abfd)) + { + default: + case bfd_mach_avr2: + val = E_AVR_MACH_AVR2; + break; + + case bfd_mach_avr1: + val = E_AVR_MACH_AVR1; + break; + + case bfd_mach_avr3: + val = E_AVR_MACH_AVR3; + break; + + case bfd_mach_avr4: + val = E_AVR_MACH_AVR4; + break; + + } + + elf_elfheader (abfd)->e_machine = EM_AVR; + elf_elfheader (abfd)->e_flags &= ~ EF_AVR_MACH; + elf_elfheader (abfd)->e_flags |= val; +} + +/* Set the right machine number. */ + +static boolean +elf32_avr_object_p (abfd) + bfd *abfd; +{ + int e_set = bfd_mach_avr2; + if (elf_elfheader (abfd)->e_machine == EM_AVR) + { + int e_mach = elf_elfheader (abfd)->e_flags & EF_AVR_MACH; + switch (e_mach) + { + default: + case E_AVR_MACH_AVR2: + e_set = bfd_mach_avr2; + break; + + case E_AVR_MACH_AVR1: + e_set = bfd_mach_avr1; + break; + + case E_AVR_MACH_AVR3: + e_set = bfd_mach_avr3; + break; + + case E_AVR_MACH_AVR4: + e_set = bfd_mach_avr4; + break; + } + } + return bfd_default_set_arch_mach (abfd, bfd_arch_avr, + e_set); +} + + +#define ELF_ARCH bfd_arch_avr +#define ELF_MACHINE_CODE EM_AVR +#define ELF_MAXPAGESIZE 1 + +#define TARGET_LITTLE_SYM bfd_elf32_avr_vec +#define TARGET_LITTLE_NAME "elf32-avr" + +#define elf_info_to_howto avr_info_to_howto_rela +#define elf_info_to_howto_rel NULL +#define elf_backend_relocate_section elf32_avr_relocate_section +#define elf_backend_gc_mark_hook elf32_avr_gc_mark_hook +#define elf_backend_gc_sweep_hook elf32_avr_gc_sweep_hook +#define elf_backend_check_relocs elf32_avr_check_relocs +#define elf_backend_can_gc_sections 1 +#define elf_backend_final_write_processing \ + bfd_elf_avr_final_write_processing +#define elf_backend_object_p elf32_avr_object_p + + +#include "elf32-target.h" diff -upr --new-file binutils-2.9.5.0.31/bfd/elf32-m32r.c binutils-2.9.5.0.32/bfd/elf32-m32r.c --- binutils-2.9.5.0.31/bfd/elf32-m32r.c Sun Mar 19 12:07:54 2000 +++ binutils-2.9.5.0.32/bfd/elf32-m32r.c Fri Mar 31 09:28:45 2000 @@ -1,5 +1,5 @@ /* M32R-specific support for 32-bit ELF. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -35,6 +35,8 @@ static void m32r_elf_relocate_hi16 bfd_byte *, bfd_vma)); bfd_reloc_status_type m32r_elf_lo16_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +bfd_reloc_status_type m32r_elf_generic_reloc + PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static bfd_reloc_status_type m32r_elf_sda16_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup @@ -105,7 +107,7 @@ static reloc_howto_type m32r_elf_howto_t false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + m32r_elf_generic_reloc,/* special_function */ "R_M32R_16", /* name */ true, /* partial_inplace */ 0xffff, /* src_mask */ @@ -120,7 +122,7 @@ static reloc_howto_type m32r_elf_howto_t false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + m32r_elf_generic_reloc,/* special_function */ "R_M32R_32", /* name */ true, /* partial_inplace */ 0xffffffff, /* src_mask */ @@ -135,7 +137,7 @@ static reloc_howto_type m32r_elf_howto_t false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ + m32r_elf_generic_reloc,/* special_function */ "R_M32R_24", /* name */ true, /* partial_inplace */ 0xffffff, /* src_mask */ @@ -508,10 +510,6 @@ m32r_elf_lo16_reloc (input_bfd, reloc_en bfd *output_bfd; char **error_message; { - bfd_reloc_status_type ret; - bfd_vma relocation; - unsigned long insn; - /* This part is from bfd_elf_generic_reloc. If we're relocating, and this an external symbol, we don't want to change anything. */ @@ -564,6 +562,44 @@ m32r_elf_lo16_reloc (input_bfd, reloc_en but we have partial_inplace == TRUE. bfd_elf_generic_reloc will pass the handling back to bfd_install_relocation which will install a section relative addend which is wrong. */ + return m32r_elf_generic_reloc (input_bfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message); +} + +/* Do generic partial_inplace relocation. + This is a local replacement for bfd_elf_generic_reloc. */ + +bfd_reloc_status_type +m32r_elf_generic_reloc (input_bfd, reloc_entry, symbol, data, + input_section, output_bfd, error_message) + bfd *input_bfd; + arelent *reloc_entry; + asymbol *symbol; + PTR data; + asection *input_section; + bfd *output_bfd; + char **error_message; +{ + bfd_reloc_status_type ret; + bfd_vma relocation; + bfd_byte *inplace_address; + + /* This part is from bfd_elf_generic_reloc. + If we're relocating, and this an external symbol, we don't want + to change anything. */ + if (output_bfd != (bfd *) NULL + && (symbol->flags & BSF_SECTION_SYM) == 0 + && reloc_entry->addend == 0) + { + reloc_entry->address += input_section->output_offset; + return bfd_reloc_ok; + } + + /* Now do the the reloc in the usual way. + ??? It would be nice to call bfd_elf_generic_reloc here, + but we have partial_inplace == TRUE. bfd_elf_generic_reloc will + pass the handling back to bfd_install_relocation which will install + a section relative addend which is wrong. */ /* Sanity check the address (offset in section). */ if (reloc_entry->address > input_section->_cooked_size) @@ -588,10 +624,32 @@ m32r_elf_lo16_reloc (input_bfd, reloc_en } relocation += reloc_entry->addend; + inplace_address = data + reloc_entry->address; + +#define DOIT(x) \ + x = ( (x & ~reloc_entry->howto->dst_mask) | \ + (((x & reloc_entry->howto->src_mask) + relocation) & \ + reloc_entry->howto->dst_mask)) - insn = bfd_get_32 (input_bfd, data + reloc_entry->address); - insn = (insn & 0xffff0000) | (relocation & 0xffff); - bfd_put_32 (input_bfd, insn, data + reloc_entry->address); + switch (reloc_entry->howto->size) + { + case 1: + { + short x = bfd_get_16 (input_bfd, inplace_address); + DOIT (x); + bfd_put_16 (input_bfd, x, inplace_address); + } + break; + case 2: + { + unsigned long x = bfd_get_32 (input_bfd, inplace_address); + DOIT (x); + bfd_put_32 (input_bfd, x, inplace_address); + } + break; + default: + BFD_ASSERT (0); + } if (output_bfd != (bfd *) NULL) reloc_entry->address += input_section->output_offset; diff -upr --new-file binutils-2.9.5.0.31/bfd/elf64-alpha.c binutils-2.9.5.0.32/bfd/elf64-alpha.c --- binutils-2.9.5.0.31/bfd/elf64-alpha.c Sun Mar 19 11:52:01 2000 +++ binutils-2.9.5.0.32/bfd/elf64-alpha.c Fri Mar 31 09:28:45 2000 @@ -125,6 +125,10 @@ static boolean elf64_alpha_finish_dynami PARAMS((bfd *, struct bfd_link_info *)); static boolean elf64_alpha_final_link PARAMS((bfd *, struct bfd_link_info *)); +static boolean elf64_alpha_merge_ind_symbols + PARAMS((struct alpha_elf_link_hash_entry *, PTR)); +static Elf_Internal_Rela * elf64_alpha_find_reloc_at_ofs + PARAMS ((Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_vma, int)); struct alpha_elf_link_hash_entry diff -upr --new-file binutils-2.9.5.0.31/bfd/ihex.c binutils-2.9.5.0.32/bfd/ihex.c --- binutils-2.9.5.0.31/bfd/ihex.c Mon Jul 19 09:13:21 1999 +++ binutils-2.9.5.0.32/bfd/ihex.c Fri Mar 31 09:16:39 2000 @@ -146,7 +146,7 @@ static int ihex_sizeof_headers PARAMS (( /* The number of bytes we put on one line during output. */ -#define CHUNK (21) +#define CHUNK 16 /* Macros for converting between hex and binary. */ diff -upr --new-file binutils-2.9.5.0.31/bfd/libbfd.h binutils-2.9.5.0.32/bfd/libbfd.h --- binutils-2.9.5.0.31/bfd/libbfd.h Thu Dec 2 09:14:46 1999 +++ binutils-2.9.5.0.32/bfd/libbfd.h Fri Mar 31 09:28:45 2000 @@ -871,6 +871,22 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_MCORE_PCREL_32", "BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2", "BFD_RELOC_MCORE_RVA", + "BFD_RELOC_AVR_7_PCREL", + "BFD_RELOC_AVR_13_PCREL", + "BFD_RELOC_AVR_16_PM", + "BFD_RELOC_AVR_LO8_LDI", + "BFD_RELOC_AVR_HI8_LDI", + "BFD_RELOC_AVR_HH8_LDI", + "BFD_RELOC_AVR_LO8_LDI_NEG", + "BFD_RELOC_AVR_HI8_LDI_NEG", + "BFD_RELOC_AVR_HH8_LDI_NEG", + "BFD_RELOC_AVR_LO8_LDI_PM", + "BFD_RELOC_AVR_HI8_LDI_PM", + "BFD_RELOC_AVR_HH8_LDI_PM", + "BFD_RELOC_AVR_LO8_LDI_PM_NEG", + "BFD_RELOC_AVR_HI8_LDI_PM_NEG", + "BFD_RELOC_AVR_HH8_LDI_PM_NEG", + "BFD_RELOC_AVR_CALL", "BFD_RELOC_VTABLE_INHERIT", "BFD_RELOC_VTABLE_ENTRY", "@@overflow: BFD_RELOC_UNUSED@@", diff -upr --new-file binutils-2.9.5.0.31/bfd/reloc.c binutils-2.9.5.0.32/bfd/reloc.c --- binutils-2.9.5.0.31/bfd/reloc.c Sun Mar 19 12:07:55 2000 +++ binutils-2.9.5.0.32/bfd/reloc.c Fri Mar 31 09:28:45 2000 @@ -2591,6 +2591,91 @@ ENUMDOC Motorola Mcore relocations. ENUM + BFD_RELOC_AVR_7_PCREL +ENUMDOC + This is a 16 bit reloc for the AVR that stores 8 bit pc relative + short offset into 7 bits. +ENUM + BFD_RELOC_AVR_13_PCREL +ENUMDOC + This is a 16 bit reloc for the AVR that stores 13 bit pc relative + short offset into 12 bits. +ENUM + BFD_RELOC_AVR_16_PM +ENUMDOC + This is a 16 bit reloc for the AVR that stores 17 bit value (usually + program memory address) into 16 bits. +ENUM + BFD_RELOC_AVR_LO8_LDI +ENUMDOC + This is a 16 bit reloc for the AVR that stores 8 bit value (usually + data memory address) into 8 bit immediate value of LDI insn. +ENUM + BFD_RELOC_AVR_HI8_LDI +ENUMDOC + This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit + of data memory address) into 8 bit immediate value of LDI insn. +ENUM + BFD_RELOC_AVR_HH8_LDI +ENUMDOC + This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit + of program memory address) into 8 bit immediate value of LDI insn. +ENUM + BFD_RELOC_AVR_LO8_LDI_NEG +ENUMDOC + This is a 16 bit reloc for the AVR that stores negated 8 bit value + (usually data memory address) into 8 bit immediate value of SUBI insn. +ENUM + BFD_RELOC_AVR_HI8_LDI_NEG +ENUMDOC + This is a 16 bit reloc for the AVR that stores negated 8 bit value + (high 8 bit of data memory address) into 8 bit immediate value of + SUBI insn. +ENUM + BFD_RELOC_AVR_HH8_LDI_NEG +ENUMDOC + This is a 16 bit reloc for the AVR that stores negated 8 bit value + (most high 8 bit of program memory address) into 8 bit immediate value + of LDI or SUBI insn. +ENUM + BFD_RELOC_AVR_LO8_LDI_PM +ENUMDOC + This is a 16 bit reloc for the AVR that stores 8 bit value (usually + command address) into 8 bit immediate value of LDI insn. +ENUM + BFD_RELOC_AVR_HI8_LDI_PM +ENUMDOC + This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit + of command address) into 8 bit immediate value of LDI insn. +ENUM + BFD_RELOC_AVR_HH8_LDI_PM +ENUMDOC + This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit + of command address) into 8 bit immediate value of LDI insn. +ENUM + BFD_RELOC_AVR_LO8_LDI_PM_NEG +ENUMDOC + This is a 16 bit reloc for the AVR that stores negated 8 bit value + (usually command address) into 8 bit immediate value of SUBI insn. +ENUM + BFD_RELOC_AVR_HI8_LDI_PM_NEG +ENUMDOC + This is a 16 bit reloc for the AVR that stores negated 8 bit value + (high 8 bit of 16 bit command address) into 8 bit immediate value + of SUBI insn. +ENUM + BFD_RELOC_AVR_HH8_LDI_PM_NEG +ENUMDOC + This is a 16 bit reloc for the AVR that stores negated 8 bit value + (high 6 bit of 22 bit command address) into 8 bit immediate + value of SUBI insn. +ENUM + BFD_RELOC_AVR_CALL +ENUMDOC + This is a 32 bit reloc for the AVR that stores 23 bit value + into 22 bits. + +ENUM BFD_RELOC_VTABLE_INHERIT ENUMX BFD_RELOC_VTABLE_ENTRY diff -upr --new-file binutils-2.9.5.0.31/bfd/srec.c binutils-2.9.5.0.32/bfd/srec.c --- binutils-2.9.5.0.31/bfd/srec.c Thu Jan 20 19:06:21 2000 +++ binutils-2.9.5.0.32/bfd/srec.c Fri Mar 31 09:16:44 2000 @@ -171,7 +171,7 @@ srec_init () /* The maximum number of bytes on a line is FF */ #define MAXCHUNK 0xff /* The number of bytes we fit onto a line on output */ -#define CHUNK 21 +#define CHUNK 16 /* When writing an S-record file, the S-records can not be output as they are seen. This structure is used to hold them in memory. */ diff -upr --new-file binutils-2.9.5.0.31/bfd/targets.c binutils-2.9.5.0.32/bfd/targets.c --- binutils-2.9.5.0.31/bfd/targets.c Tue Feb 29 11:15:14 2000 +++ binutils-2.9.5.0.32/bfd/targets.c Fri Mar 31 09:28:45 2000 @@ -506,6 +506,7 @@ extern const bfd_target arm_epoc_pei_big extern const bfd_target b_out_vec_big_host; extern const bfd_target b_out_vec_little_host; extern const bfd_target bfd_elf64_alpha_vec; +extern const bfd_target bfd_elf32_avr_vec; extern const bfd_target bfd_elf32_bigarc_vec; extern const bfd_target bfd_elf32_bigarm_vec; extern const bfd_target bfd_elf32_bigarm_oabi_vec; @@ -690,6 +691,7 @@ const bfd_target * const bfd_target_vect #ifdef BFD64 &bfd_elf64_alpha_vec, #endif + &bfd_elf32_avr_vec, &bfd_elf32_bigarc_vec, &bfd_elf32_bigarm_vec, &bfd_elf32_bigarm_oabi_vec, diff -upr --new-file binutils-2.9.5.0.31/binutils/ChangeLog binutils-2.9.5.0.32/binutils/ChangeLog --- binutils-2.9.5.0.31/binutils/ChangeLog Sun Mar 12 09:31:33 2000 +++ binutils-2.9.5.0.32/binutils/ChangeLog Fri Mar 31 09:16:05 2000 @@ -1,3 +1,21 @@ +2000-03-31 John David Anglin + + * readelf.c: Include sys/types.h before sys/stat.h for ultrix. + +2000-03-27 Nick Clifton + + * rddbg.c (read_section_stabs_debugging_info): Catch out of range + string offsets in corrupt stabs entries. + +2000-03-27 Alan Modra + + * readelf.c: Include elf/avr.h + (dump_relocations): Add EM_AVR case. + +2000-03-09 Tim Waugh + + * strings.1: Correct '-bytes' to '--bytes'. + 2000-03-08 H.J. Lu * Makefile.am (install-exec-local): Depend on diff -upr --new-file binutils-2.9.5.0.31/binutils/rddbg.c binutils-2.9.5.0.32/binutils/rddbg.c --- binutils-2.9.5.0.31/binutils/rddbg.c Thu Jun 3 11:01:56 1999 +++ binutils-2.9.5.0.32/binutils/rddbg.c Fri Mar 31 09:16:08 2000 @@ -185,7 +185,17 @@ read_section_stabs_debugging_info (abfd, char *f, *s; f = NULL; + + if (stroff + strx > strsize) + { + fprintf (stderr, "%s: %s: stab entry %d is corrupt, strx = 0x%x, type = %d\n", + bfd_get_filename (abfd), names[i].secname, + (stab - stabs) / 12, strx, type); + continue; + } + s = (char *) strings + stroff + strx; + while (s[strlen (s) - 1] == '\\' && stab + 12 < stabs + stabsize) { diff -upr --new-file binutils-2.9.5.0.31/binutils/readelf.c binutils-2.9.5.0.32/binutils/readelf.c --- binutils-2.9.5.0.31/binutils/readelf.c Tue Feb 29 11:15:14 2000 +++ binutils-2.9.5.0.32/binutils/readelf.c Fri Mar 31 09:28:45 2000 @@ -23,6 +23,7 @@ #include +#include #include #include #include @@ -68,6 +69,7 @@ #include "elf/mcore.h" #include "elf/i960.h" #include "elf/pj.h" +#include "elf/avr.h" #include "bucomm.h" #include "getopt.h" @@ -803,6 +805,10 @@ dump_relocations (file, rel_offset, rel_ case EM_960: rtype = elf_i960_reloc_type (type); + break; + + case EM_AVR: + rtype = elf_avr_reloc_type (type); break; case EM_OLD_SPARCV9: diff -upr --new-file binutils-2.9.5.0.31/binutils/strings.1 binutils-2.9.5.0.32/binutils/strings.1 --- binutils-2.9.5.0.31/binutils/strings.1 Thu Jun 3 11:01:56 1999 +++ binutils-2.9.5.0.32/binutils/strings.1 Fri Mar 31 09:16:09 2000 @@ -90,7 +90,7 @@ on the standard output and exit. .TP .B "\-\fImin\-len\fP" .TP -.B "\-bytes=\fImin\-len\fP" +.B "\-\-bytes=\fImin\-len\fP" Print sequences of characters that are at least .I min\-len characters long, instead of the default 4. diff -upr --new-file binutils-2.9.5.0.31/binutils.spec binutils-2.9.5.0.32/binutils.spec --- binutils-2.9.5.0.31/binutils.spec Sun Mar 19 12:09:10 2000 +++ binutils-2.9.5.0.32/binutils.spec Fri Mar 31 10:44:53 2000 @@ -1,6 +1,6 @@ Summary: GNU Binary Utility Development Utilities Name: binutils -Version: 2.9.5.0.31 +Version: 2.9.5.0.32 Release: 1 Copyright: GPL Group: Development/Tools diff -upr --new-file binutils-2.9.5.0.31/configure binutils-2.9.5.0.32/configure --- binutils-2.9.5.0.31/configure Sat Feb 19 11:21:13 2000 +++ binutils-2.9.5.0.32/configure Fri Mar 31 09:16:04 2000 @@ -86,7 +86,7 @@ subdirs= target_alias=NOTARGET target_makefile_frag= undefs=NOUNDEFS -version="$Revision: 1.4 $" +version="$Revision: 1.5 $" x11=default bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' @@ -587,12 +587,12 @@ esac # the gcc version number changes. if [ "${with_gcc_version_trigger+set}" = set ]; then gcc_version_trigger="$with_gcc_version_trigger" - gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${with_gcc_version_trigger}` + gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` else # If gcc's sources are available, define the trigger file. if [ -f ${topsrcdir}/gcc/version.c ] ; then gcc_version_trigger=${topsrcdir}/gcc/version.c - gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}` + gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` case "$arguments" in *--with-gcc-version-trigger=$gcc_version_trigger* ) ;; diff -upr --new-file binutils-2.9.5.0.31/configure.in binutils-2.9.5.0.32/configure.in --- binutils-2.9.5.0.31/configure.in Sun Mar 12 09:40:09 2000 +++ binutils-2.9.5.0.32/configure.in Fri Mar 31 09:28:34 2000 @@ -329,7 +329,7 @@ case "${target}" in powerpc-*-netware*) target_makefile_frag="${target_makefile_frag} config/mt-netware" ;; - *-*-linux-gnu) + *-*-linux-gnu*) target_makefile_frag="${target_makefile_frag} config/mt-linux" ;; *-*-aix4.[3456789]* | *-*-aix[56789].*) diff -upr --new-file binutils-2.9.5.0.31/gas/ChangeLog binutils-2.9.5.0.32/gas/ChangeLog --- binutils-2.9.5.0.31/gas/ChangeLog Sun Mar 19 11:55:01 2000 +++ binutils-2.9.5.0.32/gas/ChangeLog Fri Mar 31 09:16:58 2000 @@ -1,3 +1,78 @@ +2000-03-29 Nick Clifton + + * config/tc-sh.h (SEG_NAME): New macro: return the name of a + segment. Works for both BFD_ASSEMBLER and others. + (SUB_SEGMENT_ALIGN): Use SEG_NAME. + +2000-03-29 Nick Clifton + + * listing.c (LISTING_LHS_WIDTH): Default depends on + LISTING_WORD_SIZE. + (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH. + +2000-03-27 Ian Lance Taylor + + * config/tc-sh.c (md_show_usage): Use backslash before newline in + string literal. + +2000-03-27 Alan Modra + + * config/tc-avr.h (TC_HANDLES_FX_DONE): Define. + + * config/tc-avr.c (mcu_types): Add missing initialiser. + (md_pcrel_from_section): Add prototype. + (avr_operand): Remove redundant test of unsigned < 0. + (avr_cons_fix_new): Ensure exp_mod_pm zero on function exit. + +2000-03-27 Denis Chertykov + + * config/tc-avr.c: New file for AVR support. + * config/tc-avr.h: Likewise. + * configure.in: Add AVR support. + * configure: Regenerate. + +2000-03-26 Timothy Wall + + * gasp.c (macro_op): Add new argument to check_macro call. + Macro structure definitions moved to macro.h + * sb.h: Add argument to prototype for input_scrub_include_sb. + * input-scrub.c (input_scrub_include_sb): Allow disabling of sb + nesting checks with an additional flag. + (struct input_save): Add flag to indicate whether current sb + should be checked for proper macro/conditional nesting. + (input_scrub_push/pop): Save/restore nest check flag. + (input_scrub_next_buffer): Ditto. Also call end of macro hook if + defined. + * macro.c (check_macro): Allow caller to retrieve parsed macro + information if a pointer is provided. This information may be + used by the new macro hooks. + * macro.h: Update prototype for check_macro. Macro struct + definitions moved here from macro.c/gasp.c. + * read.c (read_a_source_file): Add parameter to check_macro call, + and pass macro info to the macro hook, if defined. + (input_scrub_insert_line): New. Allow insertion of a line of + characters into the input stream. + (input_scrub_insert_file): New. Allow insertion of an arbitrary + file into the input stream. + (s_include): Use input_scrub_insert_file. + * internals.texi: Document new macro hooks. + * as.h: New prototypes added. + +2000-03-26 Alan Modra + + * config/tc-i386.c: Don't start any as_bad or as_warn message with + an initial capital letter. + (i386_index_check): Reindent. + +2000-03-19 Nick Clifton + + * config/tc-arm.c (md_apply_fix3): Fix bug detectng overflow of pc + relative branches. + 2000-03-17 Thomas de Lellis * config/tc-arm.c (do_t_adr): Flag "adr Rd,label" diff -upr --new-file binutils-2.9.5.0.31/gas/NEWS binutils-2.9.5.0.32/gas/NEWS --- binutils-2.9.5.0.31/gas/NEWS Thu Feb 24 11:11:39 2000 +++ binutils-2.9.5.0.32/gas/NEWS Fri Mar 31 09:16:59 2000 @@ -2,6 +2,8 @@ Changes in 2.10: +Support for ATMEL AVR. + Support for IBM 370 ELF. Somewhat experimental. Support for numbers with suffixes. diff -upr --new-file binutils-2.9.5.0.31/gas/as.h binutils-2.9.5.0.32/gas/as.h --- binutils-2.9.5.0.31/gas/as.h Fri Feb 25 13:39:23 2000 +++ binutils-2.9.5.0.32/gas/as.h Fri Mar 31 09:28:45 2000 @@ -557,6 +557,8 @@ void print_version_id PARAMS ((void)); char *app_push PARAMS ((void)); char *atof_ieee PARAMS ((char *str, int what_kind, LITTLENUM_TYPE * words)); char *input_scrub_include_file PARAMS ((char *filename, char *position)); +extern void input_scrub_insert_line PARAMS((const char *line)); +extern void input_scrub_insert_file PARAMS((char *path)); char *input_scrub_new_file PARAMS ((char *filename)); char *input_scrub_next_buffer PARAMS ((char **bufp)); int do_scrub_chars PARAMS ((int (*get) (char *, int), char *to, int tolen)); diff -upr --new-file binutils-2.9.5.0.31/gas/config/tc-arm.c binutils-2.9.5.0.32/gas/config/tc-arm.c --- binutils-2.9.5.0.31/gas/config/tc-arm.c Sun Mar 19 11:55:06 2000 +++ binutils-2.9.5.0.32/gas/config/tc-arm.c Fri Mar 31 09:17:04 2000 @@ -808,6 +808,7 @@ static CONST struct thumb_opcode tinsns[ {"blt", 0xdbfe, 2, ARM_THUMB, do_t_branch9}, {"bgt", 0xdcfe, 2, ARM_THUMB, do_t_branch9}, {"ble", 0xddfe, 2, ARM_THUMB, do_t_branch9}, + {"bal", 0xdefe, 2, ARM_THUMB, do_t_branch9}, {"bic", 0x4380, 2, ARM_THUMB, do_t_arit}, {"bl", 0xf7fffffe, 4, ARM_THUMB, do_t_branch23}, {"bx", 0x4700, 2, ARM_THUMB, do_t_bx}, @@ -5608,8 +5609,7 @@ md_apply_fix3 (fixP, val, seg) value += SEXT24 (newval); if ((value & 0xff000000UL) != 0 - && (fixP->fx_done == 0 - || ((value & 0xff000000UL) != 0xff000000UL))) + && ((value & 0xff000000UL) != 0xff000000UL)) as_bad_where (fixP->fx_file, fixP->fx_line, _("out of range branch")); diff -upr --new-file binutils-2.9.5.0.31/gas/config/tc-avr.c binutils-2.9.5.0.32/gas/config/tc-avr.c --- binutils-2.9.5.0.31/gas/config/tc-avr.c Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/gas/config/tc-avr.c Fri Mar 31 09:17:09 2000 @@ -0,0 +1,1252 @@ +/* tc-avr.c -- Assembler code for the ATMEL AVR + + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Contributed by Denis Chertykov + + This file is part of GAS, the GNU Assembler. + + GAS 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, or (at your option) + any later version. + + GAS 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 GAS; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include "as.h" +#include "subsegs.h" + +const char comment_chars[] = ";"; +const char line_comment_chars[] = "#"; +const char line_separator_chars[] = "$"; + +#define AVR_ISA_1200 1 +#define AVR_ISA_2xxx 3 +#define AVR_ISA_MEGA_x03 0x17 +#define AVR_ISA_MEGA 0x10 +#define AVR_ISA_MEGA_161 0x1b + +const char *md_shortopts = "m:"; +struct mcu_type_s +{ + char *name; + int isa; + int mach; +}; + +static struct mcu_type_s mcu_types[] = +{ + {"avr1", AVR_ISA_1200, bfd_mach_avr1}, + {"avr2", AVR_ISA_2xxx, bfd_mach_avr2}, + {"avr3", AVR_ISA_MEGA_x03, bfd_mach_avr3}, + {"avr4", AVR_ISA_MEGA_161, bfd_mach_avr4}, + {"at90s1200", AVR_ISA_1200, bfd_mach_avr1}, + {"at90s2313", AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s2323", AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s2333", AVR_ISA_2xxx, bfd_mach_avr2}, + {"attiny22" , AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s2343", AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s4433", AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s4414", AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s4434", AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s8515", AVR_ISA_2xxx, bfd_mach_avr2}, + {"at90s8535", AVR_ISA_2xxx, bfd_mach_avr2}, + {"atmega603", AVR_ISA_MEGA_x03, bfd_mach_avr3}, + {"atmega103", AVR_ISA_MEGA_x03, bfd_mach_avr3}, + {"atmega161", AVR_ISA_MEGA_161, bfd_mach_avr4}, + {NULL, 0, 0} +}; + + +/* Current MCU type. */ +static struct mcu_type_s default_mcu = {"avr2", AVR_ISA_2xxx,bfd_mach_avr2}; +static struct mcu_type_s *avr_mcu = &default_mcu; + +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; +static void avr_set_arch (int dummy); + +/* The target specific pseudo-ops which we support. */ +const pseudo_typeS md_pseudo_table[] = +{ + {"arch", avr_set_arch, 0}, + { NULL, NULL, 0} +}; + +#define LDI_IMMEDIATE(x) (((x) & 0xf) | (((x) << 4) & 0xf00)) +#define REGISTER_P(x) ((x) == 'r' || (x) == 'd' || (x) == 'w') + +struct avr_opcodes_s +{ + char *name; + char *constraints; + char *opcode; + int insn_size; /* in words */ + int isa; + unsigned int bin_opcode; +}; + +static char * skip_space (char * s); +static char * extract_word (char *from, char *to, int limit); +static unsigned int avr_operand (struct avr_opcodes_s *opcode, + int where, char *op, char **line); +static unsigned int avr_operands (struct avr_opcodes_s *opcode, char **line); +static unsigned int avr_get_constant (char * str, unsigned int max); +static char *parse_exp (char *s, expressionS * op); +static bfd_reloc_code_real_type avr_ldi_expression (expressionS *exp); +long md_pcrel_from_section PARAMS ((fixS *, segT)); + +/* constraint letters + r - any register + d - `ldi' register (r16-r31) + M - immediate value from 0 to 255 + n - immediate value from 0 to 255 ( n = ~M ). Relocation impossible + w - `adiw' register (r24,r26,r28,r30) + s - immediate value from 0 to 7 + P - Port address value from 0 to 64. (in, out) + p - Port address value from 0 to 32. (cbi, sbi, sbic, sbis) + K - immediate value from 0 to 64 (used in `adiw', `sbiw') + e - pointer regegisters (X,Y,Z) + b - base pointer register and displacement ([YZ]+disp) + i - immediate value + l - signed pc relative offset from -64 to 63 + L - signed pc relative offset from -2048 to 2047 + h - absolut code address (call, jmp) + S - immediate value from 0 to 7 (S = s << 4) +*/ +struct avr_opcodes_s avr_opcodes[] = +{ + {"adc", "r,r", "000111rdddddrrrr", 1, AVR_ISA_1200, 0x1c00}, + {"add", "r,r", "000011rdddddrrrr", 1, AVR_ISA_1200, 0x0c00}, + {"and", "r,r", "001000rdddddrrrr", 1, AVR_ISA_1200, 0x2000}, + {"cp", "r,r", "000101rdddddrrrr", 1, AVR_ISA_1200, 0x1400}, + {"cpc", "r,r", "000001rdddddrrrr", 1, AVR_ISA_1200, 0x0400}, + {"cpse", "r,r", "000100rdddddrrrr", 1, AVR_ISA_1200, 0x1000}, + {"eor", "r,r", "001001rdddddrrrr", 1, AVR_ISA_1200, 0x2400}, + {"mov", "r,r", "001011rdddddrrrr", 1, AVR_ISA_1200, 0x2c00}, + {"mul", "r,r", "100111rdddddrrrr", 1, AVR_ISA_MEGA_161, 0x9c00}, + {"or", "r,r", "001010rdddddrrrr", 1, AVR_ISA_1200, 0x2800}, + {"sbc", "r,r", "000010rdddddrrrr", 1, AVR_ISA_1200, 0x0800}, + {"sub", "r,r", "000110rdddddrrrr", 1, AVR_ISA_1200, 0x1800}, + + {"clr", "r=r", "001001rdddddrrrr", 1, AVR_ISA_1200, 0x2400}, + {"lsl", "r=r", "000011rdddddrrrr", 1, AVR_ISA_1200, 0x0c00}, + {"rol", "r=r", "000111rdddddrrrr", 1, AVR_ISA_1200, 0x1c00}, + {"tst", "r=r", "001000rdddddrrrr", 1, AVR_ISA_1200, 0x2000}, + + {"andi", "d,M", "0111KKKKddddKKKK", 1, AVR_ISA_1200, 0x7000}, + /*XXX special case*/ + {"cbr", "d,n", "0111KKKKddddKKKK", 1, AVR_ISA_1200, 0x7000}, + {"cpi", "d,M", "0011KKKKddddKKKK", 1, AVR_ISA_1200, 0x3000}, + {"ldi", "d,M", "1110KKKKddddKKKK", 1, AVR_ISA_1200, 0xe000}, + {"ori", "d,M", "0110KKKKddddKKKK", 1, AVR_ISA_1200, 0x6000}, + {"sbci", "d,M", "0100KKKKddddKKKK", 1, AVR_ISA_1200, 0x4000}, + {"sbr", "d,M", "0110KKKKddddKKKK", 1, AVR_ISA_1200, 0x6000}, + {"subi", "d,M", "0101KKKKddddKKKK", 1, AVR_ISA_1200, 0x5000}, + + {"sbrc", "r,s", "1111110rrrrr0sss", 1, AVR_ISA_1200, 0xfc00}, + {"sbrs", "r,s", "1111111rrrrr0sss", 1, AVR_ISA_1200, 0xfe00}, + {"bld", "r,s", "1111100ddddd0sss", 1, AVR_ISA_1200, 0xf800}, + {"bst", "r,s", "1111101ddddd0sss", 1, AVR_ISA_1200, 0xfa00}, + + {"in", "r,P", "10110PPdddddPPPP", 1, AVR_ISA_1200, 0xb000}, + {"out", "P,r", "10111PPrrrrrPPPP", 1, AVR_ISA_1200, 0xb800}, + + {"adiw", "w,K", "10010110KKddKKKK", 1, AVR_ISA_2xxx, 0x9600}, + {"sbiw", "w,K", "10010111KKddKKKK", 1, AVR_ISA_2xxx, 0x9700}, + + {"cbi", "p,s", "10011000pppppsss", 1, AVR_ISA_1200, 0x9800}, + {"sbi", "p,s", "10011010pppppsss", 1, AVR_ISA_1200, 0x9a00}, + {"sbic", "p,s", "10011001pppppsss", 1, AVR_ISA_1200, 0x9900}, + {"sbis", "p,s", "10011011pppppsss", 1, AVR_ISA_1200, 0x9b00}, + + /* ee = {X=11,Y=10,Z=00, 0} */ + {"ld", "r,e", "100!000dddddee-+", 1, AVR_ISA_2xxx, 0x8000}, + {"st", "e,r", "100!001rrrrree-+", 1, AVR_ISA_2xxx, 0x8200}, + {"ldd", "r,b", "10o0oo0dddddbooo", 1, AVR_ISA_2xxx, 0x8000}, + {"std", "b,r", "10o0oo1rrrrrbooo", 1, AVR_ISA_2xxx, 0x8200}, + {"sts", "i,r", "1001001ddddd0000", 2, AVR_ISA_2xxx, 0x9200}, + {"lds", "r,i", "1001000ddddd0000", 2, AVR_ISA_2xxx, 0x9000}, + + {"brbc", "s,l", "111101lllllllsss", 1, AVR_ISA_1200, 0xf400}, + {"brbs", "s,l", "111100lllllllsss", 1, AVR_ISA_1200, 0xf000}, + + {"brcc", "l", "111101lllllll000", 1, AVR_ISA_1200, 0xf400}, + {"brcs", "l", "111100lllllll000", 1, AVR_ISA_1200, 0xf000}, + {"breq", "l", "111100lllllll001", 1, AVR_ISA_1200, 0xf001}, + {"brge", "l", "111101lllllll100", 1, AVR_ISA_1200, 0xf404}, + {"brhc", "l", "111101lllllll101", 1, AVR_ISA_1200, 0xf405}, + {"brhs", "l", "111100lllllll101", 1, AVR_ISA_1200, 0xf005}, + {"brid", "l", "111101lllllll111", 1, AVR_ISA_1200, 0xf407}, + {"brie", "l", "111100lllllll111", 1, AVR_ISA_1200, 0xf007}, + {"brlo", "l", "111100lllllll000", 1, AVR_ISA_1200, 0xf000}, + {"brlt", "l", "111100lllllll100", 1, AVR_ISA_1200, 0xf004}, + {"brmi", "l", "111100lllllll010", 1, AVR_ISA_1200, 0xf002}, + {"brne", "l", "111101lllllll001", 1, AVR_ISA_1200, 0xf401}, + {"brpl", "l", "111101lllllll010", 1, AVR_ISA_1200, 0xf402}, + {"brsh", "l", "111101lllllll000", 1, AVR_ISA_1200, 0xf400}, + {"brtc", "l", "111101lllllll110", 1, AVR_ISA_1200, 0xf406}, + {"brts", "l", "111100lllllll110", 1, AVR_ISA_1200, 0xf006}, + {"brvc", "l", "111101lllllll011", 1, AVR_ISA_1200, 0xf403}, + {"brvs", "l", "111100lllllll011", 1, AVR_ISA_1200, 0xf003}, + + {"rcall", "L", "1101LLLLLLLLLLLL", 1, AVR_ISA_1200, 0xd000}, + {"rjmp", "L", "1100LLLLLLLLLLLL", 1, AVR_ISA_1200, 0xc000}, + + {"call", "h", "1001010hhhhh111h", 2, AVR_ISA_MEGA, 0x940e}, + {"jmp", "h", "1001010hhhhh110h", 2, AVR_ISA_MEGA, 0x940c}, + + {"asr", "r", "1001010rrrrr0101", 1, AVR_ISA_1200, 0x9405}, + {"com", "r", "1001010rrrrr0000", 1, AVR_ISA_1200, 0x9400}, + {"dec", "r", "1001010rrrrr1010", 1, AVR_ISA_1200, 0x940a}, + {"inc", "r", "1001010rrrrr0011", 1, AVR_ISA_1200, 0x9403}, + {"lsr", "r", "1001010rrrrr0110", 1, AVR_ISA_1200, 0x9406}, + {"neg", "r", "1001010rrrrr0001", 1, AVR_ISA_1200, 0x9401}, + {"pop", "r", "1001000rrrrr1111", 1, AVR_ISA_2xxx, 0x900f}, + {"push", "r", "1001001rrrrr1111", 1, AVR_ISA_2xxx, 0x920f}, + {"ror", "r", "1001010rrrrr0111", 1, AVR_ISA_1200, 0x9407}, + {"ser", "d", "11101111dddd1111", 1, AVR_ISA_1200, 0xef0f}, + {"swap", "r", "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402}, + + {"bclr", "S", "100101001SSS1000", 1, AVR_ISA_1200, 0x9488}, + {"bset", "S", "100101000SSS1000", 1, AVR_ISA_1200, 0x9408}, + + {"clc", "", "1001010010001000", 1, AVR_ISA_1200, 0x9488}, + {"clh", "", "1001010011011000", 1, AVR_ISA_1200, 0x94d8}, + {"cli", "", "1001010011111000", 1, AVR_ISA_1200, 0x94f8}, + {"cln", "", "1001010010101000", 1, AVR_ISA_1200, 0x94a8}, + {"cls", "", "1001010011001000", 1, AVR_ISA_1200, 0x94c8}, + {"clt", "", "1001010011101000", 1, AVR_ISA_1200, 0x94e8}, + {"clv", "", "1001010010111000", 1, AVR_ISA_1200, 0x94b8}, + {"clz", "", "1001010010011000", 1, AVR_ISA_1200, 0x9498}, + {"icall","", "1001010100001001", 1, AVR_ISA_2xxx, 0x9509}, + {"ijmp", "", "1001010000001001", 1, AVR_ISA_2xxx, 0x9409}, + {"lpm", "", "1001010111001000", 1, AVR_ISA_2xxx, 0x95c8}, + {"nop", "", "0000000000000000", 1, AVR_ISA_1200, 0x0000}, + {"ret", "", "1001010100001000", 1, AVR_ISA_1200, 0x9508}, + {"reti", "", "1001010100011000", 1, AVR_ISA_1200, 0x9518}, + {"sec", "", "1001010000001000", 1, AVR_ISA_1200, 0x9408}, + {"seh", "", "1001010001011000", 1, AVR_ISA_1200, 0x9458}, + {"sei", "", "1001010001111000", 1, AVR_ISA_1200, 0x9478}, + {"sen", "", "1001010000101000", 1, AVR_ISA_1200, 0x9428}, + {"ses", "", "1001010001001000", 1, AVR_ISA_1200, 0x9448}, + {"set", "", "1001010001101000", 1, AVR_ISA_1200, 0x9468}, + {"sev", "", "1001010000111000", 1, AVR_ISA_1200, 0x9438}, + {"sez", "", "1001010000011000", 1, AVR_ISA_1200, 0x9418}, + {"sleep","", "1001010110001000", 1, AVR_ISA_1200, 0x9588}, + {"wdr", "", "1001010110101000", 1, AVR_ISA_1200, 0x95a8}, + {"elpm", "", "1001010111011000", 1, AVR_ISA_MEGA_x03, 0x95d8}, + {NULL, NULL, NULL, 0, 0, 0} +}; + + + +#define EXP_MOD_NAME(i) exp_mod[i].name +#define EXP_MOD_RELOC(i) exp_mod[i].reloc +#define EXP_MOD_NEG_RELOC(i) exp_mod[i].neg_reloc +#define HAVE_PM_P(i) exp_mod[i].have_pm + +struct exp_mod_s +{ + char * name; + bfd_reloc_code_real_type reloc; + bfd_reloc_code_real_type neg_reloc; + int have_pm; +}; + +static struct exp_mod_s exp_mod[] = { + {"hh8", BFD_RELOC_AVR_HH8_LDI, BFD_RELOC_AVR_HH8_LDI_NEG, 1}, + {"pm_hh8", BFD_RELOC_AVR_HH8_LDI_PM, BFD_RELOC_AVR_HH8_LDI_PM_NEG, 0}, + {"hi8", BFD_RELOC_AVR_HI8_LDI, BFD_RELOC_AVR_HI8_LDI_NEG, 1}, + {"pm_hi8", BFD_RELOC_AVR_HI8_LDI_PM, BFD_RELOC_AVR_HI8_LDI_PM_NEG, 0}, + {"lo8", BFD_RELOC_AVR_LO8_LDI, BFD_RELOC_AVR_LO8_LDI_NEG, 1}, + {"pm_lo8", BFD_RELOC_AVR_LO8_LDI_PM, BFD_RELOC_AVR_LO8_LDI_PM_NEG, 0}, + {"hlo8", -BFD_RELOC_AVR_LO8_LDI, -BFD_RELOC_AVR_LO8_LDI_NEG, 0}, + {"hhi8", -BFD_RELOC_AVR_HI8_LDI, -BFD_RELOC_AVR_HI8_LDI_NEG, 0}, +}; + +/* Opcode hash table. */ +static struct hash_control *avr_hash; + +/* Reloc modifiers hash control (hh8,hi8,lo8,pm_xx). */ +static struct hash_control *avr_mod_hash; + +#define OPTION_MMCU (OPTION_MD_BASE + 1) + +struct option md_longopts[] = { + {"mmcu", required_argument, NULL, 'm'}, + {NULL, no_argument, NULL, 0} +}; +size_t md_longopts_size = sizeof(md_longopts); + +static inline char * +skip_space (s) + char * s; +{ + while (*s == ' ' || *s == '\t') + ++s; + return s; +} + +/* Extract one word from FROM and copy it to TO. */ +static char * +extract_word (char *from, char *to, int limit) +{ + char *op_start; + char *op_end; + int size = 0; + + /* Drop leading whitespace. */ + from = skip_space (from); + *to = 0; + /* Find the op code end. */ + for (op_start = op_end = from; *op_end != 0 && is_part_of_name(*op_end); ) + { + to[size++] = *op_end++; + if (size + 1 >= limit) + break; + } + to[size] = 0; + return op_end; +} + +int +md_estimate_size_before_relax (fragp, seg) + fragS *fragp; + asection *seg; +{ + abort (); + return 0; +} + +void +md_show_usage (stream) + FILE *stream; +{ + fprintf + (stream, + _ ("AVR options:\n" + " -mmcu=[avr-name] select microcontroller variant\n" + " [avr-name] can be:\n" + " avr1 - AT90S1200\n" + " avr2 - AT90S2xxx, AT90S4xxx, AT90S85xx, ATtiny22\n" + " avr3 - ATmega103 or ATmega603\n" + " avr4 - ATmega161\n" + " or immediate microcontroller name.\n")); +} + +static void +avr_set_arch (dummy) + int dummy; +{ + char * str; + str = (char *)alloca (20); + input_line_pointer = extract_word (input_line_pointer, str, 20); + md_parse_option ('m', str); + bfd_set_arch_mach (stdoutput, TARGET_ARCH, avr_mcu->mach); +} + +int +md_parse_option (c, arg) + int c; + char *arg; +{ + char *t = alloca (strlen (arg) + 1); + char *s = t; + char *arg1 = arg; + do + *t = tolower (*arg1++); + while (*t++); + + if (c == 'm') + { + int i; + + for (i = 0; mcu_types[i].name; ++i) + if (strcmp (mcu_types[i].name, s) == 0) + break; + + if (!mcu_types[i].name) + as_fatal (_ ("unknown MCU: %s\n"), arg); + if (avr_mcu == &default_mcu) + avr_mcu = &mcu_types[i]; + else + as_fatal (_ ("redefinition of mcu type `%s'"), mcu_types[i].name); + return 1; + } + return 0; +} + +symbolS * +md_undefined_symbol (name) + char *name; +{ + return 0; +} + +/* Convert a string pointed to by input_line_pointer into a floating point + constant of type `type', and store the appropriate bytes to `*litP'. + The number of LITTLENUMS emitted is stored in `*sizeP'. Returns NULL if + OK, or an error message otherwise. */ +char * +md_atof (type, litP, sizeP) + int type; + char *litP; + int *sizeP; +{ + int prec; + LITTLENUM_TYPE words[4]; + LITTLENUM_TYPE *wordP; + char *t; + + switch (type) + { + case 'f': + prec = 2; + break; + case 'd': + prec = 4; + break; + default: + *sizeP = 0; + return _("bad call to md_atof"); + } + + t = atof_ieee (input_line_pointer, type, words); + if (t) + input_line_pointer = t; + + *sizeP = prec * sizeof (LITTLENUM_TYPE); + /* This loop outputs the LITTLENUMs in REVERSE order. */ + for (wordP = words + prec - 1; prec--;) + { + md_number_to_chars (litP, (valueT) (*wordP--), sizeof (LITTLENUM_TYPE)); + litP += sizeof (LITTLENUM_TYPE); + } + return NULL; +} + +void +md_convert_frag (abfd, sec, fragP) + bfd *abfd; + asection *sec; + fragS *fragP; +{ + abort (); +} + + +void +md_begin () +{ + int i; + struct avr_opcodes_s *opcode; + avr_hash = hash_new(); + + /* Insert unique names into hash table. This hash table then provides a + quick index to the first opcode with a particular name in the opcode + table. */ + + for (opcode = avr_opcodes; opcode->name; opcode++) + hash_insert (avr_hash, opcode->name, (char *) opcode); + + avr_mod_hash = hash_new (); + + for (i = 0; i < sizeof (exp_mod) / sizeof (exp_mod[0]); ++i) + hash_insert (avr_mod_hash, EXP_MOD_NAME(i), (void*)(i+10)); + + for (i = 0; i < 32; i++) + { + char buf[5]; + + sprintf (buf, "r%d", i); + symbol_table_insert (symbol_new (buf, reg_section, i, + &zero_address_frag)); + sprintf (buf, "R%d", i); + symbol_table_insert (symbol_new (buf, reg_section, i, + &zero_address_frag)); + } + + bfd_set_arch_mach (stdoutput, TARGET_ARCH, avr_mcu->mach); +} + + +static unsigned int +avr_operands (opcode, line) + struct avr_opcodes_s *opcode; + char **line; +{ + char *op = opcode->constraints; + unsigned int bin = opcode->bin_opcode; + char *frag = frag_more (opcode->insn_size * 2); + char *str = *line; + int where = frag - frag_now->fr_literal; + + /* Opcode have operands. */ + if (*op) + { + unsigned int reg1 = 0; + unsigned int reg2 = 0; + int reg1_present = 0; + int reg2_present = 0; + + /* Parse first operand. */ + if (REGISTER_P (*op)) + reg1_present = 1; + reg1 = avr_operand (opcode, where, op, &str); + ++op; + + /* Parse second operand. */ + if (*op) + { + if (*op == ',') + ++op; + if (*op == '=') + { + reg2 = reg1; + reg2_present = 1; + } + else + { + if (REGISTER_P (*op)) + reg2_present = 1; + + str = skip_space (str); + if (*str++ != ',') + as_bad (_ ("`,' required")); + str = skip_space (str); + + reg2 = avr_operand (opcode, where, op, &str); + + } + if (reg1_present && reg2_present) + reg2 = (reg2 & 0xf) | ((reg2 << 5) & 0x200); + else if (reg2_present) + reg2 <<= 4; + } + if (reg1_present) + reg1 <<= 4; + bin |= reg1 | reg2; + } + if (opcode->insn_size == 2) + { + bfd_putl32 ((bfd_vma)bin, frag); + } + else + { + bfd_putl16 ((bfd_vma)bin, frag); + } + *line = str; + return bin; +} + +static unsigned int +avr_get_constant (str, max) + char * str; + unsigned int max; +{ + expressionS ex; + str = skip_space (str); + input_line_pointer = str; + expression (&ex); + + if (ex.X_op != O_constant) + as_bad (_("constant value required")); + + if (ex.X_add_number > max) + as_bad (_("number must be less than %d"), max+1); + return ex.X_add_number; +} + +static unsigned int +avr_operand (opcode, where, op, line) + struct avr_opcodes_s *opcode; + int where; + char *op; + char **line; +{ + unsigned int op_mask = 0; + char *str = *line; + expressionS op_expr; + + str = skip_space (str); + switch (*op) + { + /* Any register operand. */ + case 'w': + case 'd': + case 'r': + { + char r_name[256]; + str = extract_word (str, r_name, sizeof (r_name)); + parse_exp (r_name, &op_expr); + if (op_expr.X_op == O_register) + { + op_mask = op_expr.X_add_number; + if (op_mask <= 31) + { + if (*op == 'd') + { + if (op_mask < 16) + as_bad (_ ("register number above 15 required")); + op_mask -= 16; + } + if (*op == 'w') + { + op_mask -= 24; + if (op_mask & 1 || op_mask > 6) + as_bad (_ ("register r24,r26,r28 or r30 required")); + op_mask >>= 1; + } + break; + } + } + as_bad (_ ("register required")); + } + break; + + case 'e': + { + char c; + if (*str == '-') + { + str = skip_space (str+1); + op_mask = 0x1002; + } + c = tolower (*str); + if (c == 'x') + op_mask |= 0x100c; + else if (c == 'y') + op_mask |= 0x8; + else if (c != 'z') + as_bad (_ ("pointer register (X,Y or Z) required")); + + str = skip_space (str+1); + if (*str == '+') + { + ++str; + if (op_mask & 2) + as_bad (_ ("cannot both predecrement and postincrement")); + op_mask |= 0x1001; + } + } + break; + + case 'b': + { + char c = tolower (*str++); + if (c == 'y') + op_mask |= 0x8; + else if (c != 'z') + as_bad (_ ("pointer register (Y or Z) required")); + str = skip_space (str); + if (*str++ == '+') + { + unsigned int x; + x = avr_get_constant (str, 63); + str = input_line_pointer; + op_mask |= (x & 7) | ((x & (3 << 3)) << 7) | ((x & (1 << 5)) << 8); + } + } + break; + + case 'h': + { + str = parse_exp (str, &op_expr); + fix_new_exp (frag_now, where, opcode->insn_size * 2, + &op_expr, false, BFD_RELOC_AVR_CALL); + + } + break; + + case 'L': + { + str = parse_exp (str, &op_expr); + fix_new_exp (frag_now, where, opcode->insn_size * 2, + &op_expr, true, BFD_RELOC_AVR_13_PCREL); + + } + break; + + case 'l': + { + str = parse_exp (str, &op_expr); + fix_new_exp (frag_now, where, opcode->insn_size * 2, + &op_expr, true, BFD_RELOC_AVR_7_PCREL); + + } + break; + + case 'i': + { + str = parse_exp (str, &op_expr); + fix_new_exp (frag_now, where+2, opcode->insn_size * 2, + &op_expr, false, BFD_RELOC_16); + + } + break; + + case 'M': + { + bfd_reloc_code_real_type r_type; + input_line_pointer = str; + r_type = avr_ldi_expression (&op_expr); + str = input_line_pointer; + fix_new_exp (frag_now, where, 3, + &op_expr, false, r_type); + } + break; + + case 'n': + { + unsigned int x; + x = ~avr_get_constant (str, 255); + str = input_line_pointer; + op_mask |= (x & 0xf) | ((x << 4) & 0xf00); + } + break; + + case 'K': + { + unsigned int x; + x = avr_get_constant (str, 63); + str = input_line_pointer; + op_mask |= (x & 0xf) | ((x & 0x30) << 2); + } + break; + + case 'S': + case 's': + { + unsigned int x; + x = avr_get_constant (str, 7); + str = input_line_pointer; + if (*op == 'S') + x <<= 4; + op_mask |= x; + } + break; + + case 'P': + { + unsigned int x; + x = avr_get_constant (str, 63); + str = input_line_pointer; + op_mask |= (x & 0xf) | ((x & 0x30) << 5); + } + break; + + case 'p': + { + unsigned int x; + x = avr_get_constant (str, 31); + str = input_line_pointer; + op_mask |= x << 3; + } + break; + default: + as_bad (_ ("unknown constraint `%c'"), *op); + } + *line = str; + return op_mask; +} + +/* GAS will call this function for each section at the end of the assembly, + to permit the CPU backend to adjust the alignment of a section. */ +valueT +md_section_align (seg, addr) + asection *seg; + valueT addr; +{ + int align = bfd_get_section_alignment (stdoutput, seg); + return ((addr + (1 << align) - 1) & (-1 << align)); +} + +/* If you define this macro, it should return the offset between the + address of a PC relative fixup and the position from which the PC + relative adjustment should be made. On many processors, the base + of a PC relative instruction is the next instruction, so this + macro would return the length of an instruction. */ +long +md_pcrel_from_section (fixp, sec) + fixS *fixp; + segT sec; +{ + if (fixp->fx_addsy != (symbolS *)NULL + && (!S_IS_DEFINED (fixp->fx_addsy) + || (S_GET_SEGMENT (fixp->fx_addsy) != sec))) + return 0; + return fixp->fx_frag->fr_address + fixp->fx_where; +} + +/* GAS will call this for each fixup. It should store the correct + value in the object file. */ +int +md_apply_fix3 (fixp, valuep, seg) + fixS *fixp; + valueT *valuep; + segT seg; +{ + unsigned char *where; + unsigned long insn; + long value; + + if (fixp->fx_addsy == (symbolS *) NULL) + { + value = *valuep; + fixp->fx_done = 1; + } + else if (fixp->fx_pcrel) + { + segT s = S_GET_SEGMENT (fixp->fx_addsy); + if (fixp->fx_addsy && (s == seg || s == absolute_section)) + { + value = S_GET_VALUE (fixp->fx_addsy) + *valuep; + fixp->fx_done = 1; + } + else + value = *valuep; + } + else + { + value = fixp->fx_offset; + if (fixp->fx_subsy != (symbolS *) NULL) + { + if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section) + { + value -= S_GET_VALUE (fixp->fx_subsy); + fixp->fx_done = 1; + } + else + { + /* We don't actually support subtracting a symbol. */ + as_bad_where (fixp->fx_file, fixp->fx_line, + _ ("expression too complex")); + } + } + } + switch (fixp->fx_r_type) + { + default: + fixp->fx_no_overflow = 1; + break; + case BFD_RELOC_AVR_7_PCREL: + case BFD_RELOC_AVR_13_PCREL: + case BFD_RELOC_32: + case BFD_RELOC_16: + case BFD_RELOC_AVR_CALL: + break; + } + + if (fixp->fx_done) + { + /* Fetch the instruction, insert the fully resolved operand + value, and stuff the instruction back again. */ + where = fixp->fx_frag->fr_literal + fixp->fx_where; + insn = bfd_getl16 (where); + + switch (fixp->fx_r_type) + { + case BFD_RELOC_AVR_7_PCREL: + if (value & 1) + as_bad_where (fixp->fx_file, fixp->fx_line, + _("odd address operand: %ld"), value); + /* Instruction addresses are always right-shifted by 1. */ + value >>= 1; + --value; /* Correct PC. */ + if (value < -64 || value > 63) + as_bad_where (fixp->fx_file, fixp->fx_line, + _("operand out of range: %ld"), value); + value = (value << 3) & 0x3f8; + bfd_putl16 ((bfd_vma) (value | insn), where); + break; + + case BFD_RELOC_AVR_13_PCREL: + if (value & 1) + as_bad_where (fixp->fx_file, fixp->fx_line, + _("odd address operand: %ld"), value); + /* Instruction addresses are always right-shifted by 1. */ + value >>= 1; + --value; /* Correct PC. */ + /* XXX AT90S8515 must have WRAP here. */ + + if (value < -2048 || value > 2047) + { + if (avr_mcu->mach == bfd_mach_avr2) + { + if (value > 2047) + value -= 4096; + else + value += 4096; + } + else + as_bad_where (fixp->fx_file, fixp->fx_line, + _("operand out of range: %ld"), value); + } + + value &= 0xfff; + bfd_putl16 ((bfd_vma) (value | insn), where); + break; + + case BFD_RELOC_32: + bfd_putl16 ((bfd_vma) value, where); + break; + + case BFD_RELOC_16: + bfd_putl16 ((bfd_vma) value, where); + break; + + case BFD_RELOC_AVR_16_PM: + bfd_putl16 ((bfd_vma) (value>>1), where); + break; + + case BFD_RELOC_AVR_LO8_LDI: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value), where); + break; + + case -BFD_RELOC_AVR_LO8_LDI: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 16), where); + break; + + case BFD_RELOC_AVR_HI8_LDI: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 8), where); + break; + + case -BFD_RELOC_AVR_HI8_LDI: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 24), where); + break; + + case BFD_RELOC_AVR_HH8_LDI: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 16), where); + break; + + case BFD_RELOC_AVR_LO8_LDI_NEG: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value), where); + break; + + case -BFD_RELOC_AVR_LO8_LDI_NEG: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 16), where); + break; + + case BFD_RELOC_AVR_HI8_LDI_NEG: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 8), where); + break; + + case -BFD_RELOC_AVR_HI8_LDI_NEG: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 24), where); + break; + + case BFD_RELOC_AVR_HH8_LDI_NEG: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 16), where); + break; + + case BFD_RELOC_AVR_LO8_LDI_PM: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 1), where); + break; + + case BFD_RELOC_AVR_HI8_LDI_PM: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 9), where); + break; + + case BFD_RELOC_AVR_HH8_LDI_PM: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 17), where); + break; + + case BFD_RELOC_AVR_LO8_LDI_PM_NEG: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 1), where); + break; + + case BFD_RELOC_AVR_HI8_LDI_PM_NEG: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 9), where); + break; + + case BFD_RELOC_AVR_HH8_LDI_PM_NEG: + bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 17), where); + break; + + case BFD_RELOC_AVR_CALL: + { + unsigned long x; + x = bfd_getl16 (where); + if (value & 1) + as_bad_where (fixp->fx_file, fixp->fx_line, + _("odd address operand: %ld"), value); + value >>= 1; + x |= ((value & 0x10000) | ((value << 3) & 0x1f00000)) >> 16; + bfd_putl16 ((bfd_vma) x, where); + bfd_putl16 ((bfd_vma) (value & 0xffff), where+2); + } + break; + + default: + as_fatal ( _("line %d: unknown relocation type: 0x%x"), + fixp->fx_line, fixp->fx_r_type); + break; + } + } + else + { + switch (fixp->fx_r_type) + { + case -BFD_RELOC_AVR_HI8_LDI_NEG: + case -BFD_RELOC_AVR_HI8_LDI: + case -BFD_RELOC_AVR_LO8_LDI_NEG: + case -BFD_RELOC_AVR_LO8_LDI: + as_bad_where (fixp->fx_file, fixp->fx_line, + _("only constant expression allowed")); + fixp->fx_done = 1; + break; + default: + break; + } + fixp->fx_addnumber = value; + } + return 0; +} + + +/* A `BFD_ASSEMBLER' GAS will call this to generate a reloc. GAS + will pass the resulting reloc to `bfd_install_relocation'. This + currently works poorly, as `bfd_install_relocation' often does the + wrong thing, and instances of `tc_gen_reloc' have been written to + work around the problems, which in turns makes it difficult to fix + `bfd_install_relocation'. */ + +/* If while processing a fixup, a reloc really needs to be created + then it is done here. */ + +arelent * +tc_gen_reloc (seg, fixp) + asection *seg; + fixS *fixp; +{ + arelent *reloc; + + reloc = (arelent *) xmalloc (sizeof (arelent)); + + reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); + *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); + + reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; + reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); + if (reloc->howto == (reloc_howto_type *) NULL) + { + as_bad_where (fixp->fx_file, fixp->fx_line, + _("reloc %d not supported by object file format"), + (int)fixp->fx_r_type); + return NULL; + } + + if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT + || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) + reloc->address = fixp->fx_offset; + + reloc->addend = fixp->fx_offset; + + return reloc; +} + + +void +md_assemble (str) + char *str; +{ + struct avr_opcodes_s * opcode; + char op[11]; + + str = extract_word (str, op, sizeof(op)); + + if (!op[0]) + as_bad (_ ("can't find opcode ")); + + opcode = (struct avr_opcodes_s *) hash_find (avr_hash, op); + + if (opcode == NULL) + { + as_bad (_ ("unknown opcode `%s'"), op); + return; + } + + if ((opcode->isa & avr_mcu->isa) != opcode->isa) + as_bad (_ ("illegal opcode %s for mcu %s"), opcode->name, avr_mcu->name); + + /* We used to set input_line_pointer to the result of get_operands, + but that is wrong. Our caller assumes we don't change it. */ + { + char *t = input_line_pointer; + avr_operands (opcode, &str); + if (*str) + as_bad (_ ("garbage at end of line")); + input_line_pointer = t; + } +} + +/* Parse ordinary expression. */ +static char * +parse_exp (s, op) + char *s; + expressionS * op; +{ + input_line_pointer = s; + expression (op); + if (op->X_op == O_absent) + as_bad (_("missing operand")); + return input_line_pointer; +} + + +/* Parse special expressions (needed for LDI command): + xx8 (address) + xx8 (-address) + pm_xx8 (address) + pm_xx8 (-address) + where xx is: hh, hi, lo +*/ +static bfd_reloc_code_real_type +avr_ldi_expression (exp) + expressionS *exp; +{ + char *str = input_line_pointer; + char *tmp; + char op[8]; + int mod; + tmp = str; + + str = extract_word (str, op, sizeof (op)); + if (op[0]) + { + mod = (int) hash_find (avr_mod_hash, op); + if (mod) + { + int closes = 0; + mod -= 10; + str = skip_space (str); + if (*str == '(') + { + int neg_p = 0; + ++str; + if (strncmp ("pm(", str, 3) == 0 + || strncmp ("-(pm(", str, 5) == 0) + { + if (HAVE_PM_P(mod)) + { + ++mod; + ++closes; + } + else + as_bad (_ ("illegal expression")); + if (*str == '-') + { + neg_p = 1; + ++closes; + str += 5; + } + else + str += 3; + } + if (*str == '-' && *(str + 1) == '(') + { + neg_p ^= 1; + ++closes; + str += 2; + } + input_line_pointer = str; + expression (exp); + do + { + if (*input_line_pointer != ')') + { + as_bad (_ ("`)' required")); + break; + } + input_line_pointer++; + } + while (closes--); + return neg_p ? EXP_MOD_NEG_RELOC (mod) : EXP_MOD_RELOC (mod); + } + } + } + input_line_pointer = tmp; + expression (exp); + return BFD_RELOC_AVR_LO8_LDI; +} + +/* Flag to pass `pm' mode between `avr_parse_cons_expression' and + `avr_cons_fix_new' */ +static int exp_mod_pm = 0; + +/* Parse special CONS expression: pm (expression) + which is used for addressing to a program memory. + Relocation: BFD_RELOC_AVR_16_PM */ +void +avr_parse_cons_expression (exp, nbytes) + expressionS *exp; + int nbytes; +{ + char * tmp; + + exp_mod_pm = 0; + + tmp = input_line_pointer = skip_space (input_line_pointer); + + if (nbytes == 2) + { + char * pm_name = "pm"; + int len = strlen (pm_name); + if (strncasecmp (input_line_pointer, pm_name, len) == 0) + { + input_line_pointer = skip_space (input_line_pointer + len); + if (*input_line_pointer == '(') + { + input_line_pointer = skip_space (input_line_pointer + 1); + exp_mod_pm = 1; + expression (exp); + if (*input_line_pointer == ')') + ++input_line_pointer; + else + { + as_bad (_ ("`)' required")); + exp_mod_pm = 0; + } + return; + } + input_line_pointer = tmp; + } + } + expression (exp); +} + +void +avr_cons_fix_new(frag, where, nbytes, exp) + fragS *frag; + int where; + int nbytes; + expressionS *exp; +{ + if (exp_mod_pm == 0) + { + if (nbytes == 2) + fix_new_exp (frag, where, nbytes, exp, false, BFD_RELOC_16); + else if (nbytes == 4) + fix_new_exp (frag, where, nbytes, exp, false, BFD_RELOC_32); + else + as_bad (_ ("illegal %srelocation size: %d"), "", nbytes); + } + else + { + if (nbytes == 2) + fix_new_exp (frag, where, nbytes, exp, false, BFD_RELOC_AVR_16_PM); + else + as_bad (_ ("illegal %srelocation size: %d"), "`pm' ", nbytes); + exp_mod_pm = 0; + } +} diff -upr --new-file binutils-2.9.5.0.31/gas/config/tc-avr.h binutils-2.9.5.0.32/gas/config/tc-avr.h --- binutils-2.9.5.0.31/gas/config/tc-avr.h Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/gas/config/tc-avr.h Fri Mar 31 09:17:09 2000 @@ -0,0 +1,118 @@ +/* This file is tc-avr.h + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + + Contributed by Denis Chertykov + + This file is part of GAS, the GNU Assembler. + + GAS 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, or (at your option) + any later version. + + GAS 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 GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#ifndef BFD_ASSEMBLER + #error AVR support requires BFD_ASSEMBLER +#endif + + +#define TC_AVR +/* By convention, you should define this macro in the `.h' file. For + example, `tc-m68k.h' defines `TC_M68K'. You might have to use this + if it is necessary to add CPU specific code to the object format + file. */ + +#define TARGET_FORMAT "elf32-avr" +/* This macro is the BFD target name to use when creating the output + file. This will normally depend upon the `OBJ_FMT' macro. */ + +#define TARGET_ARCH bfd_arch_avr +/* This macro is the BFD architecture to pass to `bfd_set_arch_mach'. */ + +#define TARGET_MACH 0 +/* This macro is the BFD machine number to pass to + `bfd_set_arch_mach'. If it is not defined, GAS will use 0. */ + +#define TARGET_BYTES_BIG_ENDIAN 0 +/* You should define this macro to be non-zero if the target is big + endian, and zero if the target is little endian. */ + +#define ONLY_STANDARD_ESCAPES +/* If you define this macro, GAS will warn about the use of + nonstandard escape sequences in a string. */ + +#define md_operand(x) +/* GAS will call this function for any expression that can not be + recognized. When the function is called, `input_line_pointer' + will point to the start of the expression. */ + +void avr_parse_cons_expression (expressionS *exp, int nbytes); + +#define TC_PARSE_CONS_EXPRESSION(EXPR,N) avr_parse_cons_expression (EXPR,N) +/* + You may define this macro to parse an expression used in a data + allocation pseudo-op such as `.word'. You can use this to + recognize relocation directives that may appear in such directives.*/ + +void avr_cons_fix_new(fragS *frag,int where, int nbytes, expressionS *exp); + +#define TC_CONS_FIX_NEW(FRAG,WHERE,N,EXP) avr_cons_fix_new(FRAG,WHERE,N,EXP) +/* You may define this macro to generate a fixup for a data + allocation pseudo-op. */ + +#define md_number_to_chars number_to_chars_littleendian +/* This should just call either `number_to_chars_bigendian' or + `number_to_chars_littleendian', whichever is appropriate. On + targets like the MIPS which support options to change the + endianness, which function to call is a runtime decision. On + other targets, `md_number_to_chars' can be a simple macro. */ + +#define WORKING_DOT_WORD +/* +`md_short_jump_size' +`md_long_jump_size' +`md_create_short_jump' +`md_create_long_jump' + If `WORKING_DOT_WORD' is defined, GAS will not do broken word + processing (*note Broken words::.). Otherwise, you should set + `md_short_jump_size' to the size of a short jump (a jump that is + just long enough to jump around a long jmp) and + `md_long_jump_size' to the size of a long jump (a jump that can go + anywhere in the function), You should define + `md_create_short_jump' to create a short jump around a long jump, + and define `md_create_long_jump' to create a long jump. */ + +#define MD_APPLY_FIX3 + +#define TC_HANDLES_FX_DONE + +#undef RELOC_EXPANSION_POSSIBLE +/* If you define this macro, it means that `tc_gen_reloc' may return + multiple relocation entries for a single fixup. In this case, the + return value of `tc_gen_reloc' is a pointer to a null terminated + array. */ + +#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) +/* If you define this macro, it should return the offset between the + address of a PC relative fixup and the position from which the PC + relative adjustment should be made. On many processors, the base + of a PC relative instruction is the next instruction, so this + macro would return the length of an instruction. */ + +#define LISTING_WORD_SIZE 2 +/* The number of bytes to put into a word in a listing. This affects + the way the bytes are clumped together in the listing. For + example, a value of 2 might print `1234 5678' where a value of 1 + would print `12 34 56 78'. The default value is 4. */ + +#define LEX_DOLLAR 0 +/* AVR port uses `$' as a logical line separator */ diff -upr --new-file binutils-2.9.5.0.31/gas/config/tc-i386.c binutils-2.9.5.0.32/gas/config/tc-i386.c --- binutils-2.9.5.0.31/gas/config/tc-i386.c Tue Feb 29 11:15:14 2000 +++ binutils-2.9.5.0.32/gas/config/tc-i386.c Fri Mar 31 09:28:45 2000 @@ -549,7 +549,7 @@ set_intel_syntax (syntax_flag) else if (strcmp(string, "noprefix") == 0) ask_naked_reg = -1; else - as_bad (_("Bad argument to syntax directive.")); + as_bad (_("bad argument to syntax directive.")); *input_line_pointer = e; } demand_empty_rest_of_line (); @@ -911,7 +911,7 @@ reloc (size, pcrel, other) case 2: return BFD_RELOC_16_PCREL; case 4: return BFD_RELOC_32_PCREL; } - as_bad (_("Can not do %d byte pc-relative relocation"), size); + as_bad (_("can not do %d byte pc-relative relocation"), size); } else { @@ -921,7 +921,7 @@ reloc (size, pcrel, other) case 2: return BFD_RELOC_16; case 4: return BFD_RELOC_32; } - as_bad (_("Can not do %d byte relocation"), size); + as_bad (_("can not do %d byte relocation"), size); } return BFD_RELOC_NONE; @@ -1466,7 +1466,7 @@ md_assemble (line) if (!intel_syntax && (i.types[0] & JumpAbsolute) != (t->operand_types[0] & JumpAbsolute)) { - as_warn (_("Indirect %s without `*'"), t->name); + as_warn (_("indirect %s without `*'"), t->name); } if ((t->opcode_modifier & (IsPrefix|IgnoreSize)) == (IsPrefix|IgnoreSize)) @@ -1490,8 +1490,8 @@ md_assemble (line) i.tm.operand_types[1] = t->operand_types[0]; } - /* Undo UNIXWARE_COMPAT brokenness when in Intel mode. See i386.h */ - if (UNIXWARE_COMPAT + /* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */ + if (SYSV386_COMPAT && intel_syntax && (i.tm.base_opcode & 0xfffffde0) == 0xdce0) i.tm.base_opcode ^= FloatR; @@ -2496,7 +2496,7 @@ i386_immediate (imm_start) if (i.imm_operands == MAX_IMMEDIATE_OPERANDS) { - as_bad (_("Only 1 or 2 immediate operands are allowed")); + as_bad (_("only 1 or 2 immediate operands are allowed")); return 0; } @@ -2549,7 +2549,7 @@ i386_immediate (imm_start) len = 3; } else - as_bad (_("Bad reloc specifier in expression")); + as_bad (_("bad reloc specifier in expression")); /* Replace the relocation token with ' ', so that errors like foo@GOTOFF1 will be detected. */ @@ -2567,14 +2567,14 @@ i386_immediate (imm_start) SKIP_WHITESPACE (); if (*input_line_pointer) - as_bad (_("Ignoring junk `%s' after expression"), input_line_pointer); + as_bad (_("ignoring junk `%s' after expression"), input_line_pointer); input_line_pointer = save_input_line_pointer; if (exp->X_op == O_absent || exp->X_op == O_big) { /* missing or bad expr becomes absolute 0 */ - as_bad (_("Missing or invalid immediate expression `%s' taken as 0"), + as_bad (_("missing or invalid immediate expression `%s' taken as 0"), imm_start); exp->X_op = O_constant; exp->X_add_number = 0; @@ -2604,9 +2604,9 @@ i386_immediate (imm_start) ) { #ifdef BFD_ASSEMBLER - as_bad (_("Unimplemented segment %s in operand"), exp_seg->name); + as_bad (_("unimplemented segment %s in operand"), exp_seg->name); #else - as_bad (_("Unimplemented segment type %d in operand"), exp_seg); + as_bad (_("unimplemented segment type %d in operand"), exp_seg); #endif return 0; } @@ -2773,7 +2773,7 @@ i386_displacement (disp_start, disp_end) len = 3; } else - as_bad (_("Bad reloc specifier in expression")); + as_bad (_("bad reloc specifier in expression")); /* Replace the relocation token with ' ', so that errors like foo@GOTOFF1 will be detected. */ @@ -2807,7 +2807,7 @@ i386_displacement (disp_start, disp_end) SKIP_WHITESPACE (); if (*input_line_pointer) - as_bad (_("Ignoring junk `%s' after expression"), + as_bad (_("ignoring junk `%s' after expression"), input_line_pointer); #if GCC_ASM_O_HACK RESTORE_END_STRING (disp_end + 1); @@ -2818,7 +2818,7 @@ i386_displacement (disp_start, disp_end) if (exp->X_op == O_absent || exp->X_op == O_big) { /* missing or bad expr becomes absolute 0 */ - as_bad (_("Missing or invalid displacement expression `%s' taken as 0"), + as_bad (_("missing or invalid displacement expression `%s' taken as 0"), disp_start); exp->X_op = O_constant; exp->X_add_number = 0; @@ -2850,9 +2850,9 @@ i386_displacement (disp_start, disp_end) && exp_seg != undefined_section) { #ifdef BFD_ASSEMBLER - as_bad (_("Unimplemented segment %s in operand"), exp_seg->name); + as_bad (_("unimplemented segment %s in operand"), exp_seg->name); #else - as_bad (_("Unimplemented segment type %d in operand"), exp_seg); + as_bad (_("unimplemented segment type %d in operand"), exp_seg); #endif return 0; } @@ -3069,24 +3069,24 @@ i386_index_check (operand_string) tryprefix: #endif - if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0) ? + if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0) /* 16 bit mode checks */ - ((i.base_reg - && ((i.base_reg->reg_type & (Reg16|BaseIndex)) - != (Reg16|BaseIndex))) - || (i.index_reg - && (((i.index_reg->reg_type & (Reg16|BaseIndex)) - != (Reg16|BaseIndex)) - || ! (i.base_reg - && i.base_reg->reg_num < 6 - && i.index_reg->reg_num >= 6 - && i.log2_scale_factor == 0)))) : + ? ((i.base_reg + && ((i.base_reg->reg_type & (Reg16|BaseIndex)) + != (Reg16|BaseIndex))) + || (i.index_reg + && (((i.index_reg->reg_type & (Reg16|BaseIndex)) + != (Reg16|BaseIndex)) + || ! (i.base_reg + && i.base_reg->reg_num < 6 + && i.index_reg->reg_num >= 6 + && i.log2_scale_factor == 0)))) /* 32 bit mode checks */ - ((i.base_reg - && (i.base_reg->reg_type & Reg32) == 0) - || (i.index_reg - && ((i.index_reg->reg_type & (Reg32|BaseIndex)) - != (Reg32|BaseIndex))))) + : ((i.base_reg + && (i.base_reg->reg_type & Reg32) == 0) + || (i.index_reg + && ((i.index_reg->reg_type & (Reg32|BaseIndex)) + != (Reg32|BaseIndex))))) { #if INFER_ADDR_PREFIX if (i.prefix[ADDR_PREFIX] == 0 && stackop_size != '\0') @@ -3445,7 +3445,7 @@ i386_operand (operand_string) } if (*op_string) { - as_bad (_("Junk `%s' after register"), op_string); + as_bad (_("junk `%s' after register"), op_string); return 0; } i.types[this_operand] |= r->reg_type & ~BaseIndex; @@ -3462,7 +3462,7 @@ i386_operand (operand_string) ++op_string; if (i.types[this_operand] & JumpAbsolute) { - as_bad (_("Immediate operand illegal with absolute jump")); + as_bad (_("immediate operand illegal with absolute jump")); return 0; } if (!i386_immediate (op_string)) @@ -4404,7 +4404,7 @@ tc_gen_reloc (section, fixp) switch (fixp->fx_size) { default: - as_bad (_("Can not do %d byte pc-relative relocation"), + as_bad (_("can not do %d byte pc-relative relocation"), fixp->fx_size); code = BFD_RELOC_32_PCREL; break; @@ -4418,7 +4418,7 @@ tc_gen_reloc (section, fixp) switch (fixp->fx_size) { default: - as_bad (_("Can not do %d byte relocation"), fixp->fx_size); + as_bad (_("can not do %d byte relocation"), fixp->fx_size); code = BFD_RELOC_32; break; case 1: code = BFD_RELOC_8; break; @@ -4453,7 +4453,7 @@ tc_gen_reloc (section, fixp) if (rel->howto == NULL) { as_bad_where (fixp->fx_file, fixp->fx_line, - _("Cannot represent relocation type %s"), + _("cannot represent relocation type %s"), bfd_get_reloc_code_name (code)); /* Set howto to a garbage value so that we can keep going. */ rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32); diff -upr --new-file binutils-2.9.5.0.31/gas/config/tc-sh.c binutils-2.9.5.0.32/gas/config/tc-sh.c --- binutils-2.9.5.0.31/gas/config/tc-sh.c Sun Mar 19 11:55:09 2000 +++ binutils-2.9.5.0.32/gas/config/tc-sh.c Fri Mar 31 09:17:08 2000 @@ -1,5 +1,5 @@ /* tc-sh.c -- Assemble code for the Hitachi Super-H - Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation. + Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -1851,7 +1851,7 @@ md_show_usage (stream) SH options:\n\ -little generate little endian code\n\ -relax alter jump instructions for long displacements\n\ --small align sections to 4 byte boundaries, not 16\n +-small align sections to 4 byte boundaries, not 16\n\ -dsp enable sh-dsp insns, and disable sh3e / sh4 insns.\n")); } diff -upr --new-file binutils-2.9.5.0.31/gas/config/tc-sh.h binutils-2.9.5.0.32/gas/config/tc-sh.h --- binutils-2.9.5.0.31/gas/config/tc-sh.h Fri Feb 25 14:34:55 2000 +++ binutils-2.9.5.0.32/gas/config/tc-sh.h Fri Mar 31 09:17:08 2000 @@ -130,18 +130,20 @@ extern void sh_coff_reloc_mangle extern int tc_coff_sizemachdep PARAMS ((fragS *)); #ifdef BFD_ASSEMBLER -#define SUB_SEGMENT_ALIGN(SEG) 4 +#define SEG_NAME(SEG) segment_name (SEG) #else +#define SEG_NAME(SEG) obj_segment_name (SEG) +#endif + /* We align most sections to a 16 byte boundary. */ -#define SUB_SEGMENT_ALIGN(SEG) \ - (strncmp (obj_segment_name (SEG), ".stabstr", 8) == 0 \ - ? 0 \ - : ((strncmp (obj_segment_name (SEG), ".stab", 5) == 0 \ - || strcmp (obj_segment_name (SEG), ".ctors") == 0 \ - || strcmp (obj_segment_name (SEG), ".dtors") == 0) \ - ? 2 \ +#define SUB_SEGMENT_ALIGN(SEG) \ + (strncmp (SEG_NAME (SEG), ".stabstr", 8) == 0 \ + ? 0 \ + : ((strncmp (SEG_NAME (SEG), ".stab", 5) == 0 \ + || strcmp (SEG_NAME (SEG), ".ctors") == 0 \ + || strcmp (SEG_NAME (SEG), ".dtors") == 0) \ + ? 2 \ : (sh_small ? 2 : 4))) -#endif #endif /* OBJ_COFF */ diff -upr --new-file binutils-2.9.5.0.31/gas/configure binutils-2.9.5.0.32/gas/configure --- binutils-2.9.5.0.31/gas/configure Sun Mar 12 09:40:14 2000 +++ binutils-2.9.5.0.32/gas/configure Fri Mar 31 09:28:45 2000 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.13.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -51,7 +51,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -166,7 +165,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -337,11 +335,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -363,7 +356,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.13.1" exit 0 ;; -with-* | --with-*) @@ -507,16 +500,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -527,7 +516,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -571,9 +560,130 @@ done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:570: checking host system type" >&5 +if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_host_alias=$host + case "$ac_cv_host_alias" in + NONE) + case $nonopt in + NONE) + if ac_cv_host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) ac_cv_host_alias=$nonopt ;; + esac ;; + esac + + ac_cv_host=`$ac_config_sub $ac_cv_host_alias` + ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_host" 1>&6 + +host=$ac_cv_host +host_alias=$ac_cv_host_alias +host_cpu=$ac_cv_host_cpu +host_vendor=$ac_cv_host_vendor +host_os=$ac_cv_host_os + + + + + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:611: checking target system type" >&5 +if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_target_alias=$target + case "$ac_cv_target_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_target_alias=$host_alias ;; + + *) ac_cv_target_alias=$nonopt ;; + esac ;; + esac + + ac_cv_target=`$ac_config_sub $ac_cv_target_alias` + ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_target" 1>&6 + +target=$ac_cv_target +target_alias=$ac_cv_target_alias +target_cpu=$ac_cv_target_cpu +target_vendor=$ac_cv_target_vendor +target_os=$ac_cv_target_os + + + + + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:651: checking build system type" >&5 +if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_build_alias=$build + case "$ac_cv_build_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_build_alias=$host_alias ;; + + *) ac_cv_build_alias=$nonopt ;; + esac ;; + esac + + ac_cv_build=`$ac_config_sub $ac_cv_build_alias` + ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_build" 1>&6 + +build=$ac_cv_build +build_alias=$ac_cv_build_alias +build_cpu=$ac_cv_build_cpu +build_vendor=$ac_cv_build_vendor +build_os=$ac_cv_build_os + + + # Do some error checking and defaulting for the host and target type. @@ -596,69 +706,6 @@ NONE---*---* | *---NONE---* | *---*---NO *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; esac - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:607: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:628: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:646: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && @@ -677,9 +724,9 @@ test "$host_alias" != "$target_alias" && # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:681: checking for a BSD compatible install" >&5 +echo "configure:728: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -697,6 +744,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -725,12 +776,12 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:734: checking whether build environment is sane" >&5 +echo "configure:785: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -778,18 +829,18 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:791: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:842: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF @@ -833,7 +884,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:837: checking for working aclocal" >&5 +echo "configure:888: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -846,7 +897,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:850: checking for working autoconf" >&5 +echo "configure:901: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -859,7 +910,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:863: checking for working automake" >&5 +echo "configure:914: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -872,7 +923,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:876: checking for working autoheader" >&5 +echo "configure:927: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -885,7 +936,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:889: checking for working makeinfo" >&5 +echo "configure:940: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -971,8 +1022,8 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:975: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1026: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1001,8 +1052,8 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1005: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:1056: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -1031,8 +1082,8 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1035: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:1086: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -1078,12 +1129,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1086: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:1137: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -1113,8 +1164,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1118: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1169: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1125,12 +1176,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1129 "configure" +#line 1180 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1155,14 +1206,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1160: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1211: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1165: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:1216: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1189,8 +1240,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1193: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:1244: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -1232,7 +1283,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1236: checking for ld used by GCC" >&5 +echo "configure:1287: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1256,12 +1307,12 @@ echo "configure:1236: checking for ld us esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1260: checking for GNU ld" >&5 +echo "configure:1311: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1263: checking for non-GNU ld" >&5 +echo "configure:1314: checking for non-GNU ld" >&5 fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then @@ -1294,8 +1345,8 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1298: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then +echo "configure:1349: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -1310,8 +1361,8 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1314: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then +echo "configure:1365: checking for BSD-compatible nm" >&5 +if eval "test \"\${ac_cv_path_NM+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then @@ -1346,8 +1397,8 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1350: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +echo "configure:1401: checking whether ln -s works" >&5 +if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata @@ -1395,8 +1446,8 @@ test x"$silent" = xyes && libtool_flags= case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1399 "configure"' > conftest.$ac_ext - if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1450 "configure"' > conftest.$ac_ext + if { (eval echo configure:1451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1417,19 +1468,19 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1421: checking whether the C compiler needs -belf" >&5 -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then +echo "configure:1472: checking whether the C compiler needs -belf" >&5 +if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1513,7 +1564,7 @@ $libtool_flags --no-verify $ac_aux_dir/l # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -1697,6 +1748,8 @@ for this_target in $target $canon_target arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; arm-*-riscix*) fmt=aout em=riscix ;; + avr-*-*) fmt=elf bfd_gas=yes ;; + d10v-*-*) fmt=elf bfd_gas=yes ;; d30v-*-*) fmt=elf bfd_gas=yes ;; @@ -2380,8 +2433,8 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2384: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2437: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2410,8 +2463,8 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2414: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2467: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2457,12 +2510,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2465: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2518: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2492,8 +2545,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2497: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:2550: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2504,12 +2557,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2508 "configure" +#line 2561 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2534,14 +2587,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2539: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:2592: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2544: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:2597: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2568,8 +2621,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2572: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:2625: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -2605,8 +2658,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2609: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then +echo "configure:2662: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_YACC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$YACC"; then @@ -2636,13 +2689,13 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2640: checking how to run the C preprocessor" >&5 +echo "configure:2693: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -2651,13 +2704,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2668,13 +2721,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2685,13 +2738,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2721,8 +2774,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2725: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then +echo "configure:2778: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_LEX+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$LEX"; then @@ -2754,8 +2807,8 @@ test -n "$LEX" || LEX=""$missing_dir/mis # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2758: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then +echo "configure:2811: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_LEX+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$LEX"; then @@ -2788,15 +2841,15 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:2792: checking for yywrap in -l$ac_lib" >&5 -ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:2845: checking for yywrap in -l$ac_lib" >&5 +ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2830,8 +2883,8 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:2834: checking lex output file root" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then +echo "configure:2887: checking lex output file root" >&5 +if eval "test \"\${ac_cv_prog_lex_root+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # The minimal lex program is just a single line: %%. But some broken lexes @@ -2851,8 +2904,8 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:2855: checking whether yytext is a pointer" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then +echo "configure:2908: checking whether yytext is a pointer" >&5 +if eval "test \"\${ac_cv_prog_lex_yytext_pointer+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # POSIX says lex can declare yytext either as a pointer or an array; the @@ -2863,14 +2916,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPU ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -2894,7 +2947,7 @@ fi ALL_LINGUAS= echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:2898: checking for POSIXized ISC" >&5 +echo "configure:2951: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -2915,12 +2968,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2919: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then +echo "configure:2972: checking for ANSI C header files" >&5 +if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2928,7 +2981,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2945,7 +2998,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2963,7 +3016,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2984,7 +3037,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2995,7 +3048,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3019,12 +3072,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3023: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then +echo "configure:3076: checking for working const" >&5 +if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3094,21 +3147,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3098: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then +echo "configure:3151: checking for inline" >&5 +if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3134,12 +3187,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3138: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then +echo "configure:3191: checking for off_t" >&5 +if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3150,29 +3203,31 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_off_t=yes + eval "ac_cv_type_off_t=yes" else rm -rf conftest* - ac_cv_type_off_t=no + eval "ac_cv_type_off_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:3171: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +echo "configure:3226: checking for size_t" >&5 +if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3183,17 +3238,19 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_size_t=yes + eval "ac_cv_type_size_t=yes" else rm -rf conftest* - ac_cv_type_size_t=no + eval "ac_cv_type_size_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:3206: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then +echo "configure:3263: checking for working alloca.h" >&5 +if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3235,12 +3292,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3239: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then +echo "configure:3296: checking for alloca" >&5 +if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3300,12 +3357,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3304: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then +echo "configure:3361: checking whether alloca needs Cray hooks" >&5 +if eval "test \"\${ac_cv_os_cray+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3334: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3391: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3385,15 +3443,15 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3389: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then +echo "configure:3447: checking stack direction for C alloca" >&5 +if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3437,17 +3495,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3441: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3499: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3476,12 +3534,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3480: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3538: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3529,15 +3588,15 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3533: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +echo "configure:3592: checking for working mmap" >&5 +if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3705,17 +3764,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3709: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3768: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3745,12 +3804,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3749: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3808: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3802,12 +3862,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3806: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3866: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3864,19 +3925,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3868: checking for LC_MESSAGES" >&5 -if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then +echo "configure:3929: checking for LC_MESSAGES" >&5 +if eval "test \"\${am_cv_val_LC_MESSAGES+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3897,7 +3958,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3901: checking whether NLS is requested" >&5 +echo "configure:3962: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3917,7 +3978,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3921: checking whether included gettext is requested" >&5 +echo "configure:3982: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3936,17 +3997,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3940: checking for libintl.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4001: checking for libintl.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3963,19 +4024,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3967: checking for gettext in libc" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then +echo "configure:4028: checking for gettext in libc" >&5 +if eval "test \"\${gt_cv_func_gettext_libc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3991,15 +4052,15 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3995: checking for bindtextdomain in -lintl" >&5 -ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:4056: checking for bindtextdomain in -lintl" >&5 +ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4026,19 +4087,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:4030: checking for gettext in libintl" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then +echo "configure:4091: checking for gettext in libintl" >&5 +if eval "test \"\${gt_cv_func_gettext_libintl+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -4066,8 +4127,8 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4070: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:4131: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -4100,12 +4161,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4104: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:4165: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4155,8 +4217,8 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4159: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:4221: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -4191,8 +4253,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4195: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:4257: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -4223,7 +4285,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4263,8 +4325,8 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4267: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:4329: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -4297,8 +4359,8 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4301: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:4363: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -4333,8 +4395,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4337: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:4399: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -4423,7 +4485,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4427: checking for catalogs to be installed" >&5 +echo "configure:4489: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4451,17 +4513,17 @@ echo "configure:4427: checking for catal if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4455: checking for linux/version.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4517: checking for linux/version.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4524,7 +4586,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4528: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4590: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4547,12 +4609,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:4551: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then +echo "configure:4613: checking for Cygwin environment" >&5 +if eval "test \"\${ac_cv_cygwin+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -4573,26 +4635,25 @@ else ac_cv_cygwin=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:4584: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then +echo "configure:4645: checking for mingw32 environment" >&5 +if eval "test \"\${ac_cv_mingw32+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -4602,29 +4663,57 @@ else ac_cv_mingw32=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes +echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6 +echo "configure:4673: checking for EMX OS/2 environment" >&5 +if eval "test \"\${ac_cv_emxos2+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_emxos2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_emxos2=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_emxos2" 1>&6 +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4615: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then +echo "configure:4704: checking for executable suffix" >&5 +if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then ac_cv_exeext=.exe else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.C | *.o | *.obj | *.xcoff) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -4646,17 +4735,17 @@ for ac_hdr in string.h stdlib.h memory.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4650: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4739: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4686,7 +4775,7 @@ done # Put this here so that autoconf's "cross-compiling" message doesn't confuse # people who are not cross-compiling but are compiling cross-assemblers. echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 -echo "configure:4690: checking whether compiling a cross-assembler" >&5 +echo "configure:4779: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -4701,19 +4790,19 @@ echo "$ac_t""$cross_gas" 1>&6 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:4705: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then +echo "configure:4794: checking for working alloca.h" >&5 +if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -4734,12 +4823,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4738: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then +echo "configure:4827: checking for alloca" >&5 +if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -4799,12 +4888,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4803: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then +echo "configure:4892: checking whether alloca needs Cray hooks" >&5 +if eval "test \"\${ac_cv_os_cray+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4833: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:4922: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4884,15 +4974,15 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4888: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then +echo "configure:4978: checking stack direction for C alloca" >&5 +if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -4933,21 +5023,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:4937: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then +echo "configure:5027: checking for inline" >&5 +if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -4977,12 +5067,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4981: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:5071: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5034,12 +5125,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5038: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:5129: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5091,12 +5183,12 @@ done # enough, but on some of those systems, the assert macro relies on requoting # working properly! echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 -echo "configure:5095: checking for working assert macro" >&5 -if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then +echo "configure:5187: checking for working assert macro" >&5 +if eval "test \"\${gas_cv_assert_ok+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5112,7 +5204,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -5153,12 +5245,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:5157: checking whether declaration is required for strstr" >&5 -if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then +echo "configure:5249: checking whether declaration is required for strstr" >&5 +if eval "test \"\${gas_cv_decl_needed_strstr+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_strstr=no else @@ -5190,12 +5282,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:5194: checking whether declaration is required for malloc" >&5 -if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then +echo "configure:5286: checking whether declaration is required for malloc" >&5 +if eval "test \"\${gas_cv_decl_needed_malloc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_malloc=no else @@ -5227,12 +5319,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:5231: checking whether declaration is required for free" >&5 -if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then +echo "configure:5323: checking whether declaration is required for free" >&5 +if eval "test \"\${gas_cv_decl_needed_free+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_free=no else @@ -5264,12 +5356,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:5268: checking whether declaration is required for sbrk" >&5 -if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then +echo "configure:5360: checking whether declaration is required for sbrk" >&5 +if eval "test \"\${gas_cv_decl_needed_sbrk+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_sbrk=no else @@ -5301,12 +5393,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:5305: checking whether declaration is required for environ" >&5 -if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then +echo "configure:5397: checking whether declaration is required for environ" >&5 +if eval "test \"\${gas_cv_decl_needed_environ+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_environ=no else @@ -5341,12 +5433,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:5345: checking whether declaration is required for errno" >&5 -if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then +echo "configure:5437: checking whether declaration is required for errno" >&5 +if eval "test \"\${gas_cv_decl_needed_errno+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_errno=no else @@ -5473,7 +5565,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.13.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -5818,5 +5910,5 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 diff -upr --new-file binutils-2.9.5.0.31/gas/configure.in binutils-2.9.5.0.32/gas/configure.in --- binutils-2.9.5.0.31/gas/configure.in Sun Mar 12 09:40:14 2000 +++ binutils-2.9.5.0.32/gas/configure.in Fri Mar 31 09:28:45 2000 @@ -164,6 +164,8 @@ changequote([,])dnl arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; arm-*-riscix*) fmt=aout em=riscix ;; + avr-*-*) fmt=elf bfd_gas=yes ;; + d10v-*-*) fmt=elf bfd_gas=yes ;; d30v-*-*) fmt=elf bfd_gas=yes ;; diff -upr --new-file binutils-2.9.5.0.31/gas/doc/internals.texi binutils-2.9.5.0.32/gas/doc/internals.texi --- binutils-2.9.5.0.31/gas/doc/internals.texi Sun Mar 19 11:55:12 2000 +++ binutils-2.9.5.0.32/gas/doc/internals.texi Fri Mar 31 09:17:09 2000 @@ -8,7 +8,7 @@ This chapter describes the internals of the assembler. It is incomplete, but it may help a bit. -This chapter was last modified on $Date: 2000/03/13 20:46:07 $. It is not updated regularly, and it +This chapter was last modified on $Date: 2000/03/26 14:47:33 $. It is not updated regularly, and it may be out of date. @menu @@ -1246,6 +1246,24 @@ permit the CPU backend to adjust the ali must take two arguments, a @code{segT} for the section and a @code{valueT} for the size of the section, and return a @code{valueT} for the rounded size. + +@item md_macro_start +@cindex md_macro_start +If defined, GAS will call this macro when it starts to include a macro +expansion. @code{macro_nest} indicates the current macro nesting level, which +includes the one being expanded. + +@item md_macro_info +@cindex md_macro_info +If defined, GAS will call this macro after the macro expansion has been +included in the input and after parsing the macro arguments. The single +argument is a pointer to the macro processing's internal representation of the +macro (macro_entry *), which includes expansion of the formal arguments. + +@item md_macro_end +@cindex md_macro_end +Complement to md_macro_start. If defined, it is called when finished +processing an inserted macro expansion, just before decrementing macro_nest. @item DOUBLEBAR_PARALLEL @cindex DOUBLEBAR_PARALLEL diff -upr --new-file binutils-2.9.5.0.31/gas/gasp.c binutils-2.9.5.0.32/gas/gasp.c --- binutils-2.9.5.0.31/gas/gasp.c Sun Mar 12 09:40:14 2000 +++ binutils-2.9.5.0.32/gas/gasp.c Fri Mar 31 09:28:45 2000 @@ -193,37 +193,6 @@ typedef struct } hash_table; -/* Structures used to store macros. - - Each macro knows its name and included text. It gets built with a - list of formal arguments, and also keeps a hash table which points - into the list to speed up formal search. Each formal knows its - name and its default value. Each time the macro is expanded, the - formals get the actual values attatched to them. */ - -/* describe the formal arguments to a macro */ - -typedef struct formal_struct - { - struct formal_struct *next; /* next formal in list */ - sb name; /* name of the formal */ - sb def; /* the default value */ - sb actual; /* the actual argument (changed on each expansion) */ - int index; /* the index of the formal 0..formal_count-1 */ - } -formal_entry; - -/* describe the macro. */ - -typedef struct macro_struct - { - sb sub; /* substitution text. */ - int formal_count; /* number of formal args. */ - formal_entry *formals; /* pointer to list of formal_structs */ - hash_table formal_hash; /* hash table of formals. */ - } -macro_entry; - /* how we nest files and expand macros etc. we keep a stack of of include_stack structs. each include file @@ -2687,7 +2656,7 @@ macro_op (idx, in) return 0; sb_terminate (in); - if (! check_macro (in->ptr + idx, &out, comment_char, &err)) + if (! check_macro (in->ptr + idx, &out, comment_char, &err, NULL)) return 0; if (err != NULL) diff -upr --new-file binutils-2.9.5.0.31/gas/input-scrub.c binutils-2.9.5.0.32/gas/input-scrub.c --- binutils-2.9.5.0.31/gas/input-scrub.c Thu Jun 3 11:01:58 1999 +++ binutils-2.9.5.0.32/gas/input-scrub.c Fri Mar 31 09:17:01 2000 @@ -74,6 +74,9 @@ static int sb_index = -1; /* If we are reading from an sb structure, this is it. */ static sb from_sb; +/* Should we do a conditional check on from_sb? */ +static int from_sb_is_expansion = 1; + /* The number of nested sb structures we have included. */ int macro_nest; @@ -111,6 +114,7 @@ struct input_save int logical_input_line; int sb_index; sb from_sb; + int from_sb_is_expansion; /* Should we do a conditional check? */ struct input_save *next_saved_file; /* Chain of input_saves */ char *input_file_save; /* Saved state of input routines */ char *saved_position; /* Caller's saved position in buf */ @@ -147,6 +151,7 @@ input_scrub_push (saved_position) saved->logical_input_line = logical_input_line; saved->sb_index = sb_index; saved->from_sb = from_sb; + saved->from_sb_is_expansion = from_sb_is_expansion; memcpy (saved->save_source, save_source, sizeof (save_source)); saved->next_saved_file = next_saved_file; saved->input_file_save = input_file_push (); @@ -181,6 +186,7 @@ input_scrub_pop (saved) logical_input_line = saved->logical_input_line; sb_index = saved->sb_index; from_sb = saved->from_sb; + from_sb_is_expansion = saved->from_sb_is_expansion; partial_where = saved->partial_where; partial_size = saved->partial_size; next_saved_file = saved->next_saved_file; @@ -255,17 +261,26 @@ input_scrub_include_file (filename, posi expanding a macro. */ void -input_scrub_include_sb (from, position) +input_scrub_include_sb (from, position, is_expansion) sb *from; char *position; + int is_expansion; { if (macro_nest > max_macro_nest) - as_fatal (_("macros nested too deeply")); + as_fatal (_("buffers nested too deeply")); ++macro_nest; +#ifdef md_macro_start + if (is_expansion) + { + md_macro_start (); + } +#endif + next_saved_file = input_scrub_push (position); sb_new (&from_sb); + from_sb_is_expansion = is_expansion; if (from->len >= 1 && from->ptr[0] != '\n') { /* Add the sentinel required by read.c. */ @@ -297,8 +312,15 @@ input_scrub_next_buffer (bufp) if (sb_index >= from_sb.len) { sb_kill (&from_sb); - cond_finish_check (macro_nest); - --macro_nest; + if (from_sb_is_expansion) + { + cond_finish_check (macro_nest); +#ifdef md_macro_end + /* allow the target to clean up per-macro expansion data */ + md_macro_end (); +#endif + } + --macro_nest; partial_where = NULL; if (next_saved_file != NULL) *bufp = input_scrub_pop (next_saved_file); diff -upr --new-file binutils-2.9.5.0.31/gas/listing.c binutils-2.9.5.0.32/gas/listing.c --- binutils-2.9.5.0.31/gas/listing.c Fri Feb 25 13:39:23 2000 +++ binutils-2.9.5.0.32/gas/listing.c Fri Mar 31 09:28:45 2000 @@ -109,10 +109,10 @@ Software Foundation, 59 Temple Place - S #define LISTING_WORD_SIZE 4 #endif #ifndef LISTING_LHS_WIDTH -#define LISTING_LHS_WIDTH 1 +#define LISTING_LHS_WIDTH ((LISTING_WORD_SIZE) > 4 ? 1 : 4 / (LISTING_WORD_SIZE)) #endif #ifndef LISTING_LHS_WIDTH_SECOND -#define LISTING_LHS_WIDTH_SECOND 1 +#define LISTING_LHS_WIDTH_SECOND LISTING_LHS_WIDTH #endif #ifndef LISTING_RHS_WIDTH #define LISTING_RHS_WIDTH 100 diff -upr --new-file binutils-2.9.5.0.31/gas/macro.c binutils-2.9.5.0.32/gas/macro.c --- binutils-2.9.5.0.31/gas/macro.c Fri Nov 19 09:43:12 1999 +++ binutils-2.9.5.0.32/gas/macro.c Fri Mar 31 09:17:02 2000 @@ -70,42 +70,6 @@ extern void *alloca (); /* The routines in this file handle macro definition and expansion. They are called by both gasp and gas. */ -/* Structures used to store macros. - - Each macro knows its name and included text. It gets built with a - list of formal arguments, and also keeps a hash table which points - into the list to speed up formal search. Each formal knows its - name and its default value. Each time the macro is expanded, the - formals get the actual values attatched to them. */ - -/* describe the formal arguments to a macro */ - -typedef struct formal_struct - { - struct formal_struct *next; /* next formal in list */ - sb name; /* name of the formal */ - sb def; /* the default value */ - sb actual; /* the actual argument (changed on each expansion) */ - int index; /* the index of the formal 0..formal_count-1 */ - } -formal_entry; - -/* Other values found in the index field of a formal_entry. */ -#define QUAL_INDEX (-1) -#define NARG_INDEX (-2) -#define LOCAL_INDEX (-3) - -/* describe the macro. */ - -typedef struct macro_struct - { - sb sub; /* substitution text. */ - int formal_count; /* number of formal args. */ - formal_entry *formals; /* pointer to list of formal_structs */ - struct hash_control *formal_hash; /* hash table of formals. */ - } -macro_entry; - /* Internal functions. */ static int get_token PARAMS ((int, sb *, sb *)); @@ -1108,11 +1072,12 @@ macro_expand (idx, in, m, out, comment_c gasp. Return 1 if a macro is found, 0 otherwise. */ int -check_macro (line, expand, comment_char, error) +check_macro (line, expand, comment_char, error, info) const char *line; sb *expand; int comment_char; const char **error; + macro_entry **info; { const char *s; char *copy, *cs; @@ -1152,6 +1117,10 @@ check_macro (line, expand, comment_char, *error = macro_expand (0, &line_sb, macro, expand, comment_char); sb_kill (&line_sb); + + /* export the macro information if requested */ + if (info) + *info = macro; return 1; } diff -upr --new-file binutils-2.9.5.0.31/gas/macro.h binutils-2.9.5.0.32/gas/macro.h --- binutils-2.9.5.0.31/gas/macro.h Thu Jun 3 11:01:59 1999 +++ binutils-2.9.5.0.32/gas/macro.h Fri Mar 31 09:17:02 2000 @@ -28,6 +28,42 @@ #include "ansidecl.h" #include "sb.h" +/* Structures used to store macros. + + Each macro knows its name and included text. It gets built with a + list of formal arguments, and also keeps a hash table which points + into the list to speed up formal search. Each formal knows its + name and its default value. Each time the macro is expanded, the + formals get the actual values attatched to them. */ + +/* describe the formal arguments to a macro */ + +typedef struct formal_struct + { + struct formal_struct *next; /* next formal in list */ + sb name; /* name of the formal */ + sb def; /* the default value */ + sb actual; /* the actual argument (changed on each expansion) */ + int index; /* the index of the formal 0..formal_count-1 */ + } +formal_entry; + +/* Other values found in the index field of a formal_entry. */ +#define QUAL_INDEX (-1) +#define NARG_INDEX (-2) +#define LOCAL_INDEX (-3) + +/* describe the macro. */ + +typedef struct macro_struct + { + sb sub; /* substitution text. */ + int formal_count; /* number of formal args. */ + formal_entry *formals; /* pointer to list of formal_structs */ + struct hash_control *formal_hash; /* hash table of formals. */ + } +macro_entry; + /* Whether any macros have been defined. */ extern int macro_defined; @@ -45,7 +81,8 @@ extern void macro_mri_mode PARAMS ((int) extern const char *define_macro PARAMS ((int idx, sb *in, sb *label, int (*get_line) PARAMS ((sb *)), const char **namep)); -extern int check_macro PARAMS ((const char *, sb *, int, const char **)); +extern int check_macro PARAMS ((const char *, sb *, int, const char **, + macro_entry **)); extern void delete_macro PARAMS ((const char *)); extern const char *expand_irp PARAMS ((int, int, sb *, sb *, int (*) PARAMS ((sb *)), int)); diff -upr --new-file binutils-2.9.5.0.31/gas/read.c binutils-2.9.5.0.32/gas/read.c --- binutils-2.9.5.0.31/gas/read.c Sun Mar 19 12:07:57 2000 +++ binutils-2.9.5.0.32/gas/read.c Fri Mar 31 09:28:45 2000 @@ -879,17 +879,21 @@ read_a_source_file (name) { sb out; const char *err; + macro_entry *macro; - if (check_macro (s, &out, '\0', &err)) + if (check_macro (s, &out, '\0', &err, ¯o)) { if (err != NULL) as_bad ("%s", err); *input_line_pointer++ = c; input_scrub_include_sb (&out, - input_line_pointer); + input_line_pointer, 1); sb_kill (&out); buffer_limit = input_scrub_next_buffer (&input_line_pointer); +#ifdef md_macro_info + md_macro_info (macro); +#endif continue; } } @@ -1842,7 +1846,7 @@ s_irp (irpc) sb_kill (&s); - input_scrub_include_sb (&out, input_line_pointer); + input_scrub_include_sb (&out, input_line_pointer, 1); sb_kill (&out); buffer_limit = input_scrub_next_buffer (&input_line_pointer); } @@ -2675,7 +2679,7 @@ do_repeat (count, start, end) sb_kill (&one); - input_scrub_include_sb (&many, input_line_pointer); + input_scrub_include_sb (&many, input_line_pointer, 1); sb_kill (&many); buffer_limit = input_scrub_next_buffer (&input_line_pointer); } @@ -4878,7 +4882,6 @@ void s_include (arg) int arg ATTRIBUTE_UNUSED; { - char *newbuf; char *filename; int i; FILE *try; @@ -4929,8 +4932,7 @@ s_include (arg) gotit: /* malloc Storage leak when file is found on path. FIXME-SOMEDAY. */ register_dependency (path); - newbuf = input_scrub_include_file (path, input_line_pointer); - buffer_limit = input_scrub_next_buffer (&input_line_pointer); + input_scrub_insert_file (path); } /* s_include() */ void @@ -5113,6 +5115,38 @@ read_print_statistics (file) FILE *file; { hash_print_statistics (file, "pseudo-op table", po_hash); +} + +/* Inserts the given line into the input stream. + + This call avoids macro/conditionals nesting checking, since the contents of + the line are assumed to replace the contents of a line already scanned. + + An appropriate use of this function would be substition of input lines when + called by md_start_line_hook(). The given line is assumed to already be + properly scrubbed. */ + +void +input_scrub_insert_line (line) + const char *line; +{ + sb newline; + sb_new (&newline); + sb_add_string (&newline, line); + input_scrub_include_sb (&newline, input_line_pointer, 0); + sb_kill (&newline); + buffer_limit = input_scrub_next_buffer (&input_line_pointer); +} + +/* Insert a file into the input stream; the path must resolve to an actual + file; no include path searching or dependency registering is performed. */ + +void +input_scrub_insert_file (path) + char *path; +{ + input_scrub_include_file (path, input_line_pointer); + buffer_limit = input_scrub_next_buffer (&input_line_pointer); } /* end of read.c */ diff -upr --new-file binutils-2.9.5.0.31/gas/sb.h binutils-2.9.5.0.32/gas/sb.h --- binutils-2.9.5.0.31/gas/sb.h Thu Jun 3 11:01:59 1999 +++ binutils-2.9.5.0.32/gas/sb.h Fri Mar 31 09:17:02 2000 @@ -94,6 +94,6 @@ extern int sb_skip_white PARAMS ((int, s extern int sb_skip_comma PARAMS ((int, sb *)); /* Actually in input-scrub.c. */ -extern void input_scrub_include_sb PARAMS ((sb *, char *)); +extern void input_scrub_include_sb PARAMS ((sb *, char *, int)); #endif /* SB_H */ diff -upr --new-file binutils-2.9.5.0.31/gas/testsuite/ChangeLog binutils-2.9.5.0.32/gas/testsuite/ChangeLog --- binutils-2.9.5.0.31/gas/testsuite/ChangeLog Sun Mar 12 09:32:48 2000 +++ binutils-2.9.5.0.32/gas/testsuite/ChangeLog Fri Mar 31 09:17:11 2000 @@ -1,3 +1,25 @@ +2000-03-29 Nick Clifton + + * gas/ieee-fp/x930509a.exp (dotest): Fix test for + LISTING_WORD_SIZE==1. + * gas/all/gas.exp (do_930509a): Same here. + * gas/all/cond.d: And here. + +2000-03-16 Nick Clifton + + * gas/arm/arm.exp: Run branch.s test. + Run tests if target is strongarm. + + * gas/arm/branch.s: New test. Make sure that assembler can handle + same-section branch relocations properly. + + * gas/arm/branch.d: New file. Expected output from assembling + branch.s. + 2000-03-10 Geoffrey Keating * gas/mips/empic.d: New file. diff -upr --new-file binutils-2.9.5.0.31/gas/testsuite/gas/all/cond.d binutils-2.9.5.0.32/gas/testsuite/gas/all/cond.d --- binutils-2.9.5.0.31/gas/testsuite/gas/all/cond.d Thu Jun 3 11:02:02 1999 +++ binutils-2.9.5.0.32/gas/testsuite/gas/all/cond.d Fri Mar 31 09:17:11 2000 @@ -7,14 +7,14 @@ 8[ ]+.else 9[ ]+.if 1 10[ ]+.endc - 11 0000 0[02]00 ?000[02][ ]+.long[ ]+2 + 11 0000 0[02] ?00 ?00 ?0[02][ ]+.long[ ]+2 12[ ]+.if 0 14[ ]+.else - 15 0004 0[04]00 ?000[04][ ]+.long[ ]+4 + 15 0004 0[04] ?00 ?00 ?0[04][ ]+.long[ ]+4 16[ ]+.endc 17[ ]+.endc - 18 0008 0000 ?0000[ ]+.p2align 5,0 - 18[ ]+0000 ?0000 - 18[ ]+0000 ?0000 - 18[ ]+0000 ?0000 - 18[ ]+0000 ?0000 + 18 0008 00 ?00 ?00 ?00[ ]+.p2align 5,0 + 18[ ]+00 ?00 ?00 ?00 + 18[ ]+00 ?00 ?00 ?00 + 18[ ]+00 ?00 ?00 ?00 + 18[ ]+00 ?00 ?00 ?00 diff -upr --new-file binutils-2.9.5.0.31/gas/testsuite/gas/all/gas.exp binutils-2.9.5.0.32/gas/testsuite/gas/all/gas.exp --- binutils-2.9.5.0.31/gas/testsuite/gas/all/gas.exp Mon Sep 13 09:37:21 1999 +++ binutils-2.9.5.0.32/gas/testsuite/gas/all/gas.exp Fri Mar 31 09:17:11 2000 @@ -65,9 +65,9 @@ proc do_930509a {} { # If ".long" means an 8-byte value on some target someday, this test will have # to be fixed. expect { - -re "^ +1 .... 0000 *0000" { fail $testname; set x 1 } - -re "^ +1 .... 0400 *0000" { pass $testname; set x 1 } - -re "^ +1 .... 0000 *0004" { pass $testname; set x 1 } + -re "^ +1 .... 00 ?00 ?00 ?00" { fail $testname; set x 1 } + -re "^ +1 .... 04 ?00 ?00 ?00" { pass $testname; set x 1 } + -re "^ +1 .... 00 ?00 ?00 ?04" { pass $testname; set x 1 } -re "\[^\n\]*\n" { } timeout { perror "timeout\n"; break } eof { break } @@ -124,7 +124,7 @@ proc test_cond {} { global subdir set testname "conditional listings" - gas_run cond.s -alc ">dump.out" + gas_run cond.s "-alc" ">dump.out" if ![string match "" $comp_output] { send_log "$comp_output\n" fail $testname diff -upr --new-file binutils-2.9.5.0.31/gas/testsuite/gas/arm/thumb.s binutils-2.9.5.0.32/gas/testsuite/gas/arm/thumb.s --- binutils-2.9.5.0.31/gas/testsuite/gas/arm/thumb.s Thu Jun 3 11:02:02 1999 +++ binutils-2.9.5.0.32/gas/testsuite/gas/arm/thumb.s Fri Mar 31 09:17:13 2000 @@ -118,6 +118,7 @@ bar: bhi bar blo bar bul bar + bal bar close: lsl r4, r5, #near - close diff -upr --new-file binutils-2.9.5.0.31/gas/testsuite/gas/ieee-fp/x930509a.exp binutils-2.9.5.0.32/gas/testsuite/gas/ieee-fp/x930509a.exp --- binutils-2.9.5.0.31/gas/testsuite/gas/ieee-fp/x930509a.exp Thu Jun 3 11:02:03 1999 +++ binutils-2.9.5.0.32/gas/testsuite/gas/ieee-fp/x930509a.exp Fri Mar 31 09:17:19 2000 @@ -7,10 +7,9 @@ proc dotest {} { gas_start "x930509a.s" "-al" while 1 { expect { - -re " 00008000\[ \]+.single" { pass $testname; set x 1 } - -re " 00800000\[ \]+.single" { pass $testname; set x 1 } - -re " 0080 0000\[ \]+.single" { pass $testname; set x 1 } - -re " ........ +.single" { fail $testname; set x 1 } + -re " 00 ?00 ?80 ?00\[ \]+.single" { pass $testname; set x 1 } + -re " 00 ?80 ?00 ?00\[ \]+.single" { pass $testname; set x 1 } + -re ".single" { fail $testname; set x 1 } -re "\[^\n\]*\n" { } timeout { perror "timeout\n"; break } eof { break } diff -upr --new-file binutils-2.9.5.0.31/gprof/ChangeLog binutils-2.9.5.0.32/gprof/ChangeLog --- binutils-2.9.5.0.31/gprof/ChangeLog Thu Feb 24 11:12:17 2000 +++ binutils-2.9.5.0.32/gprof/ChangeLog Fri Mar 31 09:17:33 2000 @@ -1,3 +1,15 @@ +2000-03-31 Alan Modra + + * symtab.c (symtab_finalize): Don't use post-increment on + structure copy to work around a ppc gcc bug. + +1999-09-29 Mark Kettenis + + * hertz.h [MACH] (hertz): Remove macro. The + include doesn't exist on al Mach based + systems, and the definition of hertz breaks compilation of hertz.c + anyway. + 2000-02-22 Ian Lance Taylor From Brad Lucier : diff -upr --new-file binutils-2.9.5.0.31/gprof/hertz.h binutils-2.9.5.0.32/gprof/hertz.h --- binutils-2.9.5.0.31/gprof/hertz.h Thu Jun 3 11:02:08 1999 +++ binutils-2.9.5.0.32/gprof/hertz.h Fri Mar 31 09:17:33 2000 @@ -10,13 +10,6 @@ * we return HZ_WRONG, an impossible sampling frequency. */ -/* FIXME: Checking for MACH here makes no sense when for a cross - gprof. */ -#ifdef MACH -#include -#define hertz() (HZ) -#else extern int hertz PARAMS ((void)); -#endif #endif /* hertz_h */ diff -upr --new-file binutils-2.9.5.0.31/gprof/symtab.c binutils-2.9.5.0.32/gprof/symtab.c --- binutils-2.9.5.0.31/gprof/symtab.c Fri Jul 9 08:21:27 1999 +++ binutils-2.9.5.0.32/gprof/symtab.c Fri Mar 31 09:17:33 2000 @@ -132,7 +132,8 @@ DEFUN (symtab_finalize, (tab), Sym_Table /* retain sym only if it has a non-empty address range: */ if (!src->end_addr || src->addr <= src->end_addr) { - *dst++ = *src; + *dst = *src; + dst++; prev_addr = src->addr; } } diff -upr --new-file binutils-2.9.5.0.31/include/ChangeLog binutils-2.9.5.0.32/include/ChangeLog --- binutils-2.9.5.0.31/include/ChangeLog Sun Mar 12 09:32:30 2000 +++ binutils-2.9.5.0.32/include/ChangeLog Fri Mar 31 09:16:51 2000 @@ -1,3 +1,34 @@ +2000-03-27 Denis Chertykov + + * dis-asm.h (print_insn_avr): Declare. + +2000-03-14 Bernd Schmidt + + * hashtab.h (htab_trav): Modify type so that first arg is of type + void **. + (htab_find_with_hash, htab_find_slot_with_hash): Declare new + functions. + +2000-03-09 Alex Samuel + + * partition.h: New file. + +2000-03-09 Zack Weinberg + + * hashtab.h (struct htab): Add del_f. + (htab_del): New type. + (htab_create): Add fourth argument. + +2000-03-08 Zack Weinberg + + * hashtab.h (hash_table_t): Rename to htab_t. + (struct hash_table): Rename to struct htab. Shorten element + names. Reorder elements by size. + (htab_hash, htab_eq, htab_trav): New typedefs for the callback + function pointers. + (hash_table_entry_t): Discard; just use void * for element + type. + 2000-03-01 H.J. Lu * bfdlink.h (bfd_link_callbacks): Add a boolean arg to @@ -85,7 +116,7 @@ Wed Dec 15 11:22:56 1999 Jeffrey A Law (asprintf, vasprintf): Provide declarations. Wed Nov 10 12:43:21 1999 Philippe De Muyter - Kaveh R. Ghazi + Kaveh R. Ghazi * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'. @@ -117,7 +148,7 @@ Fri Oct 15 01:47:51 1999 Vladimir Makar * ansidecl.h (HAVE_GCC_VERSION): New macro. Use it instead of explicitly testing __GNUC__ and __GNUC_MINOR__. - + (ATTRIBUTE_PRINTF): Use `__format__', not `format'. 1999-09-25 Kaveh R. Ghazi @@ -234,18 +265,18 @@ Tue Dec 8 00:30:31 1998 Elena Zannoni from FILE* to void*, for use with gdb's new type GDB_FILE. (fprintf_ftype): change FILE* parameter type to void*. - * demangle.h: (DMGL_EDG): new macro for Kuck and Associates - (DMGL_STYLE_MASK): modify to include Kuck and Assoc style - (demangling_styles): add new edg_demangling style - (EDG_DEMANGLING_STYLE_STRING): new macro - (EDG_DEMANGLING): new macro - - * demangle.h (DMGL_HP): new macro, for HP/aCC compiler. - (DMGL_STYLE_MASK): modify to include new HP's style. - (demangling_styles): add new hp_demangling value. - (HP_DEMANGLING_STYLE_STRING): new macro. - (ARM_DEMANGLING): coerce to int. - (HP_DEMANGLING): new macro. + * demangle.h: (DMGL_EDG): new macro for Kuck and Associates + (DMGL_STYLE_MASK): modify to include Kuck and Assoc style + (demangling_styles): add new edg_demangling style + (EDG_DEMANGLING_STYLE_STRING): new macro + (EDG_DEMANGLING): new macro + + * demangle.h (DMGL_HP): new macro, for HP/aCC compiler. + (DMGL_STYLE_MASK): modify to include new HP's style. + (demangling_styles): add new hp_demangling value. + (HP_DEMANGLING_STYLE_STRING): new macro. + (ARM_DEMANGLING): coerce to int. + (HP_DEMANGLING): new macro. * hp-symtab.h: rewritten, from HP. (quick_procedure): change type of language field to unsigned int @@ -969,8 +1000,8 @@ Thu Apr 28 19:06:50 1994 Ken Raeburn ( Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) - * obstack.h: Delete use of IN_GCC to control whether - stddef.h or gstddef.h is included. + * obstack.h: Delete use of IN_GCC to control whether + stddef.h or gstddef.h is included. Tue Mar 22 13:06:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) diff -upr --new-file binutils-2.9.5.0.31/include/dis-asm.h binutils-2.9.5.0.32/include/dis-asm.h --- binutils-2.9.5.0.31/include/dis-asm.h Fri Feb 25 13:39:23 2000 +++ binutils-2.9.5.0.32/include/dis-asm.h Fri Mar 31 09:28:46 2000 @@ -194,6 +194,7 @@ extern int print_insn_tic30 PARAMS ((bf extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*)); +extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*)); extern void print_arm_disassembler_options PARAMS ((FILE *)); extern void parse_arm_disassembler_option PARAMS ((char *)); diff -upr --new-file binutils-2.9.5.0.31/include/elf/ChangeLog binutils-2.9.5.0.32/include/elf/ChangeLog --- binutils-2.9.5.0.31/include/elf/ChangeLog Sun Mar 12 09:32:32 2000 +++ binutils-2.9.5.0.32/include/elf/ChangeLog Fri Mar 31 09:16:55 2000 @@ -1,3 +1,8 @@ +2000-03-27 Denis Chertykov + + * avr.h: New file. AVR ELF support for BFD. + * common.h: Add AVR magic number. + 2000-03-10 Geoffrey Keating * mips.h: Add R_MIPS_GNU_REL_HI16, R_MIPS_GNU_REL_LO16, diff -upr --new-file binutils-2.9.5.0.31/include/elf/avr.h binutils-2.9.5.0.32/include/elf/avr.h --- binutils-2.9.5.0.31/include/elf/avr.h Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/include/elf/avr.h Fri Mar 31 09:16:55 2000 @@ -0,0 +1,58 @@ +/* AVR ELF support for BFD. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Contributed by Denis Chertykov + +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. */ + +#ifndef _ELF_AVR_H +#define _ELF_AVR_H + +#include "elf/reloc-macros.h" + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_AVR_MACH 0xf + +#define E_AVR_MACH_AVR1 1 +#define E_AVR_MACH_AVR2 2 +#define E_AVR_MACH_AVR3 3 +#define E_AVR_MACH_AVR4 4 + +/* Relocations. */ +START_RELOC_NUMBERS (elf_avr_reloc_type) + RELOC_NUMBER (R_AVR_NONE, 0) + RELOC_NUMBER (R_AVR_32, 1) + RELOC_NUMBER (R_AVR_7_PCREL, 2) + RELOC_NUMBER (R_AVR_13_PCREL, 3) + RELOC_NUMBER (R_AVR_16, 4) + RELOC_NUMBER (R_AVR_16_PM, 5) + RELOC_NUMBER (R_AVR_LO8_LDI, 6) + RELOC_NUMBER (R_AVR_HI8_LDI, 7) + RELOC_NUMBER (R_AVR_HH8_LDI, 8) + RELOC_NUMBER (R_AVR_LO8_LDI_NEG, 9) + RELOC_NUMBER (R_AVR_HI8_LDI_NEG, 10) + RELOC_NUMBER (R_AVR_HH8_LDI_NEG, 11) + RELOC_NUMBER (R_AVR_LO8_LDI_PM, 12) + RELOC_NUMBER (R_AVR_HI8_LDI_PM, 13) + RELOC_NUMBER (R_AVR_HH8_LDI_PM, 14) + RELOC_NUMBER (R_AVR_LO8_LDI_PM_NEG, 15) + RELOC_NUMBER (R_AVR_HI8_LDI_PM_NEG, 16) + RELOC_NUMBER (R_AVR_HH8_LDI_PM_NEG, 17) + RELOC_NUMBER (R_AVR_CALL, 18) + EMPTY_RELOC (R_AVR_max) +END_RELOC_NUMBERS + +#endif /* _ELF_AVR_H */ diff -upr --new-file binutils-2.9.5.0.31/include/elf/common.h binutils-2.9.5.0.32/include/elf/common.h --- binutils-2.9.5.0.31/include/elf/common.h Fri Feb 25 13:39:23 2000 +++ binutils-2.9.5.0.32/include/elf/common.h Fri Mar 31 09:28:46 2000 @@ -189,6 +189,10 @@ Foundation, Inc., 59 Temple Place - Suit /* FR30 magic number - no EABI available. */ #define EM_CYGNUS_FR30 0x3330 +/* AVR magic number + Written in the absense of an ABI. */ +#define EM_AVR 0x1057 + /* See the above comment before you add a new EM_* value here. */ /* Values for e_version */ diff -upr --new-file binutils-2.9.5.0.31/include/hashtab.h binutils-2.9.5.0.32/include/hashtab.h --- binutils-2.9.5.0.31/include/hashtab.h Thu Feb 24 11:11:33 2000 +++ binutils-2.9.5.0.32/include/hashtab.h Fri Mar 31 09:16:52 2000 @@ -38,69 +38,88 @@ extern "C" { #include -/* The hash table element is represented by the following type. */ +/* Callback function pointer types. */ -typedef const void *hash_table_entry_t; +/* Calculate hash of a table entry. */ +typedef unsigned int (*htab_hash) PARAMS ((const void *)); + +/* Compare a table entry with a possible entry. The entry already in + the table always comes first, so the second element can be of a + different type (but in this case htab_find and htab_find_slot + cannot be used; instead the variants that accept a hash value + must be used). */ +typedef int (*htab_eq) PARAMS ((const void *, const void *)); + +/* Cleanup function called whenever a live element is removed from + the hash table. */ +typedef void (*htab_del) PARAMS ((void *)); + +/* Function called by htab_traverse for each live element. The first + arg is the slot of the element (which can be passed to htab_clear_slot + if desired), the second arg is the auxiliary pointer handed to + htab_traverse. Return 1 to continue scan, 0 to stop. */ +typedef int (*htab_trav) PARAMS ((void **, void *)); /* Hash tables are of the following type. The structure (implementation) of this type is not needed for using the hash tables. All work with hash table should be executed only through functions mentioned below. */ -typedef struct hash_table +struct htab { - /* Current size (in entries) of the hash table */ - size_t size; - /* Current number of elements including also deleted elements */ - size_t number_of_elements; - /* Current number of deleted elements in the table */ - size_t number_of_deleted_elements; - /* The following member is used for debugging. Its value is number - of all calls of `find_hash_table_entry' for the hash table. */ - int searches; - /* The following member is used for debugging. Its value is number - of collisions fixed for time of work with the hash table. */ - int collisions; - /* Pointer to function for evaluation of hash value (any unsigned value). - This function has one parameter of type hash_table_entry_t. */ - unsigned (*hash_function) PARAMS ((hash_table_entry_t)); - /* Pointer to function for test on equality of hash table elements (two - parameter of type hash_table_entry_t. */ - int (*eq_function) PARAMS ((hash_table_entry_t, hash_table_entry_t)); - /* Table itself */ - hash_table_entry_t *entries; -} *hash_table_t; - + /* Pointer to hash function. */ + htab_hash hash_f; -/* The prototypes of the package functions. */ + /* Pointer to comparison function. */ + htab_eq eq_f; -extern hash_table_t create_hash_table - PARAMS ((size_t, unsigned (*) (hash_table_entry_t), - int (*) (hash_table_entry_t, hash_table_entry_t))); + /* Pointer to cleanup function. */ + htab_del del_f; -extern void delete_hash_table PARAMS ((hash_table_t)); + /* Table itself. */ + void **entries; -extern void empty_hash_table PARAMS ((hash_table_t)); + /* Current size (in entries) of the hash table */ + size_t size; -extern hash_table_entry_t *find_hash_table_entry - PARAMS ((hash_table_t, hash_table_entry_t, int)); + /* Current number of elements including also deleted elements */ + size_t n_elements; -extern void remove_element_from_hash_table_entry PARAMS ((hash_table_t, - hash_table_entry_t)); + /* Current number of deleted elements in the table */ + size_t n_deleted; -extern void clear_hash_table_slot PARAMS ((hash_table_t, hash_table_entry_t *)); + /* The following member is used for debugging. Its value is number + of all calls of `htab_find_slot' for the hash table. */ + unsigned int searches; -extern void traverse_hash_table PARAMS ((hash_table_t, - int (*) (hash_table_entry_t, void *), - void *)); - -extern size_t hash_table_size PARAMS ((hash_table_t)); + /* The following member is used for debugging. Its value is number + of collisions fixed for time of work with the hash table. */ + unsigned int collisions; +}; -extern size_t hash_table_elements_number PARAMS ((hash_table_t)); +typedef struct htab *htab_t; -extern int hash_table_collisions PARAMS ((hash_table_t)); +/* The prototypes of the package functions. */ -extern int all_hash_table_collisions PARAMS ((void)); +extern htab_t htab_create PARAMS ((size_t, htab_hash, + htab_eq, htab_del)); +extern void htab_delete PARAMS ((htab_t)); +extern void htab_empty PARAMS ((htab_t)); + +extern void *htab_find PARAMS ((htab_t, const void *)); +extern void **htab_find_slot PARAMS ((htab_t, const void *, int)); +extern void *htab_find_with_hash PARAMS ((htab_t, const void *, + unsigned int)); +extern void **htab_find_slot_with_hash PARAMS ((htab_t, const void *, + unsigned int, int)); +extern void htab_clear_slot PARAMS ((htab_t, void **)); +extern void htab_remove_elt PARAMS ((htab_t, void *)); + +extern void htab_traverse PARAMS ((htab_t, htab_trav, void *)); + +extern size_t htab_size PARAMS ((htab_t)); +extern size_t htab_elements PARAMS ((htab_t)); +extern double htab_collisions PARAMS ((htab_t)); #ifdef __cplusplus } diff -upr --new-file binutils-2.9.5.0.31/include/opcode/ChangeLog binutils-2.9.5.0.32/include/opcode/ChangeLog --- binutils-2.9.5.0.31/include/opcode/ChangeLog Sun Mar 12 09:32:34 2000 +++ binutils-2.9.5.0.32/include/opcode/ChangeLog Fri Mar 31 09:16:56 2000 @@ -1,3 +1,18 @@ +2000-03-27 Nick Clifton + + * d30v.h (SHORT_A1): Fix value. + (SHORT_AR): Renumber so that it is at the end of the list of short + instructions, not the end of the list of long instructions. + +2000-03-26 Alan Modra + + * i386.h: (UNIXWARE_COMPAT): Rename to SYSV386_COMPAT as the + problem isn't really specific to Unixware. + (OLDGCC_COMPAT): Define. + (i386_optab): If !OLDGCC_COMPAT, don't handle fsubp etc. with + destination %st(0). + Fix lots of comments. + 2000-03-02 J"orn Rennecke * d30v.h: diff -upr --new-file binutils-2.9.5.0.31/include/opcode/d30v.h binutils-2.9.5.0.32/include/opcode/d30v.h --- binutils-2.9.5.0.31/include/opcode/d30v.h Sun Mar 12 09:32:34 2000 +++ binutils-2.9.5.0.32/include/opcode/d30v.h Fri Mar 31 09:16:57 2000 @@ -101,7 +101,7 @@ struct d30v_opcode #define SHORT_A5 36 /* SHORT_A with a 5-bit immediate instead of 6 */ #define SHORT_CMP 38 /* special form for CMPcc */ #define SHORT_CMPU 40 /* special form for CMPUcc */ -#define SHORT_A1 48 /* special form of SHORT_A for MACa opcodes where a=1 */ +#define SHORT_A1 42 /* special form of SHORT_A for MACa opcodes where a=1 */ #define SHORT_AA 44 /* SHORT_A with the first register an accumulator */ #define SHORT_RA 46 /* SHORT_A with the second register an accumulator */ #define SHORT_MODINC 48 @@ -111,20 +111,20 @@ struct d30v_opcode #define SHORT_UF 52 #define SHORT_A2 53 #define SHORT_NONE 55 /* no operands */ -#define LONG 56 -#define LONG_U 57 /* unary LONG */ -#define LONG_Ur 58 /* LONG pc-relative */ -#define LONG_CMP 59 /* special form for CMPcc and CMPUcc */ -#define LONG_M 60 /* Memory long for ldb, stb */ -#define LONG_M2 61 /* Memory long for ld2w, st2w */ -#define LONG_2 62 /* LONG with 2 operands; jmptnz */ -#define LONG_2r 63 /* LONG with 2 operands; bratnz */ -#define LONG_2b 64 /* LONG_2 with modifier of 3 */ -#define LONG_2br 65 /* LONG_2r with modifier of 3 */ -#define LONG_D 66 /* for DJMPI*/ -#define LONG_Dr 67 /* for DBRAI*/ -#define LONG_Dbr 68 /* for repeati*/ -#define SHORT_AR 69 /* like SHORT_AA but only accept register as third parameter */ +#define SHORT_AR 56 /* like SHORT_AA but only accept register as third parameter */ +#define LONG 57 +#define LONG_U 58 /* unary LONG */ +#define LONG_Ur 59 /* LONG pc-relative */ +#define LONG_CMP 60 /* special form for CMPcc and CMPUcc */ +#define LONG_M 61 /* Memory long for ldb, stb */ +#define LONG_M2 62 /* Memory long for ld2w, st2w */ +#define LONG_2 63 /* LONG with 2 operands; jmptnz */ +#define LONG_2r 64 /* LONG with 2 operands; bratnz */ +#define LONG_2b 65 /* LONG_2 with modifier of 3 */ +#define LONG_2br 66 /* LONG_2r with modifier of 3 */ +#define LONG_D 67 /* for DJMPI */ +#define LONG_Dr 68 /* for DBRAI */ +#define LONG_Dbr 69 /* for repeati */ /* the execution unit(s) used */ int unit; diff -upr --new-file binutils-2.9.5.0.31/include/opcode/i386.h binutils-2.9.5.0.32/include/opcode/i386.h --- binutils-2.9.5.0.31/include/opcode/i386.h Fri Feb 25 14:34:49 2000 +++ binutils-2.9.5.0.32/include/opcode/i386.h Fri Mar 31 09:16:57 2000 @@ -17,11 +17,11 @@ You should have received a copy of the G along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* The UnixWare assembler, and probably other AT&T derived ix86 Unix - assemblers, generate floating point instructions with reversed - source and destination registers in certain cases. Unfortunately, - gcc and possibly many other programs use this reversed syntax, so - we're stuck with it. +/* The SystemV/386 SVR3.2 assembler, and probably all AT&T derived + ix86 Unix assemblers, generate floating point instructions with + reversed source and destination registers in certain cases. + Unfortunately, gcc and possibly many other programs use this + reversed syntax, so we're stuck with it. eg. `fsub %st(3),%st' results in st = st - st(3) as expected, but `fsub %st,%st(3)' results in st(3) = st - st(3), rather than @@ -33,13 +33,18 @@ Foundation, Inc., 59 Temple Place - Suit The affected opcode map is dceX, dcfX, deeX, defX. */ -#ifndef UNIXWARE_COMPAT +#ifndef SYSV386_COMPAT /* Set non-zero for broken, compatible instructions. Set to zero for - non-broken opcodes at your peril. gcc generates UnixWare + non-broken opcodes at your peril. gcc generates SystemV/386 compatible instructions. */ -#define UNIXWARE_COMPAT 1 +#define SYSV386_COMPAT 1 +#endif +#ifndef OLDGCC_COMPAT +/* Set non-zero to cater for old (<= 2.8.1) versions of gcc that could + generate nonsense fsubp, fsubrp, fdivp and fdivrp with operands + reversed. */ +#define OLDGCC_COMPAT SYSV386_COMPAT #endif - static const template i386_optab[] = { @@ -65,7 +70,7 @@ static const template i386_optab[] = { #define sl_FP (sl_Suf|IgnoreSize) #define sld_FP (sld_Suf|IgnoreSize) #define sldx_FP (sldx_Suf|IgnoreSize) -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT /* Someone forgot that the FloatR bit reverses the operation when not equal to the FloatD bit. ie. Changing only FloatD results in the destination being swapped *and* the direction being reversed. */ @@ -74,7 +79,7 @@ static const template i386_optab[] = { #define FloatDR (FloatD|FloatR) #endif -/* move instructions */ +/* Move instructions. */ #define MOV_AX_DISP32 0xa0 { "mov", 2, 0xa0, X, bwl_Suf|D|W, { Disp16|Disp32, Acc, 0 } }, { "mov", 2, 0x88, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0 } }, @@ -87,12 +92,12 @@ static const template i386_optab[] = { the implementation defined value is zero). */ { "mov", 2, 0x8c, X, wl_Suf|Modrm, { SReg3|SReg2, WordReg|WordMem, 0 } }, { "mov", 2, 0x8e, X, wl_Suf|Modrm|IgnoreSize, { WordReg|WordMem, SReg3|SReg2, 0 } }, -/* move to/from control debug registers */ +/* Move to/from control debug registers. */ { "mov", 2, 0x0f20, X, l_Suf|D|Modrm|IgnoreSize, { Control, Reg32|InvMem, 0} }, { "mov", 2, 0x0f21, X, l_Suf|D|Modrm|IgnoreSize, { Debug, Reg32|InvMem, 0} }, { "mov", 2, 0x0f24, X, l_Suf|D|Modrm|IgnoreSize, { Test, Reg32|InvMem, 0} }, -/* move with sign extend */ +/* Move with sign extend. */ /* "movsbl" & "movsbw" must not be unified into "movsb" to avoid conflict with the "movs" string move instruction. */ {"movsbl", 2, 0x0fbe, X, NoSuf|Modrm, { Reg8|ByteMem, Reg32, 0} }, @@ -102,40 +107,38 @@ static const template i386_optab[] = { {"movsx", 2, 0x0fbf, X, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} }, {"movsx", 2, 0x0fbe, X, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} }, -/* move with zero extend */ +/* Move with zero extend. */ {"movzb", 2, 0x0fb6, X, wl_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} }, {"movzwl", 2, 0x0fb7, X, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} }, /* Intel Syntax */ {"movzx", 2, 0x0fb7, X, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} }, {"movzx", 2, 0x0fb6, X, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} }, -/* push instructions */ +/* Push instructions. */ {"push", 1, 0x50, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } }, {"push", 1, 0xff, 6, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } }, {"push", 1, 0x6a, X, wl_Suf|DefaultSize, { Imm8S, 0, 0} }, {"push", 1, 0x68, X, wl_Suf|DefaultSize, { Imm16|Imm32, 0, 0} }, {"push", 1, 0x06, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } }, {"push", 1, 0x0fa0, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } }, -/* push all */ {"pusha", 0, 0x60, X, wl_Suf|DefaultSize, { 0, 0, 0 } }, -/* pop instructions */ +/* Pop instructions. */ {"pop", 1, 0x58, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } }, {"pop", 1, 0x8f, 0, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } }, #define POP_SEG_SHORT 0x07 {"pop", 1, 0x07, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } }, {"pop", 1, 0x0fa1, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } }, -/* pop all */ {"popa", 0, 0x61, X, wl_Suf|DefaultSize, { 0, 0, 0 } }, -/* xchg exchange instructions - xchg commutes: we allow both operand orders */ +/* Exchange instructions. + xchg commutes: we allow both operand orders. */ {"xchg", 2, 0x90, X, wl_Suf|ShortForm, { WordReg, Acc, 0 } }, {"xchg", 2, 0x90, X, wl_Suf|ShortForm, { Acc, WordReg, 0 } }, {"xchg", 2, 0x86, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } }, {"xchg", 2, 0x86, X, bwl_Suf|W|Modrm, { Reg|AnyMem, Reg, 0 } }, -/* in/out from ports */ +/* In/out from ports. */ {"in", 2, 0xe4, X, bwl_Suf|W, { Imm8, Acc, 0 } }, {"in", 2, 0xec, X, bwl_Suf|W, { InOutPortReg, Acc, 0 } }, {"in", 1, 0xe4, X, bwl_Suf|W, { Imm8, 0, 0 } }, @@ -145,17 +148,17 @@ static const template i386_optab[] = { {"out", 1, 0xe6, X, bwl_Suf|W, { Imm8, 0, 0 } }, {"out", 1, 0xee, X, bwl_Suf|W, { InOutPortReg, 0, 0 } }, -/* load effective address */ +/* Load effective address. */ {"lea", 2, 0x8d, X, wl_Suf|Modrm, { WordMem, WordReg, 0 } }, -/* load segment registers from memory */ +/* Load segment registers from memory. */ {"lds", 2, 0xc5, X, wl_Suf|Modrm, { WordMem, WordReg, 0} }, {"les", 2, 0xc4, X, wl_Suf|Modrm, { WordMem, WordReg, 0} }, {"lfs", 2, 0x0fb4, X, wl_Suf|Modrm, { WordMem, WordReg, 0} }, {"lgs", 2, 0x0fb5, X, wl_Suf|Modrm, { WordMem, WordReg, 0} }, {"lss", 2, 0x0fb2, X, wl_Suf|Modrm, { WordMem, WordReg, 0} }, -/* flags register instructions */ +/* Flags register instructions. */ {"clc", 0, 0xf8, X, NoSuf, { 0, 0, 0} }, {"cld", 0, 0xfc, X, NoSuf, { 0, 0, 0} }, {"cli", 0, 0xfa, X, NoSuf, { 0, 0, 0} }, @@ -169,7 +172,7 @@ static const template i386_optab[] = { {"std", 0, 0xfd, X, NoSuf, { 0, 0, 0} }, {"sti", 0, 0xfb, X, NoSuf, { 0, 0, 0} }, -/* arithmetic */ +/* Arithmetic. */ {"add", 2, 0x00, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} }, {"add", 2, 0x83, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} }, {"add", 2, 0x04, X, bwl_Suf|W, { Imm, Acc, 0} }, @@ -216,7 +219,7 @@ static const template i386_optab[] = { {"xor", 2, 0x34, X, bwl_Suf|W, { Imm, Acc, 0} }, {"xor", 2, 0x80, 6, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} }, -/* iclr with 1 operand is really xor with 2 operands. */ +/* iclr with 1 operand is really xor with 2 operands. */ {"clr", 1, 0x30, X, bwl_Suf|W|Modrm|regKludge, { Reg, 0, 0 } }, {"adc", 2, 0x10, X, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} }, @@ -236,13 +239,13 @@ static const template i386_optab[] = { {"aam", 0, 0xd40a, X, NoSuf, { 0, 0, 0} }, {"aam", 1, 0xd4, X, NoSuf, { Imm8S, 0, 0} }, -/* conversion insns */ -/* conversion: intel naming */ +/* Conversion insns. */ +/* Intel naming */ {"cbw", 0, 0x98, X, NoSuf|Size16, { 0, 0, 0} }, {"cwde", 0, 0x98, X, NoSuf|Size32, { 0, 0, 0} }, {"cwd", 0, 0x99, X, NoSuf|Size16, { 0, 0, 0} }, {"cdq", 0, 0x99, X, NoSuf|Size32, { 0, 0, 0} }, -/* att naming */ +/* AT&T naming */ {"cbtw", 0, 0x98, X, NoSuf|Size16, { 0, 0, 0} }, {"cwtl", 0, 0x98, X, NoSuf|Size32, { 0, 0, 0} }, {"cwtd", 0, 0x99, X, NoSuf|Size16, { 0, 0, 0} }, @@ -315,7 +318,7 @@ static const template i386_optab[] = { {"sar", 2, 0xd2, 7, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} }, {"sar", 1, 0xd0, 7, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} }, -/* control transfer instructions */ +/* Control transfer instructions. */ {"call", 1, 0xe8, X, wl_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} }, {"call", 1, 0xff, 2, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} }, /* Intel Syntax */ @@ -342,7 +345,7 @@ static const template i386_optab[] = { {"enter", 2, 0xc8, X, wl_Suf|DefaultSize, { Imm16, Imm8, 0} }, {"leave", 0, 0xc9, X, wl_Suf|DefaultSize, { 0, 0, 0} }, -/* conditional jumps */ +/* Conditional jumps. */ {"jo", 1, 0x70, X, NoSuf|Jump, { Disp, 0, 0} }, {"jno", 1, 0x71, X, NoSuf|Jump, { Disp, 0, 0} }, {"jb", 1, 0x72, X, NoSuf|Jump, { Disp, 0, 0} }, @@ -388,7 +391,7 @@ static const template i386_optab[] = { {"loopnz", 1, 0xe0, X, wl_Suf|JumpByte, { Disp, 0, 0} }, {"loopne", 1, 0xe0, X, wl_Suf|JumpByte, { Disp, 0, 0} }, -/* set byte on flag instructions */ +/* Set byte on flag instructions. */ {"seto", 1, 0x0f90, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} }, {"setno", 1, 0x0f91, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} }, {"setb", 1, 0x0f92, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} }, @@ -420,7 +423,7 @@ static const template i386_optab[] = { {"setnle", 1, 0x0f9f, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} }, {"setg", 1, 0x0f9f, 0, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} }, -/* string manipulation */ +/* String manipulation. */ {"cmps", 0, 0xa6, X, bwld_Suf|W|IsString, { 0, 0, 0} }, {"cmps", 2, 0xa6, X, bwld_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} }, {"scmp", 0, 0xa6, X, bwld_Suf|W|IsString, { 0, 0, 0} }, @@ -454,7 +457,7 @@ static const template i386_optab[] = { {"xlat", 0, 0xd7, X, b_Suf|IsString, { 0, 0, 0} }, {"xlat", 1, 0xd7, X, b_Suf|IsString, { AnyMem, 0, 0} }, -/* bit manipulation */ +/* Bit manipulation. */ {"bsf", 2, 0x0fbc, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} }, {"bsr", 2, 0x0fbd, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} }, {"bt", 2, 0x0fa3, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} }, @@ -466,25 +469,25 @@ static const template i386_optab[] = { {"bts", 2, 0x0fab, X, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} }, {"bts", 2, 0x0fba, 5, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} }, -/* interrupts & op. sys insns */ +/* Interrupts & op. sys insns. */ /* See gas/config/tc-i386.c for conversion of 'int $3' into the special - int 3 insn. */ + int 3 insn. */ #define INT_OPCODE 0xcd #define INT3_OPCODE 0xcc {"int", 1, 0xcd, X, NoSuf, { Imm8, 0, 0} }, {"int3", 0, 0xcc, X, NoSuf, { 0, 0, 0} }, {"into", 0, 0xce, X, NoSuf, { 0, 0, 0} }, {"iret", 0, 0xcf, X, wl_Suf, { 0, 0, 0} }, -/* i386sl, i486sl, later 486, and Pentium */ +/* i386sl, i486sl, later 486, and Pentium. */ {"rsm", 0, 0x0faa, X, NoSuf, { 0, 0, 0} }, {"bound", 2, 0x62, X, wl_Suf|Modrm, { WordReg, WordMem, 0} }, {"hlt", 0, 0xf4, X, NoSuf, { 0, 0, 0} }, -/* nop is actually 'xchgl %eax, %eax' */ +/* nop is actually 'xchgl %eax, %eax'. */ {"nop", 0, 0x90, X, NoSuf, { 0, 0, 0} }, -/* protection control */ +/* Protection control. */ {"arpl", 2, 0x63, X, w_Suf|Modrm|IgnoreSize,{ Reg16, Reg16|ShortMem, 0} }, {"lar", 2, 0x0f02, X, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} }, {"lgdt", 1, 0x0f01, 2, wl_Suf|Modrm, { WordMem, 0, 0} }, @@ -503,7 +506,7 @@ static const template i386_optab[] = { {"verr", 1, 0x0f00, 4, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} }, {"verw", 1, 0x0f00, 5, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} }, -/* floating point instructions */ +/* Floating point instructions. */ /* load */ {"fld", 1, 0xd9c0, X, FP|ShortForm, { FloatReg, 0, 0} }, /* register */ @@ -582,7 +585,7 @@ static const template i386_optab[] = { /* add */ {"fadd", 2, 0xd8c0, X, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} }, {"fadd", 1, 0xd8c0, X, FP|ShortForm, { FloatReg, 0, 0} }, /* alias for fadd %st(i), %st */ -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fadd", 0, 0xdec1, X, FP|Ugh, { 0, 0, 0} }, /* alias for faddp */ #endif {"fadd", 1, 0xd8, 0, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, @@ -596,17 +599,19 @@ static const template i386_optab[] = { /* subtract */ {"fsub", 2, 0xd8e0, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} }, {"fsub", 1, 0xd8e0, X, FP|ShortForm, { FloatReg, 0, 0} }, -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fsub", 0, 0xdee1, X, FP|Ugh, { 0, 0, 0} }, /* alias for fsubp */ #endif {"fsub", 1, 0xd8, 4, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, {"fisub", 1, 0xde, 4, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fsubp", 2, 0xdee0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} }, {"fsubp", 1, 0xdee0, X, FP|ShortForm, { FloatReg, 0, 0} }, {"fsubp", 0, 0xdee1, X, FP, { 0, 0, 0} }, +#if OLDGCC_COMPAT {"fsubp", 2, 0xdee0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} }, +#endif #else {"fsubp", 2, 0xdee8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} }, {"fsubp", 1, 0xdee8, X, FP|ShortForm, { FloatReg, 0, 0} }, @@ -616,17 +621,19 @@ static const template i386_optab[] = { /* subtract reverse */ {"fsubr", 2, 0xd8e8, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} }, {"fsubr", 1, 0xd8e8, X, FP|ShortForm, { FloatReg, 0, 0} }, -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fsubr", 0, 0xdee9, X, FP|Ugh, { 0, 0, 0} }, /* alias for fsubrp */ #endif {"fsubr", 1, 0xd8, 5, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, {"fisubr", 1, 0xde, 5, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fsubrp", 2, 0xdee8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} }, {"fsubrp", 1, 0xdee8, X, FP|ShortForm, { FloatReg, 0, 0} }, {"fsubrp", 0, 0xdee9, X, FP, { 0, 0, 0} }, +#if OLDGCC_COMPAT {"fsubrp", 2, 0xdee8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} }, +#endif #else {"fsubrp", 2, 0xdee0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} }, {"fsubrp", 1, 0xdee0, X, FP|ShortForm, { FloatReg, 0, 0} }, @@ -636,7 +643,7 @@ static const template i386_optab[] = { /* multiply */ {"fmul", 2, 0xd8c8, X, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} }, {"fmul", 1, 0xd8c8, X, FP|ShortForm, { FloatReg, 0, 0} }, -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fmul", 0, 0xdec9, X, FP|Ugh, { 0, 0, 0} }, /* alias for fmulp */ #endif {"fmul", 1, 0xd8, 1, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, @@ -650,17 +657,19 @@ static const template i386_optab[] = { /* divide */ {"fdiv", 2, 0xd8f0, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} }, {"fdiv", 1, 0xd8f0, X, FP|ShortForm, { FloatReg, 0, 0} }, -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fdiv", 0, 0xdef1, X, FP|Ugh, { 0, 0, 0} }, /* alias for fdivp */ #endif {"fdiv", 1, 0xd8, 6, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, {"fidiv", 1, 0xde, 6, sld_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fdivp", 2, 0xdef0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} }, {"fdivp", 1, 0xdef0, X, FP|ShortForm, { FloatReg, 0, 0} }, {"fdivp", 0, 0xdef1, X, FP, { 0, 0, 0} }, +#if OLDGCC_COMPAT {"fdivp", 2, 0xdef0, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} }, +#endif #else {"fdivp", 2, 0xdef8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} }, {"fdivp", 1, 0xdef8, X, FP|ShortForm, { FloatReg, 0, 0} }, @@ -670,17 +679,19 @@ static const template i386_optab[] = { /* divide reverse */ {"fdivr", 2, 0xd8f8, X, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} }, {"fdivr", 1, 0xd8f8, X, FP|ShortForm, { FloatReg, 0, 0} }, -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fdivr", 0, 0xdef9, X, FP|Ugh, { 0, 0, 0} }, /* alias for fdivrp */ #endif {"fdivr", 1, 0xd8, 7, sld_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} }, {"fidivr", 1, 0xde, 7, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, -#if UNIXWARE_COMPAT +#if SYSV386_COMPAT {"fdivrp", 2, 0xdef8, X, FP|ShortForm, { FloatAcc, FloatReg, 0} }, {"fdivrp", 1, 0xdef8, X, FP|ShortForm, { FloatReg, 0, 0} }, {"fdivrp", 0, 0xdef9, X, FP, { 0, 0, 0} }, +#if OLDGCC_COMPAT {"fdivrp", 2, 0xdef8, X, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} }, +#endif #else {"fdivrp", 2, 0xdef0, X, FP|ShortForm, { FloatAcc, FloatReg, 0} }, {"fdivrp", 1, 0xdef0, X, FP|ShortForm, { FloatReg, 0, 0} }, @@ -720,8 +731,7 @@ static const template i386_optab[] = { {"fstsw", 0, 0xdfe0, X, FP|FWait, { 0, 0, 0} }, {"fnclex", 0, 0xdbe2, X, FP, { 0, 0, 0} }, {"fclex", 0, 0xdbe2, X, FP|FWait, { 0, 0, 0} }, -/* Short forms of fldenv, fstenv use data size prefix. - FIXME: Are these the right suffixes? */ +/* Short forms of fldenv, fstenv use data size prefix. */ {"fnstenv",1, 0xd9, 6, sl_Suf|Modrm, { LLongMem, 0, 0} }, {"fstenv", 1, 0xd9, 6, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} }, {"fldenv", 1, 0xd9, 4, sl_Suf|Modrm, { LLongMem, 0, 0} }, @@ -736,9 +746,8 @@ static const template i386_optab[] = { #define FWAIT_OPCODE 0x9b {"fwait", 0, 0x9b, X, FP, { 0, 0, 0} }, -/* - opcode prefixes; we allow them as seperate insns too -*/ +/* Opcode prefixes; we allow them as separate insns too. */ + #define ADDR_PREFIX_OPCODE 0x67 {"addr16", 0, 0x67, X, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} }, {"addr32", 0, 0x67, X, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} }, @@ -772,7 +781,7 @@ static const template i386_optab[] = { {"repne", 0, 0xf2, X, NoSuf|IsPrefix, { 0, 0, 0} }, {"repnz", 0, 0xf2, X, NoSuf|IsPrefix, { 0, 0, 0} }, -/* 486 extensions */ +/* 486 extensions. */ {"bswap", 1, 0x0fc8, X, l_Suf|ShortForm, { Reg32, 0, 0 } }, {"xadd", 2, 0x0fc0, X, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } }, @@ -781,10 +790,10 @@ static const template i386_optab[] = { {"wbinvd", 0, 0x0f09, X, NoSuf, { 0, 0, 0} }, {"invlpg", 1, 0x0f01, 7, NoSuf|Modrm, { AnyMem, 0, 0} }, -/* 586 and late 486 extensions */ +/* 586 and late 486 extensions. */ {"cpuid", 0, 0x0fa2, X, NoSuf, { 0, 0, 0} }, -/* Pentium extensions */ +/* Pentium extensions. */ {"wrmsr", 0, 0x0f30, X, NoSuf, { 0, 0, 0} }, {"rdtsc", 0, 0x0f31, X, NoSuf, { 0, 0, 0} }, {"rdmsr", 0, 0x0f32, X, NoSuf, { 0, 0, 0} }, @@ -794,7 +803,7 @@ static const template i386_optab[] = { {"fxsave", 1, 0x0fae, 0, FP|Modrm, { LLongMem, 0, 0} }, {"fxrstor", 1, 0x0fae, 1, FP|Modrm, { LLongMem, 0, 0} }, -/* Pentium Pro extensions */ +/* Pentium Pro extensions. */ {"rdpmc", 0, 0x0f33, X, NoSuf, { 0, 0, 0} }, {"ud2", 0, 0x0f0b, X, NoSuf, { 0, 0, 0} }, /* official undefined instr. */ @@ -919,7 +928,7 @@ static const template i386_optab[] = { {"pxor", 2, 0x0fef, X, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } }, -/* PIII Katmai New Instructions / SIMD instructions */ +/* PIII Katmai New Instructions / SIMD instructions. */ {"addps", 2, 0x0f58, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, {"addss", 2, 0xf30f58, X, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } }, @@ -1008,7 +1017,7 @@ static const template i386_optab[] = { {"unpcklps", 2, 0x0f14, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, {"xorps", 2, 0x0f57, X, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -/* AMD 3DNow! instructions */ +/* AMD 3DNow! instructions. */ {"prefetch", 1, 0x0f0d, 0, FP|Modrm, { ByteMem, 0, 0 } }, {"prefetchw",1, 0x0f0d, 1, FP|Modrm, { ByteMem, 0, 0 } }, @@ -1066,7 +1075,7 @@ static const template i386_optab[] = { #define MAX_MNEM_SIZE 16 /* for parsing insn mnemonics from input */ -/* 386 register table */ +/* 386 register table. */ static const reg_entry i386_regtab[] = { /* make %st first as we test for it */ diff -upr --new-file binutils-2.9.5.0.31/include/partition.h binutils-2.9.5.0.32/include/partition.h --- binutils-2.9.5.0.31/include/partition.h Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/include/partition.h Fri Mar 31 09:16:52 2000 @@ -0,0 +1,81 @@ +/* List implentation of a partition of consecutive integers. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by CodeSourcery, LLC. + + This file is part of GNU CC. + + GNU CC 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, or (at your option) + any later version. + + GNU CC 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 GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This package implements a partition of consecutive integers. The + elements are partitioned into classes. Each class is represented + by one of its elements, the canonical element, which is chosen + arbitrarily from elements in the class. The principal operations + on a partition are FIND, which takes an element, determines its + class, and returns the canonical element for that class, and UNION, + which unites the two classes that contain two given elements into a + single class. + + The list implementation used here provides constant-time finds. By + storing the size of each class with the class's canonical element, + it is able to perform unions over all the classes in the partition + in O (N log N) time. */ + +#ifndef _PARTITION_H +#define _PARTITION_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include +#include + +struct partition_elem +{ + /* The canonical element that represents the class containing this + element. */ + int class_element; + /* The next element in this class. Elements in each class form a + circular list. */ + struct partition_elem* next; + /* The number of elements in this class. Valid only if this is the + canonical element for its class. */ + unsigned class_count; +}; + +typedef struct partition_def +{ + /* The number of elements in this partition. */ + int num_elements; + /* The elements in the partition. */ + struct partition_elem elements[1]; +} *partition; + +extern partition partition_new PARAMS((int)); +extern void partition_delete PARAMS((partition)); +extern int partition_union PARAMS((partition, + int, + int)); +extern void partition_print PARAMS((partition, + FILE*)); + +/* Returns the canonical element corresponding to the class containing + ELEMENT__ in PARTITION__. */ + +#define partition_find(partition__, element__) \ + ((partition__)->elements[(element__)].class_element) + +#endif /* _PARTITION_H */ diff -upr --new-file binutils-2.9.5.0.31/ld/ChangeLog binutils-2.9.5.0.32/ld/ChangeLog --- binutils-2.9.5.0.31/ld/ChangeLog Sun Mar 12 09:33:11 2000 +++ binutils-2.9.5.0.32/ld/ChangeLog Fri Mar 31 09:17:34 2000 @@ -1,3 +1,18 @@ +2000-03-27 Denis Chertykov + + * configure.tgt (avr-*-*): New target support. + * Makefile.am: Likewise. + * scripttempl/elf32avr.sc: New script file. + * emulparams/avr1200.sh: New file. + * emulparams/avr23xx.sh: New file. + * emulparams/avr4433.sh New file. + * emulparams/avr44x4.sh New file. + * emulparams/avr85xx.sh New file. + * emulparams/avrmega103.sh New file. + * emulparams/avrmega161.sh New file. + * emulparams/avrmega603.sh New file. + * Makefile.in: Regenerate. + 2000-03-09 Andreas Jaeger * Makefile.am (check-DEJAGNU): Also unset LANG. diff -upr --new-file binutils-2.9.5.0.31/ld/Makefile.am binutils-2.9.5.0.32/ld/Makefile.am --- binutils-2.9.5.0.31/ld/Makefile.am Sun Mar 12 09:40:14 2000 +++ binutils-2.9.5.0.32/ld/Makefile.am Fri Mar 31 09:28:46 2000 @@ -111,6 +111,14 @@ ALL_EMULATIONS = \ earmnbsd.o \ earmpe.o \ earm_epoc_pe.o \ + eavr1200.o \ + eavr23xx.o \ + eavr44x4.o \ + eavr4433.o \ + eavr85xx.o \ + eavrmega603.o \ + eavrmega103.o \ + eavrmega161.o \ ecoff_sparc.o \ ed10velf.o \ ed30velf.o \ @@ -320,6 +328,38 @@ earm_epoc_pe.c: $(srcdir)/emulparams/arm earmpe.c: $(srcdir)/emulparams/armpe.sh \ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS} ${GENSCRIPTS} armpe "$(tdir_armpe)" +eavr85xx.c: $(srcdir)/emulparams/avr85xx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr85xx "$(tdir_avr85xx)" +eavr1200.c: $(srcdir)/emulparams/avr1200.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr1200 "$(tdir_avr85xx)" +eavr23xx.c: $(srcdir)/emulparams/avr23xx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr23xx "$(tdir_avr85xx)" +eavr44x4.c: $(srcdir)/emulparams/avr44x4.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr44x4 "$(tdir_avr85xx)" +eavr4433.c: $(srcdir)/emulparams/avr4433.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr4433 "$(tdir_avr85xx)" +eavrmega603.c: $(srcdir)/emulparams/avrmega603.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avrmega603 "$(tdir_avr85xx)" +eavrmega103.c: $(srcdir)/emulparams/avrmega103.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)" +eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avrmega161 "$(tdir_avr85xx)" ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS} ${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)" diff -upr --new-file binutils-2.9.5.0.31/ld/Makefile.in binutils-2.9.5.0.32/ld/Makefile.in --- binutils-2.9.5.0.31/ld/Makefile.in Sun Mar 12 09:40:14 2000 +++ binutils-2.9.5.0.32/ld/Makefile.in Fri Mar 31 09:28:46 2000 @@ -214,6 +214,14 @@ ALL_EMULATIONS = \ earmnbsd.o \ earmpe.o \ earm_epoc_pe.o \ + eavr1200.o \ + eavr23xx.o \ + eavr44x4.o \ + eavr4433.o \ + eavr85xx.o \ + eavrmega603.o \ + eavrmega103.o \ + eavrmega161.o \ ecoff_sparc.o \ ed10velf.o \ ed30velf.o \ @@ -1019,6 +1027,38 @@ earm_epoc_pe.c: $(srcdir)/emulparams/arm earmpe.c: $(srcdir)/emulparams/armpe.sh \ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS} ${GENSCRIPTS} armpe "$(tdir_armpe)" +eavr85xx.c: $(srcdir)/emulparams/avr85xx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr85xx "$(tdir_avr85xx)" +eavr1200.c: $(srcdir)/emulparams/avr1200.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr1200 "$(tdir_avr85xx)" +eavr23xx.c: $(srcdir)/emulparams/avr23xx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr23xx "$(tdir_avr85xx)" +eavr44x4.c: $(srcdir)/emulparams/avr44x4.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr44x4 "$(tdir_avr85xx)" +eavr4433.c: $(srcdir)/emulparams/avr4433.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr4433 "$(tdir_avr85xx)" +eavrmega603.c: $(srcdir)/emulparams/avrmega603.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avrmega603 "$(tdir_avr85xx)" +eavrmega103.c: $(srcdir)/emulparams/avrmega103.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avrmega103 "$(tdir_avr85xx)" +eavrmega161.c: $(srcdir)/emulparams/avrmega161.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avrmega161 "$(tdir_avr85xx)" ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS} ${GENSCRIPTS} coff_sparc "$(tdir_coff_sparc)" diff -upr --new-file binutils-2.9.5.0.31/ld/configure.tgt binutils-2.9.5.0.32/ld/configure.tgt --- binutils-2.9.5.0.31/ld/configure.tgt Sun Mar 12 09:40:14 2000 +++ binutils-2.9.5.0.32/ld/configure.tgt Fri Mar 31 09:28:46 2000 @@ -21,6 +21,8 @@ arm-*-wince) targ_emul=armpe ; arm-*-pe) targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; arc-*-elf*) targ_emul=arcelf ;; +avr-*-*) targ_emul=avr85xx + targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161" ;; d10v-*-*) targ_emul=d10velf ;; d30v-*-*ext*) targ_emul=d30v_e; targ_extra_emuls="d30velf d30v_o" ;; d30v-*-*onchip*) targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;; diff -upr --new-file binutils-2.9.5.0.31/ld/emulparams/avr1200.sh binutils-2.9.5.0.32/ld/emulparams/avr1200.sh --- binutils-2.9.5.0.31/ld/emulparams/avr1200.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/ld/emulparams/avr1200.sh Fri Mar 31 09:17:40 2000 @@ -0,0 +1,11 @@ +ARCH=avr:1 +MACHINE= +SCRIPT_NAME=elf32avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +TEXT_LENGTH=1K +DATA_LENGTH=0 +EEPROM_LENGTH=64 diff -upr --new-file binutils-2.9.5.0.31/ld/emulparams/avr23xx.sh binutils-2.9.5.0.32/ld/emulparams/avr23xx.sh --- binutils-2.9.5.0.31/ld/emulparams/avr23xx.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/ld/emulparams/avr23xx.sh Fri Mar 31 09:17:40 2000 @@ -0,0 +1,12 @@ +ARCH=avr:2 +MACHINE= +SCRIPT_NAME=elf32avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +TEXT_LENGTH=2K +DATA_LENGTH=128 +EEPROM_LENGTH=128 + diff -upr --new-file binutils-2.9.5.0.31/ld/emulparams/avr4433.sh binutils-2.9.5.0.32/ld/emulparams/avr4433.sh --- binutils-2.9.5.0.31/ld/emulparams/avr4433.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/ld/emulparams/avr4433.sh Fri Mar 31 09:17:40 2000 @@ -0,0 +1,12 @@ +ARCH=avr:2 +MACHINE= +SCRIPT_NAME=elf32avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +TEXT_LENGTH=4K +DATA_LENGTH=128 +EEPROM_LENGTH=256 + diff -upr --new-file binutils-2.9.5.0.31/ld/emulparams/avr44x4.sh binutils-2.9.5.0.32/ld/emulparams/avr44x4.sh --- binutils-2.9.5.0.31/ld/emulparams/avr44x4.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/ld/emulparams/avr44x4.sh Fri Mar 31 09:17:40 2000 @@ -0,0 +1,12 @@ +ARCH=avr:2 +MACHINE= +SCRIPT_NAME=elf32avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +TEXT_LENGTH=4K +DATA_LENGTH=256 +EEPROM_LENGTH=256 + diff -upr --new-file binutils-2.9.5.0.31/ld/emulparams/avr85xx.sh binutils-2.9.5.0.32/ld/emulparams/avr85xx.sh --- binutils-2.9.5.0.31/ld/emulparams/avr85xx.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/ld/emulparams/avr85xx.sh Fri Mar 31 09:17:40 2000 @@ -0,0 +1,12 @@ +ARCH=avr:2 +MACHINE= +SCRIPT_NAME=elf32avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +TEXT_LENGTH=8K +DATA_LENGTH=512 +EEPROM_LENGTH=512 + diff -upr --new-file binutils-2.9.5.0.31/ld/emulparams/avrmega103.sh binutils-2.9.5.0.32/ld/emulparams/avrmega103.sh --- binutils-2.9.5.0.31/ld/emulparams/avrmega103.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/ld/emulparams/avrmega103.sh Fri Mar 31 09:17:40 2000 @@ -0,0 +1,12 @@ +ARCH=avr:3 +MACHINE= +SCRIPT_NAME=elf32avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +TEXT_LENGTH=128K +DATA_LENGTH=4K +EEPROM_LENGTH=4K + diff -upr --new-file binutils-2.9.5.0.31/ld/emulparams/avrmega161.sh binutils-2.9.5.0.32/ld/emulparams/avrmega161.sh --- binutils-2.9.5.0.31/ld/emulparams/avrmega161.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/ld/emulparams/avrmega161.sh Fri Mar 31 09:17:40 2000 @@ -0,0 +1,12 @@ +ARCH=avr:4 +MACHINE= +SCRIPT_NAME=elf32avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +TEXT_LENGTH=16K +DATA_LENGTH=1K +EEPROM_LENGTH=512 + diff -upr --new-file binutils-2.9.5.0.31/ld/emulparams/avrmega603.sh binutils-2.9.5.0.32/ld/emulparams/avrmega603.sh --- binutils-2.9.5.0.31/ld/emulparams/avrmega603.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/ld/emulparams/avrmega603.sh Fri Mar 31 09:17:40 2000 @@ -0,0 +1,12 @@ +ARCH=avr:3 +MACHINE= +SCRIPT_NAME=elf32avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +TEXT_LENGTH=64K +DATA_LENGTH=4K +EEPROM_LENGTH=2K + diff -upr --new-file binutils-2.9.5.0.31/ld/scripttempl/elf32avr.sc binutils-2.9.5.0.32/ld/scripttempl/elf32avr.sc --- binutils-2.9.5.0.31/ld/scripttempl/elf32avr.sc Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/ld/scripttempl/elf32avr.sc Fri Mar 31 09:17:43 2000 @@ -0,0 +1,149 @@ +cat < text} + + .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))} + { + *(.data) + *(.gnu.linkonce.d*) + ${RELOCATING+. = ALIGN(2);} + ${RELOCATING+ _edata = . ; } + } ${RELOCATING+ > data} + + .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : + ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text) + SIZEOF (.data))} + { + ${RELOCATING+ PROVIDE (__bss_start = .) ; } + *(.bss) + *(COMMON) + ${RELOCATING+ PROVIDE (__bss_end = .) ; } + ${RELOCATING+ _end = . ; } + } ${RELOCATING+ > data} + + .eeprom ${RELOCATING-0}: + { + *(.eeprom*) + ${RELOCATING+ __eeprom_end = . ; } + } ${RELOCATING+ > eeprom} + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + +} +EOF + diff -upr --new-file binutils-2.9.5.0.31/libiberty/ChangeLog binutils-2.9.5.0.32/libiberty/ChangeLog --- binutils-2.9.5.0.31/libiberty/ChangeLog Thu Feb 24 11:11:27 2000 +++ binutils-2.9.5.0.32/libiberty/ChangeLog Fri Mar 31 09:16:49 2000 @@ -1,3 +1,49 @@ +Thu Mar 16 01:33:58 2000 Jeffrey A Law (law@cygnus.com) + + * Makefile.in (partition.o): Depend on config.h + +2000-03-14 Bernd Schmidt + + * hashtab.c (find_empty_slot_for_expand): New function. + (htab_expand): Use it instead of htab_find_slot. + (htab_find_with_hash): Renamed from htab_find; now accepts extra + argument HASH. + (htab_find_slot_with_hash): Likewise for htab_find_slot. + (htab_find): New wrapper function. + (htab_find_slot): Likewise. + (htab_traverse): Pass slot, not entry, to called function. + +2000-03-09 Alex Samuel + + * Makefile.in (CFILES): Add partition.c. + (REQUIRED_OFILES): Add partition.o. + (partition.o): New rule. + * partition.c: New file. + +2000-03-09 Zack Weinberg + + * hashtab.c (htab_create): Set del_f. + (htab_delete, htab_empty, htab_remove_elt, htab_clear_slot): + Use it. + +2000-03-08 Zack Weinberg + + * hashtab.c: Remove debugging variables (all_searches, + all_collisions, all_expansions). Delete + all_hash_table_collisions. + (create_hash_table, delete_hash_table, empty_hash_table, + find_hash_table_entry, remove_element_from_hash_table_entry, + clear_hash_table_slot, traverse_hash_table, hash_table_size, + hash_table_elements_number, hash_table_collisions): Rename to: + htab_create, htab_delete, htab_empty, htab_find_slot, + htab_remove_elt, htab_clear_slot, htab_traverse, htab_size, + htab_elements, htab_collisions. + (htab_find): New function, handles common case where you don't + plan to add or delete an entry. + (htab_expand): Don't create a whole new table, just a new + entry vector. + (htab_find_slot): Simplify logic. + 1999-08-03 Ian Lance Taylor * floatformat.c: Add casts to avoid signed/unsigned warnings. @@ -21,7 +67,7 @@ 2000-01-04 Mumit Khan * pexecute.c: Conditionally include string.h. - (fix_argv): Handle embedded whitespace in args for Mingw32. + (fix_argv): Handle embedded whitespace in args for Mingw32. 2000-01-04 Kaveh R. Ghazi @@ -100,7 +146,7 @@ Tue Nov 2 03:23:13 1999 Philippe De Mu (demangle_qualified): Use consume_count_with_underscores. (get_count): Tweak formatting. (do_type): Use string_append_template_idx. - + 1999-10-18 Kaveh R. Ghazi * calloc.c: Add a public domain notice. @@ -163,7 +209,7 @@ Wed Sep 8 20:03:28 1999 Kaveh R. Ghazi Tue Sep 7 23:32:18 1999 Linas Vepstas - * config.table: Add openedition target. + * config.table: Add openedition target. * config/mh-openedition: New file. Thu Sep 2 01:36:12 1999 Marc Espie @@ -192,7 +238,7 @@ Thu Sep 2 01:36:12 1999 Marc Espie @@ -210,7 +256,7 @@ Fri Aug 6 23:32:29 1999 Daniel Jacobow 1999-07-14 Richard Henderson - * argv.c: Include stdlib.h and string.h instead of + * argv.c: Include stdlib.h and string.h instead of prototyping directly. * choose-temp.c: Conditionally include string.h. @@ -304,7 +350,7 @@ Sun Apr 25 01:18:21 1999 Mumit Khan Fix from Dale Hawkins: - * cplus-dem.c (mop_up): Set typevec_size to zero, so it'll be + * cplus-dem.c (mop_up): Set typevec_size to zero, so it'll be reallocated properly if we use it again. * cplus-dem.c (demangle_fund_type): Check for buffer overrun. Be @@ -395,7 +441,7 @@ Sun Apr 11 23:20:59 1999 Mumit Khan * pexecute.c (__CYGWIN32__): Rename to @@ -429,10 +475,10 @@ Tue Feb 9 01:12:27 1999 Marc Espie - * clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on + * clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on platforms that don't have HZ. * getruntime.c (HZ): Likewise. @@ -501,7 +547,7 @@ Fri Dec 18 17:50:18 1998 David Taylor * cplus-dem.c (demangle_arm_pt): remove declaration -- function doesn't exist. (do_hpacc_template_literal): remove unused variable `i'. - + Fri Dec 18 16:11:43 EST 1998 Andrew MacLeod * cplus-dem.c (demangle_fund_type): Process CV and u codes before @@ -607,7 +653,7 @@ Mon Nov 23 16:59:49 1998 Kaveh R. Ghazi 1998-11-16 Benjamin Kosnik - * cplus-dem.c (demangle_fund_type): Add demangling for C9x types. + * cplus-dem.c (demangle_fund_type): Add demangling for C9x types. Thu Nov 19 22:15:50 1998 Jeffrey A Law (law@cygnus.com) @@ -660,8 +706,8 @@ Sat Nov 7 16:02:10 1998 Kaveh R. Ghazi Mon Nov 2 15:05:33 1998 Geoffrey Noer - * configure.in: detect cygwin* instead of cygwin32* - * configure: regenerate + * configure.in: detect cygwin* instead of cygwin32* + * configure: regenerate Mon Nov 2 10:22:01 1998 Kaveh R. Ghazi @@ -751,9 +797,9 @@ Thu Oct 15 18:51:12 1998 Kaveh R. Ghazi Tue Oct 13 23:51:51 1998 Jeffrey A Law (law@cygnus.com) - * mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h - * configure.in (AC_CHECK_HEADERS): Check for sys/time.h too. - * config.in, configure: Rebuilt. + * mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h + * configure.in (AC_CHECK_HEADERS): Check for sys/time.h too. + * config.in, configure: Rebuilt. * getopt.c: Check HAVE_STRINGS_H before including strings.h. * configure.in (AC_CHECK_HEADERS): Check for strings.h too. @@ -761,7 +807,7 @@ Tue Oct 13 23:51:51 1998 Jeffrey A Law Mon Oct 12 19:15:59 1998 Geoffrey Noer - * configure.in: in comment, call AC_EXEEXT instead of AM_EXEEXT + * configure.in: in comment, call AC_EXEEXT instead of AM_EXEEXT Sun Oct 11 17:36:06 1998 Michael Tiemann @@ -1201,8 +1247,8 @@ Fri Feb 6 01:35:17 1998 Manfred Hollst Thu Feb 5 18:48:56 1998 Geoffrey Noer - * config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES - since it gets built automatically + * config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES + since it gets built automatically Sun Feb 1 02:52:32 1998 Mike Stump @@ -1287,24 +1333,24 @@ Mon Sep 29 12:28:41 1997 Ian Lance Tayl Mon Sep 29 12:27:59 1997 Ian Lance Taylor - * pexecute.c: Use spawn if __CYGWIN32__. + * pexecute.c: Use spawn if __CYGWIN32__. 1997-08-08 Paul Eggert - * pexecute.c: Include "config.h" first, as per autoconf manual. + * pexecute.c: Include "config.h" first, as per autoconf manual. Fri Jun 27 15:20:29 1997 Scott Christley - * pexecute.c (fix_argv): New function. - (pexecute): Win32 but not Cygwin32 needs its arguments fixed. - Add underscore to cwait function call. + * pexecute.c (fix_argv): New function. + (pexecute): Win32 but not Cygwin32 needs its arguments fixed. + Add underscore to cwait function call. Sun Sep 28 12:00:52 1997 Mark Mitchell - * cplus-dem.c (demangle_template): Add new parameter. Handle new - template-function mangling. - (consume_count_with_underscores): New function. - (demangle_signature): Handle new name-mangling scheme. + * cplus-dem.c (demangle_template): Add new parameter. Handle new + template-function mangling. + (consume_count_with_underscores): New function. + (demangle_signature): Handle new name-mangling scheme. Wed Sep 24 00:31:59 1997 Felix Lee @@ -1682,7 +1728,7 @@ Tue Jun 25 23:01:07 1996 Jason Molenda Tue Jun 25 22:50:07 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) - * Makefile.in (datadir): Set to $(prefix)/share. + * Makefile.in (datadir): Set to $(prefix)/share. Thu Jun 20 21:17:52 1996 Ian Lance Taylor @@ -1728,7 +1774,7 @@ Wed Apr 17 11:17:55 1996 Doug Evans @@ -1982,7 +2028,7 @@ Wed Jun 28 19:13:23 1995 Jason Merrill * cplus-dem.c: Update from gcc. * argv.c, dummy.c: If __STDC__, #include "alloca-conf.h" after - . + . * alloca-norm.h: If __STDC__, declare alloca with its parameter. Thu Jun 22 18:57:47 1995 Stan Shebs @@ -2075,17 +2121,17 @@ Mon May 15 19:53:17 1995 Per Bothner < Thu May 4 14:36:42 1995 Jason Merrill * cplus-dem.c: Use const instead of CONST. Don't include - ansidecl.h directly. + ansidecl.h directly. Wed Apr 19 01:30:27 1995 Jason Merrill * cplus-dem.c: Don't include libiberty.h. Do declare xmalloc and - xrealloc. + xrealloc. (-DMAIN): Don't rely on an externally-defined version number; - instead, require the version number to be defined as a - preprocessor macro. Handle the RS/6000 leading dot. Define - xmalloc, xrealloc and fatal. Don't strip a leading underscore - if we couldn't demangle the word. + instead, require the version number to be defined as a + preprocessor macro. Handle the RS/6000 leading dot. Define + xmalloc, xrealloc and fatal. Don't strip a leading underscore + if we couldn't demangle the word. Tue Apr 4 13:03:51 1995 Stan Shebs @@ -2259,7 +2305,7 @@ Fri Aug 19 15:29:12 1994 Kung Hsu (kun Thu Aug 18 14:37:14 1994 Kung Hsu (kung@mexican.cygnus.com) * cplus-dem.c (demangle args): Handle ARM repeat encoding where - the type index is greater than 9. + the type index is greater than 9. Wed Aug 17 16:13:49 1994 Kung Hsu (kung@mexican.cygnus.com) @@ -2321,7 +2367,7 @@ Thu Jun 16 17:54:01 1994 Ian Lance Tayl Sun Jun 12 01:37:09 1994 Jason Merrill (jason@deneb.cygnus.com) * cplus-dem.c (demangle_template): Separate consecutive >'s with a - space. + space. (gnu_special): Demangle template and qualified names in a vtable name. Fri May 27 12:27:52 1994 Ken Raeburn (raeburn@cujo.cygnus.com) @@ -2365,13 +2411,13 @@ Fri May 6 11:01:59 1994 D. V. Henkel-W Mon Apr 11 00:54:33 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) - * getopt.c [not __GNU_LIBRARY__] [__GCC__] [not __STDC__]: - Declare strlen to return int. Don't include stddef.h. + * getopt.c [not __GNU_LIBRARY__] [__GCC__] [not __STDC__]: + Declare strlen to return int. Don't include stddef.h. Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) - * getopt.c: Delete use of IN_GCC to control whether - stddef.h or gstddef.h is included. + * getopt.c: Delete use of IN_GCC to control whether + stddef.h or gstddef.h is included. Thu Apr 14 14:00:56 1994 Kung Hsu (kung@mexican.cygnus.com) @@ -2444,27 +2490,27 @@ Thu Feb 24 11:51:12 1994 David J. Macke Thu Feb 10 14:44:16 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) - * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]: - Test just __STDC__, not emacs. + * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]: + Test just __STDC__, not emacs. Wed Feb 9 00:14:00 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) - * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC] - [emacs] [not __STDC__]: Don't include stddef.h. Don't declare strlen. + * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC] + [emacs] [not __STDC__]: Don't include stddef.h. Don't declare strlen. Fri Dec 24 19:43:00 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) - * getopt.c (_NO_PROTO): Define before config.h is included. + * getopt.c (_NO_PROTO): Define before config.h is included. Mon Sep 20 15:59:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - * getopt.c, getopt1.c [emacs || CONFIG_BROKETS]: Include + * getopt.c, getopt1.c [emacs || CONFIG_BROKETS]: Include only under these, else "config.h". Thu Aug 12 18:16:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) - * getopt.c, getopt1.c [HAVE_CONFIG_H]: Include - instead of "config.h". + * getopt.c, getopt1.c [HAVE_CONFIG_H]: Include + instead of "config.h". Sun Feb 20 17:17:01 1994 Ian Lance Taylor (ian@lisa.cygnus.com) @@ -2840,7 +2886,7 @@ Fri May 21 09:53:57 1993 Jim Kingdon ( Tue May 18 17:12:10 1993 Fred Fish (fnf@cygnus.com) - (merge changes from dlong@cse.ucsc.edu) + (merge changes from dlong@cse.ucsc.edu) * cplus-dem.c (consume_count): Simplify. * cplus-dem.c (arm_pt, demangle_class_name): New functions. * cplus-dem.c (various): Calls to arm_pt, demangle_class_name. diff -upr --new-file binutils-2.9.5.0.31/libiberty/ChangeLog.linux binutils-2.9.5.0.32/libiberty/ChangeLog.linux --- binutils-2.9.5.0.31/libiberty/ChangeLog.linux Fri Feb 25 16:39:55 2000 +++ binutils-2.9.5.0.32/libiberty/ChangeLog.linux Fri Feb 25 16:39:55 2000 @@ -12,7 +12,7 @@ Fri Feb 25 15:51:36 2000 H.J. Lu (hjl@ * Makefile.in (LOADLIBES): New. (maintainer-clean-subdir): Pass $(FLAGS_TO_PASS) to subdir. - * testsuite//Makefile.in (test-filter): Add $(LOADLIBES). + * testsuite/Makefile.in (test-filter): Add $(LOADLIBES). Fri Nov 19 09:47:39 1999 H.J. Lu (hjl@gnu.org) diff -upr --new-file binutils-2.9.5.0.31/libiberty/Makefile.in binutils-2.9.5.0.32/libiberty/Makefile.in --- binutils-2.9.5.0.31/libiberty/Makefile.in Fri Feb 25 16:36:48 2000 +++ binutils-2.9.5.0.32/libiberty/Makefile.in Fri Mar 31 09:28:46 2000 @@ -124,22 +124,22 @@ HFILES = alloca-conf.h # NOTE: If you add new files to the library, add them to this list # (alphabetical), and add them to REQUIRED_OFILES or funcs in # configure.in. -CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \ +CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \ bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c \ - fnmatch.c getcwd.c getpwd.c getopt.c getopt1.c getpagesize.c \ - getruntime.c floatformat.c hashtab.c hex.c index.c insque.c memchr.c \ - memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \ - pexecute.c putenv.c random.c rename.c rindex.c setenv.c sigsetmask.c \ - spaces.c splay-tree.c strcasecmp.c strncasecmp.c strchr.c strdup.c \ - strerror.c strrchr.c strsignal.c strstr.c strtod.c strtol.c strtoul.c \ - tmpnam.c vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c \ - waitpid.c xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c \ - xstrerror.c bugs.c + fnmatch.c getcwd.c getpwd.c getopt.c getopt1.c getpagesize.c \ + getruntime.c floatformat.c hashtab.c hex.c index.c insque.c memchr.c \ + memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \ + partition.c pexecute.c putenv.c random.c rename.c rindex.c \ + setenv.c sigsetmask.c spaces.c splay-tree.c strcasecmp.c \ + strncasecmp.c strchr.c strdup.c strerror.c strrchr.c \ + strsignal.c strstr.c strtod.c strtol.c strtoul.c tmpnam.c \ + vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c \ + xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c bugs.c # These are always included in the library. REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o \ fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o \ - hex.o floatformat.o objalloc.o obstack.o pexecute.o spaces.o \ + hex.o floatformat.o objalloc.o obstack.o partition.o pexecute.o spaces.o \ splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \ xmemdup.o xstrdup.o xstrerror.o bugs.o @@ -281,6 +281,7 @@ floatformat.o: $(INCDIR)/floatformat.h mkstemps.o: config.h objalloc.o: $(INCDIR)/objalloc.h obstack.o: config.h $(INCDIR)/obstack.h +partition.o: config.h $(INCDIR)/partition.h pexecute.o: config.h $(INCDIR)/libiberty.h setenv.o: config.h spaces.o: $(INCDIR)/libiberty.h diff -upr --new-file binutils-2.9.5.0.31/libiberty/hashtab.c binutils-2.9.5.0.32/libiberty/hashtab.c --- binutils-2.9.5.0.31/libiberty/hashtab.c Thu Feb 24 11:11:29 2000 +++ binutils-2.9.5.0.32/libiberty/hashtab.c Fri Mar 31 09:16:51 2000 @@ -46,25 +46,9 @@ Boston, MA 02111-1307, USA. */ #include "libiberty.h" #include "hashtab.h" -/* The following variable is used for debugging. Its value is number - of all calls of `find_hash_table_entry' for all hash tables. */ - -static int all_searches = 0; - -/* The following variable is used for debugging. Its value is number - of collisions fixed for time of work with all hash tables. */ - -static int all_collisions = 0; - -/* The following variable is used for debugging. Its value is number - of all table expansions fixed for time of work with all hash - tables. */ - -static int all_expansions = 0; - /* This macro defines reserved value for empty table entry. */ -#define EMPTY_ENTRY NULL +#define EMPTY_ENTRY ((void *) 0) /* This macro defines reserved value for table entry which contained a deleted element. */ @@ -75,19 +59,27 @@ static int all_expansions = 0; greater than given source number. */ static unsigned long -higher_prime_number (number) - unsigned long number; +higher_prime_number (n) + unsigned long n; { unsigned long i; - for (number = (number / 2) * 2 + 3;; number += 2) + n |= 0x01; /* Force N to be odd. */ + if (n < 9) + return n; /* All odd numbers < 9 are prime. */ + + next: + n += 2; + i = 3; + do { - for (i = 3; i * i <= number; i += 2) - if (number % i == 0) - break; - if (i * i > number) - return number; + if (n % i == 0) + goto next; + i += 2; } + while ((i * i) <= n); + + return n; } /* This function creates table with length slightly longer than given @@ -95,26 +87,22 @@ higher_prime_number (number) hash table entries are EMPTY_ENTRY). The function returns the created hash table. */ -hash_table_t -create_hash_table (size, hash_function, eq_function) +htab_t +htab_create (size, hash_f, eq_f, del_f) size_t size; - unsigned (*hash_function) PARAMS ((hash_table_entry_t)); - int (*eq_function) PARAMS ((hash_table_entry_t, hash_table_entry_t)); + htab_hash hash_f; + htab_eq eq_f; + htab_del del_f; { - hash_table_t result; + htab_t result; size = higher_prime_number (size); - result = (hash_table_t) xmalloc (sizeof (*result)); - result->entries - = (hash_table_entry_t *) xmalloc (size * sizeof (hash_table_entry_t)); + result = (htab_t) xcalloc (1, sizeof (struct htab)); + result->entries = (void **) xcalloc (size, sizeof (void *)); result->size = size; - result->hash_function = hash_function; - result->eq_function = eq_function; - result->number_of_elements = 0; - result->number_of_deleted_elements = 0; - result->searches = 0; - result->collisions = 0; - memset (result->entries, 0, size * sizeof (hash_table_entry_t)); + result->hash_f = hash_f; + result->eq_f = eq_f; + result->del_f = del_f; return result; } @@ -122,9 +110,18 @@ create_hash_table (size, hash_function, Naturally the hash table must already exist. */ void -delete_hash_table (htab) - hash_table_t htab; +htab_delete (htab) + htab_t htab; { + int i; + if (htab->del_f) + for (i = htab->size - 1; i >= 0; i--) + { + if (htab->entries[i] != EMPTY_ENTRY + && htab->entries[i] != DELETED_ENTRY) + (*htab->del_f) (htab->entries[i]); + } + free (htab->entries); free (htab); } @@ -132,10 +129,49 @@ delete_hash_table (htab) /* This function clears all entries in the given hash table. */ void -empty_hash_table (htab) - hash_table_t htab; +htab_empty (htab) + htab_t htab; { - memset (htab->entries, 0, htab->size * sizeof (hash_table_entry_t)); + int i; + if (htab->del_f) + for (i = htab->size - 1; i >= 0; i--) + { + if (htab->entries[i] != EMPTY_ENTRY + && htab->entries[i] != DELETED_ENTRY) + (*htab->del_f) (htab->entries[i]); + } + + memset (htab->entries, 0, htab->size * sizeof (void *)); +} + +/* Similar to htab_find_slot, but without several unwanted side effects: + - Does not call htab->eq_f when it finds an existing entry. + - Does not change the count of elements/searches/collisions in the + hash table. + This function also assumes there are no deleted entries in the table. + HASH is the hash value for the element to be inserted. */ +static void ** +find_empty_slot_for_expand (htab, hash) + htab_t htab; + unsigned int hash; +{ + size_t size = htab->size; + unsigned int hash2 = 1 + hash % (size - 2); + unsigned int index = hash % size; + + for (;;) + { + void **slot = htab->entries + index; + if (*slot == EMPTY_ENTRY) + return slot; + + if (*slot == DELETED_ENTRY) + abort (); + + index += hash2; + if (index >= size) + index -= size; + } } /* The following function changes size of memory allocated for the @@ -145,121 +181,193 @@ empty_hash_table (htab) table entries is changed. */ static void -expand_hash_table (htab) - hash_table_t htab; +htab_expand (htab) + htab_t htab; { - hash_table_t new_htab; - hash_table_entry_t *entry_ptr; - hash_table_entry_t *new_entry_ptr; - - new_htab = create_hash_table (htab->number_of_elements * 2, - htab->hash_function, htab->eq_function); - for (entry_ptr = htab->entries; entry_ptr < htab->entries + htab->size; - entry_ptr++) - if (*entry_ptr != EMPTY_ENTRY && *entry_ptr != DELETED_ENTRY) - { - new_entry_ptr = find_hash_table_entry (new_htab, *entry_ptr, 1); - *new_entry_ptr = (*entry_ptr); - } - free (htab->entries); - *htab = (*new_htab); - free (new_htab); + void **oentries; + void **olimit; + void **p; + + oentries = htab->entries; + olimit = oentries + htab->size; + + htab->size = higher_prime_number (htab->size * 2); + htab->entries = xcalloc (htab->size, sizeof (void **)); + + htab->n_elements -= htab->n_deleted; + htab->n_deleted = 0; + + p = oentries; + do + { + void *x = *p; + if (x != EMPTY_ENTRY && x != DELETED_ENTRY) + { + void **q = find_empty_slot_for_expand (htab, (*htab->hash_f) (x)); + *q = x; + } + p++; + } + while (p < olimit); + free (oentries); } -/* This function searches for hash table entry which contains element - equal to given value or empty entry in which given value can be - placed (if the element with given value does not exist in the - table). The function works in two regimes. The first regime is - used only for search. The second is used for search and - reservation empty entry for given value. The table is expanded if - occupancy (taking into accout also deleted elements) is more than - 75%. Naturally the hash table must already exist. If reservation - flag is TRUE then the element with given value should be inserted - into the table entry before another call of - `find_hash_table_entry'. */ - -hash_table_entry_t * -find_hash_table_entry (htab, element, reserve) - hash_table_t htab; - hash_table_entry_t element; - int reserve; -{ - hash_table_entry_t *entry_ptr; - hash_table_entry_t *first_deleted_entry_ptr; - unsigned index, hash_value, secondary_hash_value; +/* This function searches for a hash table entry equal to the given + element. It cannot be used to insert or delete an element. */ - if (htab->size * 3 <= htab->number_of_elements * 4) +void * +htab_find_with_hash (htab, element, hash) + htab_t htab; + const void *element; + unsigned int hash; +{ + unsigned int index, hash2; + size_t size; + + htab->searches++; + size = htab->size; + hash2 = 1 + hash % (size - 2); + index = hash % size; + + for (;;) { - all_expansions++; - expand_hash_table (htab); + void *entry = htab->entries[index]; + if (entry == EMPTY_ENTRY) + return NULL; + else if (entry != DELETED_ENTRY && (*htab->eq_f) (entry, element)) + return entry; + + htab->collisions++; + index += hash2; + if (index >= size) + index -= size; } - hash_value = (*htab->hash_function) (element); - secondary_hash_value = 1 + hash_value % (htab->size - 2); - index = hash_value % htab->size; +} + +/* Like htab_find_slot_with_hash, but compute the hash value from the + element. */ +void * +htab_find (htab, element) + htab_t htab; + const void *element; +{ + return htab_find_with_hash (htab, element, (*htab->hash_f) (element)); +} + +/* This function searches for a hash table slot containing an entry + equal to the given element. To delete an entry, call this with + INSERT = 0, then call htab_clear_slot on the slot returned (possibly + after doing some checks). To insert an entry, call this with + INSERT = 1, then write the value you want into the returned slot. */ + +void ** +htab_find_slot_with_hash (htab, element, hash, insert) + htab_t htab; + const void *element; + unsigned int hash; + int insert; +{ + void **first_deleted_slot; + unsigned int index, hash2; + size_t size; + + if (insert && htab->size * 3 <= htab->n_elements * 4) + htab_expand (htab); + + size = htab->size; + hash2 = 1 + hash % (size - 2); + index = hash % size; + htab->searches++; - all_searches++; - first_deleted_entry_ptr = NULL; - for (;;htab->collisions++, all_collisions++) + first_deleted_slot = NULL; + + for (;;) { - entry_ptr = htab->entries + index; - if (*entry_ptr == EMPTY_ENTRY) - { - if (reserve) + void *entry = htab->entries[index]; + if (entry == EMPTY_ENTRY) + { + if (!insert) + return NULL; + + htab->n_elements++; + + if (first_deleted_slot) { - htab->number_of_elements++; - if (first_deleted_entry_ptr != NULL) - { - entry_ptr = first_deleted_entry_ptr; - *entry_ptr = EMPTY_ENTRY; - } + *first_deleted_slot = EMPTY_ENTRY; + return first_deleted_slot; } - break; - } - else if (*entry_ptr != DELETED_ENTRY) - { - if ((*htab->eq_function) (*entry_ptr, element)) - break; - } - else if (first_deleted_entry_ptr == NULL) - first_deleted_entry_ptr = entry_ptr; - index += secondary_hash_value; - if (index >= htab->size) - index -= htab->size; + + return &htab->entries[index]; + } + + if (entry == DELETED_ENTRY) + { + if (!first_deleted_slot) + first_deleted_slot = &htab->entries[index]; + } + else + { + if ((*htab->eq_f) (entry, element)) + return &htab->entries[index]; + } + + htab->collisions++; + index += hash2; + if (index >= size) + index -= size; } - return entry_ptr; } -/* This function deletes element with given value from hash table. - The hash table entry value will be `DELETED_ENTRY' after the - function call. Naturally the hash table must already exist. Hash - table entry for given value should be not empty (or deleted). */ +/* Like htab_find_slot_with_hash, but compute the hash value from the + element. */ +void ** +htab_find_slot (htab, element, insert) + htab_t htab; + const void *element; + int insert; +{ + return htab_find_slot_with_hash (htab, element, (*htab->hash_f) (element), + insert); +} + +/* This function deletes an element with the given value from hash + table. If there is no matching element in the hash table, this + function does nothing. */ void -remove_element_from_hash_table_entry (htab, element) - hash_table_t htab; - hash_table_entry_t element; -{ - hash_table_entry_t *entry_ptr; +htab_remove_elt (htab, element) + htab_t htab; + void *element; +{ + void **slot; + + slot = htab_find_slot (htab, element, 0); + if (*slot == EMPTY_ENTRY) + return; + + if (htab->del_f) + (*htab->del_f) (*slot); - entry_ptr = find_hash_table_entry (htab, element, 0); - *entry_ptr = DELETED_ENTRY; - htab->number_of_deleted_elements++; + *slot = DELETED_ENTRY; + htab->n_deleted++; } -/* This function clears a specified slot in a hash table. - It is useful when you've already done the lookup and don't want to - do it again. */ +/* This function clears a specified slot in a hash table. It is + useful when you've already done the lookup and don't want to do it + again. */ void -clear_hash_table_slot (htab, slot) - hash_table_t htab; - hash_table_entry_t *slot; +htab_clear_slot (htab, slot) + htab_t htab; + void **slot; { if (slot < htab->entries || slot >= htab->entries + htab->size || *slot == EMPTY_ENTRY || *slot == DELETED_ENTRY) abort (); + if (htab->del_f) + (*htab->del_f) (*slot); *slot = DELETED_ENTRY; - htab->number_of_deleted_elements++; + htab->n_deleted++; } /* This function scans over the entire hash table calling @@ -268,24 +376,29 @@ clear_hash_table_slot (htab, slot) argument. */ void -traverse_hash_table (htab, callback, info) - hash_table_t htab; - int (*callback) PARAMS ((hash_table_entry_t, void *)); +htab_traverse (htab, callback, info) + htab_t htab; + htab_trav callback; void *info; { - hash_table_entry_t *entry_ptr; - for (entry_ptr = htab->entries; entry_ptr < htab->entries + htab->size; - entry_ptr++) - if (*entry_ptr != EMPTY_ENTRY && *entry_ptr != DELETED_ENTRY) - if (!callback (*entry_ptr, info)) - break; + void **slot, **limit; + slot = htab->entries; + limit = slot + htab->size; + do + { + void *x = *slot; + if (x != EMPTY_ENTRY && x != DELETED_ENTRY) + if (!(*callback) (slot, info)) + break; + } + while (++slot < limit); } /* The following function returns current size of given hash table. */ size_t -hash_table_size (htab) - hash_table_t htab; +htab_size (htab) + htab_t htab; { return htab->size; } @@ -294,37 +407,23 @@ hash_table_size (htab) hash table. */ size_t -hash_table_elements_number (htab) - hash_table_t htab; +htab_elements (htab) + htab_t htab; { - return htab->number_of_elements - htab->number_of_deleted_elements; + return htab->n_elements - htab->n_deleted; } /* The following function returns number of percents of fixed collisions during all work with given hash table. */ -int -hash_table_collisions (htab) - hash_table_t htab; +double +htab_collisions (htab) + htab_t htab; { int searches; searches = htab->searches; if (searches == 0) - searches++; - return htab->collisions * 100 / searches; -} - -/* The following function returns number of percents of fixed - collisions during all work with all hash tables. */ - -int -all_hash_table_collisions () -{ - int searches; - - searches = all_searches; - if (searches == 0) - searches++; - return all_collisions * 100 / searches; + return 0.0; + return (double)htab->collisions / (double)searches; } diff -upr --new-file binutils-2.9.5.0.31/libiberty/partition.c binutils-2.9.5.0.32/libiberty/partition.c --- binutils-2.9.5.0.31/libiberty/partition.c Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/libiberty/partition.c Fri Mar 31 09:16:51 2000 @@ -0,0 +1,185 @@ +/* List implentation of a partition of consecutive integers. + Copyright (C) 2000 Free Software Foundation, Inc. + Contributed by CodeSourcery, LLC. + + This file is part of GNU CC. + + GNU CC 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, or (at your option) + any later version. + + GNU CC 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 GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_STDLIB_H +#include +#endif + +#include "libiberty.h" +#include "partition.h" + +/* Creates a partition of NUM_ELEMENTS elements. Initially each + element is in a class by itself. */ + +partition +partition_new (num_elements) + int num_elements; +{ + int e; + + partition part = (partition) + xmalloc (sizeof (struct partition_def) + + (num_elements - 1) * sizeof (struct partition_elem)); + part->num_elements = num_elements; + for (e = 0; e < num_elements; ++e) + { + part->elements[e].class_element = e; + part->elements[e].next = &(part->elements[e]); + part->elements[e].class_count = 1; + } + + return part; +} + +/* Freeds a partition. */ + +void +partition_delete (part) + partition part; +{ + free (part); +} + +/* Unites the classes containing ELEM1 and ELEM2 into a single class + of partition PART. If ELEM1 and ELEM2 are already in the same + class, does nothing. Returns the canonical element of the + resulting union class. */ + +int +partition_union (part, elem1, elem2) + partition part; + int elem1; + int elem2; +{ + struct partition_elem *elements = part->elements; + struct partition_elem *e1; + struct partition_elem *e2; + struct partition_elem *p; + struct partition_elem *old_next; + /* The canonical element of the resulting union class. */ + int class_element = elements[elem1].class_element; + + /* If they're already in the same class, do nothing. */ + if (class_element == elements[elem2].class_element) + return class_element; + + /* Make sure ELEM1 is in the larger class of the two. If not, swap + them. This way we always scan the shorter list. */ + if (elements[elem1].class_count < elements[elem2].class_count) + { + int temp = elem1; + elem1 = elem2; + elem2 = temp; + class_element = elements[elem1].class_element; + } + + e1 = &(elements[elem1]); + e2 = &(elements[elem2]); + + /* Keep a count of the number of elements in the list. */ + elements[class_element].class_count + += elements[e2->class_element].class_count; + + /* Update the class fields in elem2's class list. */ + e2->class_element = class_element; + for (p = e2->next; p != e2; p = p->next) + p->class_element = class_element; + + /* Splice ELEM2's class list into ELEM1's. These are circular + lists. */ + old_next = e1->next; + e1->next = e2->next; + e2->next = old_next; + + return class_element; +} + +/* Compare elements ELEM1 and ELEM2 from array of integers, given a + pointer to each. Used to qsort such an array. */ + +static int +elem_compare (elem1, elem2) + const void *elem1; + const void *elem2; +{ + int e1 = * (int *) elem1; + int e2 = * (int *) elem2; + if (e1 < e2) + return -1; + else if (e1 > e2) + return 1; + else + return 0; +} + +/* Prints PART to the file pointer FP. The elements of each + class are sorted. */ + +void +partition_print (part, fp) + partition part; + FILE *fp; +{ + char *done; + int num_elements = part->num_elements; + struct partition_elem *elements = part->elements; + int *class_elements; + int e; + + /* Flag the elements we've already printed. */ + done = (char *) xmalloc (num_elements); + memset (done, 0, num_elements); + + /* A buffer used to sort elements in a class. */ + class_elements = (int *) xmalloc (num_elements * sizeof (int)); + + fputc ('[', fp); + for (e = 0; e < num_elements; ++e) + /* If we haven't printed this element, print its entire class. */ + if (! done[e]) + { + int c = e; + int count = elements[elements[e].class_element].class_count; + int i; + + /* Collect the elements in this class. */ + for (i = 0; i < count; ++i) { + class_elements[i] = c; + done[c] = 1; + c = elements[c].next - elements; + } + /* Sort them. */ + qsort ((void *) class_elements, count, sizeof (int), &elem_compare); + /* Print them. */ + fputc ('(', fp); + for (i = 0; i < count; ++i) + fprintf (fp, i == 0 ? "%d" : " %d", class_elements[i]); + fputc (')', fp); + } + fputc (']', fp); + + free (done); +} + diff -upr --new-file binutils-2.9.5.0.31/opcodes/ChangeLog binutils-2.9.5.0.32/opcodes/ChangeLog --- binutils-2.9.5.0.31/opcodes/ChangeLog Sun Mar 12 09:31:37 2000 +++ binutils-2.9.5.0.32/opcodes/ChangeLog Fri Mar 31 09:16:10 2000 @@ -1,3 +1,35 @@ +2000-03-29 Thomas de Lellis + + * arm-opc.h (thumb_opcodes): Disassemble 0xde.. to "bal" + [branch always] instead of "undefined". + +2000-03-27 Nick Clifton + + * d30v-opc.c (d30v_format_table): Move SHORT_AR to end of list of + short instructions, from end of list of long instructions. + +2000-03-27 Ian Lance Taylor + + * Makefile.am (CFILES): Add avr-dis.c. + (ALL_MACHINES): Add avr-dis.lo. + +2000-03-27 Alan Modra + + * avr-dis.c (add0fff, add03f8): Don't use structure bitfields to + truncate integers. + (print_insn_avr): Call function via pointer in K&R compatible way. + (dispLDD, regPP, reg50, reg104, reg40, reg20w, lit404, lit204, + add0fff, add03f8): Convert to old style function declaration and + add prototype. + (avrdis_opcode): Add prototype. + +2000-03-27 Denis Chertykov + + * avr-dis.c: New file. AVR disassembler. + * configure.in (bfd_avr_arch): New architecture support. + * disassemble.c: Likewise. + * configure: Regenerate. + Mon Mar 6 19:52:05 2000 J"orn Rennecke * sh-opc.h (sh_table): ldre and ldrs have a *signed* displacement. diff -upr --new-file binutils-2.9.5.0.31/opcodes/Makefile.am binutils-2.9.5.0.32/opcodes/Makefile.am --- binutils-2.9.5.0.31/opcodes/Makefile.am Tue Feb 29 11:15:15 2000 +++ binutils-2.9.5.0.32/opcodes/Makefile.am Fri Mar 31 09:28:46 2000 @@ -33,6 +33,7 @@ CFILES = \ arc-dis.c \ arc-opc.c \ arm-dis.c \ + avr-dis.c \ cgen-asm.c \ cgen-dis.c \ cgen-opc.c \ @@ -96,6 +97,7 @@ ALL_MACHINES = \ arc-dis.lo \ arc-opc.lo \ arm-dis.lo \ + avr-dis.lo \ cgen-asm.lo \ cgen-dis.lo \ cgen-opc.lo \ diff -upr --new-file binutils-2.9.5.0.31/opcodes/Makefile.in binutils-2.9.5.0.32/opcodes/Makefile.in --- binutils-2.9.5.0.31/opcodes/Makefile.in Tue Feb 29 11:15:15 2000 +++ binutils-2.9.5.0.32/opcodes/Makefile.in Fri Mar 31 09:28:46 2000 @@ -137,6 +137,7 @@ CFILES = \ arc-dis.c \ arc-opc.c \ arm-dis.c \ + avr-dis.c \ cgen-asm.c \ cgen-dis.c \ cgen-opc.c \ @@ -201,6 +202,7 @@ ALL_MACHINES = \ arc-dis.lo \ arc-opc.lo \ arm-dis.lo \ + avr-dis.lo \ cgen-asm.lo \ cgen-dis.lo \ cgen-opc.lo \ diff -upr --new-file binutils-2.9.5.0.31/opcodes/arm-opc.h binutils-2.9.5.0.32/opcodes/arm-opc.h --- binutils-2.9.5.0.31/opcodes/arm-opc.h Fri Nov 19 09:44:11 1999 +++ binutils-2.9.5.0.32/opcodes/arm-opc.h Fri Mar 31 09:16:11 2000 @@ -73,7 +73,8 @@ Thumb specific format options: /* Note: There is a partial ordering in this table - it must be searched from the top to obtain a correct match. */ -static struct arm_opcode arm_opcodes[] = { +static struct arm_opcode arm_opcodes[] = +{ /* ARM instructions */ {0xe1a00000, 0xffffffff, "nop\t\t\t(mov r0,r0)"}, {0x012FFF10, 0x0ffffff0, "bx%c\t%0-3r"}, @@ -163,7 +164,8 @@ static struct arm_opcode arm_opcodes[] = {0x0e000010, 0x0f100010, "mcr%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"}, {0x0c000000, 0x0e100000, "stc%c%22'l\t%8-11d, cr%12-15d, %A"}, {0x0c100000, 0x0e100000, "ldc%c%22'l\t%8-11d, cr%12-15d, %A"}, - /* the rest */ + + /* The rest. */ {0x00000000, 0x00000000, "undefined instruction %0-31x"}, {0x00000000, 0x00000000, 0} }; @@ -265,7 +267,7 @@ static struct thumb_opcode thumb_opcodes {0xDC00, 0xFF00, "bgt\t%0-7B"}, {0xDD00, 0xFF00, "ble\t%0-7B"}, /* format 17 */ - {0xDE00, 0xFF00, "undefined"}, + {0xDE00, 0xFF00, "bal\t%0-7B"}, {0xDF00, 0xFF00, "swi\t%0-7d"}, /* format 9 */ {0x6000, 0xF800, "str\t%0-2r, [%3-5r, #%6-10W]"}, diff -upr --new-file binutils-2.9.5.0.31/opcodes/avr-dis.c binutils-2.9.5.0.32/opcodes/avr-dis.c --- binutils-2.9.5.0.31/opcodes/avr-dis.c Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.32/opcodes/avr-dis.c Fri Mar 31 09:16:15 2000 @@ -0,0 +1,577 @@ +/* Disassemble AVR instructions. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + + Contributed by Denis Chertykov + +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. */ + + +#include "dis-asm.h" +#include "opintl.h" + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned long u32; + +#define IFMASK(a,b) ((opcode & (a)) == (b)) +#define CODE_MAX 65537 + +static char* SREG_flags = "CZNVSHTI"; +static char* sect94[] = {"COM","NEG","SWAP","INC","NULL","ASR","LSR","ROR", + 0,0,"DEC",0,0,0,0,0}; +static char* sect98[] = {"CBI","SBIC","SBI","SBIS"}; +static char* branchs[] = { + "BRCS","BREQ","BRMI","BRVS", + "BRLT","BRHS","BRTS","BRIE", + "BRCC","BRNE","BRPL","BRVC", + "BRGE","BRHC","BRTC","BRID" +}; +static char* last4[] = {"BLD","BST","SBRC","SBRS"}; + + + +static void dispLDD PARAMS ((u16, char *)); + +static void +dispLDD (opcode, dest) + u16 opcode; + char *dest; +{ + opcode = (((opcode & 0x2000) >> 8) | ((opcode & 0x0c00) >> 7) + | (opcode & 7)); + sprintf(dest, "%d", opcode); +} + + +static void regPP PARAMS ((u16, char *)); + +static void +regPP (opcode, dest) + u16 opcode; + char *dest; +{ + opcode = ((opcode & 0x0600) >> 5) | (opcode & 0xf); + sprintf(dest, "0x%02X", opcode); +} + + +static void reg50 PARAMS ((u16, char *)); + +static void +reg50 (opcode, dest) + u16 opcode; + char *dest; +{ + opcode = (opcode & 0x01f0) >> 4; + sprintf(dest, "R%d", opcode); +} + + +static void reg104 PARAMS ((u16, char *)); + +static void +reg104 (opcode, dest) + u16 opcode; + char *dest; +{ + opcode = (opcode & 0xf) | ((opcode & 0x0200) >> 5); + sprintf(dest, "R%d", opcode); +} + + +static void reg40 PARAMS ((u16, char *)); + +static void +reg40 (opcode, dest) + u16 opcode; + char *dest; +{ + opcode = (opcode & 0xf0) >> 4; + sprintf(dest, "R%d", opcode + 16); +} + + +static void reg20w PARAMS ((u16, char *)); + +static void +reg20w (opcode, dest) + u16 opcode; + char *dest; +{ + opcode = (opcode & 0x30) >> 4; + sprintf(dest, "R%d", 24 + opcode * 2); +} + + +static void lit404 PARAMS ((u16, char *)); + +static void +lit404 (opcode, dest) + u16 opcode; + char *dest; +{ + opcode = ((opcode & 0xf00) >> 4) | (opcode & 0xf); + sprintf(dest, "0x%02X", opcode); +} + + +static void lit204 PARAMS ((u16, char *)); + +static void +lit204 (opcode, dest) + u16 opcode; + char *dest; +{ + opcode = ((opcode & 0xc0) >> 2) | (opcode & 0xf); + sprintf(dest, "0x%02X", opcode); +} + + +static void add0fff PARAMS ((u16, char *, int)); + +static void +add0fff (op, dest, pc) + u16 op; + char *dest; + int pc; +{ + int opcode = op & 0x0fff; + sprintf(dest, ".%+-8d ; 0x%06X", opcode * 2, pc + 2 + opcode * 2); +} + + +static void add03f8 PARAMS ((u16, char *, int)); + +static void +add03f8 (op, dest, pc) + u16 op; + char *dest; + int pc; +{ + int opcode = (op >> 3) & 0x7f; + sprintf(dest, ".%+-8d ; 0x%06X", opcode * 2, pc + 2 + opcode * 2); +} + + +static u16 avrdis_opcode PARAMS ((bfd_vma, disassemble_info *)); + +static u16 +avrdis_opcode (addr, info) + bfd_vma addr; + disassemble_info *info; +{ + bfd_byte buffer[2]; + int status; + status = info->read_memory_func(addr, buffer, 2, info); + if (status != 0) + { + info->memory_error_func(status, addr, info); + return -1; + } + return bfd_getl16 (buffer); +} + + +int +print_insn_avr(addr, info) + bfd_vma addr; + disassemble_info *info; +{ + char rr[200]; + char rd[200]; + u16 opcode; + void *stream = info->stream; + fprintf_ftype prin = info->fprintf_func; + int cmd_len = 2; + + opcode = avrdis_opcode (addr, info); + + if (IFMASK(0xd000, 0x8000)) + { + char letter; + reg50(opcode, rd); + dispLDD(opcode, rr); + if (opcode & 8) + letter = 'Y'; + else + letter = 'Z'; + if (opcode & 0x0200) + (*prin) (stream, " STD %c+%s,%s", letter, rr, rd); + else + (*prin) (stream, " LDD %s,%c+%s", rd, letter, rr); + } + else + { + switch (opcode & 0xf000) + { + case 0x0000: + { + reg50(opcode, rd); + reg104(opcode, rr); + switch (opcode & 0x0c00) + { + case 0x0000: + (*prin) (stream, " NOP"); + break; + case 0x0400: + (*prin) (stream, " CPC %s,%s", rd, rr); + break; + case 0x0800: + (*prin) (stream, " SBC %s,%s", rd, rr); + break; + case 0x0c00: + (*prin) (stream, " ADD %s,%s", rd, rr); + break; + } + } + break; + case 0x1000: + { + reg50(opcode, rd); + reg104(opcode, rr); + switch (opcode & 0x0c00) + { + case 0x0000: + (*prin) (stream, " CPSE %s,%s", rd, rr); + break; + case 0x0400: + (*prin) (stream, " CP %s,%s", rd, rr); + break; + case 0x0800: + (*prin) (stream, " SUB %s,%s", rd, rr); + break; + case 0x0c00: + (*prin) (stream, " ADC %s,%s", rd, rr); + break; + } + } + break; + case 0x2000: + { + reg50(opcode, rd); + reg104(opcode, rr); + switch (opcode & 0x0c00) + { + case 0x0000: + (*prin) (stream, " AND %s,%s", rd, rr); + break; + case 0x0400: + (*prin) (stream, " EOR %s,%s", rd, rr); + break; + case 0x0800: + (*prin) (stream, " OR %s,%s", rd, rr); + break; + case 0x0c00: + (*prin) (stream, " MOV %s,%s", rd, rr); + break; + } + } + break; + case 0x3000: + { + reg40(opcode, rd); + lit404(opcode, rr); + (*prin) (stream, " CPI %s,%s", rd, rr); + } + break; + case 0x4000: + { + reg40(opcode, rd); + lit404(opcode, rr); + (*prin) (stream, " SBCI %s,%s", rd, rr); + } + break; + case 0x5000: + { + reg40(opcode, rd); + lit404(opcode, rr); + (*prin) (stream, " SUBI %s,%s", rd, rr); + } + break; + case 0x6000: + { + reg40(opcode, rd); + lit404(opcode, rr); + (*prin) (stream, " ORI %s,%s", rd, rr); + } + break; + case 0x7000: + { + reg40(opcode, rd); + lit404(opcode, rr); + (*prin) (stream, " ANDI %s,%s", rd, rr); + } + break; + case 0x9000: + { + switch (opcode & 0x0e00) + { + case 0x0000: + { + reg50(opcode, rd); + switch (opcode & 0xf) + { + case 0x0: + { + (*prin) (stream, " LDS %s,0x%04X", rd, + avrdis_opcode(addr + 2, info)); + cmd_len = 4; + } + break; + case 0x1: + { + (*prin) (stream, " LD %s,Z+", rd); + } + break; + case 0x2: + { + (*prin) (stream, " LD %s,-Z", rd); + } + break; + case 0x9: + { + (*prin) (stream, " LD %s,Y+", rd); + } + break; + case 0xa: + { + (*prin) (stream, " LD %s,-Y", rd); + } + break; + case 0xc: + { + (*prin) (stream, " LD %s,X", rd); + } + break; + case 0xd: + { + (*prin) (stream, " LD %s,X+", rd); + } + break; + case 0xe: + { + (*prin) (stream, " LD %s,-X", rd); + } + break; + case 0xf: + { + (*prin) (stream, " POP %s", rd); + } + break; + default: + { + (*prin) (stream, " ????"); + } + break; + } + } + break; + case 0x0200: + { + reg50(opcode, rd); + switch (opcode & 0xf) + { + case 0x0: + { + (*prin) (stream, " STS 0x%04X,%s", + avrdis_opcode(addr + 2, info), rd); + cmd_len = 4; + } + break; + case 0x1: + { + (*prin) (stream, " ST Z+,%s", rd); + } + break; + case 0x2: + { + (*prin) (stream, " ST -Z,%s", rd); + } + break; + case 0x9: + { + (*prin) (stream, " ST Y+,%s", rd); + } + break; + case 0xa: + { + (*prin) (stream, " ST -Y,%s", rd); + } + break; + case 0xc: + { + (*prin) (stream, " ST X,%s", rd); + } + break; + case 0xd: + { + (*prin) (stream, " ST X+,%s", rd); + } + break; + case 0xe: + { + (*prin) (stream, " ST -X,%s", rd); + } + break; + case 0xf: + { + (*prin) (stream, " PUSH %s", rd); + } + break; + default: + { + (*prin) (stream, " ????"); + } + break; + } + } + break; + case 0x0400: + { + if (IFMASK(0x020c, 0x000c)) + { + u32 k = ((opcode & 0x01f0) >> 3) | (opcode & 1); + k = (k << 16) | avrdis_opcode(addr + 2, info); + if (opcode & 0x0002) + (*prin) (stream, " CALL 0x%06X", k*2); + else + (*prin) (stream, " JMP 0x%06X", k*2); + cmd_len = 4; + } + else if (IFMASK(0x010f, 0x0008)) + { + int sf = (opcode & 0x70) >> 4; + if (opcode & 0x0080) + (*prin) (stream, " CL%c", SREG_flags[sf]); + else + (*prin) (stream, " SE%c", SREG_flags[sf]); + } + else if (IFMASK(0x000f, 0x0009)) + { + if (opcode & 0x0100) + (*prin) (stream, " ICALL"); + else + (*prin) (stream, " IJMP"); + } + else if (IFMASK(0x010f, 0x0108)) + { + if (IFMASK(0x0090, 0x0000)) + (*prin) (stream, " RET"); + else if (IFMASK(0x0090, 0x0010)) + (*prin) (stream, " RETI"); + else if (IFMASK(0x00e0, 0x0080)) + (*prin) (stream, " SLEEP"); + else if (IFMASK(0x00e0, 0x00a0)) + (*prin) (stream, " WDR"); + else if (IFMASK(0x00f0, 0x00c0)) + (*prin) (stream, " LPM"); + else if (IFMASK(0x00f0, 0x00d0)) + (*prin) (stream, " ELPM"); + else + (*prin) (stream, " ????"); + } + else + { + const char* p; + reg50(opcode, rd); + p = sect94[opcode & 0xf]; + if (!p) + p = "????"; + (*prin) (stream, " %-8s%s", p, rd); + } + } + break; + case 0x0600: + { + if (opcode & 0x0200) + { + lit204(opcode, rd); + reg20w(opcode, rr); + if (opcode & 0x0100) + (*prin) (stream, " SBIW %s,%s", rr, rd); + else + (*prin) (stream, " ADIW %s,%s", rr, rd); + } + } + break; + case 0x0800: + case 0x0a00: + { + (*prin) (stream, " %-8s0x%02X,%d", + sect98[(opcode & 0x0300) >> 8], + (opcode & 0xf8) >> 3, + opcode & 7); + } + break; + default: + { + reg50(opcode, rd); + reg104(opcode, rr); + (*prin) (stream, " MUL %s,%s", rd, rr); + } + } + } + break; + case 0xb000: + { + reg50(opcode, rd); + regPP(opcode, rr); + if (opcode & 0x0800) + (*prin) (stream, " OUT %s,%s", rr, rd); + else + (*prin) (stream, " IN %s,%s", rd, rr); + } + break; + case 0xc000: + { + add0fff(opcode, rd, addr); + (*prin) (stream, " RJMP %s", rd); + } + break; + case 0xd000: + { + add0fff(opcode, rd, addr); + (*prin) (stream, " RCALL %s", rd); + } + break; + case 0xe000: + { + reg40(opcode, rd); + lit404(opcode, rr); + (*prin) (stream, " LDI %s,%s", rd, rr); + } + break; + case 0xf000: + { + if (opcode & 0x0800) + { + reg50(opcode, rd); + (*prin) (stream, " %-8s%s,%d", + last4[(opcode & 0x0600) >> 9], + rd, opcode & 7); + } + else + { + char* p; + add03f8(opcode, rd, addr); + p = branchs[((opcode & 0x0400) >> 7) | (opcode & 7)]; + (*prin) (stream, " %-8s%s", p, rd); + } + } + break; + } + } + return cmd_len; +} diff -upr --new-file binutils-2.9.5.0.31/opcodes/configure binutils-2.9.5.0.32/opcodes/configure --- binutils-2.9.5.0.31/opcodes/configure Tue Feb 29 11:15:15 2000 +++ binutils-2.9.5.0.32/opcodes/configure Fri Mar 31 09:28:46 2000 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.13.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -49,7 +49,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -164,7 +163,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -335,11 +333,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -361,7 +354,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.13.1" exit 0 ;; -with-* | --with-*) @@ -505,16 +498,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -525,7 +514,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -569,9 +558,130 @@ done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:568: checking host system type" >&5 +if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_host_alias=$host + case "$ac_cv_host_alias" in + NONE) + case $nonopt in + NONE) + if ac_cv_host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) ac_cv_host_alias=$nonopt ;; + esac ;; + esac + + ac_cv_host=`$ac_config_sub $ac_cv_host_alias` + ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_host" 1>&6 + +host=$ac_cv_host +host_alias=$ac_cv_host_alias +host_cpu=$ac_cv_host_cpu +host_vendor=$ac_cv_host_vendor +host_os=$ac_cv_host_os + + + + + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:609: checking target system type" >&5 +if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_target_alias=$target + case "$ac_cv_target_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_target_alias=$host_alias ;; + + *) ac_cv_target_alias=$nonopt ;; + esac ;; + esac + + ac_cv_target=`$ac_config_sub $ac_cv_target_alias` + ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_target" 1>&6 + +target=$ac_cv_target +target_alias=$ac_cv_target_alias +target_cpu=$ac_cv_target_cpu +target_vendor=$ac_cv_target_vendor +target_os=$ac_cv_target_os + + + + + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:649: checking build system type" >&5 +if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_build_alias=$build + case "$ac_cv_build_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_build_alias=$host_alias ;; + + *) ac_cv_build_alias=$nonopt ;; + esac ;; + esac + + ac_cv_build=`$ac_config_sub $ac_cv_build_alias` + ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_build" 1>&6 + +build=$ac_cv_build +build_alias=$ac_cv_build_alias +build_cpu=$ac_cv_build_cpu +build_vendor=$ac_cv_build_vendor +build_os=$ac_cv_build_os + + + # Do some error checking and defaulting for the host and target type. @@ -594,69 +704,6 @@ NONE---*---* | *---NONE---* | *---*---NO *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; esac - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:605: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:626: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:644: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && @@ -665,8 +712,8 @@ test "$host_alias" != "$target_alias" && # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:669: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:716: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -695,8 +742,8 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:699: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:746: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -742,12 +789,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:750: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:797: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -777,8 +824,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:782: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:829: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -789,12 +836,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 793 "configure" +#line 840 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -819,14 +866,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:824: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:871: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:829: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:876: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -853,8 +900,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:857: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:904: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -885,7 +932,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:889: checking for POSIXized ISC" >&5 +echo "configure:936: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -923,9 +970,9 @@ BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:927: checking for a BSD compatible install" >&5 +echo "configure:974: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -943,6 +990,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -971,12 +1022,12 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:980: checking whether build environment is sane" >&5 +echo "configure:1031: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1024,18 +1075,18 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1037: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1088: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF @@ -1079,7 +1130,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1083: checking for working aclocal" >&5 +echo "configure:1134: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1092,7 +1143,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1096: checking for working autoconf" >&5 +echo "configure:1147: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1105,7 +1156,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1109: checking for working automake" >&5 +echo "configure:1160: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1118,7 +1169,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1122: checking for working autoheader" >&5 +echo "configure:1173: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1131,7 +1182,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1135: checking for working makeinfo" >&5 +echo "configure:1186: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1154,8 +1205,8 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1158: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then +echo "configure:1209: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then @@ -1186,8 +1237,8 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1190: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1241: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1218,8 +1269,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1222: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1273: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1324,8 +1375,8 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1328: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1379: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1363,7 +1414,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1367: checking for ld used by GCC" >&5 +echo "configure:1418: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1387,12 +1438,12 @@ echo "configure:1367: checking for ld us esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1391: checking for GNU ld" >&5 +echo "configure:1442: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1394: checking for non-GNU ld" >&5 +echo "configure:1445: checking for non-GNU ld" >&5 fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then @@ -1425,8 +1476,8 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1429: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then +echo "configure:1480: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -1441,8 +1492,8 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1445: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then +echo "configure:1496: checking for BSD-compatible nm" >&5 +if eval "test \"\${ac_cv_path_NM+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then @@ -1477,8 +1528,8 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1481: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +echo "configure:1532: checking whether ln -s works" >&5 +if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata @@ -1526,8 +1577,8 @@ test x"$silent" = xyes && libtool_flags= case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1530 "configure"' > conftest.$ac_ext - if { (eval echo configure:1531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1581 "configure"' > conftest.$ac_ext + if { (eval echo configure:1582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1548,19 +1599,19 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1552: checking whether the C compiler needs -belf" >&5 -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then +echo "configure:1603: checking whether the C compiler needs -belf" >&5 +if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1644,7 +1695,7 @@ $libtool_flags --no-verify $ac_aux_dir/l # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -1700,17 +1751,17 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1714: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:1765: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -1733,12 +1784,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:1737: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then +echo "configure:1788: checking for Cygwin environment" >&5 +if eval "test \"\${ac_cv_cygwin+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -1759,26 +1810,25 @@ else ac_cv_cygwin=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:1770: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then +echo "configure:1820: checking for mingw32 environment" >&5 +if eval "test \"\${ac_cv_mingw32+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -1788,29 +1838,57 @@ else ac_cv_mingw32=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes +echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6 +echo "configure:1848: checking for EMX OS/2 environment" >&5 +if eval "test \"\${ac_cv_emxos2+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_emxos2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_emxos2=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_emxos2" 1>&6 +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1801: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then +echo "configure:1879: checking for executable suffix" >&5 +if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then ac_cv_exeext=.exe else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.C | *.o | *.obj | *.xcoff) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1833,8 +1911,8 @@ ac_exeext=$EXEEXT # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1837: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:1915: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -1863,8 +1941,8 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1867: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:1945: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -1910,12 +1988,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1918: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:1996: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -1945,8 +2023,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1950: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:2028: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1957,12 +2035,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1961 "configure" +#line 2039 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1987,14 +2065,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1992: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:2070: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1997: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:2075: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2021,8 +2099,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2025: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:2103: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -2055,13 +2133,13 @@ fi ALL_LINGUAS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2059: checking how to run the C preprocessor" >&5 +echo "configure:2137: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -2070,13 +2148,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2087,13 +2165,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2104,13 +2182,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2135,12 +2213,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2139: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then +echo "configure:2217: checking for ANSI C header files" >&5 +if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2148,7 +2226,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2165,7 +2243,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2183,7 +2261,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2204,7 +2282,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2215,7 +2293,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2239,12 +2317,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2243: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then +echo "configure:2321: checking for working const" >&5 +if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2314,21 +2392,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2318: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then +echo "configure:2396: checking for inline" >&5 +if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2354,12 +2432,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2358: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then +echo "configure:2436: checking for off_t" >&5 +if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2370,29 +2448,31 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_off_t=yes + eval "ac_cv_type_off_t=yes" else rm -rf conftest* - ac_cv_type_off_t=no + eval "ac_cv_type_off_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:2391: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +echo "configure:2471: checking for size_t" >&5 +if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2403,17 +2483,19 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_size_t=yes + eval "ac_cv_type_size_t=yes" else rm -rf conftest* - ac_cv_type_size_t=no + eval "ac_cv_type_size_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:2426: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then +echo "configure:2508: checking for working alloca.h" >&5 +if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2455,12 +2537,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2459: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then +echo "configure:2541: checking for alloca" >&5 +if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2520,12 +2602,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2524: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then +echo "configure:2606: checking whether alloca needs Cray hooks" >&5 +if eval "test \"\${ac_cv_os_cray+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2554: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:2636: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2605,15 +2688,15 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2609: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then +echo "configure:2692: checking stack direction for C alloca" >&5 +if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2657,17 +2740,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2661: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:2744: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2696,12 +2779,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2700: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:2783: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2749,15 +2833,15 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2753: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +echo "configure:2837: checking for working mmap" >&5 +if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -2925,17 +3009,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2929: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3013: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2965,12 +3049,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2969: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3053: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3022,12 +3107,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3026: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3111: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3084,19 +3170,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3088: checking for LC_MESSAGES" >&5 -if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then +echo "configure:3174: checking for LC_MESSAGES" >&5 +if eval "test \"\${am_cv_val_LC_MESSAGES+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3117,7 +3203,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3121: checking whether NLS is requested" >&5 +echo "configure:3207: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3137,7 +3223,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3141: checking whether included gettext is requested" >&5 +echo "configure:3227: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3156,17 +3242,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3160: checking for libintl.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3246: checking for libintl.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3183,19 +3269,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3187: checking for gettext in libc" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then +echo "configure:3273: checking for gettext in libc" >&5 +if eval "test \"\${gt_cv_func_gettext_libc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3211,15 +3297,15 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3215: checking for bindtextdomain in -lintl" >&5 -ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:3301: checking for bindtextdomain in -lintl" >&5 +ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3246,19 +3332,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3250: checking for gettext in libintl" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then +echo "configure:3336: checking for gettext in libintl" >&5 +if eval "test \"\${gt_cv_func_gettext_libintl+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3286,8 +3372,8 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3290: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:3376: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3320,12 +3406,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3324: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3410: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3375,8 +3462,8 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3379: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:3466: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -3411,8 +3498,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3415: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:3502: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -3443,7 +3530,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3483,8 +3570,8 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3487: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:3574: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3517,8 +3604,8 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3521: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:3608: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -3553,8 +3640,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3557: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:3644: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -3643,7 +3730,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3647: checking for catalogs to be installed" >&5 +echo "configure:3734: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -3671,17 +3758,17 @@ echo "configure:3647: checking for catal if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:3675: checking for linux/version.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3762: checking for linux/version.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3758,9 +3845,9 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:3762: checking for a BSD compatible install" >&5 +echo "configure:3849: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -3778,6 +3865,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -3806,7 +3897,7 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' @@ -3815,17 +3906,17 @@ for ac_hdr in string.h strings.h stdlib. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3819: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3910: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3918,6 +4009,7 @@ if test x${all_targets} = xfalse ; then bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;; bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;; bfd_arm_arch) ta="$ta arm-dis.lo" ;; + bfd_avr_arch) ta="$ta avr-dis.lo" ;; bfd_convex_arch) ;; bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;; bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;; @@ -4084,7 +4176,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.13.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -4408,5 +4500,5 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 diff -upr --new-file binutils-2.9.5.0.31/opcodes/configure.in binutils-2.9.5.0.32/opcodes/configure.in --- binutils-2.9.5.0.31/opcodes/configure.in Wed Sep 22 15:13:29 1999 +++ binutils-2.9.5.0.32/opcodes/configure.in Fri Mar 31 09:28:46 2000 @@ -133,6 +133,7 @@ if test x${all_targets} = xfalse ; then bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;; bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo" ;; bfd_arm_arch) ta="$ta arm-dis.lo" ;; + bfd_avr_arch) ta="$ta avr-dis.lo" ;; bfd_convex_arch) ;; bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;; bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;; diff -upr --new-file binutils-2.9.5.0.31/opcodes/d30v-opc.c binutils-2.9.5.0.32/opcodes/d30v-opc.c --- binutils-2.9.5.0.31/opcodes/d30v-opc.c Sun Mar 12 09:31:39 2000 +++ binutils-2.9.5.0.32/opcodes/d30v-opc.c Fri Mar 31 09:16:11 2000 @@ -468,6 +468,7 @@ const struct d30v_format d30v_format_tab { SHORT_A2, 0, { Ra2, Rb, Rc } }, /* Ra2,Rb,Rc */ { SHORT_A2, 2, { Ra2, Rb, IMM6 } }, /* Ra2,Rb,imm6 */ { SHORT_NONE, 0, { 0 } }, /* no operands (nop, reit) */ + { SHORT_AR, 0, { Aa, Rb, Rc } }, /* Aa,Rb,Rc */ { LONG, 2, { Ra, Rb, IMM32 } }, /* Ra,Rb,imm32 */ { LONG_U, 2, { IMM32 } }, /* imm32 */ { LONG_Ur, 2, { REL32 } }, /* rel32 */ @@ -481,7 +482,6 @@ const struct d30v_format d30v_format_tab { LONG_D, 2, { REL6S3, IMM32 } }, /* rel6s3,imm32 */ { LONG_Dr, 2, { REL6S3, REL32 } }, /* rel6s3,rel32 */ { LONG_Dbr, 2, { IMM6U, REL32 } }, /* imm6,rel32 */ - { SHORT_AR, 0, { Aa, Rb, Rc } }, /* Aa,Rb,Rc */ { 0, 0, { 0 } }, }; diff -upr --new-file binutils-2.9.5.0.31/opcodes/disassemble.c binutils-2.9.5.0.32/opcodes/disassemble.c --- binutils-2.9.5.0.31/opcodes/disassemble.c Fri Feb 25 13:39:24 2000 +++ binutils-2.9.5.0.32/opcodes/disassemble.c Fri Mar 31 09:28:46 2000 @@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suit #define ARCH_alpha #define ARCH_arc #define ARCH_arm +#define ARCH_avr #define ARCH_d10v #define ARCH_d30v #define ARCH_h8300 @@ -91,6 +92,11 @@ disassembler (abfd) disassemble = print_insn_big_arm; else disassemble = print_insn_little_arm; + break; +#endif +#ifdef ARCH_avr + case bfd_arch_avr: + disassemble = print_insn_avr; break; #endif #ifdef ARCH_d10v