diff -uprN binutils-2.11.90.0.29/bfd/ChangeLog binutils-2.11.90.0.31/bfd/ChangeLog --- binutils-2.11.90.0.29/bfd/ChangeLog Mon Aug 27 11:44:50 2001 +++ binutils-2.11.90.0.31/bfd/ChangeLog Thu Aug 30 14:58:39 2001 @@ -1,3 +1,111 @@ +2001-08-30 H.J. Lu + + * elf32-mips.c (mips_elf_calculate_relocation): Revert the last + 2 changes. + (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic + relocations for weak definitions. + +2001-08-30 H.J. Lu + + * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo. + (BFD32_BACKENDS_CFILES): Add elf32-h8300.c. + * Makefile.in: Rebuild. + +2001-08-30 H.J. Lu + + * elf32-mips.c (mips_elf_calculate_relocation): Don't create + dynamic relocation for undefined weak symbols when creating + executables. Check h->root.root.type, instead of h->root.type. + +2001-08-29 Joel Sherrill + + * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change + default from coff to elf. + +2001-08-29 Jeff Law + + * elf32-h8300.c (h8_elf_howto_table): Add new PC relative + relocations. + (h8_reloc_map): Similarly. + (elf32_h8_final_link_relocate): Remove incorrect overflow tests. + Add support for PC relative relocations. + + * elf32-h8300.c: Put all prototypes together. + (elf32_h8_info_to_howto): Parameter elf_reloc is used. + (elf32_h8_final_link_relocate): New function for linker. + (elf32_h8_relocate_section): Similarly. + (elf_backend_relocate_section): Define. + + * cpu-h8300.c (h8300_scan, compatible): Prototype. + (h8300_scan): Handle architecture:machine encodings typically + found in linker scripts. + * elf.c (prep_headers): Do not try to do H8 machine recognition + here. + * elf32-h8300.c: Add some missing prototypes. + (elf32_h8_mach, elf32_h8_final_write_processing): New functions. + (elf32_h8_object_p): Similarly. + +2001-08-29 Tom Rix + + * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that + does not follow a XTY_SD. + +2001-08-29 Alan Modra + + * targmatch.sed: Delete case statements. + * config.bfd : Select 64 bit xcoff for + aix4.3 and above. + +Wed Aug 29 02:27:36 2001 J"orn Rennecke + + * Makefile.am (elf32-h8300.lo): New target. + * config.bfd (h8300*-*-elf): New case. + * configure.in (bfd_elf32_h8300_vec): New case. + * elf.c (prep_headers): Add case for bfd_arch_h8300. + * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation. + (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise. + (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise. + * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration. + * elf32-h8300.c: New file. + * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated. + +2001-08-28 Nick Clifton + + * sparclynx.c: Add missing prototypes. + * coff-mcore.c: Add missing prototypes. + * elf32-pj.c: Add missing prototypes. + * nlm32-sparc.c: Add missing prototypes. + * oasys.c: Add missing prototypes. + * pdp11.c: Add missing prototypes. + * pe-mips.c: Add missing prototypes. + * riscix.c: Add missing prototypes. + +2001-08-27 Daniel Jacobowitz + + * elf32-i386.c: Add missing prototypes. + * elf32-ppc.c: Likewise. + * elf32-sh-lin.c: Likewise. + * elfarm-nabi.c: Likewise. + +2001-08-27 Daniel Jacobowitz + + * elf32-i386.c (elf_i386_grok_prstatus): New function. + (elf_i386_grok_psinfo): New function. + (elf_backend_grok_prstatus): Define. + (elf_backend_grok_psinfo): Likewise. + * elf32-ppc.c (ppc_elf_grok_prstatus): New function. + (ppc_elf_grok_psinfo): New function. + (elf_backend_grok_prstatus): Define. + (elf_backend_grok_psinfo): Likewise. + * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function. + (elf32_shlin_grok_psinfo): New function. + (elf_backend_grok_prstatus): Define. + (elf_backend_grok_psinfo): Likewise. + * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function. + (elf32_arm_nabi_grok_psinfo): New function. + (elf_backend_grok_prstatus): Define. + (elf_backend_grok_psinfo): Likewise. + 2001-08-27 H.J. Lu * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more diff -uprN binutils-2.11.90.0.29/bfd/Makefile.am binutils-2.11.90.0.31/bfd/Makefile.am --- binutils-2.11.90.0.29/bfd/Makefile.am Mon Aug 27 11:44:50 2001 +++ binutils-2.11.90.0.31/bfd/Makefile.am Thu Aug 30 09:30:36 2001 @@ -187,6 +187,7 @@ BFD32_BACKENDS = \ elf32-d30v.lo \ elf32-fr30.lo \ elf32-gen.lo \ + elf32-h8300.lo \ elf32-hppa.lo \ elf32-i370.lo \ elf32-i386.lo \ @@ -327,6 +328,7 @@ BFD32_BACKENDS_CFILES = \ elf32-d30v.c \ elf32-fr30.c \ elf32-gen.c \ + elf32-h8300.c \ elf32-hppa.c \ elf32-i370.c \ elf32-i386.c \ @@ -1011,6 +1013,10 @@ elf32-fr30.lo: elf32-fr30.c $(INCDIR)/fi elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h elf32-target.h +elf32-h8300.lo: elf32-h8300.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ diff -uprN binutils-2.11.90.0.29/bfd/Makefile.in binutils-2.11.90.0.31/bfd/Makefile.in --- binutils-2.11.90.0.29/bfd/Makefile.in Mon Aug 27 11:44:50 2001 +++ binutils-2.11.90.0.31/bfd/Makefile.in Thu Aug 30 09:30:36 2001 @@ -311,6 +311,7 @@ BFD32_BACKENDS = \ elf32-d30v.lo \ elf32-fr30.lo \ elf32-gen.lo \ + elf32-h8300.lo \ elf32-hppa.lo \ elf32-i370.lo \ elf32-i386.lo \ @@ -452,6 +453,7 @@ BFD32_BACKENDS_CFILES = \ elf32-d30v.c \ elf32-fr30.c \ elf32-gen.c \ + elf32-h8300.c \ elf32-hppa.c \ elf32-i370.c \ elf32-i386.c \ @@ -711,7 +713,7 @@ configure.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES) OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS) @@ -1550,6 +1552,10 @@ elf32-fr30.lo: elf32-fr30.c $(INCDIR)/fi elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h elf32-target.h +elf32-h8300.lo: elf32-h8300.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ diff -uprN binutils-2.11.90.0.29/bfd/bfd-in2.h binutils-2.11.90.0.31/bfd/bfd-in2.h --- binutils-2.11.90.0.29/bfd/bfd-in2.h Mon Aug 27 11:44:50 2001 +++ binutils-2.11.90.0.31/bfd/bfd-in2.h Thu Aug 30 09:30:36 2001 @@ -2822,6 +2822,13 @@ This is the 3 bits of a value. */ /* OpenRISC Relocations. */ BFD_RELOC_OPENRISC_ABS_26, BFD_RELOC_OPENRISC_REL_26, + +/* H8 elf Relocations. */ + BFD_RELOC_H8_DIR16A8, + BFD_RELOC_H8_DIR16R8, + BFD_RELOC_H8_DIR24A8, + BFD_RELOC_H8_DIR24R8, + BFD_RELOC_H8_DIR32A16, BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; reloc_howto_type * diff -uprN binutils-2.11.90.0.29/bfd/coff-mcore.c binutils-2.11.90.0.31/bfd/coff-mcore.c --- binutils-2.11.90.0.29/bfd/coff-mcore.c Fri Mar 9 11:37:54 2001 +++ binutils-2.11.90.0.31/bfd/coff-mcore.c Thu Aug 30 09:30:36 2001 @@ -52,6 +52,10 @@ static reloc_howto_type * mcor static reloc_howto_type * coff_mcore_rtype_to_howto PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *)); +static void mcore_emit_base_file_entry + PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_vma)); +static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *)); +static struct bfd_link_hash_table * coff_mcore_link_hash_table_create PARAMS ((bfd *)); /* The NT loader points the toc register to &toc + 32768, in order to use the complete range of a 16-bit displacement. We have to adjust @@ -217,6 +221,7 @@ mcore_hash_table; ((mcore_hash_table *) ((info)->hash)) /* Create an MCore coff linker hash table. */ + static struct bfd_link_hash_table * coff_mcore_link_hash_table_create (abfd) bfd * abfd; @@ -244,6 +249,7 @@ coff_mcore_link_hash_table_create (abfd) } /* Add an entry to the base file. */ + static void mcore_emit_base_file_entry (info, output_bfd, input_section, reloc_offset) struct bfd_link_info * info; @@ -352,6 +358,7 @@ coff_mcore_rtype_to_howto (abfd, sec, re /* Return true if this relocation should appear in the output .reloc section. This function is referenced in pe_mkobject in peicode.h. */ + static boolean in_reloc_p (abfd, howto) bfd * abfd ATTRIBUTE_UNUSED; diff -uprN binutils-2.11.90.0.29/bfd/config.bfd binutils-2.11.90.0.31/bfd/config.bfd --- binutils-2.11.90.0.29/bfd/config.bfd Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/config.bfd Thu Aug 30 09:30:36 2001 @@ -261,6 +261,11 @@ case "${targ}" in ;; + h8300*-*-elf) + targ_defvec=bfd_elf32_h8300_vec + targ_underscore=yes + ;; + h8300*-*-*) targ_defvec=h8300coff_vec targ_underscore=yes @@ -320,10 +325,6 @@ case "${targ}" in targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec ;; - i[3456]86-*-rtemself*) - targ_defvec=bfd_elf32_i386_vec - targ_selvecs="i386coff_vec i386aout_vec" - ;; i[3456]86-*-chorus*) targ_defvec=bfd_elf32_i386_vec ;; @@ -335,10 +336,14 @@ case "${targ}" in i[3456]86-*-aix*) targ_defvec=i386coff_vec ;; - i[3456]86*-*-rtems*) + i[3456]86*-*-rtemscoff*) targ_defvec=i386coff_vec targ_selvecs="bfd_elf32_i386_vec i386aout_vec" ;; + i[3456]86-*-rtemself* | i[3456]86-*-rtems*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs="i386coff_vec i386aout_vec" + ;; i[3456]86-sequent-bsd*) targ_defvec=i386dynix_vec targ_underscore=yes @@ -511,12 +516,16 @@ case "${targ}" in targ_selvecs="cisco_core_big_vec ieee_vec" targ_underscore=yes ;; + m68*-*-rtemscoff*) + targ_defvec=m68kcoff_vec + targ_selvecs="m68kcoff_vec versados_vec ieee_vec aout0_big_vec" + ;; m68*-*-elf* | m68*-*-sysv4*) targ_defvec=bfd_elf32_m68k_vec targ_selvecs="m68kcoff_vec ieee_vec" ;; m68*-*-rtems*) - targ_defvec=m68kcoff_vec + targ_defvec=bfd_elf32_m68k_vec targ_selvecs="m68kcoff_vec versados_vec ieee_vec aout0_big_vec" ;; m68*-*-coff* | m68*-*-sysv*) @@ -608,7 +617,7 @@ case "${targ}" in targ_defvec=bfd_elf32_littlemips_vec targ_selvecs="bfd_elf32_bigmips_vec ecoff_little_vec ecoff_big_vec" ;; - mips*-*-netbsd*) + mips*-*-netbsd*) targ_defvec=bfd_elf32_bigmips_vec targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec" ;; @@ -727,12 +736,16 @@ case "${targ}" in powerpc-*-aix* | powerpc-*-beos* | rs6000-*-*) targ_defvec=rs6000coff_vec - targ64_selvecs="rs6000coff64_vec" + targ64_selvecs=rs6000coff64_vec + case "${targ}" in + *-*-aix4.[3456789]* | *-*-aix[56789]*) + want64=true;; + esac ;; #ifdef BFD64 powerpc64-*-aix*) targ_defvec=rs6000coff64_vec - targ_selvecs="rs6000coff_vec" + targ_selvecs=rs6000coff_vec ;; powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux*) targ_defvec=bfd_elf64_powerpc_vec diff -uprN binutils-2.11.90.0.29/bfd/configure binutils-2.11.90.0.31/bfd/configure --- binutils-2.11.90.0.29/bfd/configure Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/configure Thu Aug 30 14:58:39 2001 @@ -1116,7 +1116,7 @@ fi PACKAGE=bfd -VERSION=2.11.90.0.29 +VERSION=2.11.90.0.31 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; } @@ -5941,6 +5941,7 @@ do bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; + bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; @@ -6185,17 +6186,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:6189: checking for $ac_hdr" >&5 +echo "configure:6190: 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:6199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6200: \"$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* @@ -6224,12 +6225,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6228: checking for $ac_func" >&5 +echo "configure:6229: 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:6257: \"$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 @@ -6277,7 +6278,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6281: checking for working mmap" >&5 +echo "configure:6282: 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 @@ -6285,7 +6286,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:6430: \"$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 @@ -6450,12 +6451,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6454: checking for $ac_func" >&5 +echo "configure:6455: 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:6483: \"$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 -uprN binutils-2.11.90.0.29/bfd/configure.in binutils-2.11.90.0.31/bfd/configure.in --- binutils-2.11.90.0.29/bfd/configure.in Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/configure.in Thu Aug 30 14:58:39 2001 @@ -7,7 +7,7 @@ AC_INIT(libbfd.c) AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(bfd, 2.11.90.0.29) +AM_INIT_AUTOMAKE(bfd, 2.11.90.0.31) dnl These must be called before AM_PROG_LIBTOOL, because it may want dnl to call AC_CHECK_PROG. @@ -525,6 +525,7 @@ do bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; + bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; diff -uprN binutils-2.11.90.0.29/bfd/cpu-h8300.c binutils-2.11.90.0.31/bfd/cpu-h8300.c --- binutils-2.11.90.0.29/bfd/cpu-h8300.c Fri Mar 9 11:15:43 2001 +++ binutils-2.11.90.0.31/bfd/cpu-h8300.c Thu Aug 30 09:30:37 2001 @@ -1,5 +1,5 @@ /* BFD library support routines for the Hitachi H8/300 architecture. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000, 2001 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. @@ -25,6 +25,11 @@ Foundation, Inc., 59 Temple Place - Suit int bfd_default_scan_num_mach (); +static boolean h8300_scan + PARAMS ((const struct bfd_arch_info *, const char *)); +static const bfd_arch_info_type * compatible + PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); + static boolean h8300_scan (info, string) const struct bfd_arch_info *info; @@ -52,6 +57,18 @@ h8300_scan (info, string) string++; if (*string == '-') string++; + + /* In ELF linker scripts, we typically express the architecture/machine + as architecture:machine. + + So if we've matched so far and encounter a colon, try to match the + string following the colon. */ + if (*string == ':') + { + string++; + return h8300_scan (info, string); + } + if (*string == 'h' || *string == 'H') { return (info->mach == bfd_mach_h8300h); diff -uprN binutils-2.11.90.0.29/bfd/elf.c binutils-2.11.90.0.31/bfd/elf.c --- binutils-2.11.90.0.29/bfd/elf.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/elf.c Thu Aug 30 09:30:37 2001 @@ -3452,6 +3452,12 @@ prep_headers (abfd) i_ehdrp->e_machine = EM_OPENRISC; break; /* Also note that EM_M32, AT&T WE32100 is unknown to bfd. */ + case bfd_arch_h8300: + i_ehdrp->e_machine = EM_H8_300; + break; + case bfd_arch_h8500: + i_ehdrp->e_machine = EM_H8_500; + break; default: i_ehdrp->e_machine = EM_NONE; } diff -uprN binutils-2.11.90.0.29/bfd/elf32-h8300.c binutils-2.11.90.0.31/bfd/elf32-h8300.c --- binutils-2.11.90.0.29/bfd/elf32-h8300.c Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/bfd/elf32-h8300.c Thu Aug 30 09:30:37 2001 @@ -0,0 +1,637 @@ +/* Generic support for 32-bit ELF + Copyright 1993, 1995, 1998, 1999 Free Software Foundation, Inc. + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" +#include "elf-bfd.h" +#include "elf/h8.h" + +static reloc_howto_type *elf32_h8_reloc_type_lookup + PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); +static void elf32_h8_info_to_howto + PARAMS ((bfd *, arelent *, Elf_Internal_Rela *)); +static void elf32_h8_info_to_howto_rel + PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *)); +static int elf32_h8_mach + PARAMS ((flagword)); +static bfd_reloc_status_type elf32_h8_final_link_relocate + PARAMS ((unsigned long, bfd *, bfd *, asection *, + bfd_byte *, bfd_vma, bfd_vma, bfd_vma, + struct bfd_link_info *, asection *, int)); +static boolean elf32_h8_relocate_section + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, + bfd_byte *, Elf_Internal_Rela *, + Elf_Internal_Sym *, asection **)); + +/* This does not include any relocation information, but should be + good enough for GDB or objdump to read the file. */ + +static reloc_howto_type h8_elf_howto_table[] = +{ +#define R_H8_NONE_X 0 + HOWTO (R_H8_NONE, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_NONE", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ +#define R_H8_DIR32_X (R_H8_NONE_X + 1) + HOWTO (R_H8_DIR32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_DIR32", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ +#define R_H8_DIR16_X (R_H8_DIR32_X + 1) + HOWTO (R_H8_DIR16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_DIR16", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0x0000ffff, /* dst_mask */ + false), /* pcrel_offset */ +#define R_H8_DIR8_X (R_H8_DIR16_X + 1) + HOWTO (R_H8_DIR8, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_DIR16", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0x000000ff, /* dst_mask */ + false), /* pcrel_offset */ +#define R_H8_DIR16A8_X (R_H8_DIR8_X + 1) + HOWTO (R_H8_DIR16A8, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_DIR16A8", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0x0000ffff, /* dst_mask */ + false), /* pcrel_offset */ +#define R_H8_DIR16R8_X (R_H8_DIR16A8_X + 1) + HOWTO (R_H8_DIR16R8, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_DIR16R8", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0x0000ffff, /* dst_mask */ + false), /* pcrel_offset */ +#define R_H8_DIR24A8_X (R_H8_DIR16R8_X + 1) + HOWTO (R_H8_DIR24A8, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 24, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_DIR24A8", /* name */ + true, /* partial_inplace */ + 0xff000000, /* src_mask */ + 0x00ffffff, /* dst_mask */ + false), /* pcrel_offset */ +#define R_H8_DIR24R8_X (R_H8_DIR24A8_X + 1) + HOWTO (R_H8_DIR24R8, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 24, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_DIR24R8", /* name */ + true, /* partial_inplace */ + 0xff000000, /* src_mask */ + 0x00ffffff, /* dst_mask */ + false), /* pcrel_offset */ +#define R_H8_DIR32A16_X (R_H8_DIR24R8_X + 1) + HOWTO (R_H8_DIR32A16, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_DIR32", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ +#define R_H8_PCREL16_X (R_H8_DIR32A16_X + 1) + HOWTO (R_H8_PCREL16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_PCREL16", /* name */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + true), /* pcrel_offset */ +#define R_H8_PCREL8_X (R_H8_PCREL16_X + 1) + HOWTO (R_H8_PCREL8, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + NULL, /* special_function */ + "R_H8_PCREL8", /* name */ + false, /* partial_inplace */ + 0xff, /* src_mask */ + 0xff, /* dst_mask */ + true), /* pcrel_offset */ +}; + +/* This structure is used to map BFD reloc codes to H8 ELF relocs. */ + +struct elf_reloc_map +{ + bfd_reloc_code_real_type bfd_reloc_val; + unsigned char howto_index; +}; + +/* An array mapping BFD reloc codes to SH ELF relocs. */ + +static const struct elf_reloc_map h8_reloc_map[] = +{ + { BFD_RELOC_NONE, R_H8_NONE_X }, + { BFD_RELOC_32, R_H8_DIR32_X }, + { BFD_RELOC_16, R_H8_DIR16_X }, + { BFD_RELOC_8, R_H8_DIR8_X }, + { BFD_RELOC_H8_DIR16A8, R_H8_DIR16A8_X }, + { BFD_RELOC_H8_DIR16R8, R_H8_DIR16R8_X }, + { BFD_RELOC_H8_DIR24A8, R_H8_DIR24A8_X }, + { BFD_RELOC_H8_DIR24R8, R_H8_DIR24R8_X }, + { BFD_RELOC_H8_DIR32A16, R_H8_DIR32A16_X }, + { BFD_RELOC_16_PCREL, R_H8_PCREL16_X }, + { BFD_RELOC_8_PCREL, R_H8_PCREL8_X }, +}; + + +static reloc_howto_type * +elf32_h8_reloc_type_lookup (abfd, code) + bfd *abfd ATTRIBUTE_UNUSED; + bfd_reloc_code_real_type code; +{ + unsigned int i; + + for (i = 0; i < sizeof (h8_reloc_map) / sizeof (struct elf_reloc_map); i++) + { + if (h8_reloc_map[i].bfd_reloc_val == code) + return &h8_elf_howto_table[(int) h8_reloc_map[i].howto_index]; + } + return NULL; +} + +static void +elf32_h8_info_to_howto (abfd, bfd_reloc, elf_reloc) + bfd *abfd ATTRIBUTE_UNUSED; + arelent *bfd_reloc; + Elf32_Internal_Rela *elf_reloc; +{ + unsigned int r; + unsigned int i; + + r = ELF32_R_TYPE (elf_reloc->r_info); + for (i = 0; i < sizeof (h8_elf_howto_table) / sizeof (reloc_howto_type); i++) + if (h8_elf_howto_table[i].type== r) + { + bfd_reloc->howto = &h8_elf_howto_table[i]; + return; + } + abort (); +} + +static void +elf32_h8_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) + bfd *abfd ATTRIBUTE_UNUSED; + arelent *bfd_reloc; + Elf32_Internal_Rel *elf_reloc ATTRIBUTE_UNUSED; +{ + unsigned int r; + + abort (); + r = ELF32_R_TYPE (elf_reloc->r_info); + bfd_reloc->howto = &h8_elf_howto_table[r]; +} + + +/* Perform a relocation as part of a final link. */ +static bfd_reloc_status_type +elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd, + input_section, contents, offset, value, + addend, info, sym_sec, is_local) + unsigned long r_type; + bfd *input_bfd; + bfd *output_bfd ATTRIBUTE_UNUSED; + asection *input_section ATTRIBUTE_UNUSED; + bfd_byte *contents; + bfd_vma offset; + bfd_vma value; + bfd_vma addend; + struct bfd_link_info *info ATTRIBUTE_UNUSED; + asection *sym_sec ATTRIBUTE_UNUSED; + int is_local ATTRIBUTE_UNUSED; +{ + bfd_byte *hit_data = contents + offset; + + switch (r_type) + { + + case R_H8_NONE: + return bfd_reloc_ok; + + case R_H8_DIR32: + case R_H8_DIR32A16: + value += addend; + bfd_put_32 (input_bfd, value, hit_data); + return bfd_reloc_ok; + + case R_H8_DIR16: + case R_H8_DIR16A8: + case R_H8_DIR16R8: + value += addend; + bfd_put_16 (input_bfd, value, hit_data); + return bfd_reloc_ok; + + /* AKA R_RELBYTE */ + case R_H8_DIR8: + value += addend; + + bfd_put_8 (input_bfd, value, hit_data); + return bfd_reloc_ok; + + case R_H8_DIR24A8: + case R_H8_DIR24R8: + value += addend; + + value &= 0xffffff; + value |= (bfd_get_32 (input_bfd, hit_data) & 0xff000000); + bfd_put_32 (input_bfd, value, hit_data); + return bfd_reloc_ok; + + case R_H8_PCREL16: + value -= (input_section->output_section->vma + + input_section->output_offset); + value -= offset; + value += addend; + + bfd_put_16 (input_bfd, value, hit_data); + return bfd_reloc_ok; + + case R_H8_PCREL8: + value -= (input_section->output_section->vma + + input_section->output_offset); + value -= offset; + value += addend; + + bfd_put_8 (input_bfd, value, hit_data); + return bfd_reloc_ok; + + default: + return bfd_reloc_notsupported; + } +} + +/* Relocate an H8 ELF section. */ +static boolean +elf32_h8_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, *relend; + + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (input_bfd); + + rel = relocs; + relend = relocs + input_section->reloc_count; + for (; rel < relend; rel++) + { + int r_type; + unsigned long r_symndx; + Elf_Internal_Sym *sym; + asection *sec; + struct elf_link_hash_entry *h; + bfd_vma relocation; + bfd_reloc_status_type r; + + r_symndx = ELF32_R_SYM (rel->r_info); + r_type = ELF32_R_TYPE (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. */ + 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); + } + 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; + 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 = elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd, + input_section, + contents, rel->r_offset, + relocation, rel->r_addend, + info, sec, h == NULL); + + if (r != bfd_reloc_ok) + { + const char *name; + const char *msg = (const char *) 0; + arelent bfd_reloc; + reloc_howto_type *howto; + + elf32_h8_info_to_howto (input_bfd, &bfd_reloc, rel); + howto = bfd_reloc.howto; + + if (h != NULL) + name = h->root.root.string; + else + { + name = (bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name)); + if (name == NULL || *name == '\0') + name = bfd_section_name (input_bfd, sec); + } + + switch (r) + { + case bfd_reloc_overflow: + if (! ((*info->callbacks->reloc_overflow) + (info, name, howto->name, (bfd_vma) 0, + input_bfd, input_section, rel->r_offset))) + return false; + break; + + case bfd_reloc_undefined: + if (! ((*info->callbacks->undefined_symbol) + (info, name, input_bfd, input_section, + rel->r_offset, true))) + return false; + break; + + case bfd_reloc_outofrange: + msg = _("internal error: out of range error"); + goto common_error; + + case bfd_reloc_notsupported: + msg = _("internal error: unsupported relocation error"); + goto common_error; + + case bfd_reloc_dangerous: + msg = _("internal error: dangerous error"); + goto common_error; + + default: + msg = _("internal error: unknown error"); + /* fall through */ + + common_error: + if (!((*info->callbacks->warning) + (info, msg, name, input_bfd, input_section, + rel->r_offset))) + return false; + break; + } + } + } + + return true; +} + +/* Object files encode the specific H8 model they were compiled + for in the ELF flags field. + + Examine that field and return the proper BFD machine type for + the object file. */ +static int +elf32_h8_mach (flags) + flagword flags; +{ + switch (flags & EF_H8_MACH) + { + case E_H8_MACH_H8300: + default: + return bfd_mach_h8300; + + case E_H8_MACH_H8300H: + return bfd_mach_h8300h; + + case E_H8_MACH_H8300S: + return bfd_mach_h8300s; + } +} + +/* The final processing done just before writing out a H8 ELF object + file. We use this opportunity to encode the BFD machine type + into the flags field in the object file. */ + +void +elf32_h8_final_write_processing (abfd, linker) + bfd *abfd; + boolean linker ATTRIBUTE_UNUSED; +{ + unsigned long val; + + switch (bfd_get_mach (abfd)) + { + default: + case bfd_mach_h8300: + val = E_H8_MACH_H8300; + break; + + case bfd_mach_h8300h: + val = E_H8_MACH_H8300H; + break; + + case bfd_mach_h8300s: + val = E_H8_MACH_H8300S; + break; + } + + elf_elfheader (abfd)->e_flags &= ~ (EF_H8_MACH); + elf_elfheader (abfd)->e_flags |= val; +} + +/* Return nonzero if ABFD represents a valid H8 ELF object file; also + record the encoded machine type found in the ELF flags. */ + +boolean +elf32_h8_object_p (abfd) + bfd *abfd; +{ + bfd_default_set_arch_mach (abfd, bfd_arch_h8300, + elf32_h8_mach (elf_elfheader (abfd)->e_flags)); + return true; +} + +/* Merge backend specific data from an object file to the output + object file when linking. The only data we need to copy at this + time is the architecture/machine information. */ + +boolean +elf32_h8_merge_private_bfd_data (ibfd, obfd) + bfd *ibfd; + bfd *obfd; +{ + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour + || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + return true; + + if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) + && bfd_get_mach (obfd) < bfd_get_mach (ibfd)) + { + if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), + bfd_get_mach (ibfd))) + return false; + } + + return true; +} + + +#define TARGET_BIG_SYM bfd_elf32_h8300_vec +#define TARGET_BIG_NAME "elf32-h8300" +#define ELF_ARCH bfd_arch_h8300 +#define ELF_MACHINE_CODE EM_H8_300 +#define ELF_MAXPAGESIZE 0x1 +#define bfd_elf32_bfd_reloc_type_lookup elf32_h8_reloc_type_lookup +#define elf_info_to_howto elf32_h8_info_to_howto +#define elf_info_to_howto_rel elf32_h8_info_to_howto_rel + +/* So we can set/examine bits in e_flags to get the specific + H8 architecture in use. */ +#define elf_backend_final_write_processing \ + elf32_h8_final_write_processing +#define elf_backend_object_p \ + elf32_h8_object_p +#define bfd_elf32_bfd_merge_private_bfd_data \ + elf32_h8_merge_private_bfd_data + +/* ??? when elf_backend_relocate_section is not defined, elf32-target.h + defaults to using _bfd_generic_link_hash_table_create, but + elflink.h:bfd_elf32_size_dynamic_sections uses + dynobj = elf_hash_table (info)->dynobj; + and thus requires an elf hash table. */ +#define bfd_elf32_bfd_link_hash_table_create _bfd_elf_link_hash_table_create + +/* Use an H8 specific linker, not the ELF generic linker. */ +#define elf_backend_relocate_section elf32_h8_relocate_section + +#include "elf32-target.h" diff -uprN binutils-2.11.90.0.29/bfd/elf32-i386.c binutils-2.11.90.0.31/bfd/elf32-i386.c --- binutils-2.11.90.0.29/bfd/elf32-i386.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/elf32-i386.c Thu Aug 30 09:30:37 2001 @@ -64,6 +64,10 @@ static boolean elf_i386_finish_dynamic_s static boolean elf_i386_fake_sections PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *)); static enum elf_reloc_type_class elf_i386_reloc_type_class PARAMS ((int)); +static boolean elf_i386_grok_prstatus + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); +static boolean elf_i386_grok_psinfo + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); #define USE_REL 1 /* 386 uses REL relocations instead of RELA */ @@ -2211,6 +2215,71 @@ elf_i386_reloc_type_class (type) } } +/* Support for core dump NOTE sections */ +static boolean +elf_i386_grok_prstatus (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + int offset; + int raw_size; + + switch (note->descsz) + { + default: + return false; + + case 144: /* Linux/i386 */ + /* pr_cursig */ + elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12); + + /* pr_pid */ + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24); + + /* pr_reg */ + offset = 72; + raw_size = 68; + + break; + } + + /* Make a ".reg/999" section. */ + return _bfd_elfcore_make_pseudosection (abfd, ".reg", + raw_size, note->descpos + offset); +} + +static boolean +elf_i386_grok_psinfo (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + switch (note->descsz) + { + default: + return false; + + case 128: /* Linux/MIPS elf_prpsinfo */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80); + } + + /* Note that for some reason, a spurious space is tacked + onto the end of the args in some (at least one anyway) + implementations, so strip it off if it exists. */ + + { + char *command = elf_tdata (abfd)->core_command; + int n = strlen (command); + + if (0 < n && command[n - 1] == ' ') + command[n - 1] = '\0'; + } + + return true; +} + #define TARGET_LITTLE_SYM bfd_elf32_i386_vec #define TARGET_LITTLE_NAME "elf32-i386" #define ELF_ARCH bfd_arch_i386 @@ -2241,6 +2310,8 @@ elf_i386_reloc_type_class (type) #define elf_backend_relocate_section elf_i386_relocate_section #define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections #define elf_backend_fake_sections elf_i386_fake_sections +#define elf_backend_grok_prstatus elf_i386_grok_prstatus +#define elf_backend_grok_psinfo elf_i386_grok_psinfo #define elf_backend_reloc_type_class elf_i386_reloc_type_class #include "elf32-target.h" diff -uprN binutils-2.11.90.0.29/bfd/elf32-mips.c binutils-2.11.90.0.31/bfd/elf32-mips.c --- binutils-2.11.90.0.29/bfd/elf32-mips.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/elf32-mips.c Thu Aug 30 14:58:40 2001 @@ -6332,9 +6332,8 @@ mips_elf_calculate_relocation (abfd, if ((info->shared || (elf_hash_table (info)->dynamic_sections_created && h != NULL - && (h->root.type == bfd_link_hash_defweak - || (h->root.elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0))) + && ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) + != 0))) && (input_section->flags & SEC_ALLOC) != 0) { /* If we're creating a shared library, or this relocation is @@ -8134,7 +8133,9 @@ _bfd_mips_elf_adjust_dynamic_symbol (inf hmips = (struct mips_elf_link_hash_entry *) h; if (! info->relocateable && hmips->possibly_dynamic_relocs != 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) + && (h->root.type == bfd_link_hash_defweak + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0)) { mips_elf_allocate_dynamic_relocations (dynobj, hmips->possibly_dynamic_relocs); diff -uprN binutils-2.11.90.0.29/bfd/elf32-pj.c binutils-2.11.90.0.31/bfd/elf32-pj.c --- binutils-2.11.90.0.29/bfd/elf32-pj.c Fri Mar 9 11:15:54 2001 +++ binutils-2.11.90.0.31/bfd/elf32-pj.c Thu Aug 30 09:30:37 2001 @@ -31,6 +31,8 @@ static reloc_howto_type *pj_elf_reloc_ty PARAMS ((bfd *, bfd_reloc_code_real_type)); static void pj_elf_info_to_howto PARAMS ((bfd *, arelent *, Elf_Internal_Rela *)); +static void pj_elf_final_write_processing + PARAMS ((bfd *, boolean)); static reloc_howto_type pj_elf_howto_table[] = { diff -uprN binutils-2.11.90.0.29/bfd/elf32-ppc.c binutils-2.11.90.0.31/bfd/elf32-ppc.c --- binutils-2.11.90.0.29/bfd/elf32-ppc.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/elf32-ppc.c Thu Aug 30 09:30:37 2001 @@ -109,6 +109,10 @@ static boolean ppc_elf_finish_dynamic_sy static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); static enum elf_reloc_type_class ppc_elf_reloc_type_class PARAMS ((int)); +static boolean ppc_elf_grok_prstatus + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); +static boolean ppc_elf_grok_psinfo + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); #define BRANCH_PREDICT_BIT 0x200000 /* branch prediction bit for branch taken relocs */ #define RA_REGISTER_MASK 0x001f0000 /* mask to set RA in memory instructions */ @@ -3720,6 +3724,71 @@ ppc_elf_reloc_type_class (type) } } +/* Support for core dump NOTE sections */ +static boolean +ppc_elf_grok_prstatus (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + int offset; + int raw_size; + + switch (note->descsz) + { + default: + return false; + + case 268: /* Linux/PPC */ + /* pr_cursig */ + elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12); + + /* pr_pid */ + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24); + + /* pr_reg */ + offset = 72; + raw_size = 192; + + break; + } + + /* Make a ".reg/999" section. */ + return _bfd_elfcore_make_pseudosection (abfd, ".reg", + raw_size, note->descpos + offset); +} + +static boolean +ppc_elf_grok_psinfo (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + switch (note->descsz) + { + default: + return false; + + case 128: /* Linux/PPC elf_prpsinfo */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80); + } + + /* Note that for some reason, a spurious space is tacked + onto the end of the args in some (at least one anyway) + implementations, so strip it off if it exists. */ + + { + char *command = elf_tdata (abfd)->core_command; + int n = strlen (command); + + if (0 < n && command[n - 1] == ' ') + command[n - 1] = '\0'; + } + + return true; +} + #define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec #define TARGET_LITTLE_NAME "elf32-powerpcle" #define TARGET_BIG_SYM bfd_elf32_powerpc_vec @@ -3764,6 +3833,8 @@ ppc_elf_reloc_type_class (type) #define elf_backend_fake_sections ppc_elf_fake_sections #define elf_backend_additional_program_headers ppc_elf_additional_program_headers #define elf_backend_modify_segment_map ppc_elf_modify_segment_map +#define elf_backend_grok_prstatus ppc_elf_grok_prstatus +#define elf_backend_grok_psinfo ppc_elf_grok_psinfo #define elf_backend_reloc_type_class ppc_elf_reloc_type_class #include "elf32-target.h" diff -uprN binutils-2.11.90.0.29/bfd/elf32-sh-lin.c binutils-2.11.90.0.31/bfd/elf32-sh-lin.c --- binutils-2.11.90.0.29/bfd/elf32-sh-lin.c Thu Sep 7 14:10:48 2000 +++ binutils-2.11.90.0.31/bfd/elf32-sh-lin.c Thu Aug 30 09:30:37 2001 @@ -26,4 +26,85 @@ Foundation, Inc., 59 Temple Place - Suit #define ELF_MAXPAGESIZE 0x10000 #define elf_symbol_leading_char 0 +#include "bfd.h" +#include "sysdep.h" +#include "elf/internal.h" +#include "elf-bfd.h" + +static boolean elf32_shlin_grok_prstatus + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); +static boolean elf32_shlin_grok_psinfo + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); + +/* Support for core dump NOTE sections */ +static boolean +elf32_shlin_grok_prstatus (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + int offset; + int raw_size; + + switch (note->descsz) + { + default: + return false; + + case 168: /* Linux/SH */ + /* pr_cursig */ + elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12); + + /* pr_pid */ + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24); + + /* pr_reg */ + offset = 72; + raw_size = 92; + + break; + } + + /* Make a ".reg/999" section. */ + return _bfd_elfcore_make_pseudosection (abfd, ".reg", + raw_size, note->descpos + offset); +} + +static boolean +elf32_shlin_grok_psinfo (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + switch (note->descsz) + { + default: + return false; + + case 124: /* Linux/SH elf_prpsinfo */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80); + } + + /* Note that for some reason, a spurious space is tacked + onto the end of the args in some (at least one anyway) + implementations, so strip it off if it exists. */ + + { + char *command = elf_tdata (abfd)->core_command; + int n = strlen (command); + + if (0 < n && command[n - 1] == ' ') + command[n - 1] = '\0'; + } + + return true; +} + + +#define elf_backend_grok_prstatus elf32_shlin_grok_prstatus +#define elf_backend_grok_psinfo elf32_shlin_grok_psinfo + + + #include "elf32-sh.c" diff -uprN binutils-2.11.90.0.29/bfd/elfarm-nabi.c binutils-2.11.90.0.31/bfd/elfarm-nabi.c --- binutils-2.11.90.0.29/bfd/elfarm-nabi.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/elfarm-nabi.c Thu Aug 30 09:30:37 2001 @@ -42,6 +42,10 @@ static reloc_howto_type * elf32_arm_reloc_type_lookup PARAMS ((bfd * abfd, bfd_reloc_code_real_type code)); +static boolean elf32_arm_nabi_grok_prstatus + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); +static boolean elf32_arm_nabi_grok_psinfo + PARAMS ((bfd *abfd, Elf_Internal_Note *note)); /* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g. R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO @@ -677,4 +681,72 @@ elf32_arm_reloc_type_lookup (abfd, code) } } +/* Support for core dump NOTE sections */ +static boolean +elf32_arm_nabi_grok_prstatus (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + int offset; + int raw_size; + + switch (note->descsz) + { + default: + return false; + + case 148: /* Linux/ARM 32-bit*/ + /* pr_cursig */ + elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12); + + /* pr_pid */ + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24); + + /* pr_reg */ + offset = 72; + raw_size = 72; + + break; + } + + /* Make a ".reg/999" section. */ + return _bfd_elfcore_make_pseudosection (abfd, ".reg", + raw_size, note->descpos + offset); +} + +static boolean +elf32_arm_nabi_grok_psinfo (abfd, note) + bfd *abfd; + Elf_Internal_Note *note; +{ + switch (note->descsz) + { + default: + return false; + + case 124: /* Linux/ARM elf_prpsinfo */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80); + } + + /* Note that for some reason, a spurious space is tacked + onto the end of the args in some (at least one anyway) + implementations, so strip it off if it exists. */ + + { + char *command = elf_tdata (abfd)->core_command; + int n = strlen (command); + + if (0 < n && command[n - 1] == ' ') + command[n - 1] = '\0'; + } + + return true; +} + +#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus +#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo + #include "elf32-arm.h" diff -uprN binutils-2.11.90.0.29/bfd/libbfd.h binutils-2.11.90.0.31/bfd/libbfd.h --- binutils-2.11.90.0.29/bfd/libbfd.h Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/libbfd.h Thu Aug 30 09:30:37 2001 @@ -1113,6 +1113,11 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_860_HIGOTOFF", "BFD_RELOC_OPENRISC_ABS_26", "BFD_RELOC_OPENRISC_REL_26", + "BFD_RELOC_H8_DIR16A8", + "BFD_RELOC_H8_DIR16R8", + "BFD_RELOC_H8_DIR24A8", + "BFD_RELOC_H8_DIR24R8", + "BFD_RELOC_H8_DIR32A16", "@@overflow: BFD_RELOC_UNUSED@@", }; #endif diff -uprN binutils-2.11.90.0.29/bfd/nlm32-sparc.c binutils-2.11.90.0.31/bfd/nlm32-sparc.c --- binutils-2.11.90.0.29/bfd/nlm32-sparc.c Fri Mar 9 11:16:03 2001 +++ binutils-2.11.90.0.31/bfd/nlm32-sparc.c Thu Aug 30 09:30:37 2001 @@ -1,21 +1,21 @@ /* Support for 32-bit SPARC NLM (NetWare Loadable Module) - Copyright 1993, 1994, 2000 Free Software Foundation, Inc. + Copyright 1993, 1994, 2000, 2001 Free Software Foundation, Inc. -This file is part of BFD, the Binary File Descriptor library. + 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. */ + 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" @@ -40,6 +40,8 @@ static boolean nlm_sparc_write_import PARAMS ((bfd *, asection *, arelent *)); static boolean nlm_sparc_write_external PARAMS ((bfd *, bfd_size_type, asymbol *, struct reloc_and_sec *)); +static boolean nlm_sparc_write_export + PARAMS ((bfd *, asymbol *, bfd_vma)); enum reloc_type { @@ -61,59 +63,60 @@ enum reloc_type #if 0 static CONST char *CONST reloc_type_names[] = -{ - "R_SPARC_NONE", - "R_SPARC_8", "R_SPARC_16", "R_SPARC_32", - "R_SPARC_DISP8", "R_SPARC_DISP16", "R_SPARC_DISP32", - "R_SPARC_WDISP30", "R_SPARC_WDISP22", - "R_SPARC_HI22", "R_SPARC_22", - "R_SPARC_13", "R_SPARC_LO10", - "R_SPARC_GOT10", "R_SPARC_GOT13", "R_SPARC_GOT22", - "R_SPARC_PC10", "R_SPARC_PC22", - "R_SPARC_WPLT30", - "R_SPARC_COPY", - "R_SPARC_GLOB_DAT", "R_SPARC_JMP_SLOT", - "R_SPARC_RELATIVE", - "R_SPARC_UA32", -}; + { + "R_SPARC_NONE", + "R_SPARC_8", "R_SPARC_16", "R_SPARC_32", + "R_SPARC_DISP8", "R_SPARC_DISP16", "R_SPARC_DISP32", + "R_SPARC_WDISP30", "R_SPARC_WDISP22", + "R_SPARC_HI22", "R_SPARC_22", + "R_SPARC_13", "R_SPARC_LO10", + "R_SPARC_GOT10", "R_SPARC_GOT13", "R_SPARC_GOT22", + "R_SPARC_PC10", "R_SPARC_PC22", + "R_SPARC_WPLT30", + "R_SPARC_COPY", + "R_SPARC_GLOB_DAT", "R_SPARC_JMP_SLOT", + "R_SPARC_RELATIVE", + "R_SPARC_UA32", + }; #endif static reloc_howto_type nlm32_sparc_howto_table[] = -{ - HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, 0,"R_SPARC_NONE", false,0,0x00000000,true), - HOWTO(R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,0,"R_SPARC_8", false,0,0x000000ff,true), - HOWTO(R_SPARC_16, 0,1,16,false,0,complain_overflow_bitfield,0,"R_SPARC_16", false,0,0x0000ffff,true), - HOWTO(R_SPARC_32, 0,2,32,false,0,complain_overflow_bitfield,0,"R_SPARC_32", false,0,0xffffffff,true), - HOWTO(R_SPARC_DISP8, 0,0, 8,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP8", false,0,0x000000ff,true), - HOWTO(R_SPARC_DISP16, 0,1,16,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP16", false,0,0x0000ffff,true), - HOWTO(R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP32", false,0,0x00ffffff,true), - HOWTO(R_SPARC_WDISP30, 2,2,30,true, 0,complain_overflow_signed, 0,"R_SPARC_WDISP30", false,0,0x3fffffff,true), - HOWTO(R_SPARC_WDISP22, 2,2,22,true, 0,complain_overflow_signed, 0,"R_SPARC_WDISP22", false,0,0x003fffff,true), - HOWTO(R_SPARC_HI22, 10,2,22,false,0,complain_overflow_dont, 0,"R_SPARC_HI22", false,0,0x003fffff,true), - HOWTO(R_SPARC_22, 0,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_22", false,0,0x003fffff,true), - HOWTO(R_SPARC_13, 0,2,13,false,0,complain_overflow_bitfield,0,"R_SPARC_13", false,0,0x00001fff,true), - HOWTO(R_SPARC_LO10, 0,2,10,false,0,complain_overflow_dont, 0,"R_SPARC_LO10", false,0,0x000003ff,true), - HOWTO(R_SPARC_GOT10, 0,2,10,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT10", false,0,0x000003ff,true), - HOWTO(R_SPARC_GOT13, 0,2,13,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT13", false,0,0x00001fff,true), - HOWTO(R_SPARC_GOT22, 10,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT22", false,0,0x003fffff,true), - HOWTO(R_SPARC_PC10, 0,2,10,false,0,complain_overflow_bitfield,0,"R_SPARC_PC10", false,0,0x000003ff,true), - HOWTO(R_SPARC_PC22, 0,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_PC22", false,0,0x003fffff,true), - HOWTO(R_SPARC_WPLT30, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_WPLT30", false,0,0x00000000,true), - HOWTO(R_SPARC_COPY, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_COPY", false,0,0x00000000,true), - HOWTO(R_SPARC_GLOB_DAT,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_GLOB_DAT",false,0,0x00000000,true), - HOWTO(R_SPARC_JMP_SLOT,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_JMP_SLOT",false,0,0x00000000,true), - HOWTO(R_SPARC_RELATIVE,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_RELATIVE",false,0,0x00000000,true), - HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_UA32", false,0,0x00000000,true), + { + HOWTO (R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, 0,"R_SPARC_NONE", false,0,0x00000000,true), + HOWTO (R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,0,"R_SPARC_8", false,0,0x000000ff,true), + HOWTO (R_SPARC_16, 0,1,16,false,0,complain_overflow_bitfield,0,"R_SPARC_16", false,0,0x0000ffff,true), + HOWTO (R_SPARC_32, 0,2,32,false,0,complain_overflow_bitfield,0,"R_SPARC_32", false,0,0xffffffff,true), + HOWTO (R_SPARC_DISP8, 0,0, 8,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP8", false,0,0x000000ff,true), + HOWTO (R_SPARC_DISP16, 0,1,16,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP16", false,0,0x0000ffff,true), + HOWTO (R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, 0,"R_SPARC_DISP32", false,0,0x00ffffff,true), + HOWTO (R_SPARC_WDISP30, 2,2,30,true, 0,complain_overflow_signed, 0,"R_SPARC_WDISP30", false,0,0x3fffffff,true), + HOWTO (R_SPARC_WDISP22, 2,2,22,true, 0,complain_overflow_signed, 0,"R_SPARC_WDISP22", false,0,0x003fffff,true), + HOWTO (R_SPARC_HI22, 10,2,22,false,0,complain_overflow_dont, 0,"R_SPARC_HI22", false,0,0x003fffff,true), + HOWTO (R_SPARC_22, 0,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_22", false,0,0x003fffff,true), + HOWTO (R_SPARC_13, 0,2,13,false,0,complain_overflow_bitfield,0,"R_SPARC_13", false,0,0x00001fff,true), + HOWTO (R_SPARC_LO10, 0,2,10,false,0,complain_overflow_dont, 0,"R_SPARC_LO10", false,0,0x000003ff,true), + HOWTO (R_SPARC_GOT10, 0,2,10,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT10", false,0,0x000003ff,true), + HOWTO (R_SPARC_GOT13, 0,2,13,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT13", false,0,0x00001fff,true), + HOWTO (R_SPARC_GOT22, 10,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_GOT22", false,0,0x003fffff,true), + HOWTO (R_SPARC_PC10, 0,2,10,false,0,complain_overflow_bitfield,0,"R_SPARC_PC10", false,0,0x000003ff,true), + HOWTO (R_SPARC_PC22, 0,2,22,false,0,complain_overflow_bitfield,0,"R_SPARC_PC22", false,0,0x003fffff,true), + HOWTO (R_SPARC_WPLT30, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_WPLT30", false,0,0x00000000,true), + HOWTO (R_SPARC_COPY, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_COPY", false,0,0x00000000,true), + HOWTO (R_SPARC_GLOB_DAT,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_GLOB_DAT",false,0,0x00000000,true), + HOWTO (R_SPARC_JMP_SLOT,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_JMP_SLOT",false,0,0x00000000,true), + HOWTO (R_SPARC_RELATIVE,0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_RELATIVE",false,0,0x00000000,true), + HOWTO (R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, 0,"R_SPARC_UA32", false,0,0x00000000,true), }; /* Read a NetWare sparc reloc. */ -struct nlm32_sparc_reloc_ext { - unsigned char offset[4]; - unsigned char addend[4]; - unsigned char type[1]; - unsigned char pad1[3]; -}; +struct nlm32_sparc_reloc_ext + { + unsigned char offset[4]; + unsigned char addend[4]; + unsigned char type[1]; + unsigned char pad1[3]; + }; static boolean nlm_sparc_read_reloc (abfd, sym, secp, rel) @@ -147,10 +150,11 @@ nlm_sparc_read_reloc (abfd, sym, secp, r for (index = 0; index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type); index++) - if (nlm32_sparc_howto_table[index].type == type) { - rel->howto = &nlm32_sparc_howto_table[index]; - break; - } + if (nlm32_sparc_howto_table[index].type == type) + { + rel->howto = &nlm32_sparc_howto_table[index]; + break; + } #ifdef DEBUG fprintf (stderr, "%s: address = %08lx, addend = %08lx, type = %d, howto = %08lx\n", @@ -176,31 +180,31 @@ nlm_sparc_write_reloc (abfd, sec, rel) for (index = 0; index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type); - index++) { - tmp = &nlm32_sparc_howto_table[index]; + index++) + { + tmp = &nlm32_sparc_howto_table[index]; - if (tmp->rightshift == rel->howto->rightshift - && tmp->size == rel->howto->size - && tmp->bitsize == rel->howto->bitsize - && tmp->pc_relative == rel->howto->pc_relative - && tmp->bitpos == rel->howto->bitpos - && tmp->src_mask == rel->howto->src_mask - && tmp->dst_mask == rel->howto->dst_mask) { - type = tmp->type; - break; + if (tmp->rightshift == rel->howto->rightshift + && tmp->size == rel->howto->size + && tmp->bitsize == rel->howto->bitsize + && tmp->pc_relative == rel->howto->pc_relative + && tmp->bitpos == rel->howto->bitpos + && tmp->src_mask == rel->howto->src_mask + && tmp->dst_mask == rel->howto->dst_mask) + { + type = tmp->type; + break; + } } - } if (type == -1) abort (); - /* - * Netware wants a list of relocs for each address. - * Format is: - * long offset - * long addend - * char type - * That should be it. - */ + /* Netware wants a list of relocs for each address. + Format is: + long offset + long addend + char type + That should be it. */ /* The value we write out is the offset into the appropriate segment. This offset is the section vma, adjusted by the vma of @@ -240,30 +244,27 @@ nlm_sparc_mangle_relocs (abfd, sec, data return true; } -/* Read a NetWare sparc import record */ +/* Read a NetWare sparc import record. */ + static boolean nlm_sparc_read_import (abfd, sym) bfd *abfd; nlmNAME(symbol_type) *sym; { - struct nlm_relent *nlm_relocs; /* relocation records for symbol */ - bfd_size_type rcount; /* number of relocs */ - bfd_byte temp[NLM_TARGET_LONG_SIZE]; /* temporary 32-bit value */ - unsigned char symlength; /* length of symbol name */ + struct nlm_relent *nlm_relocs; /* Relocation records for symbol. */ + bfd_size_type rcount; /* Number of relocs. */ + bfd_byte temp[NLM_TARGET_LONG_SIZE]; /* Temporary 32-bit value. */ + unsigned char symlength; /* Length of symbol name. */ char *name; - /* - * First, read in the number of relocation - * entries for this symbol - */ + /* First, read in the number of relocation + entries for this symbol. */ if (bfd_read ((PTR) temp, 4, 1, abfd) != 4) return false; rcount = bfd_get_32 (abfd, temp); - /* - * Next, read in the length of the symbol - */ + /* Next, read in the length of the symbol. */ if (bfd_read ((PTR) &symlength, sizeof (symlength), 1, abfd) != sizeof (symlength)) @@ -273,9 +274,7 @@ nlm_sparc_read_import (abfd, sym) if (name == NULL) return false; - /* - * Then read in the symbol - */ + /* Then read in the symbol. */ if (bfd_read (name, symlength, 1, abfd) != symlength) return false; @@ -285,9 +284,7 @@ nlm_sparc_read_import (abfd, sym) sym -> symbol.value = 0; sym -> symbol.section = bfd_und_section_ptr; - /* - * Next, start reading in the relocs. - */ + /* Next, start reading in the relocs. */ nlm_relocs = ((struct nlm_relent *) bfd_alloc (abfd, rcount * sizeof (struct nlm_relent))); @@ -307,6 +304,7 @@ nlm_sparc_read_import (abfd, sym) nlm_relocs++; sym -> rcnt++; } + return true; } @@ -325,13 +323,13 @@ nlm_sparc_write_import (abfd, sec, rel) bss = bfd_get_section_by_name (abfd, NLM_UNINITIALIZED_DATA_NAME); symsec = (*rel->sym_ptr_ptr)->section; - if (symsec == code) { + if (symsec == code) base = 0; - } else if (symsec == data) { + else if (symsec == data) base = bfd_section_size (abfd, code); - } else if (symsec == bss) { + else if (symsec == bss) base = bfd_section_size (abfd, code) + bfd_section_size (abfd, data); - } else + else base = 0; #ifdef DEBUG @@ -411,29 +409,29 @@ nlm_sparc_write_export (abfd, sym, value #include "nlmswap.h" static const struct nlm_backend_data nlm32_sparc_backend = -{ - "NetWare SPARC Module \032", - sizeof (Nlm32_sparc_External_Fixed_Header), - 0, /* optional_prefix_size */ - bfd_arch_sparc, - 0, - false, - 0, /* backend_object_p */ - 0, /* write_prefix_func */ - nlm_sparc_read_reloc, - nlm_sparc_mangle_relocs, - nlm_sparc_read_import, - nlm_sparc_write_import, - 0, /* set_public_section */ - 0, /* get_public_offset */ - nlm_swap_fixed_header_in, - nlm_swap_fixed_header_out, - nlm_sparc_write_external, - nlm_sparc_write_export -}; + { + "NetWare SPARC Module \032", + sizeof (Nlm32_sparc_External_Fixed_Header), + 0, /* optional_prefix_size */ + bfd_arch_sparc, + 0, + false, + 0, /* backend_object_p */ + 0, /* write_prefix_func */ + nlm_sparc_read_reloc, + nlm_sparc_mangle_relocs, + nlm_sparc_read_import, + nlm_sparc_write_import, + 0, /* set_public_section */ + 0, /* get_public_offset */ + nlm_swap_fixed_header_in, + nlm_swap_fixed_header_out, + nlm_sparc_write_external, + nlm_sparc_write_export + }; #define TARGET_BIG_NAME "nlm32-sparc" #define TARGET_BIG_SYM nlmNAME(sparc_vec) -#define TARGET_BACKEND_DATA &nlm32_sparc_backend +#define TARGET_BACKEND_DATA & nlm32_sparc_backend #include "nlm-target.h" diff -uprN binutils-2.11.90.0.29/bfd/oasys.c binutils-2.11.90.0.31/bfd/oasys.c --- binutils-2.11.90.0.29/bfd/oasys.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/oasys.c Thu Aug 30 09:30:37 2001 @@ -3,21 +3,21 @@ Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support, . -This file is part of BFD, the Binary File Descriptor library. + 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. */ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define UNDERSCORE_HACK 1 #include "bfd.h" @@ -61,7 +61,10 @@ static boolean oasys_find_nearest_line static int oasys_generic_stat_arch_elt PARAMS ((bfd *, struct stat *)); static int oasys_sizeof_headers PARAMS ((bfd *, boolean)); -/* Read in all the section data and relocation stuff too */ +long oasys_get_symtab PARAMS ((bfd *, asymbol **)); +long oasys_canonicalize_reloc PARAMS ((bfd *, sec_ptr, arelent **, asymbol **)); + +/* Read in all the section data and relocation stuff too. */ PROTO (static boolean, oasys_slurp_section_data, (bfd * CONST abfd)); static boolean @@ -240,9 +243,6 @@ oasys_get_symtab_upper_bound (abfd) return (abfd->symcount + 1) * (sizeof (oasys_symbol_type *)); } -/* -*/ - extern const bfd_target oasys_vec; long diff -uprN binutils-2.11.90.0.29/bfd/pdp11.c binutils-2.11.90.0.31/bfd/pdp11.c --- binutils-2.11.90.0.29/bfd/pdp11.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/pdp11.c Thu Aug 30 09:30:37 2001 @@ -1,21 +1,21 @@ /* BFD back-end for PDP-11 a.out binaries. Copyright 2001 Free Software Foundation, Inc. -This file is part of BFD, the Binary File Descriptor library. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This file is part of BFD, the Binary File Descriptor library. -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. */ + 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. */ /* BFD backend for PDP-11, running 2.11BSD in particular. @@ -363,6 +363,12 @@ static void adjust_o_magic PARAMS ((bfd static void adjust_z_magic PARAMS ((bfd *, struct internal_exec *)); static void adjust_n_magic PARAMS ((bfd *, struct internal_exec *)); +static int pdp11_aout_write_headers PARAMS ((bfd *, struct internal_exec *)); +void pdp11_aout_swap_reloc_out PARAMS ((bfd *, arelent *, struct pdp11_aout_reloc_external *)); +void pdp11_aout_swap_reloc_in +PARAMS ((bfd *, struct pdp11_aout_reloc_external *, arelent *, + bfd_size_type, asymbol **, bfd_size_type)); + /* SUBSECTION Relocations diff -uprN binutils-2.11.90.0.29/bfd/pe-mips.c binutils-2.11.90.0.31/bfd/pe-mips.c --- binutils-2.11.90.0.29/bfd/pe-mips.c Fri Mar 9 11:38:00 2001 +++ binutils-2.11.90.0.31/bfd/pe-mips.c Thu Aug 30 09:30:37 2001 @@ -54,6 +54,15 @@ static void mips_adjust_reloc_in PARAMS static void mips_adjust_reloc_out PARAMS ((bfd *, const arelent *, struct internal_reloc *)); #endif + +static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *)); +static reloc_howto_type * coff_mips_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); +static void mips_swap_reloc_in PARAMS ((bfd *, PTR, PTR)); +static unsigned int mips_swap_reloc_out PARAMS ((bfd *, PTR, PTR)); +static boolean coff_pe_mips_relocate_section + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, + struct internal_reloc *, struct internal_syment *, asection **)); + #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2) /* The page size is a guess based on ELF. */ @@ -169,7 +178,8 @@ coff_mips_reloc (abfd, reloc_entry, symb /* Return true if this relocation should appear in the output .reloc section. */ -static boolean in_reloc_p(abfd, howto) +static boolean +in_reloc_p (abfd, howto) bfd * abfd ATTRIBUTE_UNUSED; reloc_howto_type *howto; { diff -uprN binutils-2.11.90.0.29/bfd/reloc.c binutils-2.11.90.0.31/bfd/reloc.c --- binutils-2.11.90.0.29/bfd/reloc.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/reloc.c Thu Aug 30 09:30:37 2001 @@ -3188,6 +3188,19 @@ ENUMX ENUMDOC OpenRISC Relocations. +ENUM + BFD_RELOC_H8_DIR16A8 +ENUMX + BFD_RELOC_H8_DIR16R8 +ENUMX + BFD_RELOC_H8_DIR24A8 +ENUMX + BFD_RELOC_H8_DIR24R8 +ENUMX + BFD_RELOC_H8_DIR32A16 +ENUMDOC + H8 elf Relocations. + ENDSENUM BFD_RELOC_UNUSED CODE_FRAGMENT diff -uprN binutils-2.11.90.0.29/bfd/riscix.c binutils-2.11.90.0.31/bfd/riscix.c --- binutils-2.11.90.0.29/bfd/riscix.c Fri Mar 9 11:16:06 2001 +++ binutils-2.11.90.0.31/bfd/riscix.c Thu Aug 30 09:30:37 2001 @@ -143,6 +143,24 @@ riscix_fix_pcrel_26_done PARAMS ((bfd *, static bfd_reloc_status_type riscix_fix_pcrel_26 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static const bfd_target * +MY (object_p) PARAMS ((bfd *)); + +reloc_howto_type * +riscix_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); + +void +riscix_swap_std_reloc_out PARAMS ((bfd *, arelent *, struct reloc_std_external *)); + +boolean +riscix_squirt_out_relocs PARAMS ((bfd *, asection *)); + +long +MY (canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, asymbol **)); + +const bfd_target * +riscix_some_aout_object_p PARAMS ((bfd *, struct internal_exec *, const bfd_target *(*) (bfd *))); + static reloc_howto_type riscix_std_reloc_howto[] = { /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */ diff -uprN binutils-2.11.90.0.29/bfd/sparclynx.c binutils-2.11.90.0.31/bfd/sparclynx.c --- binutils-2.11.90.0.29/bfd/sparclynx.c Fri Mar 9 11:16:08 2001 +++ binutils-2.11.90.0.31/bfd/sparclynx.c Thu Aug 30 09:30:37 2001 @@ -1,6 +1,6 @@ /* BFD support for Sparc binaries under LynxOS. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000 - Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, + 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suit #endif -#define MY(OP) CAT(sparclynx_aout_,OP) +#define MY(OP) CAT (sparclynx_aout_,OP) #define TARGETNAME "a.out-sparc-lynx" #include "bfd.h" @@ -43,6 +43,10 @@ Foundation, Inc., 59 Temple Place - Suit #include "aout/stab_gnu.h" #include "aout/ar.h" +void NAME (lynx,set_arch_mach) PARAMS ((bfd *, int)); +static void choose_reloc_size PARAMS ((bfd *)); +static boolean NAME (aout,sparclynx_write_object_contents) PARAMS ((bfd *)); + /* This is needed to reject a NewsOS file, e.g. in gdb/testsuite/gdb.t10/crossload.exp. I needed to add M_UNKNOWN to recognize a 68000 object, so this will @@ -52,30 +56,24 @@ Foundation, Inc., 59 Temple Place - Suit || (mtype) == M_68020 \ || (mtype) == M_SPARC) -/* -The file @code{aoutf1.h} contains the code for BFD's -a.out back end. Control over the generated back end is given by these -two preprocessor names: -@table @code -@item ARCH_SIZE -This value should be either 32 or 64, depending upon the size of an -int in the target format. It changes the sizes of the structs which -perform the memory/disk mapping of structures. - -The 64 bit backend may only be used if the host compiler supports 64 -ints (eg long long with gcc), by defining the name @code{BFD_HOST_64_BIT} in @code{bfd.h}. -With this name defined, @emph{all} bfd operations are performed with 64bit -arithmetic, not just those to a 64bit target. - -@item TARGETNAME -The name put into the target vector. -@item -@end table - -*/ - -/*SUPPRESS558*/ -/*SUPPRESS529*/ +/* The file @code{aoutf1.h} contains the code for BFD's + a.out back end. Control over the generated back end is given by these + two preprocessor names: + @table @code + @item ARCH_SIZE + This value should be either 32 or 64, depending upon the size of an + int in the target format. It changes the sizes of the structs which + perform the memory/disk mapping of structures. + + The 64 bit backend may only be used if the host compiler supports 64 + ints (eg long long with gcc), by defining the name @code{BFD_HOST_64_BIT} in @code{bfd.h}. + With this name defined, @emph{all} bfd operations are performed with 64bit + arithmetic, not just those to a 64bit target. + + @item TARGETNAME + The name put into the target vector. + @item + @end table */ void NAME(lynx,set_arch_mach) (abfd, machtype) @@ -85,9 +83,9 @@ NAME(lynx,set_arch_mach) (abfd, machtype /* Determine the architecture and machine type of the object file. */ enum bfd_architecture arch; long machine; + switch (machtype) { - case M_UNKNOWN: /* Some Sun3s make magic numbers without cpu types in them, so we'll default to the 68000. */ @@ -140,7 +138,8 @@ NAME(lynx,set_arch_mach) (abfd, machtype NAME(lynx,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \ choose_reloc_size(ABFD); -/* Determine the size of a relocation entry, based on the architecture */ +/* Determine the size of a relocation entry, based on the architecture. */ + static void choose_reloc_size (abfd) bfd *abfd; @@ -206,6 +205,8 @@ NAME(aout,sparclynx_write_object_content } #define MY_set_sizes sparclynx_set_sizes +static boolean sparclynx_set_sizes PARAMS ((bfd *)); + static boolean sparclynx_set_sizes (abfd) bfd *abfd; @@ -228,15 +229,15 @@ sparclynx_set_sizes (abfd) } static CONST struct aout_backend_data sparclynx_aout_backend = -{ - 0, 1, 0, 1, 0, sparclynx_set_sizes, 0, - 0, /* add_dynamic_symbols */ - 0, /* add_one_symbol */ - 0, /* link_dynamic_object */ - 0, /* write_dynamic_symbol */ - 0, /* check_dynamic_reloc */ - 0 /* finish_dynamic_link */ -}; + { + 0, 1, 0, 1, 0, sparclynx_set_sizes, 0, + 0, /* add_dynamic_symbols */ + 0, /* add_one_symbol */ + 0, /* link_dynamic_object */ + 0, /* write_dynamic_symbol */ + 0, /* check_dynamic_reloc */ + 0 /* finish_dynamic_link */ + }; #define MY_bfd_debug_info_start bfd_void @@ -251,10 +252,10 @@ static CONST struct aout_backend_data sp #ifdef LYNX_CORE -char *lynx_core_file_failing_command (); -int lynx_core_file_failing_signal (); +char * lynx_core_file_failing_command (); +int lynx_core_file_failing_signal (); boolean lynx_core_file_matches_executable_p (); -const bfd_target *lynx_core_file_p (); +const bfd_target * lynx_core_file_p (); #define MY_core_file_failing_command lynx_core_file_failing_command #define MY_core_file_failing_signal lynx_core_file_failing_signal diff -uprN binutils-2.11.90.0.29/bfd/targets.c binutils-2.11.90.0.31/bfd/targets.c --- binutils-2.11.90.0.29/bfd/targets.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/bfd/targets.c Thu Aug 30 09:30:37 2001 @@ -521,6 +521,7 @@ extern const bfd_target bfd_elf32_cris_v extern const bfd_target bfd_elf32_d10v_vec; extern const bfd_target bfd_elf32_d30v_vec; extern const bfd_target bfd_elf32_fr30_vec; +extern const bfd_target bfd_elf32_h8300_vec; extern const bfd_target bfd_elf32_hppa_linux_vec; extern const bfd_target bfd_elf32_hppa_vec; extern const bfd_target bfd_elf32_i370_vec; diff -uprN binutils-2.11.90.0.29/bfd/targmatch.sed binutils-2.11.90.0.31/bfd/targmatch.sed --- binutils-2.11.90.0.29/bfd/targmatch.sed Thu Jun 3 11:01:55 1999 +++ binutils-2.11.90.0.31/bfd/targmatch.sed Thu Aug 30 09:30:37 2001 @@ -1,5 +1,6 @@ 1,/START OF targmatch.h/ d /END OF targmatch.h/,$ d +/^[ ]*case/,/^[ ]*esac/ d s/^#if/KEEP #if/ s/^#endif/KEEP #endif/ s/^[ ]*#.*$// diff -uprN binutils-2.11.90.0.29/bfd/xcofflink.c binutils-2.11.90.0.31/bfd/xcofflink.c --- binutils-2.11.90.0.29/bfd/xcofflink.c Thu May 24 23:17:03 2001 +++ binutils-2.11.90.0.31/bfd/xcofflink.c Thu Aug 30 09:30:37 2001 @@ -1574,9 +1574,9 @@ xcoff_link_add_symbols (abfd, info) case XTY_LD: /* This is a label definition. The x_scnlen field is the - symbol index of the csect. I believe that this must - always follow the appropriate XTY_SD symbol, so I will - insist on it. */ + symbol index of the csect. Usually the XTY_LD symbol will + follow its appropriate XTY_SD symbol. The .set pseudo op can + cause the XTY_LD to not follow the XTY_SD symbol. */ { boolean bad; @@ -1600,7 +1600,7 @@ xcoff_link_add_symbols (abfd, info) bfd_set_error (bfd_error_bad_value); goto error_return; } - + csect = section; value = sym.n_value - csect->vma; } break; diff -uprN binutils-2.11.90.0.29/binutils/ChangeLog binutils-2.11.90.0.31/binutils/ChangeLog --- binutils-2.11.90.0.29/binutils/ChangeLog Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/binutils/ChangeLog Thu Aug 30 09:30:37 2001 @@ -1,3 +1,11 @@ +2001-08-29 Peter Targett + + * MAINTAINERS: Include ARC Maintainer. + +2001-08-29 Ben Elliston + + * stabs.c (stab_demangle_template): Initialise s4. + 2001-08-27 Alan Modra * readelf.c (dump_relocations): Recognise EM_PPC64. diff -uprN binutils-2.11.90.0.29/binutils/MAINTAINERS binutils-2.11.90.0.31/binutils/MAINTAINERS --- binutils-2.11.90.0.29/binutils/MAINTAINERS Sat Aug 4 19:52:15 2001 +++ binutils-2.11.90.0.31/binutils/MAINTAINERS Thu Aug 30 09:30:37 2001 @@ -50,6 +50,7 @@ maintainers for a given domain then resp maintainer. The first maintainer is free to devolve that responsibility among the other maintainers. + ARC Peter Targett ARM Nick Clifton AVR Denis Chertykov CRIS Hans-Peter Nilsson diff -uprN binutils-2.11.90.0.29/binutils/stabs.c binutils-2.11.90.0.31/binutils/stabs.c --- binutils-2.11.90.0.29/binutils/stabs.c Tue Jan 23 20:29:32 2001 +++ binutils-2.11.90.0.31/binutils/stabs.c Thu Aug 30 09:30:37 2001 @@ -4461,7 +4461,7 @@ stab_demangle_template (minfo, pp, pname regular demangling routine. */ if (pname != NULL) { - char *s1, *s2, *s3, *s4; + char *s1, *s2, *s3, *s4 = NULL; char *from, *to; s1 = savestring (orig, *pp - orig); diff -uprN binutils-2.11.90.0.29/binutils.spec binutils-2.11.90.0.31/binutils.spec --- binutils-2.11.90.0.29/binutils.spec Mon Aug 27 08:56:43 2001 +++ binutils-2.11.90.0.31/binutils.spec Thu Aug 30 14:54:50 2001 @@ -9,7 +9,7 @@ Summary: A GNU collection of binary utilities. Name: binutils -Version: 2.11.90.0.29 +Version: 2.11.90.0.31 Release: 1 Copyright: GPL Group: Development/Tools diff -uprN binutils-2.11.90.0.29/gas/ChangeLog binutils-2.11.90.0.31/gas/ChangeLog --- binutils-2.11.90.0.29/gas/ChangeLog Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/gas/ChangeLog Thu Aug 30 14:58:40 2001 @@ -1,3 +1,41 @@ +Thu Aug 30 12:05:13 2001 J"orn Rennecke + + * tc-h8300.c (tc_crawl_symbol_chain, tc_headers_hook): Don't + define for BFD_ASSEMBLER. + (tc_reloc_mangle): Likewise. + (tc_gen_reloc): New function for BFD_ASSEMBLER. + +Wed Aug 29 12:49:58 2001 Jeffrey A Law (law@cygnus.com) + + * config/tc-h8300.c (h8300hmode): Record the machine type + if BFD_ASSEMBLER is defined. + (h8300smode, md_begin): Similarly. + +2001-08-29 Joel Sherrill + + * configure.in (i[3456]86-*-rtems*, m68*-*-rtems*): Change + default from coff to elf. + * configure: Regenerate. + +Wed Aug 29 12:05:13 2001 J"orn Rennecke + + * tc-h8300.c: If OBJ_ELF, include elf/h8.h, and define + assorted coff relocations to the corresponding elf relocations. + * tc-h8300.h (TARGET_ARCH, TARGET_FORMAT): Define appropriately. + + * configure.in: Add case for h8300-*-elf. + * configure: Regenerate. + +Wed Aug 29 12:05:13 2001 J"orn Rennecke + + * doc/internals.texi (MD_PCREL_FROM_SECTION): Change + documentation to reflect reality. + +2001-08-27 Thiemo Seufer + + * tc_mips.c (load_address): Reflect change to MAX_GPREL_OFFSET. + (macro): Reflect change to MAX_GPREL_OFFSET. + 2001-08-27 Torbjorn Granlund Staffan Ulfberg Linus Nordberg diff -uprN binutils-2.11.90.0.29/gas/config/tc-h8300.c binutils-2.11.90.0.31/gas/config/tc-h8300.c --- binutils-2.11.90.0.29/gas/config/tc-h8300.c Fri Mar 9 11:16:53 2001 +++ binutils-2.11.90.0.31/gas/config/tc-h8300.c Thu Aug 30 14:58:40 2001 @@ -1,5 +1,5 @@ /* tc-h8300.c -- Assemble code for the Hitachi H8/300 - Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -30,6 +30,22 @@ #include "opcode/h8300.h" #include +#ifdef OBJ_ELF +#include "elf/h8.h" + +#define R_MOV24B1 BFD_RELOC_H8_DIR24A8 +#define R_MOVL1 BFD_RELOC_H8_DIR32A16 +#define R_MOV24B1 BFD_RELOC_H8_DIR24A8 +#define R_MOVL1 BFD_RELOC_H8_DIR32A16 +#define R_RELLONG BFD_RELOC_32 +#define R_MOV16B1 BFD_RELOC_H8_DIR16A8 +#define R_RELWORD BFD_RELOC_16 +#define R_RELBYTE BFD_RELOC_8 +#define R_PCRWORD BFD_RELOC_16_PCREL +#define R_PCRBYTE BFD_RELOC_8_PCREL +#define R_JMPL1 BFD_RELOC_H8_DIR24R8 +#endif + const char comment_chars[] = ";"; const char line_comment_chars[] = "#"; const char line_separator_chars[] = ""; @@ -55,6 +71,10 @@ h8300hmode () { Hmode = 1; Smode = 0; +#ifdef BFD_ASSEMBLER + if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300h)) + as_warn (_("could not set architecture and machine")); +#endif } void @@ -62,6 +82,10 @@ h8300smode () { Smode = 1; Hmode = 1; +#ifdef BFD_ASSEMBLER + if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300s)) + as_warn (_("could not set architecture and machine")); +#endif } void @@ -117,6 +141,11 @@ md_begin () char prev_buffer[100]; int idx = 0; +#ifdef BFD_ASSEMBLER + if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300)) + as_warn (_("could not set architecture and machine")); +#endif + opcode_hash_control = hash_new (); prev_buffer[0] = 0; @@ -1300,12 +1329,14 @@ md_assemble (str) build_bytes (opcode, operand); } +#ifndef BFD_ASSEMBLER void tc_crawl_symbol_chain (headers) object_headers *headers ATTRIBUTE_UNUSED; { printf (_("call to tc_crawl_symbol_chain \n")); } +#endif symbolS * md_undefined_symbol (name) @@ -1314,12 +1345,14 @@ md_undefined_symbol (name) return 0; } +#ifndef BFD_ASSEMBLER void tc_headers_hook (headers) object_headers *headers ATTRIBUTE_UNUSED; { printf (_("call to tc_headers_hook \n")); } +#endif /* Various routines to kill one day */ /* Equal to MAX_PRECISION in atof-ieee.c */ @@ -1485,6 +1518,7 @@ md_pcrel_from (fixP) abort (); } +#ifndef BFD_ASSEMBLER void tc_reloc_mangle (fix_ptr, intr, base) fixS *fix_ptr; @@ -1547,3 +1581,37 @@ tc_reloc_mangle (fix_ptr, intr, base) else intr->r_symndx = -1; } +#else /* BFD_ASSEMBLER */ +arelent * +tc_gen_reloc (section, fixp) + asection *section ATTRIBUTE_UNUSED; + fixS *fixp; +{ + arelent *rel; + bfd_reloc_code_real_type r_type; + + rel = (arelent *) xmalloc (sizeof (arelent)); + rel->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); + *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); + rel->address = fixp->fx_frag->fr_address + fixp->fx_where; + rel->addend = fixp->fx_offset; + + r_type = fixp->fx_r_type; + +#define DEBUG 0 +#if DEBUG + fprintf (stderr, "%s\n", bfd_get_reloc_code_name (r_type)); + fflush(stderr); +#endif + rel->howto = bfd_reloc_type_lookup (stdoutput, r_type); + if (rel->howto == NULL) + { + as_bad_where (fixp->fx_file, fixp->fx_line, + _("Cannot represent relocation type %s"), + bfd_get_reloc_code_name (r_type)); + return NULL; + } + + return rel; +} +#endif diff -uprN binutils-2.11.90.0.29/gas/config/tc-h8300.h binutils-2.11.90.0.31/gas/config/tc-h8300.h --- binutils-2.11.90.0.29/gas/config/tc-h8300.h Fri Mar 9 11:16:54 2001 +++ binutils-2.11.90.0.31/gas/config/tc-h8300.h Thu Aug 30 09:30:37 2001 @@ -24,6 +24,12 @@ #define TARGET_BYTES_BIG_ENDIAN 1 +#define TARGET_ARCH bfd_arch_h8300 + +#ifdef OBJ_ELF +#define TARGET_FORMAT "elf32-h8300" +#endif + #if ANSI_PROTOTYPES struct internal_reloc; #endif diff -uprN binutils-2.11.90.0.29/gas/config/tc-mips.c binutils-2.11.90.0.31/gas/config/tc-mips.c --- binutils-2.11.90.0.29/gas/config/tc-mips.c Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/gas/config/tc-mips.c Thu Aug 30 09:30:37 2001 @@ -3330,7 +3330,7 @@ load_address (counter, reg, ep) lui $reg, (BFD_RELOC_HI16_S) addiu $reg,$reg, (BFD_RELOC_LO16) If we have an addend, we always use the latter form. */ - if ((valueT) ep->X_add_number >= MAX_GPREL_OFFSET + if ((valueT) ep->X_add_number > MAX_GPREL_OFFSET || nopic_need_relax (ep->X_add_symbol, 1)) p = NULL; else @@ -4226,7 +4226,7 @@ macro (ip) addiu $tempreg,$tempreg, (BFD_RELOC_LO16) If we have a constant, we need two instructions anyhow, so we may as well always use the latter form. */ - if ((valueT) offset_expr.X_add_number >= MAX_GPREL_OFFSET + if ((valueT) offset_expr.X_add_number > MAX_GPREL_OFFSET || nopic_need_relax (offset_expr.X_add_symbol, 1)) p = NULL; else diff -uprN binutils-2.11.90.0.29/gas/configure binutils-2.11.90.0.31/gas/configure --- binutils-2.11.90.0.29/gas/configure Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/gas/configure Thu Aug 30 09:30:37 2001 @@ -2368,6 +2368,7 @@ for this_target in $target $canon_target h8300-*-rtems*) fmt=coff ;; h8300-*-coff) fmt=coff ;; + h8300-*-elf) fmt=elf ;; h8500-*-rtems*) fmt=coff ;; h8500-*-coff) fmt=coff ;; @@ -2410,7 +2411,8 @@ EOF ;; i386-*-rtemself*) fmt=elf ;; - i386-*-rtems*) fmt=coff ;; + i386-*-rtemscoff*) fmt=coff ;; + i386-*-rtems*) fmt=elf ;; i386-*-gnu*) fmt=elf ;; i386-*-mach*) fmt=aout em=mach bfd_gas=yes ;; @@ -2453,8 +2455,9 @@ EOF m68k-*-sysv4*) # must be before -sysv* fmt=elf em=svr4 ;; m68k-*-elf*) fmt=elf ;; - m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) + m68k-*-coff | m68k-*-sysv* | m68k-*-rtemscoff*) fmt=coff ;; + m68k-*-rtems*) fmt=elf ;; m68k-*-hpux*) fmt=hp300 em=hp300 ;; m68k-*-linux*aout*) fmt=aout em=linux ;; m68k-*-linux-gnu*) fmt=elf em=linux ;; @@ -3109,7 +3112,7 @@ 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:3113: checking for $ac_word" >&5 +echo "configure:3116: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3139,7 +3142,7 @@ 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:3143: checking for $ac_word" >&5 +echo "configure:3146: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3190,7 +3193,7 @@ fi # 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:3194: checking for $ac_word" >&5 +echo "configure:3197: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3222,7 +3225,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:3226: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:3229: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -3233,12 +3236,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 3237 "configure" +#line 3240 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:3242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3245: \"$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 @@ -3264,12 +3267,12 @@ 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:3268: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3271: checking whether the C compiler ($CC $CFLAGS $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:3273: checking whether we are using GNU C" >&5 +echo "configure:3276: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3278,7 +3281,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3285: \"$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 @@ -3297,7 +3300,7 @@ 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:3301: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3304: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3334,7 +3337,7 @@ 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:3338: checking for $ac_word" >&5 +echo "configure:3341: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3365,7 +3368,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3369: checking how to run the C preprocessor" >&5 +echo "configure:3372: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3380,13 +3383,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:3390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3393: \"$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 : @@ -3397,13 +3400,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:3407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3410: \"$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 : @@ -3414,13 +3417,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:3424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3427: \"$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 : @@ -3450,7 +3453,7 @@ 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:3454: checking for $ac_word" >&5 +echo "configure:3457: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3483,7 +3486,7 @@ 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:3487: checking for $ac_word" >&5 +echo "configure:3490: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3517,7 +3520,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:3521: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3524: 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 $ac_n "(cached) $ac_c" 1>&6 @@ -3525,7 +3528,7 @@ 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:3543: \"$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 @@ -3559,7 +3562,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:3563: checking lex output file root" >&5 +echo "configure:3566: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3580,7 +3583,7 @@ 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:3584: checking whether yytext is a pointer" >&5 +echo "configure:3587: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3592,14 +3595,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:3606: \"$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 @@ -3625,7 +3628,7 @@ ALL_LINGUAS= # 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:3629: checking for $ac_word" >&5 +echo "configure:3632: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3653,12 +3656,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3657: checking for ANSI C header files" >&5 +echo "configure:3660: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3666,7 +3669,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3673: \"$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* @@ -3683,7 +3686,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 @@ -3701,7 +3704,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 @@ -3722,7 +3725,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3733,7 +3736,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -if { (eval echo configure:3737: \"$ac_link\") 1>&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 : else @@ -3757,12 +3760,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3761: checking for working const" >&5 +echo "configure:3764: checking for working const" >&5 if eval "test \"`echo '$''{'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:3818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3832,21 +3835,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3836: checking for inline" >&5 +echo "configure:3839: checking for inline" >&5 if eval "test \"`echo '$''{'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:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3872,12 +3875,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3876: checking for off_t" >&5 +echo "configure:3879: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3905,12 +3908,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3909: checking for size_t" >&5 +echo "configure:3912: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3940,19 +3943,19 @@ fi # 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:3944: checking for working alloca.h" >&5 +echo "configure:3947: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'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:3956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3959: \"$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 @@ -3973,12 +3976,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3977: checking for alloca" >&5 +echo "configure:3980: checking for alloca" >&5 if eval "test \"`echo '$''{'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:4013: \"$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 @@ -4038,12 +4041,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4042: checking whether alloca needs Cray hooks" >&5 +echo "configure:4045: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'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:4072: checking for $ac_func" >&5 +echo "configure:4075: 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:4103: \"$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 @@ -4123,7 +4126,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4127: checking stack direction for C alloca" >&5 +echo "configure:4130: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4131,7 +4134,7 @@ else 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:4157: \"$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 @@ -4175,17 +4178,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:4179: checking for $ac_hdr" >&5 +echo "configure:4182: 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:4189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4192: \"$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* @@ -4214,12 +4217,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4218: checking for $ac_func" >&5 +echo "configure:4221: 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:4249: \"$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 @@ -4267,7 +4270,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4271: checking for working mmap" >&5 +echo "configure:4274: 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 @@ -4275,7 +4278,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:4422: \"$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 @@ -4443,17 +4446,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:4447: checking for $ac_hdr" >&5 +echo "configure:4450: 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:4457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4460: \"$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* @@ -4483,12 +4486,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4487: checking for $ac_func" >&5 +echo "configure:4490: 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:4518: \"$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 @@ -4540,12 +4543,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4544: checking for $ac_func" >&5 +echo "configure:4547: 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:4575: \"$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 @@ -4602,19 +4605,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:4606: checking for LC_MESSAGES" >&5 +echo "configure:4609: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'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:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4621: \"$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 @@ -4635,7 +4638,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:4639: checking whether NLS is requested" >&5 +echo "configure:4642: 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" @@ -4655,7 +4658,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:4659: checking whether included gettext is requested" >&5 +echo "configure:4662: 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" @@ -4674,17 +4677,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:4678: checking for libintl.h" >&5 +echo "configure:4681: checking for libintl.h" >&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:4688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4691: \"$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* @@ -4701,19 +4704,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:4705: checking for gettext in libc" >&5 +echo "configure:4708: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'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:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4720: \"$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 @@ -4729,7 +4732,7 @@ 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:4733: checking for bindtextdomain in -lintl" >&5 +echo "configure:4736: 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 $ac_n "(cached) $ac_c" 1>&6 @@ -4737,7 +4740,7 @@ 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:4755: \"$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 @@ -4764,19 +4767,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:4768: checking for gettext in libintl" >&5 +echo "configure:4771: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'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:4783: \"$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 @@ -4804,7 +4807,7 @@ 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:4808: checking for $ac_word" >&5 +echo "configure:4811: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4838,12 +4841,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4842: checking for $ac_func" >&5 +echo "configure:4845: 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:4873: \"$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 @@ -4893,7 +4896,7 @@ 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:4897: checking for $ac_word" >&5 +echo "configure:4900: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4929,7 +4932,7 @@ 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:4933: checking for $ac_word" >&5 +echo "configure:4936: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4961,7 +4964,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -5001,7 +5004,7 @@ 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:5005: checking for $ac_word" >&5 +echo "configure:5008: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5035,7 +5038,7 @@ 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:5039: checking for $ac_word" >&5 +echo "configure:5042: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5071,7 +5074,7 @@ 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:5075: checking for $ac_word" >&5 +echo "configure:5078: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5161,7 +5164,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:5165: checking for catalogs to be installed" >&5 +echo "configure:5168: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -5189,17 +5192,17 @@ echo "configure:5165: 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:5193: checking for linux/version.h" >&5 +echo "configure:5196: checking for linux/version.h" >&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:5203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5206: \"$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* @@ -5262,7 +5265,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:5266: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:5269: 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" @@ -5287,7 +5290,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:5291: checking for executable suffix" >&5 +echo "configure:5294: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5297,7 +5300,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -5322,17 +5325,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:5326: checking for $ac_hdr" >&5 +echo "configure:5329: 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:5336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5339: \"$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* @@ -5362,7 +5365,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:5366: checking whether compiling a cross-assembler" >&5 +echo "configure:5369: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -5377,19 +5380,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:5381: checking for working alloca.h" >&5 +echo "configure:5384: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'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:5393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5396: \"$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 @@ -5410,12 +5413,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:5414: checking for alloca" >&5 +echo "configure:5417: checking for alloca" >&5 if eval "test \"`echo '$''{'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:5450: \"$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 @@ -5475,12 +5478,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5479: checking whether alloca needs Cray hooks" >&5 +echo "configure:5482: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'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:5509: checking for $ac_func" >&5 +echo "configure:5512: 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:5540: \"$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 @@ -5560,7 +5563,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5564: checking stack direction for C alloca" >&5 +echo "configure:5567: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5568,7 +5571,7 @@ else 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:5594: \"$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 @@ -5609,21 +5612,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:5613: checking for inline" >&5 +echo "configure:5616: checking for inline" >&5 if eval "test \"`echo '$''{'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:5630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -5653,12 +5656,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5657: checking for $ac_func" >&5 +echo "configure:5660: 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:5688: \"$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 @@ -5710,12 +5713,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5714: checking for $ac_func" >&5 +echo "configure:5717: 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:5745: \"$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 @@ -5773,7 +5776,7 @@ case $host in ;; *-ncr-sysv4.3*) echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6 -echo "configure:5777: checking for _mwvalidcheckl in -lmw" >&5 +echo "configure:5780: checking for _mwvalidcheckl in -lmw" >&5 ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5781,7 +5784,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5799: \"$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 @@ -5813,7 +5816,7 @@ else fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5817: checking for main in -lm" >&5 +echo "configure:5820: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5821,14 +5824,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5835: \"$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 @@ -5851,7 +5854,7 @@ fi ;; *) echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5855: checking for main in -lm" >&5 +echo "configure:5858: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5859,14 +5862,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5873: \"$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 @@ -5897,12 +5900,12 @@ esac # 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:5901: checking for working assert macro" >&5 +echo "configure:5904: checking for working assert macro" >&5 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5918,7 +5921,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -5959,12 +5962,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:5963: checking whether declaration is required for strstr" >&5 +echo "configure:5966: checking whether declaration is required for strstr" >&5 if eval "test \"`echo '$''{'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:5982: \"$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 @@ -5996,12 +5999,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:6000: checking whether declaration is required for malloc" >&5 +echo "configure:6003: checking whether declaration is required for malloc" >&5 if eval "test \"`echo '$''{'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:6019: \"$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 @@ -6033,12 +6036,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:6037: checking whether declaration is required for free" >&5 +echo "configure:6040: checking whether declaration is required for free" >&5 if eval "test \"`echo '$''{'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:6056: \"$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 @@ -6070,12 +6073,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:6074: checking whether declaration is required for sbrk" >&5 +echo "configure:6077: checking whether declaration is required for sbrk" >&5 if eval "test \"`echo '$''{'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:6093: \"$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 @@ -6107,12 +6110,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:6111: checking whether declaration is required for environ" >&5 +echo "configure:6114: checking whether declaration is required for environ" >&5 if eval "test \"`echo '$''{'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:6130: \"$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 @@ -6147,12 +6150,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:6151: checking whether declaration is required for errno" >&5 +echo "configure:6154: checking whether declaration is required for errno" >&5 if eval "test \"`echo '$''{'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:6174: \"$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 diff -uprN binutils-2.11.90.0.29/gas/configure.in binutils-2.11.90.0.31/gas/configure.in --- binutils-2.11.90.0.29/gas/configure.in Mon Aug 27 11:44:51 2001 +++ binutils-2.11.90.0.31/gas/configure.in Thu Aug 30 09:30:37 2001 @@ -232,6 +232,7 @@ changequote([,])dnl h8300-*-rtems*) fmt=coff ;; h8300-*-coff) fmt=coff ;; + h8300-*-elf) fmt=elf ;; h8500-*-rtems*) fmt=coff ;; h8500-*-coff) fmt=coff ;; @@ -271,7 +272,8 @@ changequote([,])dnl AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?]) ;; i386-*-rtemself*) fmt=elf ;; - i386-*-rtems*) fmt=coff ;; + i386-*-rtemscoff*) fmt=coff ;; + i386-*-rtems*) fmt=elf ;; i386-*-gnu*) fmt=elf ;; i386-*-mach*) fmt=aout em=mach bfd_gas=yes ;; @@ -314,8 +316,9 @@ changequote([,])dnl m68k-*-sysv4*) # must be before -sysv* fmt=elf em=svr4 ;; m68k-*-elf*) fmt=elf ;; - m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) + m68k-*-coff | m68k-*-sysv* | m68k-*-rtemscoff*) fmt=coff ;; + m68k-*-rtems*) fmt=elf ;; m68k-*-hpux*) fmt=hp300 em=hp300 ;; m68k-*-linux*aout*) fmt=aout em=linux ;; m68k-*-linux-gnu*) fmt=elf em=linux ;; diff -uprN binutils-2.11.90.0.29/gas/doc/internals.texi binutils-2.11.90.0.31/gas/doc/internals.texi --- binutils-2.11.90.0.29/gas/doc/internals.texi Fri Jul 6 09:26:11 2001 +++ binutils-2.11.90.0.31/gas/doc/internals.texi Thu Aug 30 09:30:37 2001 @@ -1274,12 +1274,14 @@ You may define this macro to indicate wh symbol should be adjusted to be against the section symbol. It should return a non-zero value if the adjustment is acceptable. -@item MD_PCREL_FROM_SECTION +@item MD_PCREL_FROM_SECTION (@var{fixp}, @var{section}) @cindex MD_PCREL_FROM_SECTION -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. +If you define this macro, it should return the position from which the PC +relative adjustment for a PC relative fixup 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, plus the address of +the PC relative fixup. The latter can be calculated as +@var{fixp}->fx_where + @var{fixp}->fx_frag->fr_address . @item md_pcrel_from @cindex md_pcrel_from diff -uprN binutils-2.11.90.0.29/gas/testsuite/ChangeLog binutils-2.11.90.0.31/gas/testsuite/ChangeLog --- binutils-2.11.90.0.29/gas/testsuite/ChangeLog Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/gas/testsuite/ChangeLog Thu Aug 30 14:58:40 2001 @@ -1,3 +1,24 @@ +Thu Aug 30 21:58:48 2001 J"orn Rennecke + + * gas/h8300/h8300.exp (do_h8300_cbranch): Remove invocation. + (do_h8300_branch, do_h8300h_cbranch, do_h8300h_branch): Likewise. + (do_h8300s_cbranch, do_h8300s_branch, ffxx1): Likwise. + * gas/h8300/h8300-coff.exp, gas/h8300/h8300-elf.exp: New files. + * gas/h8300/branch-elf.s, gas/h8300/branchh-elf.s: Likewise. + * gas/h8300/branchs-elf.s, gas/h8300/ffxx1-elf.d: Likewise. + * gas/h8300/ffxx1-elf.s: Likewise. + * gas/h8300/branch.s, gas/h8300/branchh.s: Move to: + * gas/h8300/branch-coff.s, gas/h8300/branchh-coff.s + * gas/h8300/branchs.s, gas/h8300/ffxx1.d: Move to: + * gas/h8300/branchs-coff.s, gas/h8300/ffxx1-coff.d . + * gas/h8300/ffxx1.s: Move to: + * gas/h8300/ffxx1-coff.s . + +Wed Aug 29 12:05:13 2001 J"orn Rennecke + + * lib/gas-defs.exp: (regexp_diff) At verbosity 3, also show + where mismatch occurs due to regexp mismatch. + 2001-08-27 Staffan Ulfberg Alan Modra diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branch-coff.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branch-coff.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branch-coff.s Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branch-coff.s Thu Aug 30 14:58:40 2001 @@ -0,0 +1,10 @@ + .text +h8300_branches: + bsr h8300_branches + jmp h8300_branches + jmp @r0 + jmp @@16:8 + jsr h8300_branches + jsr @r0 + jsr @@16:8 + diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branch-elf.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branch-elf.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branch-elf.s Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branch-elf.s Thu Aug 30 14:58:40 2001 @@ -0,0 +1,13 @@ + .section zpage +vector: + .word h8300_branches + .text +h8300_branches: + bsr h8300_branches + jmp h8300_branches + jmp @r0 + jmp @@vector:8 + jsr h8300_branches + jsr @r0 + jsr @@vector:8 + diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branch.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branch.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branch.s Thu Jun 3 11:02:02 1999 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branch.s Wed Dec 31 16:00:00 1969 @@ -1,10 +0,0 @@ - .text -h8300_branches: - bsr h8300_branches - jmp h8300_branches - jmp @r0 - jmp @@16:8 - jsr h8300_branches - jsr @r0 - jsr @@16:8 - diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchh-coff.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchh-coff.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchh-coff.s Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchh-coff.s Thu Aug 30 14:58:40 2001 @@ -0,0 +1,12 @@ + .h8300h + .text +h8300h_branches: + bsr h8300h_branches:8 + bsr h8300h_branches:16 + jmp h8300h_branches + jmp @er0 + jmp @@16:8 + jsr h8300h_branches + jsr @er0 + jsr @@16:8 + diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchh-elf.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchh-elf.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchh-elf.s Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchh-elf.s Thu Aug 30 14:58:40 2001 @@ -0,0 +1,12 @@ + .h8300h + .text +h8300h_branches: + bsr h8300h_branches:8 + bsr h8300h_branches:16 + jmp h8300h_branches + jmp @er0 + jmp @@16:8 + jsr h8300h_branches + jsr @er0 + jsr @@16:8 + diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchh.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchh.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchh.s Thu Jun 3 11:02:02 1999 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchh.s Wed Dec 31 16:00:00 1969 @@ -1,12 +0,0 @@ - .h8300h - .text -h8300h_branches: - bsr h8300h_branches:8 - bsr h8300h_branches:16 - jmp h8300h_branches - jmp @er0 - jmp @@16:8 - jsr h8300h_branches - jsr @er0 - jsr @@16:8 - diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchs-coff.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchs-coff.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchs-coff.s Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchs-coff.s Thu Aug 30 14:58:40 2001 @@ -0,0 +1,12 @@ + .h8300s + .text +h8300s_branches: + bsr h8300s_branches:8 + bsr h8300s_branches:16 + jmp h8300s_branches + jmp @er0 + jmp @@16:8 + jsr h8300s_branches + jsr @er0 + jsr @@16:8 + diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchs-elf.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchs-elf.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchs-elf.s Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchs-elf.s Thu Aug 30 14:58:40 2001 @@ -0,0 +1,12 @@ + .h8300s + .text +h8300s_branches: + bsr h8300s_branches:8 + bsr h8300s_branches:16 + jmp h8300s_branches + jmp @er0 + jmp @@16:8 + jsr h8300s_branches + jsr @er0 + jsr @@16:8 + diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchs.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchs.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/branchs.s Thu Jun 3 11:02:02 1999 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/branchs.s Wed Dec 31 16:00:00 1969 @@ -1,12 +0,0 @@ - .h8300s - .text -h8300s_branches: - bsr h8300s_branches:8 - bsr h8300s_branches:16 - jmp h8300s_branches - jmp @er0 - jmp @@16:8 - jsr h8300s_branches - jsr @er0 - jsr @@16:8 - diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1-coff.d binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1-coff.d --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1-coff.d Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1-coff.d Thu Aug 30 14:58:40 2001 @@ -0,0 +1,23 @@ +#objdump: --prefix-addresses -dr +#name: FFxx1 + +# Test for FFxx:8 addressing. + +.*: file format .*h8300.* + +Disassembly of section .text: + ... + 0: 16 main +0+0400
f8 7f mov.b #0x7f,r0l +0+0402 28 bb mov.b @0xbb:8,r0l +0+0404 6a 88 ff b9 mov.b r0l,@0xffb9:16 +0+0408 f8 01 mov.b #0x1,r0l +0+040a 6a 88 ff bb mov.b r0l,@0xffbb:16 +0+040e 79 01 00 00 mov.w #0x0,r1 +0+0412 0b 01 adds #0x1,er1 +0+0414 46 00 bne .0 \(416\) + 415: DISP8 deloop[+]0xffffffff +0+0416 12 88 rotl r0l +0+0418 40 00 bra .0 \(41a\) + 419: DISP8 loop[+]0xffffffff + ... diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1-coff.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1-coff.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1-coff.s Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1-coff.s Thu Aug 30 14:58:40 2001 @@ -0,0 +1,20 @@ + .equ p6ddr, 0xffb9 ;0x7f for output + .equ p6dr, 0xffbb + .equ seed, 0x01 + .text + .org 0 +reset: .word main ;reset vector +; + .org 0x400 +main: mov.b #0x7f,r0l ;port 6 ddr = 7F + mov.b @0xffbb:8,r0l ;***test*** + mov.b r0l,@p6ddr:16 +; + mov.b #seed,r0l ;start with 0000001 +loop: mov.b r0l,@p6dr:16 ;output to port 6 +delay: mov.w #0x0000,r1 +deloop: adds.w #1,r1 + bne deloop:8 ;not = 0 + rotl r0l + bra loop:8 + .word 0 diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1-elf.d binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1-elf.d --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1-elf.d Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1-elf.d Thu Aug 30 14:58:40 2001 @@ -0,0 +1,22 @@ +#objdump: --prefix-addresses -dr +#name: FFxx1 + +# Test for FFxx:8 addressing. + +.*: file format .*h8300.* + +Disassembly of section .text: +0+0000 04 00 orc #0x0,ccr + 0: R_H8_DIR16 .text[+]0x400 + ... +0+0400
f8 7f mov.b #0x7f,r0l +0+0402 28 bb mov.b @0xbb:8,r0l +0+0404 6a 88 ff b9 mov.b r0l,@0xffb9:16 +0+0408 f8 01 mov.b #0x1,r0l +0+040a 6a 88 ff bb mov.b r0l,@0xffbb:16 +0+040e 79 01 00 00 mov.w #0x0,r1 +0+0412 0b 01 adds #0x1,er1 +0+0414 46 fc bne .-4 \(412\) +0+0416 12 88 rotl r0l +0+0418 40 f0 bra .-16 \(40a\) + ... diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1-elf.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1-elf.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1-elf.s Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1-elf.s Thu Aug 30 14:58:40 2001 @@ -0,0 +1,20 @@ + .equ p6ddr, 0xffb9 ;0x7f for output + .equ p6dr, 0xffbb + .equ seed, 0x01 + .text + .org 0 +reset: .word main ;reset vector +; + .org 0x400 +main: mov.b #0x7f,r0l ;port 6 ddr = 7F + mov.b @0xffbb:8,r0l ;***test*** + mov.b r0l,@p6ddr:16 +; + mov.b #seed,r0l ;start with 0000001 +loop: mov.b r0l,@p6dr:16 ;output to port 6 +delay: mov.w #0x0000,r1 +deloop: adds.w #1,r1 + bne deloop:8 ;not = 0 + rotl r0l + bra loop:8 + .word 0 diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1.d binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1.d --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1.d Thu Jun 3 11:02:02 1999 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1.d Wed Dec 31 16:00:00 1969 @@ -1,23 +0,0 @@ -#objdump: --prefix-addresses -dr -#name: FFxx1 - -# Test for FFxx:8 addressing. - -.*: file format .*h8300.* - -Disassembly of section .text: - ... - 0: 16 main -0+0400
f8 7f mov.b #0x7f,r0l -0+0402 28 bb mov.b @0xbb:8,r0l -0+0404 6a 88 ff b9 mov.b r0l,@0xffb9:16 -0+0408 f8 01 mov.b #0x1,r0l -0+040a 6a 88 ff bb mov.b r0l,@0xffbb:16 -0+040e 79 01 00 00 mov.w #0x0,r1 -0+0412 0b 01 adds #0x1,er1 -0+0414 46 00 bne .0 \(416\) - 415: DISP8 deloop[+]0xffffffff -0+0416 12 88 rotl r0l -0+0418 40 00 bra .0 \(41a\) - 419: DISP8 loop[+]0xffffffff - ... diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1.s binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1.s --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/ffxx1.s Thu Jun 3 11:02:02 1999 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/ffxx1.s Wed Dec 31 16:00:00 1969 @@ -1,20 +0,0 @@ - .equ p6ddr, 0xffb9 ;0x7f for output - .equ p6dr, 0xffbb - .equ seed, 0x01 - .text - .org 0 -reset: .word main ;reset vector -; - .org 0x400 -main: mov.b #0x7f,r0l ;port 6 ddr = 7F - mov.b @0xffbb:8,r0l ;***test*** - mov.b r0l,@p6ddr:16 -; - mov.b #seed,r0l ;start with 0000001 -loop: mov.b r0l,@p6dr:16 ;output to port 6 -delay: mov.w #0x0000,r1 -deloop: adds.w #1,r1 - bne deloop:8 ;not = 0 - rotl r0l - bra loop:8 - .word 0 diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/h8300-coff.exp binutils-2.11.90.0.31/gas/testsuite/gas/h8300/h8300-coff.exp --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/h8300-coff.exp Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/h8300-coff.exp Thu Aug 30 14:58:40 2001 @@ -0,0 +1,283 @@ +# +# Some H8/300 coff tests +# +proc do_h8300_cbranch {} { + set testname "cbranch.s: h8300 conditional branch tests" + set x 0 + + gas_start "cbranch.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 4000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 4000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0004 4100\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 4100\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0008 4200\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 4300\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 4400\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 4400\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0010 4500\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 4500\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 4600\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0016 4700\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0018 4800\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001a 4900\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001c 4A00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001e 4B00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0020 4C00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0022 4D00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0024 4E00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0026 4F00\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 20] then { pass $testname } else { fail $testname } +} + +proc do_h8300_branch {} { + set testname "branch.s: h8300 branch tests" + set x 0 + + gas_start "branch-coff.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 5500\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 5A000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 5900\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0008 5B00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 5E000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 5D00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0010 5F00\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 7] then { pass $testname } else { fail $testname } +} + +proc do_h8300h_cbranch {} { + set testname "cbranchh.s: h8300h conditional branch tests" + set x 0 + + gas_start "cbranchh.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 4000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 4000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0004 4100\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 4100\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0008 4200\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 4300\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 4400\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 4400\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0010 4500\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 4500\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 4600\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0016 4700\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0018 4800\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001a 4900\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001c 4A00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001e 4B00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0020 4C00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0022 4D00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0024 4E00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0026 4F00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0028 58000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 002c 58000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0030 58100000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0034 58100000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0038 58200000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 003c 58300000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0040 58400000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0044 58400000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0048 58500000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 004c 58500000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0050 58600000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0054 58700000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0058 58800000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 005c 58900000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0060 58A00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0064 58B00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0068 58C00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 006c 58D00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0070 58E00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0074 58F00000\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 40] then { pass $testname } else { fail $testname } +} + +proc do_h8300h_branch {} { + set testname "branchh.s: h8300h branch tests" + set x 0 + + gas_start "branchh-coff.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 5500\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 5C000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 5A000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 5900\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 5B00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 5E000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 5D00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 5F00\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 8] then { pass $testname } else { fail $testname } +} + +proc do_h8300s_cbranch {} { + set testname "cbranchs.s: h8300s conditional branch tests" + set x 0 + + gas_start "cbranchs.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 4000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 4000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0004 4100\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 4100\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0008 4200\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 4300\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 4400\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 4400\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0010 4500\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 4500\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 4600\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0016 4700\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0018 4800\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001a 4900\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001c 4A00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001e 4B00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0020 4C00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0022 4D00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0024 4E00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0026 4F00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0028 58000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 002c 58000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0030 58100000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0034 58100000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0038 58200000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 003c 58300000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0040 58400000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0044 58400000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0048 58500000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 004c 58500000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0050 58600000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0054 58700000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0058 58800000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 005c 58900000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0060 58A00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0064 58B00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0068 58C00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 006c 58D00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0070 58E00000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0074 58F00000\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 40] then { pass $testname } else { fail $testname } +} + +proc do_h8300s_branch {} { + set testname "branchs.s: h8300s branch tests" + set x 0 + + gas_start "branchs-coff.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 5500\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 5C000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 5A000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 5900\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 5B00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 5E000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 5D00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 5F00\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 8] then { pass $testname } else { fail $testname } +} + +if { [istarget h8300*-*-coff] + || [istarget h8300*-*-hms*] + || [istarget h8300*-*-rtems*] } then { + + # Test the basic h8300 instruction parser + do_h8300_cbranch + do_h8300_branch + + # Now test the h8300h instruction parser + do_h8300h_cbranch + do_h8300h_branch + + # Now test the h8300s instruction parser + do_h8300s_cbranch + do_h8300s_branch + + # Now some random tests + run_dump_test "ffxx1-coff" +} diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/h8300-elf.exp binutils-2.11.90.0.31/gas/testsuite/gas/h8300/h8300-elf.exp --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/h8300-elf.exp Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/h8300-elf.exp Thu Aug 30 14:58:40 2001 @@ -0,0 +1,280 @@ +# +# Some H8/300 elf tests +# +proc do_h8300_cbranch {} { + set testname "cbranch.s: h8300 conditional branch tests" + set x 0 + + gas_start "cbranch.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 40FE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 40FC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0004 41FA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 41F8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0008 42F6\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 43F4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 44F2\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 44F0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0010 45EE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 45EC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 46EA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0016 47E8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0018 48E6\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001a 49E4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001c 4AE2\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001e 4BE0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0020 4CDE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0022 4DDC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0024 4EDA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0026 4FD8\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 20] then { pass $testname } else { fail $testname } +} + +proc do_h8300_branch {} { + set testname "branch.s: h8300 branch tests" + set x 0 + + gas_start "branch-elf.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 55FE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 5A000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 5900\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0008 5B00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 5E000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 5D00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0010 5F00\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 7] then { pass $testname } else { fail $testname } +} + +proc do_h8300h_cbranch {} { + set testname "cbranchh.s: h8300h conditional branch tests" + set x 0 + + gas_start "cbranchh.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 40FE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 40FC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0004 41FA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 41F8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0008 42F6\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 43F4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 44F2\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 44F0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0010 45EE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 45EC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 46EA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0016 47E8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0018 48E6\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001a 49E4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001c 4AE2\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001e 4BE0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0020 4CDE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0022 4DDC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0024 4EDA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0026 4FD8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0028 5800FFD4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 002c 5800FFD0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0030 5810FFCC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0034 5810FFC8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0038 5820FFC4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 003c 5830FFC0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0040 5840FFBC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0044 5840FFB8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0048 5850FFB4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 004c 5850FFB0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0050 5860FFAC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0054 5870FFA8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0058 5880FFA4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 005c 5890FFA0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0060 58A0FF9C\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0064 58B0FF98\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0068 58C0FF94\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 006c 58D0FF90\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0070 58E0FF8C\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0074 58F0FF88\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 40] then { pass $testname } else { fail $testname } +} + +proc do_h8300h_branch {} { + set testname "branchh.s: h8300h branch tests" + set x 0 + + gas_start "branchh-elf.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 55FE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 5C00FFFA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 5A000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 5900\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 5B10\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 5E000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 5D00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 5F10\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 8] then { pass $testname } else { fail $testname } +} + +proc do_h8300s_cbranch {} { + set testname "cbranchs.s: h8300s conditional branch tests" + set x 0 + + gas_start "cbranchs.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 40FE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 40FC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0004 41FA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 41F8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0008 42F6\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 43F4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 44F2\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 44F0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0010 45EE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 45EC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 46EA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0016 47E8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0018 48E6\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001a 49E4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001c 4AE2\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 001e 4BE0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0020 4CDE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0022 4DDC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0024 4EDA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0026 4FD8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0028 5800FFD4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 002c 5800FFD0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0030 5810FFCC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0034 5810FFC8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0038 5820FFC4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 003c 5830FFC0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0040 5840FFBC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0044 5840FFB8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0048 5850FFB4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 004c 5850FFB0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0050 5860FFAC\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0054 5870FFA8\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0058 5880FFA4\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 005c 5890FFA0\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0060 58A0FF9C\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0064 58B0FF98\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0068 58C0FF94\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 006c 58D0FF90\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0070 58E0FF8C\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0074 58F0FF88\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 40] then { pass $testname } else { fail $testname } +} + +proc do_h8300s_branch {} { + set testname "branchs.s: h8300s branch tests" + set x 0 + + gas_start "branchs-elf.s" "-al" + + # Check each instruction bit pattern to verify it got + # assembled correctly. + while 1 { + expect { + -re " +\[0-9\]+ 0000 55FE\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0002 5C00FFFA\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0006 5A000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000a 5900\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000c 5B10\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 000e 5E000000\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0012 5D00\[^\n\]*\n" { set x [expr $x+1] } + -re " +\[0-9\]+ 0014 5F10\[^\n\]*\n" { set x [expr $x+1] } + timeout { perror "timeout\n; break } + eof { break } + } + } + + # This was intended to do any cleanup necessary. It kinda looks like it + # isn't needed, but just in case, please keep it in for now. + gas_finish + + # Did we find what we were looking for? If not, flunk it. + if [expr $x == 8] then { pass $testname } else { fail $testname } +} + +if [istarget h8300*-*-elf] then { + # Test the basic h8300 instruction parser + do_h8300_cbranch + do_h8300_branch + + # Now test the h8300h instruction parser + do_h8300h_cbranch + do_h8300h_branch + + # Now test the h8300s instruction parser + do_h8300s_cbranch + do_h8300s_branch + + # Now some random tests + run_dump_test "ffxx1-elf" +} diff -uprN binutils-2.11.90.0.29/gas/testsuite/gas/h8300/h8300.exp binutils-2.11.90.0.31/gas/testsuite/gas/h8300/h8300.exp --- binutils-2.11.90.0.29/gas/testsuite/gas/h8300/h8300.exp Sat Jul 1 12:31:35 2000 +++ binutils-2.11.90.0.31/gas/testsuite/gas/h8300/h8300.exp Thu Aug 30 14:58:40 2001 @@ -2111,12 +2111,10 @@ if [istarget h8300*-*-*] then { # Test the basic h8300 instruction parser do_h8300_add_sub do_h8300_logical - do_h8300_cbranch do_h8300_bitops1 do_h8300_bitops2 do_h8300_bitops3 do_h8300_bitops4 - do_h8300_branch do_h8300_compare do_h8300_decimal do_h8300_incdec @@ -2130,12 +2128,10 @@ if [istarget h8300*-*-*] then { # Now test the h8300h instruction parser do_h8300h_add_sub do_h8300h_logical - do_h8300h_cbranch do_h8300h_bitops1 do_h8300h_bitops2 do_h8300h_bitops3 do_h8300h_bitops4 - do_h8300h_branch do_h8300h_compare do_h8300h_decimal do_h8300h_incdec @@ -2151,12 +2147,10 @@ if [istarget h8300*-*-*] then { # Now test the h8300s instruction parser do_h8300s_add_sub do_h8300s_logical - do_h8300s_cbranch do_h8300s_bitops1 do_h8300s_bitops2 do_h8300s_bitops3 do_h8300s_bitops4 - do_h8300s_branch do_h8300s_compare do_h8300s_decimal do_h8300s_incdec @@ -2178,6 +2172,5 @@ if [istarget h8300*-*-*] then { set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ] set aout [expr [istarget *-*-bsd*] || [istarget *-*-netbsd*]] - run_dump_test "ffxx1" gas_test "cmpsi2.s" "" "" "cmpsi2.s" } diff -uprN binutils-2.11.90.0.29/gas/testsuite/lib/gas-defs.exp binutils-2.11.90.0.31/gas/testsuite/lib/gas-defs.exp --- binutils-2.11.90.0.29/gas/testsuite/lib/gas-defs.exp Fri Apr 6 15:34:11 2001 +++ binutils-2.11.90.0.31/gas/testsuite/lib/gas-defs.exp Thu Aug 30 09:30:37 2001 @@ -539,6 +539,7 @@ proc regexp_diff { file_1 file_2 } { if ![regexp "^$line_b$" "$line_a"] { send_log "regexp_diff match failure\n" send_log "regexp \"^$line_b$\"\nline \"$line_a\"\n" + verbose "regexp_diff match failure\n" 3 set differences 1 } } diff -uprN binutils-2.11.90.0.29/include/ChangeLog binutils-2.11.90.0.31/include/ChangeLog --- binutils-2.11.90.0.29/include/ChangeLog Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/include/ChangeLog Thu Aug 30 09:30:37 2001 @@ -1,3 +1,11 @@ +2001-08-29 Kaveh R. Ghazi + + * ansidecl.h: Update comments reflecting previous change. + +2001-08-27 Kaveh R. Ghazi + + * ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses. + 2001-08-25 Nick Clifton * bfdlink.h (struct bfd_link_info): Change 'spare_dynamic_tags' to diff -uprN binutils-2.11.90.0.29/include/ChangeLog.linux binutils-2.11.90.0.31/include/ChangeLog.linux --- binutils-2.11.90.0.29/include/ChangeLog.linux Sat Feb 3 15:13:05 2001 +++ binutils-2.11.90.0.31/include/ChangeLog.linux Thu Aug 30 09:30:37 2001 @@ -1,3 +1,7 @@ +2001-08-30 H.J. Lu (hjl@gnu.org) + + * bin-bugs.h (REPORT_BUGS_TO): Remove the extra `and'. + 2001-02-03 H.J. Lu (hjl@gnu.org) * demangle.h (demangler_list_buffer): Removed. diff -uprN binutils-2.11.90.0.29/include/ansidecl.h binutils-2.11.90.0.31/include/ansidecl.h --- binutils-2.11.90.0.29/include/ansidecl.h Wed Aug 22 08:52:10 2001 +++ binutils-2.11.90.0.31/include/ansidecl.h Thu Aug 30 09:30:37 2001 @@ -93,11 +93,13 @@ Foundation, Inc., 59 Temple Place - Suit You can declare variables either before or after the VA_OPEN, - VA_FIXEDARG sequence. You can _not_ put statements before VA_OPEN. - Also, VA_OPEN and VA_CLOSE are the beginning and end of a block. - They must appear at the same nesting level, and any variables - declared after VA_OPEN go out of scope at VA_CLOSE. Unfortunately, - with a K+R compiler, that includes the argument list. + VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning + and end of a block. They must appear at the same nesting level, + and any variables declared after VA_OPEN go out of scope at + VA_CLOSE. Unfortunately, with a K+R compiler, that includes the + argument list. You can have multiple instances of VA_OPEN/VA_CLOSE + pairs in a single function in case you need to traverse the + argument list more than once. For ease of writing code which uses GCC extensions but needs to be portable to other compilers, we provide the GCC_VERSION macro that @@ -152,8 +154,8 @@ So instead we use the macro below and te /* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's use without inhibiting further decls and without declaring an actual variable. */ -#define VA_OPEN(AP, VAR) va_list AP; va_start(AP, VAR); { struct Qdmy -#define VA_CLOSE(AP) } va_end(AP) +#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy +#define VA_CLOSE(AP) } va_end(AP); } #define VA_FIXEDARG(AP, T, N) struct Qdmy #undef const @@ -199,8 +201,8 @@ So instead we use the macro below and te #define VPARAMS(args) (va_alist) va_dcl #define VA_START(va_list, var) va_start(va_list) -#define VA_OPEN(AP, VAR) va_list AP; va_start(AP); { struct Qdmy -#define VA_CLOSE(AP) } va_end(AP) +#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy +#define VA_CLOSE(AP) } va_end(AP); } #define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE) /* some systems define these in header files for non-ansi mode */ diff -uprN binutils-2.11.90.0.29/include/bin-bugs.h binutils-2.11.90.0.31/include/bin-bugs.h --- binutils-2.11.90.0.29/include/bin-bugs.h Tue Jan 23 12:11:17 2001 +++ binutils-2.11.90.0.31/include/bin-bugs.h Thu Aug 30 09:30:37 2001 @@ -1,3 +1,3 @@ #ifndef REPORT_BUGS_TO -#define REPORT_BUGS_TO "bug-binutils@gnu.org and and hjl@lucon.org" +#define REPORT_BUGS_TO "bug-binutils@gnu.org and hjl@lucon.org" #endif diff -uprN binutils-2.11.90.0.29/include/elf/ChangeLog binutils-2.11.90.0.31/include/elf/ChangeLog --- binutils-2.11.90.0.29/include/elf/ChangeLog Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/include/elf/ChangeLog Thu Aug 30 09:30:37 2001 @@ -1,3 +1,13 @@ +2001-08-29 Jeff Law + + * h8.h (EF_H8_MACH): New mask for encoded machine type. + (E_H8_MACH_H8300, E_H8_MACH_H8300H, E_H8_MACH_H8300S): New + machine types. + +Tue Aug 26 23:32:34 2001 J"orn Rennecke + + * h8.h: New file. + 2001-08-27 Staffan Ulfberg * ppc.h: Add relocs from the 64-bit PowerPC ELF ABI revision 1.2. diff -uprN binutils-2.11.90.0.29/include/elf/h8.h binutils-2.11.90.0.31/include/elf/h8.h --- binutils-2.11.90.0.29/include/elf/h8.h Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/include/elf/h8.h Thu Aug 30 09:30:37 2001 @@ -0,0 +1,96 @@ +/* H8300/h8500 ELF support for BFD. + Copyright 2001 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _ELF_H8_H +#define _ELF_H8_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +/* Relocations 59..63 are GNU extensions. */ +START_RELOC_NUMBERS (elf_h8_reloc_type) + RELOC_NUMBER (R_H8_NONE, 0) + RELOC_NUMBER (R_H8_DIR32, 1) + RELOC_NUMBER (R_H8_DIR32_28, 2) + RELOC_NUMBER (R_H8_DIR32_24, 3) + RELOC_NUMBER (R_H8_DIR32_16, 4) + RELOC_NUMBER (R_H8_DIR32U, 6) + RELOC_NUMBER (R_H8_DIR32U_28, 7) + RELOC_NUMBER (R_H8_DIR32U_24, 8) + RELOC_NUMBER (R_H8_DIR32U_20, 9) + RELOC_NUMBER (R_H8_DIR32U_16, 10) + RELOC_NUMBER (R_H8_DIR24, 11) + RELOC_NUMBER (R_H8_DIR24_20, 12) + RELOC_NUMBER (R_H8_DIR24_16, 13) + RELOC_NUMBER (R_H8_DIR24U, 14) + RELOC_NUMBER (R_H8_DIR24U_20, 15) + RELOC_NUMBER (R_H8_DIR24U_16, 16) + RELOC_NUMBER (R_H8_DIR16, 17) + RELOC_NUMBER (R_H8_DIR16U, 18) + RELOC_NUMBER (R_H8_DIR16S_32, 19) + RELOC_NUMBER (R_H8_DIR16S_28, 20) + RELOC_NUMBER (R_H8_DIR16S_24, 21) + RELOC_NUMBER (R_H8_DIR16S_20, 22) + RELOC_NUMBER (R_H8_DIR16S, 23) + RELOC_NUMBER (R_H8_DIR8, 24) + RELOC_NUMBER (R_H8_DIR8U, 25) + RELOC_NUMBER (R_H8_DIR8Z_32, 26) + RELOC_NUMBER (R_H8_DIR8Z_28, 27) + RELOC_NUMBER (R_H8_DIR8Z_24, 28) + RELOC_NUMBER (R_H8_DIR8Z_20, 29) + RELOC_NUMBER (R_H8_DIR8Z_16, 30) + RELOC_NUMBER (R_H8_PCREL16, 31) + RELOC_NUMBER (R_H8_PCREL8, 32) + RELOC_NUMBER (R_H8_BPOS, 33) + FAKE_RELOC (R_H8_FIRST_INVALID_DIR_RELOC, 34) + FAKE_RELOC (R_H8_LAST_INVALID_DIR_RELOC, 58) + RELOC_NUMBER (R_H8_DIR16A8, 59) + RELOC_NUMBER (R_H8_DIR16R8, 60) + RELOC_NUMBER (R_H8_DIR24A8, 61) + RELOC_NUMBER (R_H8_DIR24R8, 62) + RELOC_NUMBER (R_H8_DIR32A16, 63) + RELOC_NUMBER (R_H8_ABS32, 65) + RELOC_NUMBER (R_H8_ABS32A16, 127) + RELOC_NUMBER (R_H8_SYM, 128) + RELOC_NUMBER (R_H8_OPneg, 129) + RELOC_NUMBER (R_H8_OPadd, 130) + RELOC_NUMBER (R_H8_OPsub, 131) + RELOC_NUMBER (R_H8_OPmul, 132) + RELOC_NUMBER (R_H8_OPdiv, 133) + RELOC_NUMBER (R_H8_OPshla, 134) + RELOC_NUMBER (R_H8_OPshra, 135) + RELOC_NUMBER (R_H8_OPsctsize, 136) + RELOC_NUMBER (R_H8_OPhword, 137) + RELOC_NUMBER (R_H8_OPlword, 138) + RELOC_NUMBER (R_H8_OPhigh, 139) + RELOC_NUMBER (R_H8_OPlow, 140) + RELOC_NUMBER (R_H8_OPscttop, 141) +END_RELOC_NUMBERS (R_H8_max) + +/* Machine variant if we know it. This field was invented at Cygnus, + but it is hoped that other vendors will adopt it. If some standard + is developed, this code should be changed to follow it. */ + +#define EF_H8_MACH 0x00FF0000 + +#define E_H8_MACH_H8300 0x00800000 +#define E_H8_MACH_H8300H 0x00810000 +#define E_H8_MACH_H8300S 0x00820000 + +#endif diff -uprN binutils-2.11.90.0.29/ld/ChangeLog binutils-2.11.90.0.31/ld/ChangeLog --- binutils-2.11.90.0.29/ld/ChangeLog Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/ld/ChangeLog Thu Aug 30 09:30:37 2001 @@ -1,3 +1,29 @@ +2001-08-29 Joel Sherrill + + * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change + default from coff to elf. + +2001-08-29 Jeff Law + + * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update + ARCH specification. + * emulparams/h8300self.sh: Similarly. + +Wed Aug 28 13:37:20 2001 J"orn Rennecke + + * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and + eh8300self.o . + (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets. + * configure.tgt (h8300-*-elf*): New case. + * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files. + * emulparams/h8300self.sh: New file. + * Makefile.in: Regenerated. + +2001-08-28 Nick Clifton + + * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision + with macro name. + 2001-08-27 Linus Nordberg Alan Modra diff -uprN binutils-2.11.90.0.29/ld/Makefile.am binutils-2.11.90.0.31/ld/Makefile.am --- binutils-2.11.90.0.29/ld/Makefile.am Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/ld/Makefile.am Thu Aug 30 09:30:37 2001 @@ -171,6 +171,9 @@ ALL_EMULATIONS = \ eh8300.o \ eh8300h.o \ eh8300s.o \ + eh8300elf.o \ + eh8300helf.o \ + eh8300self.o \ eh8500.o \ eh8500b.o \ eh8500c.o \ @@ -573,6 +576,15 @@ eh8300h.c: $(srcdir)/emulparams/h8300h.s eh8300s.c: $(srcdir)/emulparams/h8300s.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8300s "$(tdir_h8300s)" +eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)" +eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300helf "$(tdir_h8300helf)" +eh8300self.c: $(srcdir)/emulparams/h8300self.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300self "$(tdir_h8300self)" eh8500.c: $(srcdir)/emulparams/h8500.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8500 "$(tdir_h8500)" diff -uprN binutils-2.11.90.0.29/ld/Makefile.in binutils-2.11.90.0.31/ld/Makefile.in --- binutils-2.11.90.0.29/ld/Makefile.in Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/ld/Makefile.in Thu Aug 30 09:30:37 2001 @@ -279,6 +279,9 @@ ALL_EMULATIONS = \ eh8300.o \ eh8300h.o \ eh8300s.o \ + eh8300elf.o \ + eh8300helf.o \ + eh8300self.o \ eh8500.o \ eh8500b.o \ eh8500c.o \ @@ -478,7 +481,7 @@ deffilep.c ldgram.c ldlex.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES) OBJECTS = $(ld_new_OBJECTS) @@ -1287,6 +1290,15 @@ eh8300h.c: $(srcdir)/emulparams/h8300h.s eh8300s.c: $(srcdir)/emulparams/h8300s.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8300s "$(tdir_h8300s)" +eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)" +eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300helf "$(tdir_h8300helf)" +eh8300self.c: $(srcdir)/emulparams/h8300self.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300self "$(tdir_h8300self)" eh8500.c: $(srcdir)/emulparams/h8500.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8500 "$(tdir_h8500)" diff -uprN binutils-2.11.90.0.29/ld/configure.tgt binutils-2.11.90.0.31/ld/configure.tgt --- binutils-2.11.90.0.29/ld/configure.tgt Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/ld/configure.tgt Thu Aug 30 09:30:37 2001 @@ -123,8 +123,9 @@ i[3456]86-*-sco*) targ_emul=i386coff ;; i[3456]86-*-isc*) targ_emul=i386coff ;; i[3456]86-*-lynxos*) targ_emul=i386lynx ;; i[3456]86-*-coff) targ_emul=i386coff ;; +i[3456]86-*-rtemscoff*) targ_emul=i386coff ;; i[3456]86-*-rtemself*) targ_emul=elf_i386 ;; -i[3456]86-*-rtems*) targ_emul=i386coff ;; +i[3456]86-*-rtems*) targ_emul=elf_i386 ;; i[3456]86-*-bsd) targ_emul=i386bsd ;; i[3456]86-*-bsd386) targ_emul=i386bsd ;; i[3456]86-*-bsdi*) targ_emul=i386bsd ;; @@ -217,6 +218,10 @@ xscale-*-elf) targ_emul=armelf ;; h8300-*-hms* | h8300-*-coff* | h8300-*-rtems*) targ_emul=h8300; targ_extra_emuls="h8300h h8300s" ;; +h8300-*-elf*) + targ_emul=h8300elf; + targ_extra_emuls="h8300helf h8300self" + ;; h8500-*-hms* | h8500-*-coff*) targ_emul=h8500 targ_extra_emuls="h8500s h8500b h8500m h8500c" @@ -252,7 +257,8 @@ m68*-*-lynxos*) targ_emul=m68klynx ;; m68*-hp*-netbsd*) targ_emul=m68k4knbsd ;; m68*-*-netbsd*) targ_emul=m68knbsd ;; m68*-*-psos*) targ_emul=m68kpsos ;; -m68*-*-rtems*) targ_emul=m68kcoff ;; +m68*-*-rtemscoff*) targ_emul=m68kcoff ;; +m68*-*-rtems*) targ_emul=m68kelf ;; hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;; hppa*64*-*) targ_emul=elf64hppa ;; hppa*-*-linux-gnu*) targ_emul=hppalinux ;; diff -uprN binutils-2.11.90.0.29/ld/emulparams/h8300elf.sh binutils-2.11.90.0.31/ld/emulparams/h8300elf.sh --- binutils-2.11.90.0.29/ld/emulparams/h8300elf.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/ld/emulparams/h8300elf.sh Thu Aug 30 09:30:37 2001 @@ -0,0 +1,12 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-h8300" +TEXT_START_ADDR=0x100 +MAXPAGESIZE=2 +TARGET_PAGE_SIZE=128 +ARCH=h8300 +TEMPLATE_NAME=elf32 +EMBEDDED=yes + +OTHER_RELOCATING_SECTIONS=' +.stack 0xfefc : { _stack = .; *(.stack) } +' diff -uprN binutils-2.11.90.0.29/ld/emulparams/h8300helf.sh binutils-2.11.90.0.31/ld/emulparams/h8300helf.sh --- binutils-2.11.90.0.29/ld/emulparams/h8300helf.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/ld/emulparams/h8300helf.sh Thu Aug 30 09:30:37 2001 @@ -0,0 +1,12 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-h8300" +TEXT_START_ADDR=0x100 +MAXPAGESIZE=2 +TARGET_PAGE_SIZE=128 +ARCH="h8300:h8300h" +TEMPLATE_NAME=elf32 +EMBEDDED=yes + +OTHER_RELOCATING_SECTIONS=' +.stack 0xfefc : { _stack = .; *(.stack) } +' diff -uprN binutils-2.11.90.0.29/ld/emulparams/h8300self.sh binutils-2.11.90.0.31/ld/emulparams/h8300self.sh --- binutils-2.11.90.0.29/ld/emulparams/h8300self.sh Wed Dec 31 16:00:00 1969 +++ binutils-2.11.90.0.31/ld/emulparams/h8300self.sh Thu Aug 30 09:30:37 2001 @@ -0,0 +1,12 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-h8300" +TEXT_START_ADDR=0x100 +MAXPAGESIZE=2 +TARGET_PAGE_SIZE=128 +ARCH="h8300:h8300s" +TEMPLATE_NAME=elf32 +EMBEDDED=yes + +OTHER_RELOCATING_SECTIONS=' +.stack 0xfefc : { _stack = .; *(.stack) } +' diff -uprN binutils-2.11.90.0.29/ld/ldmain.c binutils-2.11.90.0.31/ld/ldmain.c --- binutils-2.11.90.0.29/ld/ldmain.c Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/ld/ldmain.c Thu Aug 30 09:30:37 2001 @@ -348,12 +348,12 @@ main (argc, argv) if (saved_script_handle) { - static const int BSIZE = 8192; + static const int BufferSize = 8192; size_t n; - char *buf = xmalloc (BSIZE); + char *buf = xmalloc (BufferSize); rewind (saved_script_handle); - while ((n = fread (buf, 1, BSIZE - 1, saved_script_handle)) > 0) + while ((n = fread (buf, 1, BufferSize - 1, saved_script_handle)) > 0) { buf [n] = 0; info_msg (buf); diff -uprN binutils-2.11.90.0.29/libiberty/ChangeLog binutils-2.11.90.0.31/libiberty/ChangeLog --- binutils-2.11.90.0.29/libiberty/ChangeLog Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/libiberty/ChangeLog Thu Aug 30 09:30:37 2001 @@ -1,3 +1,7 @@ +2001-08-27 Kaveh R. Ghazi + + * concat.c (concat): Use VPARAMS, VA_OPEN, VA_FIXEDARG & VA_CLOSE. + 2001-08-23 Ulrich Drepper * regex.c (truncate_wchar): Use wcrtomb not wctomb. diff -uprN binutils-2.11.90.0.29/libiberty/concat.c binutils-2.11.90.0.31/libiberty/concat.c --- binutils-2.11.90.0.29/libiberty/concat.c Sat Aug 4 19:52:15 2001 +++ binutils-2.11.90.0.31/libiberty/concat.c Thu Aug 30 09:30:37 2001 @@ -74,48 +74,29 @@ NOTES # endif # endif -/* VARARGS */ -#ifdef ANSI_PROTOTYPES char * -concat (const char *first, ...) -#else -char * -concat (va_alist) - va_dcl -#endif +concat VPARAMS ((const char *first, ...)) { register size_t length; register char *newstr; register char *end; register const char *arg; - va_list args; -#ifndef ANSI_PROTOTYPES - const char *first; -#endif /* First compute the size of the result and get sufficient memory. */ -#ifdef ANSI_PROTOTYPES - va_start (args, first); -#else - va_start (args); - first = va_arg (args, const char *); -#endif - + VA_OPEN (args, first); + VA_FIXEDARG (args, const char *, first); + length = 0; for (arg = first; arg ; arg = va_arg (args, const char *)) length += strlen (arg); - va_end (args); + VA_CLOSE (args); newstr = (char *) xmalloc (length + 1); /* Now copy the individual pieces to the result string. */ -#ifdef ANSI_PROTOTYPES - va_start (args, first); -#else - va_start (args); - first = va_arg (args, const char *); -#endif + VA_OPEN (args, first); + VA_FIXEDARG (args, const char *, first); end = newstr; for (arg = first; arg ; arg = va_arg (args, const char *)) @@ -125,7 +106,7 @@ concat (va_alist) end += length; } *end = '\000'; - va_end (args); + VA_CLOSE (args); return newstr; } diff -uprN binutils-2.11.90.0.29/mips/ChangeLog binutils-2.11.90.0.31/mips/ChangeLog --- binutils-2.11.90.0.29/mips/ChangeLog Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/mips/ChangeLog Thu Aug 30 09:30:37 2001 @@ -1,3 +1,9 @@ +2001-08-30 H.J. Lu + + * README: Remove binutils-mips-reloc.patch. + + * binutils-mips64.patch: Updated. + 2001-08-27 H.J. Lu * gas-mips-dwarf2.patch: Removed. diff -uprN binutils-2.11.90.0.29/mips/README binutils-2.11.90.0.31/mips/README --- binutils-2.11.90.0.29/mips/README Sat Aug 4 19:52:15 2001 +++ binutils-2.11.90.0.31/mips/README Thu Aug 30 09:30:37 2001 @@ -14,8 +14,6 @@ dir=`dirname $0` -#patch -p1 -b --suffix .reloc < $dir/binutils-mips-reloc.patch - patch -p1 -b --suffix .mips64 < $dir/binutils-mips64.patch && \ patch -p0 -b --suffix .mips < $dir/gas-mips.patch find -name "*.rej" | grep rej && exit 1 diff -uprN binutils-2.11.90.0.29/mips/binutils-mips64.patch binutils-2.11.90.0.31/mips/binutils-mips64.patch --- binutils-2.11.90.0.29/mips/binutils-mips64.patch Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/mips/binutils-mips64.patch Thu Aug 30 09:30:37 2001 @@ -1,6 +1,6 @@ ---- binutils/bfd/config.bfd.mips64 Mon Aug 27 08:51:39 2001 -+++ binutils/bfd/config.bfd Mon Aug 27 09:08:29 2001 -@@ -677,6 +677,16 @@ case "${targ}" in +--- binutils/bfd/config.bfd.mips64 Thu Aug 30 08:38:01 2001 ++++ binutils/bfd/config.bfd Thu Aug 30 08:46:43 2001 +@@ -686,6 +686,16 @@ case "${targ}" in targ_defvec=bfd_elf32_littlemips_vec targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec" ;; @@ -17,8 +17,8 @@ mips*el*-*-linux-gnu*) targ_defvec=bfd_elf32_tradlittlemips_vec targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec" ---- binutils/bfd/elf32-mips.c.mips64 Mon Aug 27 08:51:56 2001 -+++ binutils/bfd/elf32-mips.c Mon Aug 27 09:08:29 2001 +--- binutils/bfd/elf32-mips.c.mips64 Thu Aug 30 08:38:16 2001 ++++ binutils/bfd/elf32-mips.c Thu Aug 30 08:46:43 2001 @@ -1989,7 +1989,9 @@ static CONST struct elf_reloc_map mips_r { BFD_RELOC_MIPS_SUB, R_MIPS_SUB }, { BFD_RELOC_MIPS_GOT_PAGE, R_MIPS_GOT_PAGE }, @@ -40,7 +40,7 @@ BFD_ASSERT (hsd.max_non_got_dynindx <= hsd.min_got_dynindx); --- binutils/bfd/elf64-mips.c.mips64 Fri Aug 17 09:17:31 2001 -+++ binutils/bfd/elf64-mips.c Mon Aug 27 09:08:29 2001 ++++ binutils/bfd/elf64-mips.c Thu Aug 30 08:46:44 2001 @@ -1278,11 +1278,11 @@ mips_elf64_be_swap_reloc_in (abfd, src, &mirel); @@ -131,7 +131,7 @@ #include "elf64-target.h" --- binutils/configure.in.mips64 Thu May 24 23:17:50 2001 -+++ binutils/configure.in Mon Aug 27 09:08:29 2001 ++++ binutils/configure.in Thu Aug 30 08:46:44 2001 @@ -854,13 +854,12 @@ case "${target}" in noconfigdirs="$noconfigdirs ld gprof emacs target-libgloss" ;; @@ -147,8 +147,8 @@ ;; mips*-dec-bsd*) noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi" ---- binutils/gas/config/tc-mips.c.mips64 Mon Aug 27 08:52:38 2001 -+++ binutils/gas/config/tc-mips.c Mon Aug 27 09:26:54 2001 +--- binutils/gas/config/tc-mips.c.mips64 Thu Aug 30 08:38:52 2001 ++++ binutils/gas/config/tc-mips.c Thu Aug 30 08:46:44 2001 @@ -109,6 +109,10 @@ extern int target_big_endian; 64 bit [e.g. --target=mips64-elf]. */ static int mips_64; @@ -672,15 +672,6 @@ } /* set_at() -@@ -3330,7 +3429,7 @@ load_address (counter, reg, ep) - lui $reg, (BFD_RELOC_HI16_S) - addiu $reg,$reg, (BFD_RELOC_LO16) - If we have an addend, we always use the latter form. */ -- if ((valueT) ep->X_add_number >= MAX_GPREL_OFFSET -+ if ((valueT) ep->X_add_number > MAX_GPREL_OFFSET - || nopic_need_relax (ep->X_add_symbol, 1)) - p = NULL; - else @@ -3366,7 +3465,7 @@ load_address (counter, reg, ep) ep->X_add_number = 0; frag_grow (20); @@ -708,15 +699,6 @@ "t,o(b)", reg, (int) BFD_RELOC_MIPS_GOT16, GP); p += 4; macro_build (p, counter, (expressionS *) NULL, "nop", ""); -@@ -4226,7 +4325,7 @@ macro (ip) - addiu $tempreg,$tempreg, (BFD_RELOC_LO16) - If we have a constant, we need two instructions anyhow, - so we may as well always use the latter form. */ -- if ((valueT) offset_expr.X_add_number >= MAX_GPREL_OFFSET -+ if ((valueT) offset_expr.X_add_number > MAX_GPREL_OFFSET - || nopic_need_relax (offset_expr.X_add_symbol, 1)) - p = NULL; - else @@ -4241,12 +4340,48 @@ macro (ip) offset_expr.X_add_symbol, (offsetT) 0, (char *) NULL); @@ -1603,9 +1585,9 @@ #ifdef OBJ_ELF /* This function is called after the relocs have been generated. ---- binutils/ld/configure.tgt.mips64 Mon Aug 27 08:53:03 2001 -+++ binutils/ld/configure.tgt Mon Aug 27 09:08:29 2001 -@@ -286,6 +286,12 @@ mips*el-*-rtems*) targ_emul=elf32elmip ; +--- binutils/ld/configure.tgt.mips64 Thu Aug 30 08:39:22 2001 ++++ binutils/ld/configure.tgt Thu Aug 30 08:46:44 2001 +@@ -292,6 +292,12 @@ mips*el-*-rtems*) targ_emul=elf32elmip ; mips*-*-rtems*) targ_emul=elf32ebmip ;; mips*el-*-vxworks*) targ_emul=elf32elmip ;; mips*-*-vxworks*) targ_emul=elf32ebmip ;; diff -uprN binutils-2.11.90.0.29/opcodes/ChangeLog binutils-2.11.90.0.31/opcodes/ChangeLog --- binutils-2.11.90.0.29/opcodes/ChangeLog Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/opcodes/ChangeLog Thu Aug 30 09:30:37 2001 @@ -1,3 +1,7 @@ +2001-08-28 matthew gren + + * ppc-opc.c (icbt): Order correctly. + 2001-08-27 David Edelsohn Torbjorn Granlund diff -uprN binutils-2.11.90.0.29/opcodes/m68hc11-dis.c binutils-2.11.90.0.31/opcodes/m68hc11-dis.c --- binutils-2.11.90.0.29/opcodes/m68hc11-dis.c Thu Mar 15 14:52:12 2001 +++ binutils-2.11.90.0.31/opcodes/m68hc11-dis.c Thu Aug 30 09:30:37 2001 @@ -1,5 +1,5 @@ /* m68hc11-dis.c -- Motorola 68HC11 & 68HC12 disassembly - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. Written by Stephane Carrez (stcarrez@worldnet.fr) This program is free software; you can redistribute it and/or modify @@ -36,6 +36,14 @@ static const char *const reg_dst_table[] #define OP_PAGE_MASK (M6811_OP_PAGE2|M6811_OP_PAGE3|M6811_OP_PAGE4) +/* Prototypes for local functions. */ +static int read_memory + PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *)); +static int print_indexed_operand + PARAMS ((bfd_vma, struct disassemble_info *, int)); +static int print_insn + PARAMS ((bfd_vma, struct disassemble_info *, int)); + static int read_memory (memaddr, buffer, size, info) bfd_vma memaddr; diff -uprN binutils-2.11.90.0.29/opcodes/ppc-opc.c binutils-2.11.90.0.31/opcodes/ppc-opc.c --- binutils-2.11.90.0.29/opcodes/ppc-opc.c Mon Aug 27 11:44:52 2001 +++ binutils-2.11.90.0.31/opcodes/ppc-opc.c Thu Aug 30 09:30:37 2001 @@ -2624,6 +2624,8 @@ const struct powerpc_opcode powerpc_opco { "slliq", XRC(31,248,0), X_MASK, M601, { RA, RS, SH } }, { "slliq.", XRC(31,248,1), X_MASK, M601, { RA, RS, SH } }, +{ "icbt", X(31,262), XRT_MASK, PPC403, { RA, RB } }, + { "doz", XO(31,264,0,0), XO_MASK, M601, { RT, RA, RB } }, { "doz.", XO(31,264,0,1), XO_MASK, M601, { RT, RA, RB } }, { "dozo", XO(31,264,1,0), XO_MASK, M601, { RT, RA, RB } }, @@ -2645,8 +2647,6 @@ const struct powerpc_opcode powerpc_opco { "lhzx", X(31,279), X_MASK, COM, { RT, RA, RB } }, -{ "icbt", X(31,262), XRT_MASK, PPC403, { RA, RB } }, - { "eqv", XRC(31,284,0), X_MASK, COM, { RA, RS, RB } }, { "eqv.", XRC(31,284,1), X_MASK, COM, { RA, RS, RB } },