From eabaaa23fcea634c0aaef5221e18d57b3f677fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Mon, 13 Feb 2012 21:24:12 -0800 Subject: [PATCH] Original patches for tracking purposes. --- bootstrap.conf | 4 +- bootstrap.sh | 5 +- patches/binutils-2.9.1/patch | 70809 +++++++++++++++++++++++++++++++++ patches/gcc-2.95.3/patch | 31420 +++++++++++++++ 4 files changed, 102232 insertions(+), 6 deletions(-) create mode 100644 patches/binutils-2.9.1/patch create mode 100644 patches/gcc-2.95.3/patch diff --git a/bootstrap.conf b/bootstrap.conf index 18bb4c8..6fc819a 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -9,10 +9,8 @@ readonly GCC_CPP_PATCH="gcc-g++-${GCC_VER}-amiga.diff.gz" readonly BINUTILS="binutils-2.9.1" readonly BINUTILS_SRC="${BINUTILS}.tar.gz" -readonly BINUTILS_PATCH="${BINUTILS}-amiga.diff.gz" -readonly IXEMUL_VER="48.2" -readonly IXEMUL="ixemul-${IXEMUL_VER}" +readonly IXEMUL="ixemul-48.2" readonly IXEMUL_SRC="${IXEMUL}.lha" readonly LIBNIX="libnix-2.1" diff --git a/bootstrap.sh b/bootstrap.sh index 444a770..1befaa8 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -38,15 +38,14 @@ function unpack_sources { rm -rf "${BINUTILS}" tar -xzf "${ARCHIVES}/${BINUTILS_SRC}" pushd "${BINUTILS}" - zcat "${PATCHES}/${BINUTILS_PATCH}" | patch -p1 + patch -p1 < "${PATCHES}/${BINUTILS}/patch" popd rm -rf "${GCC}" tar -xzf "${ARCHIVES}/${GCC_CORE_SRC}" tar -xzf "${ARCHIVES}/${GCC_CPP_SRC}" pushd "${GCC}" - zcat "${PATCHES}/${GCC_CORE_PATCH}" | patch -p1 - zcat "${PATCHES}/${GCC_CPP_PATCH}" | patch -p1 + patch -p1 < "${PATCHES}/${GCC}/patch" popd rm -rf "${FD2INLINE}" diff --git a/patches/binutils-2.9.1/patch b/patches/binutils-2.9.1/patch new file mode 100644 index 0000000..d897788 --- /dev/null +++ b/patches/binutils-2.9.1/patch @@ -0,0 +1,70809 @@ +This file contains patches that transform the baseline version into +the gg version. Assuming that you have unarchived the baseline +version in the current directory, just run the command: + + patch -p1 -E ++ ++ * ltconfig (finish_eval): Backslash quote some double quotes ++ so that the generated file has the right amount of quotation. ++ ++Thu Apr 30 17:05:00 1998 Fred Fish ++ ++ * ltconfig: Use ARFLAGS instead of hardwired "cru". ++ ++Sat Nov 15 09:12:45 1997 Fred Fish ++ ++ * configure.in (*-*-amigaos): Fixup formatting. ++ * configure (enable_gdbtk): Set to "no" for BeOS. ++ ++Fri Sep 26 15:32:41 1997 Fred Fish ++ ++ * Makefile.in ($(DO_X)): Add missing \ in continuation line. ++ This bug is fixed in the next FSF release. ++ ++Mon Aug 25 16:32:00 1997 Steffen Opel ++ ++ * Makefile.in: Build, install and clean AmigaGuide documentation. ++ ++Sat Dec 28 12:22:20 1996 Fred Fish ++ ++ * BeOS.diffs: Update file. ++ ++Sun Dec 22 10:45:58 1996 Fred Fish ++ ++ * config.sub: Add support for BeOS target. ++ ++Tue Jul 23 16:29:55 1996 Daniel Verite ++ ++ * update from version 2.6 to version 2.7 +diff -rup --new-file binutils-2.9.1/Makefile.in binutils-2.9.1/Makefile.in +--- binutils-2.9.1/Makefile.in Fri May 1 08:52:55 1998 ++++ binutils-2.9.1/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -20,7 +20,7 @@ + + srcdir = . + +-prefix = /usr/local ++prefix = @prefix@ + exec_prefix = $(prefix) + + bindir=${exec_prefix}/bin +@@ -49,6 +49,9 @@ man6dir = $(mandir)/man6 + man7dir = $(mandir)/man7 + man8dir = $(mandir)/man8 + man9dir = $(mandir)/man9 ++infodir = $(prefix)/info ++guidedir =$(prefix)/guide ++includedir = $(prefix)/include + GDB_NLM_DEPS = + + SHELL = /bin/sh +@@ -65,9 +68,9 @@ INSTALL_DATA = $(INSTALL) -m 644 + INSTALL_DOSREL = install-dosrel-fake + + AS = as +-AR = ar +-AR_FLAGS = rc +-CC = cc ++AR = @AR@ ++ARFLAGS = @ARFLAGS@ ++CC = @CC@ + + # Special variables passed down in EXTRA_GCC_FLAGS. They are defined + # here so that they can be overridden by Makefile fragments. +@@ -93,7 +96,7 @@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit- + CXXFLAGS_FOR_TARGET = $(CXXFLAGS) + LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates + +-RANLIB = ranlib ++RANLIB = @RANLIB@ + + DLLTOOL = dlltool + WINDRES = windres +@@ -318,7 +321,7 @@ NM_FOR_TARGET = ` \ + # Flags to pass down to all sub-makes. + # Please keep these in alphabetical order. + BASE_FLAGS_TO_PASS = \ +- "AR_FLAGS=$(AR_FLAGS)" \ ++ "ARFLAGS=$(ARFLAGS)" \ + "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ + "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ + "BISON=$(BISON)" \ +@@ -854,7 +857,9 @@ DO_X = \ + do-distclean \ + do-dvi \ + do-info \ ++ do-guide \ + do-install-info \ ++ do-install-guide \ + do-installcheck \ + do-mostlyclean \ + do-maintainer-clean \ +@@ -879,9 +884,9 @@ $(DO_X): + done; \ + ;; \ + esac ; \ +- export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ ++ export AR ARFLAGS AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ + if (cd ./$$i; \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "ARFLAGS=$${ARFLAGS}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +@@ -898,9 +903,9 @@ $(DO_X): + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ + done; \ +- export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ ++ export AR ARFLAGS AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ + if (cd $(TARGET_SUBDIR)/$$i; \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "ARFLAGS=$${ARFLAGS}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +@@ -911,10 +916,11 @@ $(DO_X): + + # Here are the targets which correspond to the do-X targets. + +-.PHONY: info installcheck dvi install-info ++.PHONY: info guide installcheck dvi install-info install-guide + .PHONY: clean distclean mostlyclean maintainer-clean realclean + .PHONY: local-clean local-distclean local-maintainer-clean + info: do-info ++guide: do-guide + installcheck: do-installcheck + dvi: do-dvi + +@@ -927,6 +933,12 @@ install-info: do-install-info dir.info + $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ + else true ; fi + ++install-guide: do-install-guide dir.guide ++ srcroot=`cd $(srcdir); pwd`; export srcroot; \ ++ if [ -f dir.guide ] ; then \ ++ $(INSTALL_DATA) dir.guide $(guidedir)/dir.guide ; \ ++ else true ; fi ++ + local-clean: + -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E + +@@ -1350,7 +1362,7 @@ install-gcc: + # This rule is used to install the modules which use FLAGS_TO_PASS. + # To build a target install-X means to cd to X and make install. + .PHONY: install-dosrel +-install-dosrel: installdirs info ++install-dosrel: installdirs info guide + @dir=`echo $@ | sed -e 's/install-//'`; \ + if [ -f ./$${dir}/Makefile ] ; then \ + r=`pwd`; export r; \ +@@ -1478,6 +1490,13 @@ dir.info: do-install-info + else true ; \ + fi + ++dir.guide: do-install-guide ++ if [ -f $(srcdir)/texinfo/gen-guide-dir ] ; then \ ++ $(srcdir)/texinfo/gen-guide-dir $(guidedir) $(srcdir)/texinfo/dir.guide-template > dir.guide.new ; \ ++ mv -f dir.guide.new dir.guide ; \ ++ else true ; \ ++ fi ++ + dist: + @echo "Building a full distribution of this tree isn't done" + @echo "via 'make dist'. Check out the etc/ subdirectory" +@@ -1513,7 +1532,7 @@ DEVO_SUPPORT= README Makefile.in configu + # ChangeLog omitted because it may refer to files which are not in this + # distribution (perhaps it would be better to include it anyway). + ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ +- make-stds.texi standards.info* ++ make-stds.texi standards.info* standards.guide* + + # When you use `make setup-dirs' or `make taz' you should always redefine + # this macro. +diff -rup --new-file binutils-2.9.1/Product-Info binutils-2.9.1/Product-Info +--- binutils-2.9.1/Product-Info Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/Product-Info Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,18 @@ ++.name ++binutils ++.fullname ++GNU binutils ++.type ++Programmer Tools ++.short ++GNU binary utilities, Amiga source ++.description ++The GNU binary utilities. ++.version ++2.9.1 ++.requirements ++Amiga binaries require the ixemul.library. ++.distribution ++GNU Public License ++.described-by ++Fred Fish (fnf@ninemoons.com) +diff -rup --new-file binutils-2.9.1/bfd/ChangeLog binutils-2.9.1/bfd/ChangeLog +--- binutils-2.9.1/bfd/ChangeLog Fri May 1 08:47:57 1998 ++++ binutils-2.9.1/bfd/ChangeLog Sun Aug 23 00:00:00 1998 +@@ -1,3 +1,87 @@ ++Thu Jun 18 09:50:39 1998 Mumit Khan ++ ++ pei-i386 changes from Mikey . ++ ++ * Makefile.in (coffgen.lo): Supply explicit build rule that ++ provides target macro. ++ ++ * coffgen.c (ctype.h): Include. ++ (coff_renumber_symbsol): Sort symbols according to MS spec. ++ ++ * bfd-in.h (pei_get_comdat_info): Declare. ++ ++ * archures.c (pei_get_comdat_info): Provide stub for non pe-i386 ++ targets. ++ ++ * section.c (struct comdat_info): New structure to hold associated ++ section/comdat symbol info for each SEC_LINK_ONCE section. ++ (struct sec): New member pe_comdat_info (struct comdat_info *). ++ (STD_SECTION): Initialize pe_comdat_info in SEC (struct sec). ++ ++ * pei-i386.c (ctype.h): Include. ++ (pei_get_comdat_info): New function to get comdat symbol/associated ++ section for each SEC_LINK_ONCE sec, and set asection->pe_comdat_info ++ properly. ++ ++ * peicode.h (coff_swap_sym_in): Rename incoming C_SECTION syms to ++ guarantee that these will be undefined/unique during later ++ processing. ++ (pe_print_idata): Define IMPORTED_BY_ORDINAL instead of hard-coded ++ value. ++ ++ * cofflink.c (coff_get_first_section_of_archive): New function ++ to find correct address/resolv relocs for each .lib file. ++ (_bfd_coff_generic_relocate_section): Resolve references to ++ undefined C_SECTION symbols. ++ ++ * bfd-in2.h: Regenerate. ++ ++Fri Jun 5 13:43:10 1998 Fred Fish ++ ++ * archive.c (do_slurp_coff_armap): Redo the hack so that it should ++ work no matter how large the archive is. ++ ++Fri Jun 5 00:54:09 1998 Fred Fish ++ ++ * archive.c (do_slurp_coff_armap): Tweak hack that detects wrong ++ endian file offsets to allow up to ~16Mb archives before it always ++ triggers a reread in little endian order. ++ ++Mon Jun 1 16:41:53 1998 Fred Fish ++ ++ * archive.c (do_slurp_coff_armap): Work around bug in Metrowerks ++ linkers that did not follow PE spec with regards to storing file ++ offset in big endian order. ++ * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_LNK_COMDAT ++ flag in section flags for now. This is a hack to work around ++ the Metrowerks linker hijacking this bit for it's own purposes. ++ ++ Integrate PE changes from jeffdb@goodnet.com: ++ * section.c (_comdat_info): Add struct. Holds associated ++ section/comdat symbol info for each SEC_LINK_ONCE section. ++ (pe_comdat_info): Add pointer to comdat info. ++ (bfd_map_over_sections): Call pei_get_comdat_info for sections that ++ have the SEC_LINK_ONCE flag set, to get associated section/comdat ++ info before returning asection info to user program. ++ * bfd-in2.h: Regenerated. ++ * cofflink.c (coff_get_first_section_of_archive): New function ++ and prototype. Used to find the correct address/resolve the ++ relocs pointing to first .idata$4 and .idata$5 in the .idata$2 ++ for each LIB file. ++ (_bfd_coff_generic_relocate_section): Add code to resolve references ++ to undefined C_SECTION symbols. ++ * pei-i386.c (ctype.h): Include. ++ (pei_get_comdat_info): Find the associated section/comdat info for ++ each SEC_LINK_ONCE section found in the input, and set ++ asection->pe_comdat_info appropriately. FIXME link.exe expects the ++ symbol table to be sorted in address ascending order, to use .o's with ++ sections marked SEC_LINK_ONCE with link.exe you must strip local symbols. ++ * peicode.h (coff_swap_sym_in): Rename incoming C_SECTION symbols to ++ guarantee they will be undefined/unique for later processing. ++ (pe_print_idata): Add code to read/print .idata sections linked against ++ libraries produced with NONAME/import by ordinal functions, wsock32.lib ++ comctl32.lib and probably others. ++ + Mon Apr 27 11:49:55 1998 Ian Lance Taylor + + * configure.in: Set version number to 2.9.1. +@@ -654,6 +738,11 @@ Mon Jan 19 12:49:52 1998 Ian Lance Tayl + + * cpu-sh.c (arch_info_struct): Correct next field of sh3e. + ++Sun Jan 18 10:39:52 1998 Daniel Verite ++ ++ * amigaos.c (CAN_WRITE_OUTSYM): New macro. ++ (amiga_write_object_contents): Use CAN_WRITE_OUTSYM ++ + Wed Jan 14 17:23:27 1998 Nick Clifton + + * elf32-m32r.c: Add macros to handle NOP insertion. +@@ -721,6 +810,13 @@ Mon Dec 22 13:04:33 1997 Joel Sherrill + * config.bfd (i[3456]86*-go32-rtems*): Fix to be the same as + i[3456]86-go32. + ++Fri Dec 19 14:25:58 1997 Daniel Verite ++ ++ * amigaos.c (amiga_bfd_copy_private_section_data): Add return ++ value. ++ * amigaoslink.c (amiga_final_link): Update linker_mark fields for ++ input sections involved in the output. ++ + Thu Dec 18 16:01:25 1997 Doug Evans + + * configure: Regenerate to get @SHELL@ substituted. +@@ -943,6 +1039,10 @@ Sat Nov 15 15:36:07 1997 Fred Fish ++ ++ * config.bfd (i[3456]86-*-beos*): Add config for x86 BeOS. ++ + Tue Nov 11 10:37:23 1997 Jeffrey A Law (law@cygnus.com) + + * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field +@@ -1055,6 +1155,11 @@ Mon Oct 20 15:01:27 1997 Klaus K"ampf + + * evax-egsd.c: Make section flags dec c compatible. + ++Mon Oct 20 11:05:36 1997 Fred Fish ++ ++ * configure.in (AC_ARFLAGS): Add. ++ * configure: Regenerate. ++ + Mon Oct 20 09:38:31 1997 Jeffrey A Law (law@cygnus.com) + + * som.c (normalize): Delete function. +@@ -1260,6 +1365,16 @@ Tue Sep 23 19:03:13 1997 Ian Lance Tayl + (assign_file_positions_for_segments): Increment the file offset + for a section with contents, even if it is not loadable. + ++Tue Sep 23 09:46:10 1997 Fred Fish ++ ++ * amigaos.c (alloca): Only declare if not defined as macro. ++ ++Mon Sep 22 10:15:30 1997 Fred Fish ++ ++ * amigaos.c (sysdep.h): Relocate include to provided needed ++ file. ++ * amigaoslink.c (sysdep.h): Ditto, and remove . ++ + Thu Sep 18 15:04:57 1997 Nick Clifton + + * elf32-v850.c (v850_elf_check_relocs): Improve error message. +@@ -1392,6 +1507,12 @@ Tue Aug 26 17:26:51 1997 Ian Lance Tayl + * doc/Makefile.am (MKDOC): Use EXEEXT_FOR_BUILD, not EXEEXT. + * aclocal.m4, configure, Makefile.in, doc/Makefile.in: Rebuild. + ++Mon Aug 25 16:32:00 1997 Steffen Opel ++ ++ * Makefile.in (guide, install-guide, clean-guide, bfd.guide): ++ New targets for AmigaGuide documentation. ++ (install): Add install-info and install-guide. ++ + Mon Aug 25 16:14:34 1997 Christopher Provenzano + + * configure: Rebuild with latest devo autoconf for NT support +@@ -3300,6 +3421,12 @@ Thu Dec 26 18:36:54 1996 Ian Lance Tayl + * Makefile.in (install): Move subdir_do out of conditional. From + Fred Fish . + ++Sun Dec 22 10:45:58 1996 Fred Fish ++ ++ * config.bfd: Add BeOS target support. ++ * configure.in: Add BeOS target support. ++ * configure: Regenerate. ++ + Wed Dec 18 10:04:30 1996 Jeffrey A Law (law@cygnus.com) + + * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and +@@ -4175,6 +4302,12 @@ Fri Aug 30 11:49:19 1996 Ian Lance Tayl + (ihex_write_object_contents): Remove extbase; always use segbase + instead. + ++Thu Aug 29 17:53:51 1996 Daniel Verite ++ ++ * amigaos.c (amiga_get_section_contents): Handle sections that ++ are larger than their disksize. ++ (amiga_make_unique_section): Remove infinite loop. ++ + Thu Aug 29 16:52:17 1996 Michael Meissner + + * configure.in (i[345]86-*-*): Recognize i686 for pentium pro. +@@ -4400,6 +4533,13 @@ Mon Aug 5 13:42:41 1996 Ian Lance Tayl + check dynsec when deciding whether to start a new segment for a + writeable section; -N will now handle this. + ++Sun Aug 4 22:15:56 1996 Fred Fish ++ ++ * amigaoslink.c (sys/types.h): Include before genlink.h to get ++ definition for size_t which is used in genlink.h. This was not ++ getting defined during a cross compilation on alpha-dec-osf2.0 for ++ some reason. ++ + Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com) + + * libhppa.h: Remove "esel" changes. Not the right approach. +@@ -4496,6 +4636,11 @@ Fri Jul 19 18:15:51 1996 Ian Lance Tayl + * configure.in: Fix test for whether a compiler has a 64 bit + type. From Jim Wilson . + ++Thu Jul 18 16:58:11 1996 Daniel Verite ++ ++ * amigaoslink.c (aout_perform_reloc): Fix baserel 16 bits relocs. ++ (my_add_to): Fix sign bug in extraction of 16 bits values. ++ + Thu Jul 18 15:39:10 1996 Ian Lance Taylor + + * configure.host (mips-sgi-irix6*): New host. +@@ -4625,6 +4770,11 @@ Mon Jul 8 16:18:03 1996 Ian Lance Tayl + (mips_relocate_section): Permit an arbitrary number of REFHI or + RELHI relocs before the associated REFLO or RELLO reloc. + ++Sun Jul 7 12:15:39 1996 Kamil Iskra ++ ++ * amigaos.c (amiga_write_symbols): Fix Daniel's workaround for ++ outputting long symbol names. ++ + Fri Jul 5 19:27:49 1996 Ian Lance Taylor + + * aout-target.h (MY(callback)): Set reloc_count fields. +@@ -4704,6 +4854,11 @@ Fri Jun 28 11:17:00 1996 Richard Hender + (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address + taken, we cannot generate a .plt entry for the symbol. + ++Thu Jun 27 17:35:32 1996 Daniel Verite ++ ++ * amigaos.c (amiga_write_object_contents): Don't output symbols ++ which are not attached to any section, such as indirect symbols. ++ + Thu Jun 27 11:24:29 1996 Ian Lance Taylor + + * configure.in: Add AC_ISC_POSIX, and check for setitimer and +@@ -4932,6 +5087,19 @@ Tue Jun 11 15:24:48 1996 Ian Lance Tayl + * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a + common symbol defined by the linker. Don't export function code + even if export_defineds is set. ++ ++Tue Jun 11 12:52:10 1996 Daniel Verite ++ ++ * amigaoslink.c (mygeta4): Function removed. ++ (amiga_final_link): Search for ___a4_init symbol in the global hash ++ table and cache its value in the backend data. ++ ++ * amigaos.c (write_longs): Return a boolean instead of the ++ number of longs written. ++ (write_section_contents): Split reloc hunks at 0xffff entries. ++ (amiga_write_symbols): Cut the names in hunk symbols at 124 characters ++ (workaround for an amigaos bug). ++ (amiga_handle_rest): Added a sanity check in reloc hunks parsing. + + Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com) + +diff -rup --new-file binutils-2.9.1/bfd/Makefile.am binutils-2.9.1/bfd/Makefile.am +--- binutils-2.9.1/bfd/Makefile.am Fri May 1 08:47:58 1998 ++++ binutils-2.9.1/bfd/Makefile.am Sun Aug 23 00:00:00 1998 +@@ -98,7 +98,10 @@ ALL_MACHINES_CFILES = \ + # The .o files needed by all of the 32 bit vectors that are configured into + # target_vector in targets.c if configured with --enable-targets=all. + BFD32_BACKENDS = \ ++ amigaos.lo \ ++ amigaoslink.lo \ + aout-adobe.lo \ ++ aout-amiga.lo \ + aout-arm.lo \ + aout-ns32k.lo \ + aout-sparcle.lo \ +@@ -203,7 +206,10 @@ BFD32_BACKENDS = \ + xcofflink.lo + + BFD32_BACKENDS_CFILES = \ ++ amigaos.c \ ++ amigaoslink.c \ + aout-adobe.c \ ++ aout-amiga.c \ + aout-arm.c \ + aout-ns32k.c \ + aout-sparcle.c \ +@@ -382,7 +388,7 @@ CFILES = \ + HFILES = \ + aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \ + ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \ +- elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.h \ ++ elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libamiga.h libaout.h \ + libbfd.h libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h \ + libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \ + targmatch.h +@@ -637,6 +643,9 @@ cpu-vax.lo: cpu-vax.c + cpu-we32k.lo: cpu-we32k.c + cpu-w65.lo: cpu-w65.c + cpu-z8k.lo: cpu-z8k.c ++amigaos.lo: amigaos.c libamiga.h bfd.h ++amigaoslink.lo: bfd.h libamiga.h amigaoslink.c ++aout-amiga.lo: aout-amiga.c aoutf1.h bfd.h + aout-adobe.lo: aout-adobe.c $(INCDIR)/aout/adobe.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \ + $(INCDIR)/bfdlink.h +diff -rup --new-file binutils-2.9.1/bfd/Makefile.in binutils-2.9.1/bfd/Makefile.in +--- binutils-2.9.1/bfd/Makefile.in Fri May 1 08:47:59 1998 ++++ binutils-2.9.1/bfd/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -1,4 +1,4 @@ +-# Makefile.in generated automatically by automake 1.2e from Makefile.am ++# Makefile.in generated automatically by automake 1.3 from Makefile.am + + # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation +@@ -11,7 +11,7 @@ + # PARTICULAR PURPOSE. + + +-SHELL = @SHELL@ ++SHELL = /bin/sh + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -28,10 +28,16 @@ sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ ++guidedir = @guidedir@ ++htmldir = @htmldir@ ++dvidir = @dvidir@ ++psdir = @psdir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + ++DISTDIR = ++ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +@@ -187,7 +193,10 @@ ALL_MACHINES_CFILES = \ + # The .o files needed by all of the 32 bit vectors that are configured into + # target_vector in targets.c if configured with --enable-targets=all. + BFD32_BACKENDS = \ ++ amigaos.lo \ ++ amigaoslink.lo \ + aout-adobe.lo \ ++ aout-amiga.lo \ + aout-arm.lo \ + aout-ns32k.lo \ + aout-sparcle.lo \ +@@ -292,7 +301,10 @@ BFD32_BACKENDS = \ + xcofflink.lo + + BFD32_BACKENDS_CFILES = \ ++ amigaos.c \ ++ amigaoslink.c \ + aout-adobe.c \ ++ aout-amiga.c \ + aout-arm.c \ + aout-ns32k.c \ + aout-sparcle.c \ +@@ -471,7 +483,7 @@ CFILES = \ + HFILES = \ + aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \ + ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \ +- elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libaout.h \ ++ elfcode.h evax.h genlink.h go32stub.h hppa_stubs.h libamiga.h libaout.h \ + libbfd.h libcoff.h libecoff.h elf-bfd.h libhppa.h libieee.h \ + libnlm.h liboasys.h netbsd.h nlm-target.h nlmcode.h ns32k.h som.h \ + targmatch.h +@@ -521,6 +533,7 @@ LDFLAGS = @LDFLAGS@ + LIBS = @LIBS@ + libbfd_a_LIBADD = + libbfd_a_OBJECTS = ++ARFLAGS = @ARFLAGS@ + LTLIBRARIES = $(lib_LTLIBRARIES) + + libbfd_la_OBJECTS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo \ +@@ -536,21 +549,21 @@ acconfig.h acinclude.m4 aclocal.m4 bfd-i + configure.in stamp-h.in + + +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +- ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) \ ++ $(INFOS) $(GUIDES) $(HTMLS) $(MANS) + TAR = tar + GZIP = --best + SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES) + OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS) + +-default: all ++all: all-recursive-am all-am + + .SUFFIXES: + .SUFFIXES: .S .c .lo .o .s +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile ++$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus --include-deps Makefile + +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +@@ -643,18 +656,18 @@ maintainer-clean-libLTLIBRARIES: + + install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(libdir) ++ $(mkinstalldirs) $(DESTDIR)$(libdir) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ +- echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p"; \ +- $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p; \ ++ echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \ ++ $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \ + else :; fi; \ + done + + uninstall-libLTLIBRARIES: +- $(NORMAL_UNINSTALL) ++ @$(NORMAL_UNINSTALL) + list='$(lib_LTLIBRARIES)'; for p in $$list; do \ +- $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$$p; \ ++ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + done + + libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES) +@@ -671,7 +684,8 @@ libbfd.la: $(libbfd_la_OBJECTS) $(libbfd + + all-recursive install-data-recursive install-exec-recursive \ + installdirs-recursive install-recursive uninstall-recursive install-info-recursive \ +-check-recursive installcheck-recursive info-recursive dvi-recursive: ++check-recursive installcheck-recursive info-recursive dvi-recursive \ ++guide-recursive ps-recursive html-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + target=`echo $@ | sed s/-recursive//`; \ +@@ -776,6 +790,9 @@ distdir: $(DISTFILES) + || exit 1; \ + done + info: info-recursive ++guide: guide-recursive ++html: html-recursive ++ps: ps-recursive + dvi: dvi-recursive + check: + $(MAKE) check-recursive +@@ -803,12 +820,10 @@ install: install-recursive install-exec- + + uninstall: uninstall-recursive uninstall-am + +-all: all-recursive-am all-am +- + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: installdirs-recursive +- $(mkinstalldirs) $(libdir) ++ $(mkinstalldirs) $(DATADIR)$(libdir) + + + mostlyclean-generic: +@@ -857,26 +872,26 @@ maintainer-clean: maintainer-clean-recu + @echo "it deletes files that may require special tools to rebuild." + -rm -f config.status + +-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ +-maintainer-clean-hdr mostlyclean-noinstLIBRARIES \ +-distclean-noinstLIBRARIES clean-noinstLIBRARIES \ +-maintainer-clean-noinstLIBRARIES mostlyclean-compile distclean-compile \ +-clean-compile maintainer-clean-compile mostlyclean-libtool \ +-distclean-libtool clean-libtool maintainer-clean-libtool \ +-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ +-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ +-uninstall-libLTLIBRARIES install-libLTLIBRARIES install-data-recursive \ +-uninstall-data-recursive install-exec-recursive \ +-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +-all-recursive check-recursive installcheck-recursive info-recursive \ +-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +-distclean-tags clean-tags maintainer-clean-tags distdir info dvi \ +-installcheck install-info all-recursive-am all-am install-exec-am \ +-install-data-am uninstall-am install-exec install-data install \ +-uninstall all installdirs mostlyclean-generic distclean-generic \ +-clean-generic maintainer-clean-generic clean mostlyclean distclean \ +-maintainer-clean ++.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ ++mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ ++clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ ++mostlyclean-compile distclean-compile clean-compile \ ++maintainer-clean-compile mostlyclean-libtool distclean-libtool \ ++clean-libtool maintainer-clean-libtool mostlyclean-libLTLIBRARIES \ ++distclean-libLTLIBRARIES clean-libLTLIBRARIES \ ++maintainer-clean-libLTLIBRARIES uninstall-libLTLIBRARIES \ ++install-libLTLIBRARIES install-data-recursive uninstall-data-recursive \ ++install-exec-recursive uninstall-exec-recursive installdirs-recursive \ ++uninstalldirs-recursive all-recursive check-recursive \ ++installcheck-recursive info-recursive guide-recursive html-recursive \ ++ps-recursive dvi-recursive mostlyclean-recursive distclean-recursive \ ++clean-recursive maintainer-clean-recursive tags tags-recursive \ ++mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ ++distdir info guide html ps dvi installcheck install-info \ ++all-recursive-am all-am install-exec-am install-data-am uninstall-am \ ++install-exec install-data install uninstall all installdirs \ ++mostlyclean-generic distclean-generic clean-generic \ ++maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + + diststuff: info +@@ -922,6 +937,9 @@ targets.lo: targets.c config.status + archures.lo: archures.c config.status + $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c + ++coffgen.lo: coffgen.c config.status ++ $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/coffgen.c ++ + elf32-target.h : elfxx-target.h + rm -f elf32-target.h + sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new +@@ -1094,6 +1112,9 @@ cpu-vax.lo: cpu-vax.c + cpu-we32k.lo: cpu-we32k.c + cpu-w65.lo: cpu-w65.c + cpu-z8k.lo: cpu-z8k.c ++amigaos.lo: amigaos.c libamiga.h bfd.h ++amigaoslink.lo: bfd.h libamiga.h amigaoslink.c ++aout-amiga.lo: aout-amiga.c aoutf1.h bfd.h + aout-adobe.lo: aout-adobe.c $(INCDIR)/aout/adobe.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \ + $(INCDIR)/bfdlink.h +diff -rup --new-file binutils-2.9.1/bfd/amigaos.c binutils-2.9.1/bfd/amigaos.c +--- binutils-2.9.1/bfd/amigaos.c Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/bfd/amigaos.c Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,3313 @@ ++/* BFD back-end for Commodore-Amiga AmigaOS binaries. ++ Copyright (C) 1990-1994 Free Software Foundation, Inc. ++ Contributed by Leonard Norrgard. Partially based on the bout ++ and ieee BFD backends and Markus Wild's tool hunk2gcc. ++ Revised and updated by Stephan Thesing ++ ++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., 675 Mass Ave, Cambridge, MA 02139, USA. */ ++ ++/* ++SECTION ++ amiga back end ++ ++This section describes the overall structure of the Amiga BFD back end. ++The linker stuff can be found in @xref{amigalink}. ++@menu ++@* implementation:: ++@* amigalink:: ++@end menu ++ ++INODE ++implementation, amigalink, amiga, amiga ++ ++ ++SECTION ++ implementation ++ ++ ++The need for a port of the bfd library for Amiga style object (hunk) files ++arose by the desire to port the GNU debugger gdb to the Amiga. ++Also, the linker ld should be updated to the current version (2.5.2). ++@@* ++This port bases on the work done by Leonard Norrgard, who started porting ++gdb. Raphael Luebbert, who supports the ixemul.library, has also worked on ++implementing the needed @code{ptrace()} system call and gas2.5. ++ ++@menu ++@* not supported:: ++@* Does it work ?:: ++@* TODO:: ++@end menu ++ ++INODE ++not supported, Does it work ?,implementation,implementation ++SUBSECTION ++ not supported ++ ++Currently, the implementation does not support Amiga link library files, like ++e.g. amiga.lib. This may be added in a later version, if anyone starts work ++on it, or I find some time for it. ++ ++The handling of the symbols in hunk files is a little bit broken: ++ o The symbols in a load file are totally ignored at the moment, so gdb and gprof ++ do not work. ++ o The symbols of a object module (Hunk file, starting with HUNK_UNIT) are read in ++ correctly, but HUNK_SYMBOL hunks are also ignored. ++ ++The reason for this is the following: ++Amiga symbol hunks do not allow for much information. Only a name and a value are allowed. ++On the other hand, a.out format carries along much more information (see, e.g. the ++entry on set symbols in the ld manual). The old linker copied this information into ++a HUNK_DEBUG hunk. Now there is the choice: ++ o ignoring the debug hunk, read in only HUNK_SYMBOL definitions => extra info is lost. ++ o read in the debug hunk and use the information therein => How can clashs between the ++ information in the debug hunk and HUNK_SYMBOL or HUNK_EXT hunks be avoided ? ++I haven't decided yet, what to do about this. ++ ++ ++Although bfd allows to link together object modules of different flavours, ++producing a.out style executables does not work on Amiga :-) ++It should, however, be possible to create a.out files with the -r option of ld ++(incremental link). ++ ++INODE ++Does it work ?,TODO ,not supported , implementation ++SUBSECTION ++ Does it work ? ++ ++Currently, the following utilities work: ++ o objdump ++ o objcopy ++ o strip ++ o nm ++ o ar ++ o gas ++ ++ ++INODE ++TODO, , Does it work ?, implementation ++SUBSECTION ++ TODO ++ ++ o fix fixme:s ++ ++@* ++BFD: ++ o add flag to say if the format allows multiple sections with the ++ same name. Fix bfd_get_section_by_name() and bfd_make_section() ++ accordingly. ++ ++ o dumpobj.c: the disassembler: use relocation record data to find symbolic ++ names of addresses, when available. Needs new routine where one can ++ specify the source section of the symbol to be printed as well as some ++ rewrite of the disassemble functions. ++ ++*/ ++ ++#include "bfd.h" ++#include "bfdlink.h" ++#include "sysdep.h" ++#include "genlink.h" ++#include "libbfd.h" ++#include "libamiga.h" ++ ++#ifndef alloca ++extern PTR alloca (); ++#endif ++ ++typedef struct aout_symbol { ++ asymbol symbol; ++ short desc; ++ char other; ++ unsigned char type; ++} aout_symbol_type; ++ ++#include "aout/aout64.h" ++ ++typedef struct amiga_ardata_struct { ++ /* generic stuff */ ++ struct artdata generic; ++ /* amiga-specific stuff */ ++ unsigned long filesize; ++ struct arch_syms *defsyms; ++ unsigned long defsym_count; ++} amiga_ardata_type; ++ ++#define amiga_ardata(abfd) ((abfd)->tdata.amiga_ardata) ++ ++#define GL(x) bfd_get_32 (abfd, (bfd_byte *) (x)) ++#define GW(x) bfd_get_16 (abfd, (bfd_byte *) (x)) ++#define LONGSIZE(l) (((l)+3) >> 2) ++ ++#define DEBUG_AMIGA 10000 ++ ++static long determine_datadata_relocs PARAMS ((bfd *, asection *)); ++static boolean amiga_write_section_contents PARAMS ((bfd *, asection *, ++ asection *, long, long*)); ++static boolean amiga_write_symbols PARAMS ((bfd *, asection *)); ++static boolean amiga_digest_file (); ++static boolean amiga_mkobject (); ++static boolean amiga_mkarchive (); ++static boolean amiga_read_unit PARAMS ((bfd *, unsigned long)); ++static boolean amiga_read_load PARAMS ((bfd *)); ++static boolean amiga_handle_cdb_hunk PARAMS ((bfd *, unsigned long, ++ unsigned long, int, ++ unsigned long)); ++static boolean amiga_handle_rest PARAMS ((bfd *,asection *,boolean)); ++static boolean write_name PARAMS ((bfd*, const char*, long)); ++ ++/* AmigaOS doesn't like symbols names longer than 124 characters */ ++#define MAX_NAME_SIZE 124 ++ ++extern int amiga_pOS_flg; ++ ++#if DEBUG_AMIGA ++#include ++static void ++error_print(va_alist) ++va_dcl ++{ ++ va_list args; ++ char *fmt; ++ ++ va_start (args); ++ fmt = va_arg (args, char *); ++ ++ vfprintf (stderr, fmt, args); ++ va_end (args); ++} ++ ++#define DPRINT(L,x) if (L>=DEBUG_AMIGA) error_print x ++#else ++#define DPRINT(L,x) ++#endif ++ ++reloc_howto_type howto_hunk_reloc8 = ++{ ++ HUNK_RELOC8, /* type */ ++ 0, /* rightshift */ ++ 0, /* size */ ++ 8, /* bitsize */ ++ true, /* pc_relative */ ++ 0, /* bitpos */ ++ complain_overflow_bitfield, /* complain_on_overflow */ ++ 0, /* special_function */ ++ "reloc8", /* textual name */ ++ false, /* partial_inplace? */ ++ 0x000000ff, /* src_mask */ ++ 0x000000ff, /* dst_mask */ ++ true /* pcrel_offset */ ++}; ++ ++reloc_howto_type howto_hunk_reloc16 = ++{HUNK_RELOC16,0,1,16,true,0,complain_overflow_bitfield,0,"reloc16",false,0x0000ffff,0x0000ffff,true}; ++ ++reloc_howto_type howto_hunk_reloc32 = ++{HUNK_RELOC32,0,2,32,true,0,complain_overflow_bitfield,0,"reloc32",false,0xffffffff,0xffffffff,true}; ++ ++reloc_howto_type howto_hunk_drel8 = ++{HUNK_DREL8,0,0,8,false,0,complain_overflow_bitfield,0,"drel8",false,0x000000ff,0x000000ff,false}; ++ ++reloc_howto_type howto_hunk_drel16 = ++{HUNK_DREL16,0,1,16,false,0,complain_overflow_bitfield,0,"drel16",false,0x0000ffff,0x0000ffff,false}; ++ ++reloc_howto_type howto_hunk_drel32 = ++{HUNK_DREL32,0,2,32,false,0,complain_overflow_bitfield,0,"drel32",false,0xffffffff,0xffffffff,false}; ++ ++reloc_howto_type *amiga_howto_array[2][3] = ++{ ++ { &howto_hunk_reloc8, &howto_hunk_reloc16, &howto_hunk_reloc32 }, ++ { &howto_hunk_drel8, &howto_hunk_drel16, &howto_hunk_drel32 } ++}; ++ ++/* The following are gross hacks that need to be fixed. The problem is ++ that the linker unconditionally references these values without ++ going through any of bfd's standard interface. Thus they need to ++ be defined in a bfd module that is included in *all* configurations, ++ and are currently in bfd.c, otherwise linking the linker will fail ++ on non-Amiga target configurations. */ ++/* This one is used by the linker and tells us, if a debug hunk should be ++ written out*/ ++extern int write_debug_hunk; ++/* This is also used by the linker to set the attribute of sections */ ++extern int amiga_attribute; ++ ++static boolean ++get_long (abfd, n) ++ bfd *abfd; ++ unsigned long *n; ++{ ++ if (bfd_read ((PTR)n, 1, sizeof (*n), abfd) != sizeof (*n)) ++ return false; ++ *n = GL (n); ++ return true; ++} ++ ++static const struct bfd_target * ++amiga_object_p (abfd) ++ bfd *abfd; ++{ ++ char buf[8]; ++ unsigned int x; ++ struct stat stat_buffer; ++ ++ /* An Amiga object file must be at least 8 bytes long. */ ++ if (bfd_read ((PTR) buf, 1, 8, abfd) != 8) ++ { ++ bfd_set_error(bfd_error_wrong_format); ++ return 0; ++ } ++ ++ bfd_seek (abfd, 0, SEEK_SET); ++ ++ /* Does it look like an Amiga object file? */ ++ x = GL(buf); ++ if ((x != HUNK_UNIT) && (x != HUNK_HEADER) && (x != HUNK_HEADER_POS)) ++ { ++ /* Not an Amiga file. */ ++ bfd_set_error(bfd_error_wrong_format); ++ return 0; ++ } ++ ++ /* Can't fail and return (but must be declared boolean to suit ++ other bfd requirements). */ ++ (void) amiga_mkobject (abfd); ++ ++ AMIGA_DATA(abfd)->IsLoadFile = (x == HUNK_HEADER || x == HUNK_HEADER_POS); ++ ++ if (!amiga_digest_file (abfd)) ++ { ++ /* Something went wrong. */ ++ DPRINT (20,("bfd parser stopped at offset 0x%lx\n", bfd_tell (abfd))); ++ return (const struct bfd_target *) 0; ++ } ++ ++ /* Set default architecture to m68k:68000. */ ++ /* So we can link on 68000 AMIGAs..... */ ++ abfd->arch_info = bfd_scan_arch ("m68k:68000"); ++ ++ return (abfd->xvec); ++} ++ ++/* Skip over the hunk length longword + the number of longwords given there. */ ++#define next_hunk(abfd) \ ++ { AMIGA_DATA(abfd)->file_pointer += 1 + GL(AMIGA_DATA(abfd)->file_pointer); } ++ ++static asection * ++amiga_get_section_by_hunk_number (abfd, hunk_number) ++ bfd *abfd; ++ long hunk_number; ++{ ++ /* A cache, so we don't have to search the entire list every time. */ ++ static asection *last_reference; ++ static bfd *last_bfd; ++ asection *p; ++ ++ switch(hunk_number) ++ { ++ case -1: ++ return bfd_abs_section_ptr; ++ break; ++ case -2: ++ return bfd_und_section_ptr; ++ break; ++ case -3: ++ return bfd_com_section_ptr; ++ break; ++ default: ++ if (last_reference) ++ if (last_bfd == abfd && last_reference->target_index == hunk_number) ++ return last_reference; ++ for (p = abfd->sections; p != NULL; p = p->next) ++ if (p->target_index == hunk_number) ++ { ++ last_reference = p; ++ last_bfd = abfd; ++ return p; ++ } ++ BFD_FAIL(); ++ break; ++ } ++ return (asection *) 0; ++} ++ ++static boolean ++amiga_add_reloc (abfd, section, offset, symbol, howto, target_hunk) ++ bfd *abfd; ++ asection *section; ++ bfd_size_type offset; ++ amiga_symbol_type * symbol; ++ reloc_howto_type *howto; ++ long target_hunk; ++{ ++ amiga_reloc_type *reloc; ++ static int count; ++ asection *target_sec; ++ ++ reloc = (amiga_reloc_type *) bfd_zalloc (abfd, sizeof (amiga_reloc_type)); ++ reloc->next = 0; ++ ++ if (!reloc) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ return(false); ++ } ++ ++ abfd -> flags |= HAS_RELOC; ++ section -> flags |= SEC_RELOC; ++ ++ if (amiga_per_section(section)->reloc_tail) ++ amiga_per_section(section)->reloc_tail->next = reloc; ++ else ++ section->relocation = (struct reloc_cache_entry *) reloc; ++ amiga_per_section(section)->reloc_tail = reloc; ++ reloc->next = NULL; ++ reloc->relent.address = offset; ++ reloc->relent.addend = 0; ++ reloc->relent.howto = howto; ++ ++ if (symbol==NULL) { /* relative to section */ ++ target_sec = amiga_get_section_by_hunk_number (abfd, target_hunk); ++ if (target_sec) ++ reloc->symbol = (amiga_symbol_type *)target_sec->symbol; ++ else ++ return false; ++ } ++ else ++ reloc->symbol = symbol; ++ reloc->relent.sym_ptr_ptr=(asymbol **)(&(reloc->symbol)); ++ reloc->target_hunk = target_hunk; ++ ++ return true; ++} ++ ++/* BFD doesn't currently allow multiple sections with the same ++ name, so we try a little harder to get a unique name. */ ++asection * ++amiga_make_unique_section (abfd, name) ++ bfd *abfd; ++ CONST char *name; ++{ ++ asection *section; ++ ++ bfd_set_error (bfd_error_no_error); ++ section = bfd_make_section (abfd, name); ++ if (!section && (bfd_get_error() == bfd_error_no_error)) ++ { ++#if 0 ++ int i = 1; ++ char *new_name; ++ ++ new_name = bfd_alloc (abfd, strlen(name) + 4); ++ ++ /* We try to come up with an original name (since BFD ++ currently requires all sections to have different names). */ ++ while (!section && (i<=99)) ++ { ++ sprintf (new_name, "%s_%u", name, i++); ++ section = bfd_make_section (abfd, new_name); ++ } ++#else ++ section = bfd_make_section_anyway (abfd, name); ++#endif ++ } ++ return section; ++} ++ ++ ++ ++#if DEBUG_AMIGA ++#define DPRINTHUNK(x) fprintf (stderr,"Processing %s hunk (0x%x)...",\ ++ (x) == HUNK_UNIT ? "HUNK_UNIT" :\ ++ (x) == HUNK_NAME ? "HUNK_NAME" :\ ++ (x) == HUNK_DEBUG ? "HUNK_DEBUG" :\ ++ (x) == HUNK_OVERLAY ? "HUNK_OVERLAY" :\ ++ (x) == HUNK_BREAK ? "HUNK_BREAK" :\ ++ (x) == HUNK_HEADER ? "HUNK_HEADER" :\ ++ (x) == HUNK_HEADER_POS ? "HUNK_HEADER_POS" :\ ++ (x) == HUNK_CODE ? "HUNK_CODE" :\ ++ (x) == HUNK_DATA ? "HUNK_DATA" :\ ++ (x) == HUNK_BSS ? "HUNK_BSS" :\ ++ (x) == HUNK_RELOC8 ? "HUNK_RELOC8" :\ ++ (x) == HUNK_RELOC16 ? "HUNK_RELOC16" :\ ++ (x) == HUNK_RELOC32 ? "HUNK_RELOC32" :\ ++ (x) == HUNK_DREL8 ? "HUNK_DREL8" :\ ++ (x) == HUNK_DREL16 ? "HUNK_DREL16" :\ ++ (x) == HUNK_DREL32 ? "HUNK_DREL32" :\ ++ (x) == HUNK_SYMBOL ? "HUNK_SYMBOL" :\ ++ (x) == HUNK_EXT ? "HUNK_EXT" :\ ++ (x) == HUNK_END ? "HUNK_END" :\ ++ (x) == HUNK_LIB ? "HUNK_LIB" :\ ++ (x) == HUNK_INDEX ? "HUNK_INDEX" :\ ++ "*unknown*",(x)) ++#define DPRINTHUNKEND fprintf(stderr,"...done\n") ++#else ++#define DPRINTHUNK(x) ++#define DPRINTHUNKEND ++#endif ++ ++#define STRSZ_BLOCK 4096 ++#define CARSYM_BLOCK 200 ++ ++static boolean ++parse_archive_units (abfd, n_units, filesize, one, syms, symcount) ++ bfd *abfd; ++ int *n_units; ++ unsigned long filesize; ++ boolean one; /* parse only the first unit ? */ ++ struct arch_syms **syms; ++ symindex *symcount; ++{ ++ unsigned long hunk_type,pos,no,hunk,len,n; ++ long section_idx=-1; ++ symindex defsymcount=0; ++ unsigned long str_size=0, str_tot_size=0; ++ char *strings = NULL; ++ unsigned long unit_offset, defsym_pos=0; ++ struct arch_syms *nsyms, *syms_tail=NULL; ++ ++ *n_units = 0; ++ while (get_long (abfd, &hunk_type)) { ++ switch (hunk_type) { ++ case HUNK_UNIT: ++ unit_offset = bfd_tell (abfd)-4; ++ (*n_units)++; ++ if (one && *n_units>1) { ++ bfd_seek (abfd, -4, SEEK_CUR); ++ return true; ++ } ++ if (get_long (abfd, &len) && !bfd_seek (abfd, len<<2, SEEK_CUR)) { ++ section_idx = -1; ++ } ++ else ++ return false; ++ break; ++ case HUNK_DEBUG: ++ case HUNK_NAME: ++ if (!(get_long (abfd, &len) && !bfd_seek (abfd, len<<2, SEEK_CUR))) ++ return false; ++ break; ++ case HUNK_CODE: ++ case HUNK_DATA: ++ section_idx++; ++ if (!(get_long (abfd, &len) && !bfd_seek (abfd, (len&0x3fffffff)<<2, ++ SEEK_CUR))) ++ return false; ++ break; ++ case HUNK_BSS: ++ section_idx++; ++ if (!get_long (abfd, &len)) ++ return false; ++ break; ++ case HUNK_RELOC8: ++ case HUNK_RELOC16: ++ case HUNK_RELOC32: ++ if (!get_long (abfd, &no)) ++ return false; ++ while (no) { ++ /* destination hunk */ ++ if (!get_long (abfd, &hunk)) ++ return false; ++ /* skip the offsets */ ++ if (bfd_seek (abfd, no<<2, SEEK_CUR)) ++ return false; ++ /* read the number of offsets to come */ ++ if (!get_long (abfd, &no)) ++ return false; ++ } ++ break; ++ case HUNK_END: ++ break; ++ case HUNK_DREL8: ++ case HUNK_DREL16: ++ case HUNK_DREL32: ++ fprintf (stderr, "hunk_drelx not supported yet\n"); ++ return false; ++ case HUNK_SYMBOL: ++ if (!get_long (abfd, &len)) ++ return false; ++ while (len) { ++ if (bfd_seek (abfd, (len+1)<<2, SEEK_CUR)) ++ return false; ++ if (!get_long (abfd, &len)) ++ return false; ++ } ++ break; ++ case HUNK_EXT: ++ defsym_pos = 0; ++ if (!get_long (abfd, &n)) ++ return false; ++ while (n != 0) { ++ unsigned long tmp, type; ++ ++ len = n & 0xffffff; ++ type = (n>>24) & 0xff; ++ switch (type) { ++ case EXT_SYMB: ++ case EXT_DEF: ++ case EXT_ABS: ++ /* retain the positions of defined symbols for each object ++ in the archive. They'll be used later to build a ++ pseudo-armap, which _bfd_generic_link_add_archive_symbols ++ needs */ ++ if (defsym_pos==0) ++ defsym_pos = bfd_tell (abfd)-4; ++ /* skip name & value */ ++ if (bfd_seek (abfd, (len+1)<<2, SEEK_CUR)) ++ return false; ++ defsymcount++; ++ break; ++ ++ case EXT_REF8: ++ case EXT_REF16: ++ case EXT_REF32: ++ case EXT_DEXT8: ++ case EXT_DEXT16: ++ case EXT_DEXT32: ++ /* skip name */ ++ if (bfd_seek (abfd, len<<2, SEEK_CUR)) ++ return false; ++ ++ if (!get_long (abfd, &no)) ++ return false; ++ if (no) ++ if (bfd_seek (abfd, no<<2, SEEK_CUR)) ++ return false; ++ break; ++ ++ case EXT_COMMON: ++ /* skip name */ ++ if (bfd_seek (abfd, len<<2, SEEK_CUR)) ++ return false; ++ /* size of common block */ ++ if (!get_long (abfd, &len)) ++ return false; ++ /* number of references */ ++ if (!get_long (abfd, &no)) ++ return false; ++ /* skip references */ ++ if (no) ++ if (bfd_seek (abfd, no<<2, SEEK_CUR)) ++ return false; ++ break; ++ ++ default: /* error */ ++ fprintf (stderr, "unexpected type in hunk_ext at offset 0x%lx\n", ++ bfd_tell (abfd)); ++ return false; ++ } ++ ++ if (!get_long (abfd, &n)) ++ return false; ++ } ++ if (defsym_pos != 0 && syms) { ++ /* there are some defined symbols, keep enough information on ++ them to simulate an armap later on */ ++ nsyms = (struct arch_syms*) bfd_alloc (abfd, sizeof (struct arch_syms)); ++ nsyms->next = NULL; ++ if (syms_tail) ++ syms_tail->next = nsyms; ++ else ++ *syms = nsyms; ++ syms_tail = nsyms; ++ nsyms->offset = defsym_pos; ++ nsyms->size = bfd_tell (abfd) - defsym_pos; ++ nsyms->unit_offset = unit_offset; ++ } ++ break; /* of HUNK_EXT */ ++ ++ default: ++#if 0 ++ fprintf (stderr, "unexpected hunk 0x%lx at offset 0x%lx\n", ++ hunk_type, bfd_tell (abfd)); ++#endif ++ return false; ++ } ++ } ++ if (syms && symcount) ++ *symcount = defsymcount; ++ return (bfd_tell (abfd) == filesize); ++} ++ ++static boolean ++amiga_digest_file (abfd) ++ bfd *abfd; ++{ ++ amiga_data_type *amiga_data = AMIGA_DATA(abfd); ++ unsigned long hunk_type,pos; ++ struct stat stat_buffer; ++ ++ if (bfd_read ((PTR) &hunk_type, 1, 4, abfd) != 4) ++ { ++ bfd_set_error (bfd_error_wrong_format); ++ return false; ++ } ++ ++ if (bfd_stat (abfd, &stat_buffer) < 0) ++ return false; ++ ++ hunk_type = HUNK_VALUE(GL(&hunk_type)); ++ ++ switch (hunk_type) ++ { ++ case HUNK_UNIT: ++ /* Read the unit(s) */ ++/* ++ while ((pos=bfd_tell (abfd)) < stat_buffer.st_size) ++ { ++*/ ++ if (!amiga_read_unit (abfd, stat_buffer.st_size - abfd->origin)) ++ return false; ++ if (abfd->arelt_data) ++ arelt_size (abfd) = bfd_tell (abfd); ++/* }*/ ++ break; ++ ++ case HUNK_HEADER: ++ case HUNK_HEADER_POS: ++ /* This is a load file */ ++ if (!amiga_read_load (abfd)) ++ return(false); ++ break; ++ } ++ ++ return true; ++}/* of amiga_digest_file */ ++ ++ ++/* Read in Unit file */ ++/* file pointer is located after the HUNK_UNIT LW */ ++static boolean ++amiga_read_unit (abfd, size) ++ bfd *abfd; ++ unsigned long size; ++{ ++ amiga_data_type *amiga_data = AMIGA_DATA(abfd); ++ unsigned long hunk_type, hunk_number=0; ++ unsigned long sz; ++ unsigned long buf[2]; ++ ++ /* read LW length of unit's name */ ++ if (bfd_read (buf, sizeof (buf[0]), 1, abfd) != sizeof (buf[0])) ++ return false; ++ ++ /* and skip it (FIXME maybe) */ ++ if (bfd_seek (abfd, GL(buf)<<2, SEEK_CUR)) ++ return false; ++ ++ while (bfd_tell (abfd) < size) ++ { ++ if (!get_long (abfd, &hunk_type)) ++ return false; ++ ++ /* Now there may be CODE, DATA, BSS, SYMBOL, DEBUG, RELOC Hunks */ ++ hunk_type = HUNK_VALUE (hunk_type); ++ ++ switch(hunk_type) ++ { ++ case HUNK_UNIT: ++ /* next unit, seek back and return */ ++ return (bfd_seek (abfd, -4, SEEK_CUR) == 0); ++ ++ case HUNK_DEBUG: ++ /* we don't parse hunk_debug at the moment */ ++ if (!get_long (abfd, &sz) || bfd_seek (abfd, sz<<2, SEEK_CUR)) ++ return false; ++ break; ++ ++ case HUNK_NAME: ++ case HUNK_CODE: ++ case HUNK_DATA: ++ case HUNK_BSS: ++ /* Handle this hunk, including relocs, etc. ++ The finishing HUNK_END is consumed by the routine ++ */ ++ if (!amiga_handle_cdb_hunk (abfd, hunk_type, hunk_number++, ++ 0, -1)) ++ return false; ++ ++ break; ++ ++ default: ++ /* Something very nasty happened: ++ Illegal Hunk occured.... ++ */ ++ bfd_set_error (bfd_error_wrong_format); ++ return false; ++ break; ++ }/* Of switch hunk_type */ ++ ++ /* Next hunk */ ++ } ++ return true; ++} ++ ++ ++/* Read a load file */ ++static boolean ++amiga_read_load (abfd) ++ bfd *abfd; ++{ ++ amiga_data_type *amiga_data = AMIGA_DATA(abfd); ++ unsigned long *hunk_attributes, *hunk_sizes; ++ int hunk_number=0; ++ int hunk_type; ++ unsigned long max_hunk_number; ++ int i,n; ++ unsigned long buf[4]; ++ ++ /* Read hunk lengths (and memory attributes...) */ ++ /* Read in each hunk */ ++ ++ if (bfd_read (buf, sizeof(*buf), 4, abfd) != 4 * sizeof (*buf)) ++ return false; ++ ++ /* If there are resident libs: abort (obsolete feature) */ ++ if (GL(buf) != 0) ++ return false; ++ ++ max_hunk_number = GL(buf+1); ++ ++ /* Sanity */ ++ if (max_hunk_number<1) ++ { ++ bfd_set_error (bfd_error_wrong_format); ++ return false; ++ } ++ ++ amiga_data->nb_hunks = max_hunk_number; ++ ++ /* Num of root hunk must be 0 */ ++ if (GL(buf+2)!=0) ++ { ++ bfd_set_error (bfd_error_wrong_format); ++ return false; ++ } ++ ++ /* Num of last hunk must be mhn-1 */ ++ if (GL(buf+3) != max_hunk_number-1) ++ { ++ fprintf (stderr, "Overlay loadfiles are not supported\n"); ++ bfd_set_error (bfd_error_wrong_format); ++ return false; ++ } ++ ++ hunk_sizes = alloca (max_hunk_number * sizeof (unsigned long)); ++ hunk_attributes = alloca (max_hunk_number * sizeof (unsigned long)); ++ ++ if (hunk_sizes == NULL || hunk_attributes == NULL) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ return false; ++ } ++ ++ if (bfd_read (hunk_sizes, sizeof (unsigned long), max_hunk_number, abfd) != ++ max_hunk_number * sizeof (unsigned long)) ++ return false; ++ ++ /* Now, read in sizes and memory attributes */ ++ for (i=0; ifilepos = bfd_tell (abfd); ++ /* For a loadfile, the section size in memory comes from the ++ hunk header. The size on disk may be smaller. */ ++ current_section->_cooked_size = current_section->_raw_size = ++ ((hunk_size==-1) ? len : hunk_size); ++ current_section->target_index = hunk_number; ++ bfd_set_section_flags (abfd, current_section, secflags); ++ ++ amiga_per_section(current_section)->disk_size = len; /* size on disk */ ++ amiga_per_section(current_section)->attribute = hunk_attribute; ++ ++ /* skip the contents */ ++ if ((secflags & SEC_HAS_CONTENTS) && bfd_seek (abfd, len, SEEK_CUR)) ++ return false; ++ ++ if (!amiga_handle_rest (abfd, current_section, is_load)) ++ return false; ++ break; ++ ++ /* Currently, there is one debug hunk per executable, instead of ++ one per unit as it would with a "standard" amigaos ++ implementation. So the debug hunk is at the same level as ++ code/data/bss. This will change in the future */ ++ case HUNK_DEBUG: ++ /* format of gnu debug hunk is: ++ HUNK_DEBUG ++ N ++ 0413.L Magic number ++ symtabsize ++ strtabsize ++ symtabdata [length=symtabsize] ++ strtabdata [length=strtabsize] ++ [pad bytes] ++ */ ++ ++ /* read LW length */ ++ if (bfd_read (buf, sizeof(*buf), 1, abfd) != sizeof (*buf)) ++ return false; ++ ++ len = GL (buf) << 2; ++ if (len > 5*sizeof(long)) ++ { ++ if (bfd_read (buf, sizeof(*buf), 6, abfd) != 6*sizeof(*buf)) ++ return false; ++ ++ if (GL(buf) == 0413) /* GNU DEBUG HUNK */ ++ { ++ /*FIXME: we should add the symbols in the debug hunk to symtab... */ ++ amiga_data->symtab_size = GL(buf+1); ++ amiga_data->stringtab_size = GL(buf+2); ++ adata(abfd).sym_filepos = bfd_tell (abfd); ++ adata(abfd).str_filepos = adata(abfd).sym_filepos + ++ amiga_data->symtab_size; ++ len -= 5*sizeof(long); ++ } ++ } ++ if (bfd_seek (abfd, len, SEEK_CUR)) ++ return false; ++ break; ++ ++ default: ++ bfd_set_error (bfd_error_wrong_format); ++ return false; ++ break; ++ } /* switch (hunk_type) */ ++ ++ return true; ++ ++} /* Of amiga_handle_cdb_hunk */ ++ ++ ++/* Handle rest of a hunk ++ I.e.: Relocs, EXT, SYMBOLS... */ ++static boolean ++amiga_handle_rest (abfd, current_section, isload) ++ bfd *abfd; ++ asection *current_section; ++ boolean isload; ++{ ++ amiga_data_type *amiga_data = AMIGA_DATA(abfd); ++ unsigned long hunk_type, type, len, n; ++ long tmp; ++ unsigned long **p, no, *countptr; ++ struct amiga_raw_symbol *sp=NULL; ++ unsigned long buf[5]; ++ file_ptr filepos; ++ amiga_per_section_type *asect = amiga_per_section (current_section); ++ ++ while (1) ++ { ++ if (!get_long (abfd, &hunk_type)) ++ return false; ++ switch (hunk_type) ++ { ++ case HUNK_END: ++ return true; ++ break; ++ ++ case HUNK_RELOC8: ++ asect->raw_relocs8 = bfd_tell (abfd)-4; ++ countptr = &asect->num_raw_relocs8; ++ goto rel; ++ case HUNK_RELOC16: ++ asect->raw_relocs16 = bfd_tell (abfd)-4; ++ countptr = &asect->num_raw_relocs16; ++ goto rel; ++ case HUNK_RELOC32: ++ asect->raw_relocs32 = bfd_tell (abfd)-4; ++ countptr = &asect->num_raw_relocs32; ++ goto rel; ++ case HUNK_DREL8: ++ fprintf (stderr, "hunk_drel8 not supported yet\n"); ++ return false; ++ case HUNK_DREL16: ++ fprintf (stderr, "hunk_drel16 not supported yet\n"); ++ return false; ++ case HUNK_DREL32: ++ fprintf (stderr, "hunk_drel32 not supported yet\n"); ++ return false; ++ rel: ++ current_section->flags |= SEC_RELOC; ++ abfd->flags |= HAS_RELOC; ++ ++ /* read the first number of relocs */ ++ if (!get_long (abfd, &no)) ++ return false; ++ ++ /* count and skip them */ ++ while (no != 0) ++ { ++ current_section->reloc_count += no; ++ (*countptr) += no; ++ if (bfd_seek (abfd, (no+1)<<2, SEEK_CUR)) ++ return false; ++ if (!get_long (abfd, &no)) ++ return false; ++ } ++ break; ++ ++ case HUNK_SYMBOL: ++ /* In a unit, we ignore these, since all symbol information ++ comes with HUNK_EXT, in a load file, these are added */ ++ if (!isload) ++ { ++ amiga_per_section(current_section)->hunk_symbol_pos = ++ bfd_tell (abfd); ++ /* size of first symbol */ ++ if (bfd_read (buf, sizeof(*buf), 1, abfd) != 1*sizeof (*buf)) ++ return false; ++ while (GL(buf) != 0) /* until size is 0 */ ++ { ++ /* skip the name */ ++ if (bfd_seek (abfd, (GL(buf)+1)<<2, SEEK_CUR)) ++ return false; ++ /* read the size */ ++ if (bfd_read (buf, sizeof(*buf), 1, abfd) != 1*sizeof (*buf)) ++ return false; ++ } ++ break; ++ } ++ /* We add these, by falling through... */ ++ ++ case HUNK_EXT: ++ /* We leave these alone, until they are requested by the user */ ++ amiga_per_section(current_section)->hunk_ext_pos = bfd_tell (abfd); ++ ++ if (!get_long (abfd, &n)) ++ return false; ++ while (n != 0) ++ { ++ /* read the symbol type and length */ ++ type = (n>>24) & 0xff; ++ len = n & 0xffffff; ++ ++ /* skip the symbol name */ ++ if (bfd_seek (abfd, len<<2, SEEK_CUR)) ++ return false; ++ ++ switch(type) ++ { ++ case EXT_SYMB: /* Symbol hunks are relative to hunk start... */ ++ case EXT_DEF: /* def relative to hunk */ ++ case EXT_ABS: /* def absolute */ ++ abfd->flags |= HAS_SYMS; /* We have symbols */ ++ abfd->symcount++; ++ /* skip the value */ ++ if (!get_long (abfd, &tmp)) ++ return false; ++ break; ++ ++ case EXT_REF8: /* 8 bit ref */ ++ case EXT_REF16: /* 16 bit ref */ ++ case EXT_REF32: /* 32 bit ref */ ++ case EXT_DEXT8: /* 8 bit base relative ref */ ++ case EXT_DEXT16: /* 16 bit " "*/ ++ case EXT_DEXT32: /* 32 bit " " */ ++ abfd->flags |= HAS_SYMS; ++ abfd->symcount++; ++ if (!get_long (abfd, &tmp)) ++ return false; ++ if (tmp) ++ { ++ abfd->flags|=HAS_RELOC; ++ current_section->flags|=SEC_RELOC; ++ current_section->reloc_count += tmp; ++ /* skip references */ ++ if (bfd_seek (abfd, tmp<<2, SEEK_CUR)) ++ return false; ++ } ++ break; ++ ++ case EXT_COMMON: /* Common ref/def */ ++ abfd->flags |= HAS_SYMS; ++ abfd->symcount++; ++ /* skip the size of common block: FIXME */ ++ if (!get_long (abfd, &tmp)) ++ return false; ++ if (!get_long (abfd, &tmp)) ++ return false; ++ if (tmp) ++ { ++ abfd->flags |= HAS_RELOC; ++ current_section->flags |= SEC_RELOC; ++ current_section->reloc_count += tmp; ++ if (bfd_seek (abfd, tmp<<2, SEEK_CUR)) ++ return false; ++ } ++ break; ++ ++ default: /* error */ ++ bfd_set_error (bfd_error_wrong_format); ++ return false; ++ break; ++ }/* of switch type */ ++ ++ if (!get_long (abfd, &n)) ++ return false; ++ } ++ break; ++ ++ /* If a debug hunk is found at this position, the file has ++ been generated by a third party tool and the debug info ++ here are useless to us. Just skip the hunk, then. */ ++ case HUNK_DEBUG: ++ if (!get_long (abfd, &n) || bfd_seek (abfd, n<<2, SEEK_CUR)) ++ return false; ++ break; ++ default: /* error */ ++ bfd_set_error (bfd_error_wrong_format); ++ return false; ++ break; ++ }/* Of switch */ ++ }/* of while */ ++ return true; ++}/* of amiga_handle_rest*/ ++ ++static boolean ++amiga_mkobject (abfd) ++ bfd *abfd; ++{ ++ struct amiga_data_struct *rawptr; ++ ++ rawptr = (struct amiga_data_struct *) ++ bfd_zalloc (abfd, sizeof (struct amiga_data_struct)); ++ abfd->tdata.amiga_data = rawptr; ++ return rawptr != NULL; ++} ++ ++static boolean ++amiga_mkarchive (abfd) ++ bfd *abfd; ++{ ++ amiga_ardata_type *ar; ++ ar = (amiga_ardata_type*) bfd_zalloc (abfd, sizeof (amiga_ardata_type)); ++ amiga_ardata (abfd) = ar; ++ return (ar!=NULL); ++} ++ ++/* used with base relative linking */ ++extern int amiga_base_relative; ++ ++/* used with -resident linking */ ++extern int amiga_resident; ++ ++/* write nb long words (possibly swapped out) to the output file */ ++static boolean ++write_longs (in, nb, abfd) ++ unsigned long *in; ++ long nb; ++ bfd *abfd; ++{ ++ unsigned long out [10]; ++ int i; ++ ++ while (nb > 0) ++ { ++ for (i=0; ireloc_count;i++) ++ { ++ r=section->orelocation[i]; ++ if (r == NULL) ++ continue; ++ sym_p=*(r->sym_ptr_ptr); /* The symbol for this section */ ++ insection=sym_p->section; ++ ++ /* Is reloc relative to a special section ? */ ++ if ((insection==bfd_abs_section_ptr)||(insection==bfd_com_section_ptr)|| ++ (insection==bfd_und_section_ptr)||(insection==bfd_ind_section_ptr)) ++ continue; /* Nothing to do, since this translates to HUNK_EXT */ ++ if (insection->output_section == section) ++ relocs++; ++ } ++ return relocs; ++} ++ ++/* Adjust the indices map when we decide not to output the section */ ++static void ++remove_section_index (sec, index_map) ++ asection *sec; ++ long *index_map; ++{ ++ int i = sec->index; ++ sec = sec->next; ++ index_map[i++] = -1; ++ while (sec!=NULL) { ++ (index_map[i++])--; ++ sec=sec->next; ++ } ++} ++ ++/* Write out the contents of a bfd */ ++static boolean ++amiga_write_object_contents (abfd) ++ bfd *abfd; ++{ ++ struct amiga_data_struct *amiga_data=AMIGA_DATA(abfd); ++ sec_ptr p; ++ unsigned long n[5]; ++ long i; ++ static const char zero[3]={0,0,0}; ++ long datadata_relocs, bss_size = 0; ++ long *index_map; ++ asection *data_sec; ++ ++ /* Distinguish UNITS, LOAD Files ++ Write out hunks+relocs+HUNK_EXT+HUNK_DEBUG (GNU format)*/ ++ DPRINT(5,("Entering write_object_conts\n")); ++ ++ abfd->output_has_begun=true; /* Output has begun */ ++ ++ index_map = bfd_alloc (abfd, abfd->section_count * sizeof (long)); ++ if (!index_map) ++ return false; ++ ++ for (i=0, p=abfd->sections; p!=NULL; p=p->next) ++ index_map[i++] = p->index; ++ ++ /* Distinguish Load files and Unit files */ ++ if (amiga_data->IsLoadFile) ++ { ++ DPRINT(5,("Writing Load file\n")); ++ ++ /* Write out load file header */ ++ if (amiga_pOS_flg) ++ n[0] = HUNK_HEADER_POS; ++ else ++ n[0] = HUNK_HEADER; ++ n[1] = n[2] = 0; ++ for (p=abfd->sections; p!=NULL; p=p->next) { ++ /* For baserel linking, don't remove the empty sections, since ++ they may get some contents later on */ ++ if ((amiga_base_relative || p->_raw_size!=0 || p->_cooked_size!=0) && ++ !(amiga_base_relative && !strcmp (p->name, ".bss"))) ++ n[2]++; ++ else ++ remove_section_index (p, index_map); ++ } ++ ++ if (amiga_base_relative) ++ BFD_ASSERT(abfd->section_count==3); ++ ++ n[3]=0; ++ n[4]=n[2]-1; ++ if (!write_longs (n, 5, abfd)) ++ return false; ++ ++ /* Write out sizes and memory specifiers... */ ++ /* We have to traverse the section list again, bad but no other way... */ ++ if (amiga_base_relative) { ++ for (p=abfd->sections; p!=NULL; p=p->next) ++ { ++ if (amiga_resident && strcmp(p->name,".data")==0) ++ { ++ datadata_relocs = determine_datadata_relocs (abfd, p); ++ data_sec = p; ++ } ++ else if (strcmp(p->name,".bss")==0) ++ { ++ /* Get size for header*/ ++ bss_size = p->_raw_size; ++ } ++ } ++ } ++ ++ for (p=abfd->sections; p!=NULL; p=p->next) ++ { ++ long extra = 0; ++ ++ if (index_map[p->index] < 0) ++ continue; ++ if (amiga_resident && (strcmp(p->name,".text")==0)) ++ extra = datadata_relocs*4; ++ else { ++ if (amiga_base_relative && !strcmp (p->name, ".data")) ++ extra = bss_size; ++ } ++ ++ if (amiga_per_section(p)->disk_size == 0) ++ amiga_per_section(p)->disk_size = p->_raw_size; ++ ++ /* convert to a size in long words */ ++ n[0] = LONGSIZE (p->_raw_size+extra); ++ ++ i=amiga_per_section(p)->attribute; ++ switch (i) ++ { ++ case MEMF_CHIP: ++ n[0]|=0x40000000; ++ i=1; ++ break; ++ case MEMF_FAST: ++ n[0]|=0x80000000; ++ i=1; ++ break; ++ case 0: /* nothing*/ ++ i=1; ++ break; ++ default: /* Special one */ ++ n[0]|=0xc0000000; ++ n[1]=i; ++ i=2; ++ break; ++ }/* Of switch */ ++ ++ if (!write_longs (n, i, abfd)) ++ return false; ++ }/* Of for */ ++ } ++ else ++ {/* Unit , no base-relative linking here.... */ ++ int len = strlen (abfd->filename); ++ /* Write out unit header */ ++ DPRINT(5,("Writing Unit\n")); ++ ++ n[0]=HUNK_UNIT; ++ if (!write_longs (n, 1, abfd)) ++ return false; ++ ++ i = LONGSIZE (len); ++ if (!write_name (abfd, abfd->filename, 0)) ++ return false; ++ } ++ ++ /* Write out every section */ ++ for (p=abfd->sections; p!=NULL; p=p->next) ++ { ++ if (index_map[p->index] < 0) ++ continue; ++ if (amiga_per_section(p)->disk_size == 0) ++ amiga_per_section(p)->disk_size = p->_raw_size; ++ ++ if (amiga_resident && (strcmp(p->name,".text")==0)) ++ { ++ if (!amiga_write_section_contents (abfd,p,data_sec,datadata_relocs, ++ index_map)) ++ return false; ++ } ++ else if (amiga_base_relative && (strcmp(p->name,".data")==0)) ++ { ++ if (!amiga_write_section_contents (abfd,p,0,0,index_map)) ++ return false; ++ } ++ else ++ { ++ if (!amiga_write_section_contents (abfd,p,0,0,index_map)) ++ return false; ++ } ++ ++ if (!amiga_write_symbols(abfd,p)) /* Write out symbols, incl HUNK_END */ ++ return false; ++ ++ }/* of for sections */ ++ ++ /* Write out debug hunk, if requested */ ++ if (amiga_data->IsLoadFile /*&& write_debug_hunk*/) ++ { ++ extern boolean ++ translate_to_native_sym_flags (bfd*, asymbol*, struct external_nlist*); ++ ++ /* We have to convert all the symbols in abfd to a.out style.... */ ++ struct external_nlist data; ++ int str_size, offset = 4; ++ int symbols = 0; ++ asymbol *sym; ++ asection *s; ++ ++ if (abfd->symcount) ++ { ++ /* Now, set the .text, .data and .bss fields in the tdata ++ struct (because translate_to_native_sym_flags needs ++ them... */ ++ for (i=0,s=abfd->sections;s!=NULL;s=s->next) ++ if (strcmp(s->name,".text")==0) ++ { ++ i|=1; ++ adata(abfd).textsec=s; ++ } ++ else if (strcmp(s->name,".data")==0) ++ { ++ i|=2; ++ adata(abfd).datasec=s; ++ } ++ else if (strcmp(s->name,".bss")==0) ++ { ++ i|=4; ++ adata(abfd).bsssec=s; ++ } ++ ++ if (i!=7) /* One section missing... */ ++ { ++ fprintf(stderr,"Missing section, hunk not written\n"); ++ return true; ++ } ++ ++ str_size=4; /* the first 4 bytes will be replaced with the length */ ++ ++#define CAN_WRITE_OUTSYM(sym) (sym!=NULL && sym->section && \ ++ ((sym->section->owner && \ ++ bfd_get_flavour (sym->section->owner) == \ ++ bfd_target_aout_flavour) || \ ++ bfd_asymbol_flavour(sym) == \ ++ bfd_target_aout_flavour)) ++ ++ for (i = 0; i < abfd->symcount; i++) /* Translate every symbol */ ++ { ++ sym = abfd->outsymbols[i]; ++ /* NULL entries have been written already.... */ ++ if (CAN_WRITE_OUTSYM (sym)) ++ { ++ str_size += strlen(sym->name) + 1; ++ symbols++; ++ } ++ } ++ ++ /* Write out HUNK_DEBUG, size, 0413.... */ ++ n[0] = HUNK_DEBUG; ++ n[1] = 3 + ((symbols * sizeof(struct internal_nlist) + str_size + 3) >> 2); ++ n[2] = 0413L; /* Magic number */ ++ n[3] = symbols * sizeof(struct internal_nlist); ++ n[4] = str_size; ++ if (!write_longs ((PTR)(n), 5, abfd)) ++ return false; ++ ++ /* Write out symbols */ ++ for (i = 0; i < abfd->symcount; i++) /* Translate every symbol */ ++ { ++ sym = abfd->outsymbols[i]; ++ /* NULL entries have been written already.... */ ++ if (CAN_WRITE_OUTSYM (sym)) ++ { ++ { ++ aout_symbol_type *t = (aout_symbol_type *) ++ &(sym)->the_bfd; ++ ++ bfd_h_put_16(abfd, t->desc, data.e_desc); ++ bfd_h_put_8(abfd, t->other, data.e_other); ++ bfd_h_put_8(abfd, t->type, data.e_type); ++ } ++ if (!translate_to_native_sym_flags(abfd,sym,&data)) ++ { ++ fprintf (stderr, "Cannot translate flags for %s\n", ++ sym->name); ++ } ++ PUT_WORD(abfd, offset, &(data.e_strx[0])); /* Store index */ ++ offset += strlen(sym->name) + 1; ++ if (bfd_write ((unsigned long *)&data,sizeof(long),3,abfd) ++ != sizeof(long)*3) ++ return false; ++ } ++ } ++ ++ /* Write out strings */ ++ if (!write_longs ((unsigned long *)&str_size, 1, abfd)) ++ return false; ++ ++ for (i = 0; i < abfd->symcount; i++) /* Translate every symbol */ ++ { ++ sym = abfd->outsymbols[i]; ++ /* NULL entries have been written already.... */ ++ if (CAN_WRITE_OUTSYM (sym)) ++ { ++ int len = strlen(sym->name) + 1; ++ ++ /* Write string tab */ ++ if (bfd_write((PTR)(sym->name),sizeof(char),len,abfd)!=len) ++ return false; ++ } ++ } ++ ++ i = ((str_size + 3) & (~3)) - str_size; ++ str_size = 0; ++ /* Write padding */ ++ if (i && bfd_write((PTR)(&str_size),sizeof(char),i,abfd)!=i) ++ return false; ++ ++ /* write a HUNK_END here to finish the loadfile, or amigaos ++ will refuse to load it */ ++ n[0]=HUNK_END; ++ if (!write_longs (n, 1, abfd)) ++ return false; ++ }/* Of if abfd->symcount */ ++ }/* Of write out debug hunk */ ++ ++ bfd_release (abfd, index_map); ++ return true; ++} ++ ++/* Write a string padded to 4 bytes and preceded by it's length in ++ long words ORed with */ ++static boolean ++write_name (abfd, name, value) ++ bfd *abfd; ++ const char *name; ++ long value; ++{ ++ long i,j; ++ struct name { ++ long len; ++ char buf[MAX_NAME_SIZE+3]; ++ } n; ++ ++ j = strlen (name); ++ if (j > MAX_NAME_SIZE) ++ j = MAX_NAME_SIZE; ++ strncpy (n.buf, name, j); ++ i = LONGSIZE (j) | value; ++ n.len = GL (&i); ++ if (j&3) { ++ n.buf[j] = n.buf[j+1] = n.buf[j+2] = '\0'; ++ j += (4-(j&3))&3; ++ } ++ return (bfd_write ((PTR)&n, 1, sizeof(long)+j, abfd) == sizeof(long)+j); ++} ++ ++static boolean ++amiga_write_archive_contents (arch) ++ bfd *arch; ++{ ++ bfd *object; ++ char buffer[DEFAULT_BUFFERSIZE]; ++ int i; ++ unsigned long n[2]; ++ long size; ++ struct stat status; ++ ++ for (object = arch->archive_head; object; object = object->next) ++ { ++ unsigned int remaining; ++ ++ if (bfd_write_p (object)) ++ { ++ bfd_set_error (bfd_error_invalid_operation); ++ return false; ++ } ++ ++ if (stat (object->filename, &status) != 0) ++ { ++ bfd_set_error (bfd_error_system_call); ++ return false; ++ } ++ ++ if (bfd_seek (object, (file_ptr) 0, SEEK_SET) != 0) ++ return false; ++ ++ remaining = status.st_size; ++ ++ while (remaining) ++ { ++ unsigned int amt = DEFAULT_BUFFERSIZE; ++ if (amt > remaining) ++ amt = remaining; ++ errno = 0; ++ if (bfd_read (buffer, amt, 1, object) != amt) ++ { ++ if (bfd_get_error () != bfd_error_system_call) ++ bfd_set_error (bfd_error_malformed_archive); ++ return false; ++ } ++ if (bfd_write (buffer, amt, 1, arch) != amt) ++ return false; ++ remaining -= amt; ++ } ++ } ++ return true; ++} ++ ++static boolean ++amiga_write_armap (abfd) ++ bfd *abfd; ++{ ++ return true; ++} ++ ++#define determine_size(type) (2 - ((type)>=3 ? (type)-3 : (type))) ++ ++static int ++determine_type (r) ++ struct reloc_cache_entry *r; ++{ ++ switch (r->howto->type) /* FIXME: Is this sufficient to distinguish them ?*/ ++ { ++ /* AMIGA specific */ ++ case HUNK_RELOC8: ++ case HUNK_RELOC16: ++ case HUNK_RELOC32: ++ case HUNK_DREL8: ++ case HUNK_DREL16: ++ case HUNK_DREL32: ++ if (r->howto->type >= HUNK_DREL32) ++ return 3 + r->howto->type - HUNK_DREL32; ++ return r->howto->type - HUNK_RELOC32; ++ ++ /* Now, these may occur, if a.out was used as input */ ++ case 0: /* 8 bit ref */ ++ return 2; ++ ++ case 1: /* 16 bit relative */ ++ return 1; ++ ++ case 2: /* 32 bit relative */ ++ return 0; ++ ++ case 9: /* 16 bit base rel */ ++ return 4; ++ ++ case 10: /* 32 bit baserel */ ++ return 3; ++ ++ /* FIXME: There are other (pc relative) displacements left */ ++ default: /* Error, can't represent this */ ++ bfd_set_error(bfd_error_nonrepresentable_section); ++ return -1; ++ }/* Of switch */ ++} ++ ++#define MAX_RELOC_OUT 3 ++ ++static unsigned long reloc_types[]= { ++ HUNK_RELOC32, HUNK_RELOC16, HUNK_RELOC8 ++/* these reloc types are not supported at the moment */ ++#if 0 ++ HUNK_DREL32, HUNK_DREL16, HUNK_DREL8 ++#endif ++}; ++ ++#define NB_RELOC_TYPES (sizeof(reloc_types) / sizeof(reloc_types[0])) ++ ++/* Write out section contents, including relocs */ ++static boolean ++amiga_write_section_contents (abfd, section, data_sec, datadata_relocs, ++ index_map) ++ bfd *abfd; ++ asection *section; ++ asection *data_sec; ++ long datadata_relocs; ++ long *index_map; ++{ ++ static const char zero[3]={0,0,0}; ++ unsigned long n[2]; ++ int i, j, type, size; ++ unsigned int k; ++ struct reloc_cache_entry *r; ++ asection *osection, *sec, *insection; ++ asymbol *sym_p; ++ int pad, reloc_count = 0; ++ unsigned long disksize; ++ int max_hunk = -1; ++ char *c_p; ++ unsigned char *values; ++ long *reloc_counts; ++ ++ DPRINT(5, ("Entered Write-section-conts\n")); ++ ++ /* Compute the maximum hunk number of the ouput file */ ++ sec = abfd->sections; ++ while (sec) { ++ max_hunk++; ++ sec = sec->next; ++ } ++ ++ /* If we are base-relative linking and the section is .bss and abfd ++ is a load file, then return */ ++ if (AMIGA_DATA(abfd)->IsLoadFile) ++ { ++ if (amiga_base_relative && (strcmp(section->name, ".bss") == 0)) ++ return true; /* Nothing to do */ ++ } ++ else ++ { ++ /* WRITE out HUNK_NAME + section name */ ++ n[0] = HUNK_NAME; ++ if (!write_longs (n, 1, abfd) || !write_name (abfd, section->name, 0)) ++ return false; ++ } ++ ++ /* Depending on the type of the section, write out HUNK_{CODE|DATA|BSS} */ ++ if (section->flags & SEC_CODE) /* Code section */ ++ n[0] = HUNK_CODE; ++ else if (section->flags & (SEC_DATA | SEC_LOAD)) /* data section */ ++ n[0] = HUNK_DATA; ++ else if (section->flags & SEC_ALLOC) /* BSS */ ++ n[0] = HUNK_BSS; ++ else if (section->flags & SEC_DEBUGGING) /* debug section */ ++ n[0] = HUNK_DEBUG; ++ else /* Error */ ++ { ++#if 0 ++ bfd_set_error(bfd_error_nonrepresentable_section); ++ return(false); ++#else ++ /* FIXME: Just dump everything we don't currently recognize into ++ a DEBUG hunk. */ ++ n[0] = HUNK_DEBUG; ++#endif ++ } ++ ++ DPRINT(10,("Section type is %lx\n",n[0])); ++ ++ /* Get real size in n[1], this may be shorter than the size in the header */ ++ disksize = LONGSIZE (amiga_per_section(section)->disk_size) + datadata_relocs; ++ pad = (4-(amiga_per_section(section)->disk_size & 3)) & 3; ++ n[1] = disksize; ++ ++ /* in a load file, we put section attributes only in the header */ ++ if (!(AMIGA_DATA(abfd)->IsLoadFile)) ++ { ++ /* Get attribute for section */ ++ switch (amiga_per_section(section)->attribute) ++ { ++ case MEMF_CHIP: ++ n[1] |= HUNKF_CHIP; ++ break; ++ case MEMF_FAST: ++ n[1] |= HUNKF_FAST; ++ break; ++ case 0: ++ break; ++ default: /* error , can't represent this */ ++ bfd_set_error(bfd_error_nonrepresentable_section); ++ return(false); ++ break; ++ } ++ }/* Of switch */ ++ ++ if (!write_longs (n, 2, abfd)) ++ return false; ++ ++ DPRINT(5,("Wrote code and size=%lx\n",n[1])); ++ ++ /* If a BSS hunk, we're done, else write out section contents */ ++ if (HUNK_VALUE(n[0]) == HUNK_BSS) ++ return true; ++ ++ DPRINT(5,("Non bss hunk...\n")); ++ ++ /* Traverse through the relocs, sample them in reloc_data, adjust section ++ data to get 0 addend ++ Then compactify reloc_data ++ Set the entry in the section for the reloc to NULL */ ++ ++ if (disksize != 0) ++ BFD_ASSERT((section->flags & SEC_IN_MEMORY) != 0); ++ ++ reloc_counts = (long*) bfd_alloc (abfd, NB_RELOC_TYPES * (max_hunk+1) ++ * sizeof (long)); ++ if (!reloc_counts) ++ return false; ++ bzero (reloc_counts, NB_RELOC_TYPES*(max_hunk+1)*sizeof (long)); ++ ++ DPRINT(5,("Section has %d relocs\n", section->reloc_count)); ++ ++ for (i = 0; i < section->reloc_count; i++) ++ { ++ r = section->orelocation[i]; ++ if (r == NULL) ++ continue; ++ sym_p = *(r->sym_ptr_ptr); /* The symbol for this section */ ++ insection = sym_p->section; ++ DPRINT(5,("Sec for reloc is %lx(%s)\n",insection,insection->name)); ++ DPRINT(5,("Symbol for this reloc is %lx(%s)\n",sym_p, sym_p->name)); ++ ++ /* Is reloc relative to a special section ? */ ++ if ((insection == bfd_abs_section_ptr) || ++ (insection == bfd_com_section_ptr) || ++ (insection == bfd_und_section_ptr) || ++ (insection == bfd_ind_section_ptr)) ++ continue; /* Nothing to do, since this translates to HUNK_EXT */ ++ ++ r->addend += sym_p->value; /* Add offset of symbol from section start */ ++ ++ /* Address of reloc has been unchanged since original reloc, or has been ++ adjusted by get_relocated_section_contents. */ ++ /* For relocs, the vma of the target section is in the data, the ++ addend is -vma of that section =>No need to add vma*/ ++ /* Add in offset */ ++ r->addend += insection->output_offset; ++ osection = insection->output_section; /* target section */ ++ ++ /* Determine which hunk to write, and index of target */ ++ j = index_map[osection->index]; ++ ++ if (j<0 || j>max_hunk) { ++ fprintf (stderr, "erroneous relocation to hunk %d\n", j); ++ BFD_FAIL (); ++ } ++ ++ type = determine_type(r); ++ if (type == -1) ++ return false; ++ size = determine_size(type); ++ ++ if (type < NB_RELOC_TYPES) ++ reloc_counts[type+(j*NB_RELOC_TYPES)]++; ++ else { ++ bfd_set_error (bfd_error_nonrepresentable_section); ++ return false; ++ } ++ ++ c_p = ((char *)(section->contents)) + r->address; ++ DPRINT(5,("reloc address=%lx,addend=%lx\n",r->address,r->addend)); ++ ++ /* There is no error checking with these.. */ ++ values = (unsigned char *)c_p; ++ switch (size) ++ { ++ case 0: /* adjust byte */ ++ j = (int)(*c_p) + r->addend; ++ *c_p = (signed char)j; ++ break; ++ case 1: /* Adjust word */ ++ k = values[1] | (values[0] << 8); ++ j = (int)k + r->addend; ++ values[0] = (j & 0xff00) >> 8; ++ values[1] = j & 0xff; ++ break; ++ case 2: /* adjust long */ ++ k = values[3] | (values[2] << 8) | (values[1] << 16) | ++ (values[0] << 24); ++ j = (int)k + r->addend; ++ values[3] = j & 0xff; ++ values[2] = (j & 0xff00) >> 8; ++ values[1] = (j & 0xff0000) >> 16; ++ values[0] = ((unsigned int)j & 0xff000000) >> 24; ++ break; ++ } /* of switch */ ++ ++ r->addend = 0; ++ DPRINT(5,("Did adjusting\n")); ++ ++ if (type < MAX_RELOC_OUT) ++ reloc_count++; ++ else ++ section->orelocation[i] = NULL; ++ } /* of for i */ ++ ++ DPRINT(5,("Did all relocs\n")); ++ ++ /* We applied all the relocs, as far as possible to obtain 0 addend fields */ ++ /* Write the section contents */ ++ if (amiga_per_section(section)->disk_size != 0) ++ { ++ if (bfd_write((PTR)(section->contents), sizeof(char), ++ amiga_per_section(section)->disk_size, abfd) != ++ amiga_per_section(section)->disk_size) ++ return false; ++ } ++ ++ /* pad the section on disk if necessary (to a long boundary) */ ++ if (pad!=0 && (bfd_write (zero, 1, pad, abfd) != pad)) ++ return false; ++ ++#if 0 ++ /* write bss data in the data hunk if needed */ ++ i = 0; ++ while (bss_size--) ++ if (!write_longs((PTR)&i, 1, abfd)) ++ return false; ++#endif ++ ++ if (datadata_relocs) ++ { ++ datadata_relocs--; ++ if (!write_longs (&datadata_relocs, 1, abfd)) ++ return false; ++ for (i = 0; i < data_sec->reloc_count; i++) ++ { ++ r = data_sec->orelocation[i]; ++ if (r == NULL) ++ continue; ++ sym_p = *(r->sym_ptr_ptr); /* The symbol for this section */ ++ insection = sym_p->section; ++ ++ /* Is reloc relative to a special section ? */ ++ if ((insection == bfd_abs_section_ptr) || ++ (insection == bfd_com_section_ptr) || ++ (insection == bfd_und_section_ptr) || ++ (insection == bfd_ind_section_ptr)) ++ continue; /* Nothing to do, since this translates to HUNK_EXT */ ++ ++ if (insection->output_section == data_sec) ++ { ++ if (determine_type(r) == 0) ++ if (!write_longs ((PTR)&r->address, 1, abfd)) ++ return false; ++ } ++ } ++ } ++ DPRINT(10,("Wrote contents, writing relocs now\n")); ++ ++ ++ if (reloc_count) { ++ while (reloc_count) { ++ /* Sample every reloc type */ ++ for (i = 0; i < NB_RELOC_TYPES; i++) { ++ int written = false; ++ for (j = 0; j <= max_hunk; j++) { ++ long relocs; ++ while ((relocs = reloc_counts [i+(j*NB_RELOC_TYPES)]) > 0) { ++ if (!written) ++ if (!write_longs(&reloc_types[i], 1, abfd)) ++ return false; ++ else ++ written = true; ++ ++ if (relocs > 0xffff) ++ relocs = 0xffff; ++ ++ reloc_counts [i+(j*NB_RELOC_TYPES)] -= relocs; ++ n[0] = relocs; ++ n[1] = j; ++ if (!write_longs(n, 2, abfd)) ++ return false; ++ reloc_count -= relocs; ++ ++ for (k = 0; k < section->reloc_count; k++) { ++ int jj; ++ ++ r = section->orelocation[k]; ++ if (r == NULL) /* already written */ ++ continue; ++ sym_p = *(r->sym_ptr_ptr); /* The symbol for this section */ ++ insection = sym_p->section; ++ /* Is reloc relative to a special section ? */ ++ if ((insection == bfd_abs_section_ptr) || ++ (insection == bfd_com_section_ptr) || ++ (insection == bfd_und_section_ptr) || ++ (insection == bfd_ind_section_ptr)) ++ /* Nothing to do, since this translates to HUNK_EXT */ ++ continue; ++ ++ osection = insection->output_section; /* target section */ ++ ++#if 0 ++ /* Determine which hunk to write, and index of target */ ++ for (jj = 0, sec = abfd->sections; sec != NULL; ++ sec = sec->next, jj++) { ++ if (sec == osection) ++ break; ++ } ++ ++ BFD_ASSERT (jj==index_map[insection->output_section->index]); ++#else ++ jj=index_map[insection->output_section->index]; ++#endif ++ if (jj == j && i == determine_type(r)) { ++ section->orelocation[k] = NULL; ++ if (!write_longs((PTR)&r->address, 1, abfd)) ++ return false; ++ if (--relocs == 0) ++ break; ++ } ++ } ++ } ++ } ++ } ++ } ++ /* write a zero to finish the relocs */ ++ if (!write_longs((PTR)&reloc_count, 1, abfd)) ++ return false; ++ } ++ bfd_release (abfd, reloc_counts); ++ DPRINT(5,("Leaving write_section...\n")); ++ return true; ++} ++ ++ ++/* Write out symbol information, including HUNK_EXT, DEFS, ABS. ++ In the case, we were linking base relative, the symbols of the .bss ++ hunk have been converted already to belong to the .data hunk */ ++ ++static boolean ++amiga_write_symbols (abfd, section) ++ bfd *abfd; ++ asection *section; ++{ ++ ++ int i,j; ++ struct reloc_cache_entry *r; ++ asection *osection; ++ asymbol *sym_p; ++ char b[3]="\0\0\0"; ++ unsigned long n[3]; ++ int symbol_count; ++ unsigned long symbol_header; ++ unsigned long type, tmp; ++ int len; ++ ++ /* If base rel linking and section is .bss ==> exit */ ++ if (amiga_base_relative && (strcmp(section->name,".bss")==0)) ++ return true; ++ ++ if (section->reloc_count==0 && abfd->symcount==0) ++ {/* Write HUNK_END */ ++ alldone: ++ DPRINT(5,("Leaving write_symbols\n")); ++ n[0]=HUNK_END; ++ return write_longs ((PTR)n, 1, abfd); ++ } ++ ++ symbol_count=0; ++ symbol_header=HUNK_EXT; ++ ++ /* If this is Loadfile, then do not write HUNK_EXT, but rather HUNK_SYMB*/ ++ ++ /* Write out all the symbol definitions, then HUNK_END ++ ++ Now, first traverse the relocs, all entries that are non NULL ++ have to be taken into account */ ++ /* Determine the type of HUNK_EXT to issue and build a single ++ HUNK_EXT subtype */ ++ ++ ++ /*FIXME: We write out many HUNK_EXT's entries for references to the ++ same symbol.. */ ++ for (i=0;ireloc_count;i++) ++ { ++ r=section->orelocation[i]; ++ ++ if (r==NULL) /* Empty entry */ ++ continue; ++ ++ sym_p=*(r->sym_ptr_ptr); /* The symbol for this section */ ++ osection=sym_p->section; /* The section the symbol belongs to */ ++ /* this section MUST be a special section */ ++ ++ DPRINT(5,("Symbol is %s, section is %lx(%s)\n",sym_p->name,osection,osection->name)); ++ ++ if (osection!=bfd_com_section_ptr) /* Not common symbol */ ++ { ++ DPRINT(5,("Non common ref\n")); ++ /* Add a reference to this HUNK */ ++ if ((symbol_count++)==0) /* First write out the HUNK_EXT */ ++ { ++ tmp=HUNK_EXT; ++ if (!write_longs(&tmp, 1, abfd)) ++ return false; ++ } ++ ++ /* Determine type of ref */ ++ switch(r->howto->type) ++ { ++ /* AMIGA specific */ ++ case 0: ++ case HUNK_RELOC8: ++ type=EXT_REF8; ++ break; ++ ++ case 1: ++ case HUNK_RELOC16: ++ type=EXT_REF16; ++ break; ++ ++ case 2: ++ case HUNK_RELOC32: ++ type=EXT_REF32; ++ break; ++ case HUNK_DREL8: ++ type=EXT_DEXT8; ++ break; ++ ++ case 9: ++ case HUNK_DREL16: ++ type=EXT_DEXT16; ++ break; ++ ++ case 10: ++ case HUNK_DREL32: ++ type=EXT_DEXT32; ++ break; ++ ++ /* FIXME: There are other (pc relative) displacements left */ ++ default: /* Error, can't represent this */ ++ bfd_set_error(bfd_error_nonrepresentable_section); ++ return false; ++ break; ++ }/* Of switch */ ++ DPRINT(5,("Type is %x\n",type)); ++ ++ if (!write_name (abfd, sym_p->name, type << 24)) ++ return false; ++ n[0]=1; /* 1 ref at address... */ ++ n[1]=r->address; ++ if (!write_longs (n, 2, abfd)) ++ return false; ++ ++ continue; /* Next relocation */ ++ }/* Of is ref to undefined or abs symbol */ ++ ++ else /* ref to common symbol */ ++ { ++ DPRINT(5,("Common ref\n")); ++ ++ /* If the reference is NOT 32 bit wide absolute , then issue warning */ ++ if ((r->howto->type!=2)&&(r->howto->type!=HUNK_RELOC32)) ++ fprintf(stderr,"Warning: Non 32 bit wide reference to common symbol %s\n", ++ sym_p->name); ++ ++ if ((symbol_count++)==0) /* First write out the HUNK_EXT */ ++ { ++ tmp=HUNK_EXT; ++ if (!write_longs (&tmp, 1, abfd)) ++ return false; ++ } ++ ++ if (!write_name (abfd, sym_p->name, EXT_COMMON<<24)) ++ return false; ++ n[0]=sym_p->value; /* Size of common block */ ++ n[1]=1; ++ n[2]=r->address; ++ if (!write_longs (n, 3, abfd)) ++ return false; ++ ++ continue; ++ }/* Of is common section */ ++ ++ DPRINT(10,("Failing...\n")); ++ BFD_FAIL(); ++ }/* Of traverse relocs */ ++ ++ ++ /* Now traverse the symbol table and write out all definitions, that are relative ++ to this hunk */ ++ /* Absolute defs are always only written out with the first hunk */ ++ /* Don't write out local symbols ++ undefined symbols ++ indirect symbols ++ warning symbols ++ debugging symbols ++ warning symbols ++ constructor symbols, since they are unrepresentable in HUNK format..*/ ++ ++ DPRINT(10,("Traversing symbol table\n")); ++ symbol_header=(AMIGA_DATA(abfd)->IsLoadFile)?HUNK_SYMBOL:HUNK_EXT; ++ for (i=0;isymcount;i++) ++ { ++ sym_p=abfd->outsymbols[i]; ++ osection=sym_p->section; ++ ++ DPRINT(5,("%d. symbol(%s), osec=%x(%s)\n",i,sym_p->name,osection,osection->name)); ++ ++ if ((osection==bfd_und_section_ptr)/*||(osection==bfd_com_section_ptr)*/|| ++ (osection==bfd_ind_section_ptr)) ++ continue; /* Don't write these */ ++ ++ /* Only write abs defs, if not writing A Loadfile */ ++ if ((osection==bfd_abs_section_ptr)&&(section->index==0)&& ++ !AMIGA_DATA(abfd)->IsLoadFile) /* Write out abs defs */ ++ { ++ DPRINT(5,("Abs symbol\n")); ++ /* don't write debug symbols, they will be written in a ++ HUNK_DEBUG later on */ ++ if (sym_p->flags & BSF_DEBUGGING) ++ continue; ++ ++ if ((symbol_count++)==0) /* First write out the HUNK_EXT */ ++ { ++ if (!write_longs (&symbol_header, 1, abfd)) ++ return false; ++ } ++ ++ if (!write_name (abfd, sym_p->name, EXT_ABS << 24)) ++ return false; ++ n[0]=sym_p->value; ++ if (!write_longs (n, 1,abfd)) ++ return false; ++ continue; ++ }/* Of abs def */ ++ if (osection == NULL) /* Happens with constructor functions. FIXME */ ++ continue; ++ if (osection==bfd_abs_section_ptr) /* Not first hunk. Already written */ ++ continue; ++ ++ /* If it is a warning symbol, or a constructor symbol or a ++ debugging or a local symbol, don't write it */ ++ if (sym_p->flags & (BSF_WARNING|BSF_CONSTRUCTOR|BSF_DEBUGGING|BSF_LOCAL)) ++ continue; ++ ++ if (!(sym_p->flags & BSF_GLOBAL)) ++ continue; ++ ++ /* Now, if osection==section, write it out */ ++ if (osection->output_section==section) ++ { ++ DPRINT(5,("Writing it out\n")); ++ ++ if ((symbol_count++)==0) /* First write out the header */ ++ { ++ if (!write_longs (&symbol_header, 1, abfd)) ++ return false; ++ } ++ type=((symbol_header==HUNK_EXT?EXT_DEF:0)<<24)&0xff000000; ++ ++ if (!write_name (abfd, sym_p->name, type)) ++ return false; ++ n[0] = sym_p->value + sym_p->section->output_offset; ++ if (!write_longs (n, 1, abfd)) ++ return false; ++ } ++ else ++ { ++ /* write common definitions as bss common references */ ++ if (osection->output_section == bfd_com_section_ptr && ++ section->index == 2) ++ { ++ if ((symbol_count++)==0) /* First write out the header */ ++ { ++ if (!write_longs (&symbol_header, 1, abfd)) ++ return false; ++ } ++ if (!write_name (abfd, sym_p->name, EXT_COMMON<<24)) ++ return false; ++ ++ n[0]=sym_p->value; ++ n[1]=0; ++ if (!write_longs (n, 2, abfd)) ++ return false; ++ } ++ } ++ }/* Of for */ ++ ++ DPRINT(10,("Did traversing\n")); ++ if (symbol_count) /* terminate HUNK_EXT, HUNK_SYMBOL */ ++ { ++ n[0]=0; ++ if (!write_longs (n, 1, abfd)) ++ return false; ++ } ++ DPRINT(5,("Leaving\n")); ++ goto alldone; /* Write HUNK_END, return */ ++} ++ ++static boolean ++amiga_get_section_contents (abfd, section, location, offset, count) ++ bfd *abfd; ++ sec_ptr section; ++ PTR location; ++ file_ptr offset; ++ bfd_size_type count; ++{ ++ long disk_size = amiga_per_section (section)->disk_size; ++ ++ if (bfd_seek (abfd, section->filepos + offset, SEEK_SET)) ++ return false; ++ ++ if (offset+count > disk_size) { ++ /* the section's size on disk may be smaller than in memory ++ in this case, pad the contents */ ++ if (bfd_read (location, 1, disk_size-offset, abfd) != disk_size-offset) ++ return false; ++ memset ((char *) location + disk_size - offset, 0, count-(disk_size-offset)); ++ } ++ else { ++ if (bfd_read (location, 1, count, abfd) != disk_size-offset) ++ return false; ++ } ++ return true; ++} ++ ++ ++boolean ++amiga_new_section_hook (abfd, newsect) ++ bfd *abfd; ++ asection *newsect; ++{ ++ newsect->used_by_bfd = (PTR) bfd_zalloc (abfd, ++ sizeof (amiga_per_section_type)); ++ newsect->alignment_power = 2; ++ amiga_per_section(newsect)->reloc_tail = NULL; ++ if (!strcmp (newsect->name, ".data_chip") || !strcmp (newsect->name, ++ ".bss_chip")) ++ amiga_per_section(newsect)->attribute |= MEMF_CHIP; ++ return true; ++} ++ ++static boolean ++amiga_slurp_symbol_table (abfd) ++ bfd *abfd; ++{ ++ amiga_data_type *amiga_data=AMIGA_DATA(abfd); ++ asection *section; ++ struct amiga_raw_symbol *sp; ++ amiga_symbol_type *asp=NULL; ++ unsigned long *lp, l, buf[4]; ++ unsigned long len, type; ++ ++ if (amiga_data->symbols) ++ return true; /* already read */ ++ ++ if (abfd->symcount) ++ asp = (amiga_symbol_type*) bfd_alloc (abfd, sizeof (amiga_symbol_type) * ++ abfd->symcount); ++ else ++ return true; ++ ++ if (abfd->symcount!=0 && !asp) { ++ bfd_set_error (bfd_error_no_memory); ++ return false; ++ } ++ ++ amiga_data->symbols = asp; ++ ++ /* Symbols are associated with every section */ ++ for (section=abfd->sections; section!=NULL; section=section->next) ++ { ++ if (amiga_per_section(section)->hunk_ext_pos == 0) ++ continue; ++ ++ if (bfd_seek (abfd, amiga_per_section(section)->hunk_ext_pos, SEEK_SET)) ++ return false; ++ ++ amiga_per_section(section)->amiga_symbols = asp; ++ ++ while (get_long (abfd, &l) && (l!=0)) ++ { ++ type = l>>24; /* type of entry */ ++ len = (l & 0xffffff) << 2; /* namelength */ ++ ++ /* read the name */ ++ if ((asp->symbol.name = bfd_alloc (abfd ,len+1))==NULL) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ return false; ++ } ++ if (bfd_read ((PTR)asp->symbol.name, 1, len, abfd) != len) ++ return false; ++ ((char*)asp->symbol.name)[len] = '\0'; ++ ++ asp->symbol.the_bfd = abfd; ++ asp->type = type; ++ asp->symbol.flags = BSF_GLOBAL; ++ asp->index = asp - amiga_data->symbols; ++ ++ switch(type) { ++ case EXT_COMMON: /* Common reference/definition*/ ++ asp->symbol.section = bfd_com_section_ptr; ++ asp->hunk_number = -3; ++ /* size of common block -> symbol's value */ ++ if (!get_long (abfd, &l)) ++ return false; ++ asp->symbol.value = l; ++ /* skip refs */ ++ if (!(get_long (abfd, &l) && bfd_seek (abfd, l<<2, SEEK_CUR)==0)) ++ return false; ++ break; ++ case EXT_ABS: /* Absolute */ ++ asp->symbol.section = bfd_abs_section_ptr; ++ asp->hunk_number = -1; ++ goto rval; ++ break; ++ case EXT_DEF: /* Relative Definition */ ++ case EXT_SYMB: /* Same as EXT_DEF for load files */ ++ asp->symbol.section = section; ++ asp->hunk_number = section->target_index; ++ rval: ++ /* read the value */ ++ if (get_long (abfd, &l)) ++ asp->symbol.value = l; ++ else ++ return false; ++ break; ++ ++ default: /* References to an undefined symbol */ ++ asp->symbol.section = bfd_und_section_ptr; ++ asp->hunk_number = -2; /* undefined */ ++ asp->symbol.flags = 0; ++ /* skip refs */ ++ if (!(get_long (abfd, &l) && bfd_seek (abfd, l<<2, SEEK_CUR)==0)) ++ return false; ++ break; ++ } ++ asp++; ++ } ++ } ++ return true; ++} ++ ++ ++/* Get size of symtab */ ++long ++amiga_get_symtab_upper_bound (abfd) ++ bfd *abfd; ++{ ++ if (!amiga_slurp_symbol_table (abfd)) ++ return -1; ++ return (abfd->symcount+1) * (sizeof (amiga_symbol_type *)); ++} ++ ++long ++amiga_get_symtab (abfd, location) ++ bfd *abfd; ++ asymbol **location; ++{ ++ amiga_symbol_type *symp; ++ int i=0; ++ ++ if(!amiga_slurp_symbol_table(abfd)) ++ return -1; ++ ++ if (abfd->symcount) ++ { ++ for (symp = AMIGA_DATA(abfd)->symbols; i < bfd_get_symcount (abfd); ++ i++, symp++) ++ *location++ = &symp->symbol; ++ } ++ return abfd->symcount; ++} ++ ++asymbol * ++amiga_make_empty_symbol (abfd) ++ bfd *abfd; ++{ ++ amiga_symbol_type *new = ++ (amiga_symbol_type *) bfd_zalloc (abfd, sizeof (amiga_symbol_type)); ++ new->symbol.the_bfd = abfd; ++ return &new->symbol; ++} ++ ++ ++ ++void ++amiga_get_symbol_info (ignore_abfd, symbol, ret) ++ bfd *ignore_abfd; ++ asymbol *symbol; ++ symbol_info *ret; ++{ ++ bfd_symbol_info (symbol, ret); ++ if (symbol->name[0] == ' ') ++ ret->name = "* empty table entry "; ++ if (symbol->section==bfd_abs_section_ptr) ++ ret->type = (symbol->flags & BSF_LOCAL) ? 'a' : 'A'; ++} ++ ++ ++ ++void ++amiga_print_symbol (ignore_abfd, afile, symbol, how) ++ bfd *ignore_abfd; ++ PTR afile; ++ asymbol *symbol; ++ bfd_print_symbol_type how; ++{ ++ FILE *file = (FILE *)afile; ++ ++ switch (how) { ++ case bfd_print_symbol_name: ++ fprintf(file, "%s", symbol->name); ++ break; ++ case bfd_print_symbol_more: ++ fprintf(stderr,"%4x %2x %2x", ++ (unsigned int)((amiga_symbol(symbol)->hunk_number)&0xffff),0, ++ amiga_symbol(symbol)->type); ++ break; ++ case bfd_print_symbol_all: ++ { ++ CONST char *section_name = symbol->section->name; ++ if (symbol->name[0] == ' ') ++ { ++ fprintf(file, "* empty table entry "); ++ } ++ else ++ { ++ bfd_print_symbol_vandf ((PTR)file, symbol); ++ ++ fprintf(file," %-5s %04x %02x %s", ++ section_name, ++ (unsigned int)((amiga_symbol(symbol)->hunk_number)&0xffff), ++ (unsigned) 0, /* ->other */ ++ symbol->name); /* ->name */ ++ } ++ } ++ break; ++ } ++} ++ ++ long ++amiga_get_reloc_upper_bound (abfd, asect) ++ bfd *abfd; ++ sec_ptr asect; ++{ ++ if (bfd_get_format (abfd) != bfd_object) ++ { ++ bfd_set_error(bfd_error_invalid_operation); ++ return 0; ++ } ++ return sizeof (arelent *) * (asect->reloc_count + 1); ++} ++ ++ ++static boolean ++read_raw_relocs (abfd, section, d_offset, count) ++ bfd *abfd; ++ sec_ptr section; ++ unsigned long d_offset; /* offset in the bfd */ ++ unsigned long count; /* number of relocs */ ++{ ++ unsigned long type, no ,offset, hunk_number, j; ++ int index,br; ++ ++ if (bfd_seek (abfd, d_offset, SEEK_SET)) ++ return false; ++ while (count > 0) ++ { ++ /* first determine type of reloc */ ++ if (!get_long (abfd, &type)) ++ return false; ++ ++ switch (type) ++ { ++ case HUNK_RELOC32: /* 32 bit ref */ ++ case HUNK_RELOC16: /* 16 bit ref */ ++ case HUNK_RELOC8: /* 8 bit ref */ ++ case HUNK_DREL32: /* 32 bit ref baserel */ ++ case HUNK_DREL16: /* 16 bit baserel */ ++ case HUNK_DREL8: /* 8 bit baserel */ ++ if (type < HUNK_DREL32) ++ { /*0:8bit, 1: 16bit, 2:32bit */ ++ index=2-(type-HUNK_RELOC32); ++ br=0; /* not base relative */ ++ } ++ else ++ { ++ index=2-(type-HUNK_DREL32); ++ br=1; /* base relative */ ++ } ++ ++ if (!get_long (abfd, &no)) ++ return false; ++ while (no) /* read offsets and hunk number */ ++ { ++ if (!get_long (abfd, &hunk_number)) ++ return false; ++ for (j=0; jrelocation) ++ return true; ++ ++ if (asect->raw_relocs8) ++ if (!read_raw_relocs (abfd, section, asect->raw_relocs8, ++ asect->num_raw_relocs8)) ++ return false; ++ ++ if (asect->raw_relocs16) ++ if (!read_raw_relocs (abfd, section, asect->raw_relocs16, ++ asect->num_raw_relocs16)) ++ return false; ++ ++ if (asect->raw_relocs32) ++ if (!read_raw_relocs (abfd, section, asect->raw_relocs32, ++ asect->num_raw_relocs32)) ++ return false; ++ ++ /* Now step through the raw_symbols and add all relocs in them */ ++ if (!amiga_data->symbols && !amiga_slurp_symbol_table (abfd)) ++ return false; ++ ++ if (amiga_per_section(section)->hunk_ext_pos == 0) ++ return true; ++ ++ if (bfd_seek (abfd, amiga_per_section(section)->hunk_ext_pos, SEEK_SET)) ++ return false; ++ ++ asp = amiga_per_section(section)->amiga_symbols; ++ while (get_long (abfd, &n) && n!=0) ++ { ++ type = (n>>24) & 0xff; ++ n &= 0xffffff; ++ ++ /* skip the name */ ++ if (bfd_seek (abfd, n<<2, SEEK_CUR)) ++ return false; ++ ++ switch (type) ++ { ++ case EXT_SYMB: ++ case EXT_DEF: ++ case EXT_ABS: /* no relocs here */ ++ if (bfd_seek (abfd, sizeof (long), SEEK_CUR)) ++ return false; ++ break; ++ /* same as below, but advance lp by one to skip common size */ ++ case EXT_COMMON: ++ if (bfd_seek (abfd, sizeof (long), SEEK_CUR)) ++ return false; ++ /* Fall through */ ++ default: /* reference to something */ ++ /* points to num of refs to hunk */ ++ if (!get_long (abfd, &n)) ++ return false; ++ ++ /* Add relocs to this section, relative to asp */ ++ /* determine howto first */ ++ if (type==EXT_COMMON) /* 32 bit ref */ ++ { ++ index=2; ++ br=0; ++ } ++ else ++ { ++ if (type>EXT_REF32) ++ type--; /* skip EXT_COMMON gap */ ++ ++ type-=EXT_REF32; ++ br=0; ++ ++ if (type>2) /* base relative */ ++ { ++ type-=3; ++ br=1; ++ } ++ index=2-type; ++ }/* of else */ ++ ++ for (i=0;ioutsymbols ? ++ (amiga_symbol_type*)abfd->outsymbols[asp->index]: asp, ++ amiga_howto_array[br][index],-4)) ++ return false; ++ } ++ ++ break; ++ }/* of switch */ ++ asp++; ++ } ++ ++ return true; ++ ++}/* Of slurp_relocs */ ++ ++ ++long ++amiga_canonicalize_reloc (abfd, section, relptr, symbols) ++ bfd *abfd; ++ sec_ptr section; ++ arelent **relptr; ++ asymbol **symbols; ++{ ++ amiga_reloc_type *src; ++ int i=0; ++ ++ if (!section->relocation && !amiga_slurp_relocs (abfd, section, symbols)) ++ return -1; ++ ++ src = (amiga_reloc_type *)section->relocation; ++ while (src != (amiga_reloc_type *) 0) ++ { ++ *relptr++ = &src->relent; ++ src = src->next; ++ } ++ *relptr = (arelent *) 0; ++ ++ return section->reloc_count; ++} ++ ++ ++/* Set section contents */ ++/* We do it the following way: ++ if this is a bss section ==> error ++ otherwise, we try to allocate space for this section, ++ if this has not already been done ++ Then we set the memory area to the contents */ ++static boolean ++amiga_set_section_contents (abfd, section, location, offset, count) ++ bfd *abfd; ++ sec_ptr section; ++ unsigned char *location; ++ file_ptr offset; ++ int count; ++{ ++ unsigned char *contents; ++ ++ if ((section->flags&SEC_HAS_CONTENTS)==0) /* BSS */ ++ { ++ bfd_set_error(bfd_error_invalid_operation); ++ return false; ++ } ++ ++ if ((section->flags&SEC_IN_MEMORY)==0) /* Not in memory, so alloc space */ ++ { ++ contents=bfd_zalloc(abfd,section->_raw_size); ++ if (!contents) ++ { ++ bfd_set_error(bfd_error_no_memory); ++ return false; ++ } ++ ++ DPRINT(5,("Allocated %lx bytes at %lx\n",section->_raw_size,contents)); ++ ++ section->contents=contents; ++ section->flags|=SEC_IN_MEMORY; ++ } ++ else /* In memory */ ++ contents=section->contents; ++ ++ /* Copy mem */ ++ memmove(contents+offset,location,count); ++ ++ return(true); ++ ++}/* Of section_set_contents */ ++ ++ ++/* FIXME: Is this everything ? */ ++static boolean ++amiga_set_arch_mach (abfd, arch, machine) ++ bfd *abfd; ++ enum bfd_architecture arch; ++ unsigned long machine; ++{ ++ bfd_default_set_arch_mach(abfd, arch, machine); ++ ++ if (arch == bfd_arch_m68k) ++ { ++ switch (machine) ++ { ++ case 68000: ++ case 68008: ++ case 68010: ++ case 68020: ++ case 68030: ++ case 68040: ++ case 68070: ++ case 0: ++ return true; ++ default: ++ return false; ++ } ++ } ++ else if (arch == bfd_arch_powerpc) ++ { ++ return true; ++ } ++ return false; ++} ++ ++static int ++DEFUN(amiga_sizeof_headers,(ignore_abfd, ignore), ++ bfd *ignore_abfd AND ++ boolean ignore) ++{ ++ /* The amiga hunk format doesn't have headers.*/ ++ return 0; ++} ++ ++/* Provided a BFD, a section and an offset into the section, calculate ++ and return the name of the source file and the line nearest to the ++ wanted location. */ ++boolean ++amiga_find_nearest_line(abfd, section, symbols, offset, filename_ptr, ++ functionname_ptr, line_ptr) ++ bfd *abfd; ++ asection *section; ++ asymbol **symbols; ++ bfd_vma offset; ++ char **filename_ptr; ++ char **functionname_ptr; ++ int *line_ptr; ++{ ++ /* FIXME (see aoutx.h, for example) */ ++ return false; ++} ++ ++static const struct reloc_howto_struct * ++amiga_bfd_reloc_type_lookup (abfd, code) ++ bfd *abfd; ++ bfd_reloc_code_real_type code; ++{ ++ switch (code) ++ { ++ case BFD_RELOC_8_PCREL: return &howto_hunk_reloc8; ++ case BFD_RELOC_16_PCREL: return &howto_hunk_reloc16; ++ case BFD_RELOC_CTOR: ++ case BFD_RELOC_32_PCREL: return &howto_hunk_reloc32; ++ case BFD_RELOC_8: return &howto_hunk_reloc8; ++ case BFD_RELOC_16: return &howto_hunk_reloc16; ++ case BFD_RELOC_32: return &howto_hunk_reloc32; ++ /* FIXME: Add more cases here for base relative relocs*/ ++ default: return 0; ++ } ++} ++ ++static boolean ++amiga_bfd_copy_private_bfd_data (ibfd, obfd) ++ bfd *ibfd; ++ bfd *obfd; ++{ ++ AMIGA_DATA(obfd)->IsLoadFile = AMIGA_DATA(ibfd)->IsLoadFile; ++ return true; ++} ++ ++static boolean ++amiga_bfd_copy_private_section_data (ibfd, isec, obfd, osec) ++ bfd *ibfd; ++ asection *isec; ++ bfd *obfd; ++ asection *osec; ++{ ++ if (bfd_get_flavour (osec->owner) == bfd_target_amiga_flavour) { ++ amiga_per_section (osec)->disk_size = amiga_per_section (isec)->disk_size; ++ amiga_per_section (osec)->attribute = amiga_per_section (isec)->attribute; ++ } ++ return true; ++} ++ ++/* There is no armap in the amiga libraries, so we fill carsym entries ++ one by one after having parsed the whole archive. */ ++static boolean ++amiga_slurp_armap (abfd) ++ bfd *abfd; ++{ ++ unsigned long type, n, slen; ++ struct arch_syms *syms; ++ unsigned long symcount=0; ++ carsym *defsyms, *csym; ++ unsigned long *symblock,len; ++ ++ /* allocate the carsyms */ ++ syms = amiga_ardata(abfd)->defsyms; ++ symcount = amiga_ardata(abfd)->defsym_count; ++ ++ defsyms = (carsym*) bfd_alloc (abfd, sizeof (carsym) * symcount); ++ if (!defsyms) ++ return false; ++ ++ bfd_ardata(abfd)->symdefs = defsyms; ++ bfd_ardata(abfd)->symdef_count = symcount; ++ ++ csym = defsyms; ++ while (syms) { ++ if (bfd_seek (abfd, syms->offset, SEEK_SET)) ++ return false; ++ symblock = (unsigned long*) bfd_alloc (abfd, syms->size); ++ if (!symblock) ++ return false; ++ if (bfd_read (symblock, 1, syms->size, abfd) != syms->size) ++ return false; ++ while ((n=GL(symblock)) != 0) ++ { ++ symblock++; ++ len = n & 0xffffff; ++ type = (n>>24) & 0xff; ++ switch (type) { ++ case EXT_SYMB: ++ case EXT_DEF: ++ case EXT_ABS: ++ slen = len<<2; ++ csym->name = (char*)symblock; ++ if (*((char*)symblock+slen-1) != '\0') ++ *((char*)symblock+slen) = '\0'; ++ csym->file_offset = syms->unit_offset; ++ csym++; ++ symblock += len+1; /* name+value */ ++ break; ++ case EXT_REF8: ++ case EXT_REF16: ++ case EXT_REF32: ++ case EXT_DEXT8: ++ case EXT_DEXT16: ++ case EXT_DEXT32: ++ symblock += len; ++ symblock += 1+GL(symblock); ++ break; ++ case EXT_COMMON: ++ symblock += len+1; ++ symblock += 1+GL(symblock); ++ break; ++ default: /* error */ ++ fprintf (stderr, "unexpected type in hunk_ext\n"); ++ return false; ++ } ++ } ++ syms = syms->next; ++ } ++ bfd_has_map (abfd) = true; ++ return true; ++} ++ ++static void amiga_truncate_arname () ++{ ++} ++ ++static const struct bfd_target * ++amiga_archive_p (abfd) ++ bfd *abfd; ++{ ++ long header; ++ struct stat stat_buffer; ++ int units; ++ symindex symcount = 0; ++ struct arch_syms *symbols = NULL; ++ ++ bfd_set_error (bfd_error_wrong_format); ++ ++ if (bfd_stat (abfd, &stat_buffer) < 0) ++ return false; ++ ++ if (stat_buffer.st_size != 0) ++ { ++ /* scan the units */ ++ if (!parse_archive_units (abfd, &units, stat_buffer.st_size, false, ++ &symbols, &symcount)) ++ return NULL; ++ ++ /* if there is only one unit, we consider it's an object, not an ++ archive. Obviously it's not always true but taking objects ++ for archives makes ld fail, so we don't have much of a choice */ ++ if (units == 1) ++ return NULL; ++ ++ } ++ ++ if (abfd->arelt_data) ++ arelt_size (abfd) = bfd_tell (abfd); ++ ++ bfd_seek (abfd, 0, SEEK_SET); ++ abfd->arch_info = bfd_scan_arch ("m68k:68000"); ++ ++ if (amiga_mkarchive (abfd)) ++ { ++ amiga_ardata(abfd)->filesize = stat_buffer.st_size; ++ bfd_ardata(abfd)->first_file_filepos = 0; ++ amiga_ardata(abfd)->defsym_count = symcount; ++ amiga_ardata(abfd)->defsyms = symbols; ++ if (amiga_slurp_armap (abfd)) ++ return abfd->xvec; ++ else ++ return NULL; ++ } ++ else ++ return NULL; ++} ++ ++static bfd * ++amiga_openr_next_archived_file (archive, last_file) ++ bfd *archive; ++ bfd *last_file; ++{ ++ file_ptr filestart; ++ ++ if (!last_file) ++ filestart = bfd_ardata(archive)->first_file_filepos; ++ else ++ { ++ unsigned int size = arelt_size (last_file); ++ /* Pad to an even boundary... */ ++ filestart = last_file->origin + size; ++ filestart += filestart % 2; ++ } ++ ++ return _bfd_get_elt_at_filepos (archive, filestart); ++} ++ ++static PTR ++amiga_read_ar_hdr (abfd) ++ bfd *abfd; ++{ ++ struct areltdata *ared; ++ char *filename = NULL; ++ unsigned long header, read, len, start_pos; ++ ++ start_pos = bfd_tell (abfd); ++ ++ if (start_pos >= amiga_ardata(abfd)->filesize) { ++ bfd_set_error (bfd_error_no_more_archived_files); ++ return NULL; ++ } ++ ++ if (bfd_read ((PTR) &header, 1, sizeof (header), abfd) != sizeof (header)) ++ return NULL; ++ ++ if (GL(&header) != HUNK_UNIT) ++ { ++ bfd_set_error (bfd_error_malformed_archive); ++ return NULL; ++ } ++ ++ /* get the unit name length in long words */ ++ if (!get_long (abfd, &len)) ++ return NULL; ++ len = len << 2; ++ ++ ared = bfd_zalloc (abfd, sizeof (struct areltdata)); ++ if (ared == NULL) { ++ bfd_set_error (bfd_error_no_memory); ++ return NULL; ++ } ++ ++ if (len) ++ { ++ if (!(ared->filename = bfd_alloc (abfd, len+1))) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ return NULL; ++ } ++ else ++ { ++ if (bfd_read (ared->filename, 1, len, abfd) != len) ++ return NULL; ++ ared->filename[len] = '\0'; ++ } ++ } ++ else ++ ared->filename = "(no name)"; ++ ++ if (bfd_seek (abfd, start_pos+4, SEEK_SET)) ++ return false; ++ ++ if (!amiga_read_unit (abfd, amiga_ardata(abfd)->filesize)) ++ return NULL; ++ ++ ared->parsed_size = bfd_tell(abfd)-start_pos; ++ if (bfd_seek (abfd, start_pos, SEEK_SET)) ++ return false; ++ return (PTR) ared; ++} ++ ++int ++amiga_generic_stat_arch_elt (abfd, buf) ++ bfd *abfd; ++ struct stat *buf; ++{ ++ if (abfd->arelt_data == NULL) ++ { ++ bfd_set_error (bfd_error_invalid_operation); ++ return -1; ++ } ++ ++ /* No header in amiga archives. Let's set reasonable default values */ ++ buf->st_mtime = 0; ++ buf->st_uid = 0; ++ buf->st_gid = 0; ++ buf->st_mode = 0666; ++ ++ buf->st_size = ((struct areltdata*)(abfd->arelt_data))->parsed_size; ++ ++ return 0; ++} ++ ++/* We don't have core files. */ ++#define amiga_core_file_failing_command _bfd_dummy_core_file_failing_command ++#define amiga_core_file_failing_signal _bfd_dummy_core_file_failing_signal ++#define amiga_core_file_matches_executable_p _bfd_dummy_core_file_matches_executable_p ++ ++/* Entry points through BFD_JUMP_TABLE_ARCHIVE */ ++/*#define amiga_slurp_armap bfd_slurp_amiga_armap*/ ++#define amiga_slurp_extended_name_table _bfd_slurp_extended_name_table ++#define amiga_construct_extended_name_table _bfd_archive_bsd_construct_extended_name_table ++/*#define amiga_truncate_arname bfd_gnu_truncate_arname*/ ++/*#define amiga_write_armap amiga_write_armap*/ ++/*#define amiga_read_ar_hdr _bfd_generic_read_ar_hdr*/ ++/*#define amiga_openr_next_archived_file bfd_generic_openr_next_archived_file*/ ++ ++#define amiga_get_elt_at_index _bfd_generic_get_elt_at_index ++/* #define amiga_generic_stat_arch_elt bfd_generic_stat_arch_elt */ ++#define amiga_update_armap_timestamp _bfd_archive_bsd_update_armap_timestamp ++ ++/* Entry points through BFD_JUMP_TABLE_SYMBOLS */ ++#undef amiga_get_symtab_upper_bound /* defined above */ ++#undef amiga_get_symtab /* defined above */ ++#undef amiga_make_empty_symbol /* defined above */ ++#undef amiga_print_symbol /* defined above */ ++#undef amiga_get_symbol_info /* defined above */ ++#define amiga_bfd_is_local_label bfd_generic_is_local_label ++#define amiga_get_lineno (struct lineno_cache_entry *(*)())bfd_nullvoidptr ++#undef amiga_find_nearest_line /* defined above */ ++#define amiga_bfd_make_debug_symbol (asymbol * (*)(bfd *, void *, unsigned long)) bfd_nullvoidptr ++#define amiga_read_minisymbols _bfd_generic_read_minisymbols ++#define amiga_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol ++ ++#define amiga_bfd_debug_info_start bfd_void ++#define amiga_bfd_debug_info_end bfd_void ++#define amiga_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void ++#define amiga_bfd_is_local_label_name bfd_generic_is_local_label_name ++ ++/* NOTE: We use a special get_relocated_section_contents both in amiga AND in a.out files. ++ In addition, we use an own final_link routine, which is nearly identical to _bfd_generic_final_link */ ++extern bfd_byte *get_relocated_section_contents(bfd*, struct bfd_link_info *, ++ struct bfd_link_order *, bfd_byte *, ++ boolean, asymbol **); ++#define amiga_bfd_get_relocated_section_contents get_relocated_section_contents ++#define amiga_bfd_relax_section bfd_generic_relax_section ++ ++#define amiga_bfd_link_hash_table_create _bfd_generic_link_hash_table_create ++#define amiga_bfd_link_add_symbols _bfd_generic_link_add_symbols ++extern boolean amiga_final_link(bfd *, struct bfd_link_info *); ++#define amiga_bfd_final_link amiga_final_link ++ ++/* Entry points through BFD_JUMP_TABLE_GENERIC */ ++#define amiga_close_and_cleanup _bfd_generic_close_and_cleanup ++#define amiga_bfd_free_cached_info _bfd_generic_bfd_free_cached_info ++/* amiga_new_section_hook defined above */ ++/* amiga_get_section_hook defined above */ ++#define amiga_get_section_contents_in_window _bfd_generic_get_section_contents_in_window ++ ++/* Entry points through BFD_JUMP_TABLE_COPY */ ++#define amiga_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data ++/*#define amiga_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data*/ ++#define amiga_bfd_copy_private_symbol_data _bfd_generic_bfd_copy_private_symbol_data ++#define amiga_bfd_set_private_flags _bfd_generic_bfd_set_private_flags ++#define amiga_bfd_print_private_flags _bfd_generic_bfd_print_private_flags ++#define amiga_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data ++ ++#define amiga_bfd_link_split_section _bfd_generic_link_split_section ++ ++#if defined (amiga) ++/* So that the JUMP_TABLE() macro below can work. */ ++#undef amiga ++#endif ++ ++const bfd_target amiga_vec = ++{ ++ "amiga", /* name */ ++ bfd_target_amiga_flavour, ++ true, /* data byte order is big */ ++ true, /* header byte order is big */ ++ HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | WP_TEXT, /* object flags */ ++ /* section flags */ ++ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA, ++ '_', /* symbol leading char */ ++ ' ', /* ar_pad_char */ ++ 15, /* ar_max_namelen */ /* (15 for UNIX compatibility) */ ++ bfd_getb64, bfd_getb_signed_64, bfd_putb64, bfd_getb32, bfd_getb_signed_32, ++ bfd_putb32, bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */ ++ bfd_getb64, bfd_getb_signed_64, bfd_putb64, bfd_getb32, bfd_getb_signed_32, ++ bfd_putb32, bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */ ++ { ++ /* bfd_check_format */ ++ _bfd_dummy_target, ++ amiga_object_p, ++ amiga_archive_p, ++ _bfd_dummy_target ++ }, ++ { ++ /* bfd_set_format */ ++ bfd_false, ++ amiga_mkobject, ++ amiga_mkarchive, ++ bfd_false ++ }, ++ { ++ /* bfd_write_contents */ ++ bfd_false, ++ amiga_write_object_contents, ++ amiga_write_archive_contents, ++ bfd_false ++ }, ++ BFD_JUMP_TABLE_GENERIC (amiga), ++ BFD_JUMP_TABLE_COPY (amiga), ++ BFD_JUMP_TABLE_CORE (_bfd_nocore), ++ BFD_JUMP_TABLE_ARCHIVE (amiga), ++ BFD_JUMP_TABLE_SYMBOLS (amiga), ++ BFD_JUMP_TABLE_RELOCS (amiga), ++ BFD_JUMP_TABLE_WRITE (amiga), ++ BFD_JUMP_TABLE_LINK (amiga), ++ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), ++ (PTR) 0 ++#if 0 ++/* fixme: no longer in use? */ ++ /* How applications can find out about amiga relocation types (see ++ documentation on reloc types). */ ++ amiga_reloc_type_lookup ++#endif ++}; +diff -rup --new-file binutils-2.9.1/bfd/amigaoslink.c binutils-2.9.1/bfd/amigaoslink.c +--- binutils-2.9.1/bfd/amigaoslink.c Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/bfd/amigaoslink.c Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,1193 @@ ++/* BFD back-end for Commodore-Amiga AmigaOS binaries. Linker routines. ++ Copyright (C) 1990-1994 Free Software Foundation, Inc. ++ Contributed by Stephan Thesing ++ ++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., 675 Mass Ave, Cambridge, MA 02139, USA. */ ++ ++/* ++INODE ++amigalink, , implementation, amiga ++SECTION ++ amigalink ++ ++This is the description of the linker routines for the amiga. ++In fact, this includes a description of the changes made to the ++a.out code, in order to build a working linker for the Amiga. ++@menu ++@* alterations:: ++@end menu ++ ++INODE ++alterations, , , amigalink ++SUBSECTION ++ alterations ++ ++The file @file{aout-amiga.c} defines the amiga a.out backend. It differs from ++the sun3 backend only in these details: ++ o The @code{final_link} routine is @code{amiga_final_link}. ++ o The routine to get the relocated section contents is ++ @code{aout_bfd_get_relocated_section_contents}. ++ ++This ensures that the link is performed properly, but has the side effect of loosing ++performance. ++ ++ ++The amiga bfd code uses the same @code{amiga_final_link} routine, but with a ++different <> entry: <>. ++The latter differs from the routine of the a.out backend only in the application of relocs ++ to the section contents. ++@@* ++ ++The usage of a special linker code has one reason: ++The bfd library assumes that a program is always loaded at a known memory ++address. This is not a case on an Amiga. So the Amiga format has to take over ++some relocs to an executable output file. ++This is not the case with a.out formats, so there relocations can be applied at link time, ++not at run time, like on the Amiga. ++The special routines compensate this: instead of applying the relocations, they are ++copied to the output file, if neccessary. ++As as consequence, the @code{final_link} and @code{get_relocated_section_contents} are nearly identical to ++the original routines from @file{linker.c} and @file{reloc.c}. ++*/ ++ ++#include "bfd.h" ++#include "bfdlink.h" ++#include "sysdep.h" ++#include "genlink.h" ++#include "libbfd.h" ++ ++#include "libamiga.h" ++#undef GET_SWORD ++#define aadata ((bfd)->tdata.amiga_data->a) ++#undef adata ++#include "libaout.h" ++ ++ ++#define max(x,y) (((x)<=(y))?(y):(x)) ++ ++#define DEBUG_AMIGA 10000 ++ ++#if DEBUG_AMIGA ++#include ++static void error_print(va_alist) ++va_dcl ++{ ++va_list args; ++char *fmt; ++ ++va_start(args); ++fmt=va_arg(args,char *); ++ ++(void)vfprintf(stderr,fmt,args); ++va_end(args); ++} ++ ++#define DPRINT(L,x) if (L>=DEBUG_AMIGA) error_print x ++#else ++#define DPRINT(L,x) ++#endif ++ ++/* This one is used by the linker and tells us, if a debug hunk should be ++ written out*/ ++int write_debug_hunk = 0; ++ ++/* This is also used by the linker to set the attribute of sections */ ++int amiga_attribute = 0; ++ ++/* This one is used to indicate base-relative linking */ ++int amiga_base_relative=0; ++ ++/* This one is used to indicate -resident linking */ ++int amiga_resident=0; ++ ++/* generate a pOS executable */ ++int amiga_pOS_flg; ++ ++extern boolean default_indirect_link_order ++ PARAMS ((bfd *, struct bfd_link_info *, asection *, ++ struct bfd_link_order *, boolean)); ++ ++ ++ ++bfd_byte * ++get_relocated_section_contents PARAMS((bfd *, struct bfd_link_info *, ++ struct bfd_link_order *, bfd_byte *, ++ boolean , asymbol **)); ++static bfd_reloc_status_type ++amiga_perform_reloc PARAMS((bfd *, arelent *, PTR, asection *, bfd *, char **)); ++static bfd_reloc_status_type ++aout_perform_reloc PARAMS ((bfd *, arelent *, PTR, asection *, bfd *, char **)); ++static boolean ++amiga_reloc_link_order PARAMS ((bfd *, struct bfd_link_info *,asection *, ++ struct bfd_link_order *)); ++ ++ ++/* This one is nearly identical to bfd_generic_get_relocated_section_contents ++ from reloc.c */ ++bfd_byte * ++get_relocated_section_contents (abfd, link_info, link_order, data, ++ relocateable, symbols) ++ bfd *abfd; ++ struct bfd_link_info *link_info; ++ struct bfd_link_order *link_order; ++ bfd_byte *data; ++ boolean relocateable; ++ asymbol **symbols; ++{ ++ bfd *input_bfd = link_order->u.indirect.section->owner; ++ asection *input_section = link_order->u.indirect.section; ++ ++ long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section); ++ arelent **reloc_vector = NULL; ++ long reloc_count; ++ bfd_reloc_status_type (*reloc_func)(bfd *, arelent *, PTR, asection *, ++ bfd *, char **); ++ ++ DPRINT(5,("Entering get_rel_sec_cont\n")); ++ ++ if (reloc_size < 0) ++ goto error_return; ++ ++ if (input_bfd->xvec->flavour==bfd_target_amiga_flavour) ++ reloc_func=amiga_perform_reloc; ++ else if (input_bfd->xvec->flavour==bfd_target_aout_flavour) ++ reloc_func=aout_perform_reloc; ++ else ++ { ++ bfd_set_error(bfd_error_bad_value); ++ goto error_return; ++ } ++ ++ reloc_vector = (arelent **) malloc (reloc_size); ++ ++ if (reloc_vector == NULL && reloc_size != 0) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ goto error_return; ++ } ++ ++ DPRINT(5,("GRSC: GetSecCont()\n")); ++ /* read in the section */ ++ if (!bfd_get_section_contents (input_bfd, ++ input_section, ++ (PTR) data, ++ 0, ++ input_section->_raw_size)) ++ goto error_return; ++ ++ /* We're not relaxing the section, so just copy the size info */ ++ input_section->_cooked_size = input_section->_raw_size; ++ input_section->reloc_done = true; ++ ++ DPRINT(5,("GRSC: CanReloc\n")); ++ reloc_count = bfd_canonicalize_reloc (input_bfd, ++ input_section, ++ reloc_vector, ++ symbols); ++ if (reloc_count < 0) ++ goto error_return; ++ ++ if (reloc_count > 0) ++ { ++ arelent **parent; ++ ++ DPRINT(5,("reloc_count=%d\n",reloc_count)); ++ ++ for (parent = reloc_vector; *parent != (arelent *) NULL; ++ parent++) ++ { ++ char *error_message = (char *) NULL; ++ bfd_reloc_status_type r ; ++ ++ DPRINT(5,("Applying a reloc\nparent=%lx, reloc_vector=%lx," ++ "*parent=%lx\n",parent,reloc_vector,*parent)); ++ r=(*reloc_func) (input_bfd, ++ *parent, ++ (PTR) data, ++ input_section, ++ relocateable ? abfd : (bfd *) NULL, ++ &error_message); ++ if (relocateable) ++ { ++ asection *os = input_section->output_section; ++ ++ DPRINT(5,("Keeping reloc\n")); ++ /* A partial link, so keep the relocs */ ++ os->orelocation[os->reloc_count] = *parent; ++ os->reloc_count++; ++ } ++ ++ if (r != bfd_reloc_ok) ++ { ++ switch (r) ++ { ++ case bfd_reloc_undefined: ++ if (!((*link_info->callbacks->undefined_symbol) ++ (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr), ++ input_bfd, input_section, (*parent)->address))) ++ goto error_return; ++ break; ++ case bfd_reloc_dangerous: ++ BFD_ASSERT (error_message != (char *) NULL); ++ if (!((*link_info->callbacks->reloc_dangerous) ++ (link_info, error_message, input_bfd, input_section, ++ (*parent)->address))) ++ goto error_return; ++ break; ++ case bfd_reloc_overflow: ++ if (!((*link_info->callbacks->reloc_overflow) ++ (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr), ++ (*parent)->howto->name, (*parent)->addend, ++ input_bfd, input_section, (*parent)->address))) ++ goto error_return; ++ break; ++ case bfd_reloc_outofrange: ++ default: ++ DPRINT(10,("get_rel_sec_cont fails, perform reloc " ++ "returned $%x\n",r)); ++ abort (); ++ break; ++ } ++ ++ } ++ } ++ } ++ if (reloc_vector != NULL) ++ free (reloc_vector); ++ DPRINT(5,("GRSC: Returning ok\n")); ++ return data; ++ ++error_return: ++ DPRINT(5,("GRSC: Error_return\n")); ++ if (reloc_vector != NULL) ++ free (reloc_vector); ++ return NULL; ++} ++ ++ ++/* Add a value to a location */ ++static bfd_reloc_status_type ++my_add_to (data, offset, size, add, sign) ++ PTR data; ++ int offset, size, add, sign; ++{ ++ signed char *p; ++ int val; ++ bfd_reloc_status_type ret; ++ ++ DPRINT(5,("Entering add_value\n")); ++ ++ ret=bfd_reloc_ok; ++ p=((signed char*)data)+offset; ++ ++ switch (size) ++ { ++ case 0: /* byte size */ ++ val = (int)(p[0]) + add; ++ /* check for overflow */ ++ if (sign) { ++ if (val<-0x80 || val>0x7f) ++ ret = bfd_reloc_overflow; ++ } ++ else { ++ if ((val&0xffffff00)!=0 && (val&0xffffff00)!=0xffffff00) ++ ret=bfd_reloc_overflow; ++ } ++ /* set the value */ ++ p[0]=val&0xff; ++ break; ++ ++ case 1: /* word size */ ++ val = (int)((p[1]&0xff)|(p[0]<<8)) + add; ++ /* check for overflow */ ++ if (sign) { ++ if (val<-0x8000 || val>0x7fff) ++ ret = bfd_reloc_overflow; ++ } ++ else { ++ if ((val&0xffff0000)!=0 && (val&0xffff0000)!=0xffff0000) ++ ret=bfd_reloc_overflow; ++ } ++ /* set the value */ ++ p[1]=val&0xff; ++ p[0]=((val&0xff00)>>8)&0xff; ++ break; ++ ++ case 2: /* long word */ ++ val = bfd_getb_signed_32 (p) + add; ++ /* If we are linking a resident program, then we limit the reloc size ++ to about +/- 1 GB. ++ ++ When linking a shared library all variables defined in other ++ libraries are placed in memory >0x80000000, so if the library ++ tries to use one of those variables an error is output. ++ ++ Without this it would be much more difficult to check for ++ incorrect references. ++ */ ++ if (amiga_resident && ++ (val & 0xc0000000)!=0 && (val&0xc0000000)!=0xc0000000) /* Overflow */ ++ { ++ ret=bfd_reloc_overflow; ++ } ++ bfd_putb32 (val, p); ++ break; ++ ++ default: /* Error */ ++ ret=bfd_reloc_notsupported; ++ break; ++ }/* Of switch */ ++ ++ DPRINT(5,("Leaving add_value\n")); ++ return (ret); ++} ++ ++/* Set a value to a location */ ++static bfd_reloc_status_type ++my_set_to (data, offset, size, val, sign) ++ PTR data; ++ int offset, size, val, sign; ++{ ++ signed char *p; ++ bfd_reloc_status_type ret; ++ ++ DPRINT(5,("Entering add_value\n")); ++ ++ ret=bfd_reloc_ok; ++ p=((signed char*)data)+offset; ++ ++ switch (size) ++ { ++ case 0: /* byte size */ ++ /* check for overflow */ ++ if (sign) { ++ if (val<-0x80 || val>0x7f) ++ ret = bfd_reloc_overflow; ++ } ++ else { ++ if ((val&0xffffff00)!=0 && (val&0xffffff00)!=0xffffff00) ++ ret=bfd_reloc_overflow; ++ } ++ /* set the value */ ++ p[0]=val&0xff; ++ break; ++ ++ case 1: /* word size */ ++ /* check for overflow */ ++ if (sign) { ++ if (val<-0x8000 || val>0x7fff) ++ ret = bfd_reloc_overflow; ++ } ++ else { ++ if ((val&0xffff0000)!=0 && (val&0xffff0000)!=0xffff0000) ++ ret=bfd_reloc_overflow; ++ } ++ /* set the value */ ++ p[1]=val&0xff; ++ p[0]=((val&0xff00)>>8)&0xff; ++ break; ++ ++ case 2: /* long word */ ++ /* If we are linking a resident program, then we limit the reloc size ++ to about +/- 1 GB. ++ ++ When linking a shared library all variables defined in other ++ libraries are placed in memory >0x80000000, so if the library ++ tries to use one of those variables an error is output. ++ ++ Without this it would be much more difficult to check for ++ incorrect references. ++ */ ++ if (amiga_resident && ++ (val & 0xc0000000)!=0 && (val&0xc0000000)!=0xc0000000) /* Overflow */ ++ { ++ ret=bfd_reloc_overflow; ++ } ++ p[3] = val & 0xff; ++ p[2] = (val >> 8) & 0xff; ++ p[1] = (val >> 16) & 0xff; ++ p[0] = (val >> 24) & 0xff; ++ break; ++ ++ default: /* Error */ ++ ret=bfd_reloc_notsupported; ++ break; ++ }/* Of switch */ ++ ++ DPRINT(5,("Leaving set_value\n")); ++ return (ret); ++} ++ ++/* Perform an Amiga relocation */ ++static bfd_reloc_status_type ++amiga_perform_reloc (abfd, r, data, sec, obfd, error_message) ++ bfd *abfd; ++ arelent *r; ++ PTR data; ++ asection *sec; ++ bfd *obfd; ++ char **error_message; ++{ ++ asymbol *sym; /* Reloc is relative to sym */ ++ asection *target_section; /* reloc is relative to this section */ ++ int relocation; ++ boolean copy; ++ bfd_reloc_status_type ret; ++ int size = 2; ++ int sign = false; ++ ++ DPRINT(5,("Entering APR\nflavour is %d (aflavour=%d, aout_flavour=%d)\n", ++ sec->owner->xvec->flavour, bfd_target_amiga_flavour, ++ bfd_target_aout_flavour)); ++ ++ /* If obfd==NULL: Apply the reloc, if possible. */ ++ /* Else: Modify it and return */ ++ ++ if (obfd!=NULL) /* Only modify the reloc */ ++ { ++ r->address+=sec->output_offset; ++ sec->output_section->flags|=SEC_RELOC; ++ DPRINT(5,("Leaving APR, modified case \n")); ++ return bfd_reloc_ok; ++ } ++ ++ /* Try to apply the reloc */ ++ ++ sym=*(r->sym_ptr_ptr); ++ ++#if 0 ++ /* FIXME */ ++ if (sym->udata.p) ++ sym = ((struct generic_link_hash_entry*)sym->udata.p)->sym; ++#endif ++ ++ target_section=sym->section; ++ ++ if (target_section==bfd_und_section_ptr) /* Error */ ++ { ++ DPRINT(10,("perform_reloc: Target is undefined section\n")); ++ return bfd_reloc_undefined; ++ } ++ ++ relocation=0; copy=false; ret=bfd_reloc_ok; ++ ++ switch(r->howto->type) ++ { ++ case HUNK_RELOC32: /* 32 bit reloc */ ++ DPRINT(5,("RELOC32\n")); ++ size=2; ++ if (target_section==bfd_abs_section_ptr) /* Ref to absolute hunk */ ++ relocation=sym->value; ++ else if (target_section==bfd_com_section_ptr) /* ref to common */ ++ { ++ relocation=0; ++ copy=true; ++ } ++ else ++ { ++ /* If we access a symbol in the .bss section, we have to convert ++ this to an access to .data section */ ++ /* This is done through a change to the symbol... */ ++ if (amiga_base_relative && (strcmp(sym->section->output_section->name, ++ ".bss")==0)) ++ { ++ /* get value for .data section */ ++ bfd *ibfd; ++ asection *s; ++ ++ ibfd=target_section->output_section->owner; ++ for (s=ibfd->sections;s!=NULL;s=s->next) ++ if (strcmp(s->name,".data")==0) ++ { ++ sym->section->output_offset=s->_raw_size; ++ sym->section->output_section=s; ++ } ++ } ++ ++ relocation=0; ++ copy=true; ++ } ++ break; ++ ++ case HUNK_RELOC8: ++ case HUNK_RELOC16: ++ DPRINT(5,("RELOC16/8\n")); ++ size=(r->howto->type==HUNK_RELOC8)?0:1; ++ if (target_section==bfd_abs_section_ptr) /* Ref to absolute hunk */ ++ relocation=sym->value; ++ else { ++ if (target_section==bfd_com_section_ptr) /* Error.. */ ++ { ++ relocation=0; ++ copy=false; ++ ret=bfd_reloc_undefined; ++ } ++ else ++ { ++ DPRINT(5,("PC relative\n")); ++ /* This is a pc relative hunk... */ ++ if (sec->output_section!=target_section->output_section) /* Error */ ++ { ++ DPRINT(10,("pc relative, but out of range I\n")); ++ relocation=0; ++ copy =false; ++ ret=bfd_reloc_outofrange; ++ } ++ else ++ { /* Same section */ ++ relocation=-(r->address+sec->output_offset); ++ copy=false; ++ } ++ } ++ } ++ break; ++ ++ case HUNK_DREL32: /* baserel relocs */ ++ case HUNK_DREL16: ++ case HUNK_DREL8: ++ DPRINT(5,("HUNK_BASEREL relocs\n")); ++ ++ /* Relocs are always relative to the symbol ___a4_init */ ++ /* Relocs to .bss section are converted to a reloc to .data section, since ++ .bss section contains only COMMON sections...... and should be ++ following .data section.. */ ++ ++ size=(r->howto->type==HUNK_DREL32)?2:((r->howto->type==HUNK_DREL16)?1:0); ++ ++ if (target_section==bfd_abs_section_ptr) ++ { ++ relocation=sym->value; ++ } ++ else ++ { ++ if (! (AMIGA_DATA (target_section->output_section->owner)->baserel)) ++ { ++ fprintf(stderr,"Base symbol for base relative reloc not defined," ++ "section %s, reloc to symbol %s\n", sec->name, sym->name); ++ copy=false; ++ ret=bfd_reloc_notsupported; ++ break; ++ } ++ ++ /* If target->out is .bss, add the value of the .data section to sym->value and ++ set output_section new to .data section.... */ ++ if (strcmp(target_section->output_section->name,".bss")==0) ++ { ++ bfd *ibfd; ++ asection *s; ++ ++ ibfd=target_section->output_section->owner; ++ for (s=ibfd->sections;s!=NULL;s=s->next) ++ if (strcmp(s->name,".data")==0) ++ { ++ sym->section->output_section=s; ++ sym->section->output_offset=s->_raw_size; ++ } ++ } ++ ++ relocation = sym->value + sym->section->output_offset ++ - (AMIGA_DATA (target_section->output_section->owner))->a4init ++ + r->addend; ++ copy=false; ++ sign = true; ++ } ++ break; ++ ++ default: ++ fprintf(stderr,"Error:Not supported reloc type:%d\n",r->howto->type); ++ copy=false; ++ relocation=0; ++ ret=bfd_reloc_notsupported; ++ break; ++ } /* Of switch */ ++ ++ /* Add in relocation */ ++ if (relocation!=0) ++ ret = my_add_to (data, r->address, size, relocation, sign); ++ ++ if (copy)/* Copy reloc to output section */ ++ { ++ DPRINT(5,("Copying reloc\n")); ++ target_section=sec->output_section; ++ r->address+=sec->output_offset; ++ target_section->orelocation[target_section->reloc_count++]=r; ++ sec->output_section->flags|=SEC_RELOC; ++ } ++ DPRINT(5,("Leaving a_perform_reloc\n")); ++ return ret; ++} ++ ++ ++/* Perform an a.out reloc */ ++static bfd_reloc_status_type ++aout_perform_reloc (abfd, r, data, sec, obfd, error_message) ++ bfd *abfd; ++ arelent *r; ++ PTR data; ++ asection *sec; ++ bfd *obfd; ++ char **error_message; ++{ ++ asymbol *sym; /* Reloc is relative to this */ ++ asection *target_section; /* reloc is relative to this section */ ++ int relocation; ++ boolean copy, addval = true; ++ bfd_reloc_status_type ret; ++ int size = 2; ++ int sign = false; ++ ++ /* If obfd==NULL: Apply the reloc, if possible. */ ++ /* Else: Modify it and return */ ++ DPRINT(5,("Entering aout_perf_reloc\n")); ++ if (obfd!=NULL) /* Only modify the reloc */ ++ { ++ r->address+=sec->output_offset; ++ DPRINT(5,("Leaving aout_perf_reloc, modified\n")); ++ return bfd_reloc_ok; ++ } ++ ++ sym=*(r->sym_ptr_ptr); ++ target_section=sym->section; ++ ++ if (target_section==bfd_und_section_ptr) /* Error */ ++ { ++ DPRINT(10,("target_sec=UND, aout_perf_rel\n")); ++ return bfd_reloc_undefined; ++ } ++ relocation=0; copy=false; ret=bfd_reloc_ok; ++ ++ switch (r->howto->type) ++ { ++ case 0: /* 8 bit reloc, pc relative or absolute */ ++ case 1: /* 16 bit reloc */ ++ DPRINT(10,("16/8 bit relative\n")); ++ size=r->howto->type; ++ if (target_section==bfd_abs_section_ptr) /* Ref to absolute hunk */ ++ relocation=sym->value; ++ else if (target_section==bfd_com_section_ptr) /* Error.. */ ++ { ++ relocation=0; ++ copy=false; ++ ret=bfd_reloc_undefined; ++ fprintf(stderr,"Pc relative relocation to common symbol \"%s\" " ++ "in section %s\n", sym->name,sec->name); ++ DPRINT(10,("Ref to common symbol...aout_perf_reloc\n")); ++ } ++ else ++ { ++ /* This is a pc relative hunk... or a baserel... */ ++ if (sec->output_section!=target_section->output_section) ++ /* Error or baserel */ ++ { ++ if (target_section->output_section->flags&SEC_DATA!=0) ++ /* Baserel reloc */ ++ { ++ goto baserel; /* Dirty, but no code doubling.. */ ++ }/* Of is baserel */ ++ ++ relocation=0; ++ copy =false; ++ ret=bfd_reloc_outofrange; ++ fprintf(stderr,"pc relative relocation out of range in section" ++ "%s. Relocation was to symbol %s\n",sec->name,sym->name); ++ ++ DPRINT(10,("Section%s, target %s: Reloc out of range..." ++ "not same section, aout_perf\nsec->out=%s, target->out" ++ "=%s, offset=%lx\n",sec->name, target_section->name, ++ sec->output_section->name, ++ target_section->output_section->name,r->address)); ++ } ++ else ++ { /* Same section */ ++ relocation=-(r->address+sec->output_offset); ++ copy=false; ++ DPRINT(5,("Reloc to same section...\n")); ++ } ++ } ++ break; ++ ++ case 4: /* 8 bit displacement */ ++ case 5: /* 16 bit displacement */ ++ case 6: /* 32 bit displacement */ ++ size=r->howto->type - 4; ++ sign = true; ++ if (target_section == bfd_abs_section_ptr) /* Ref to absolute hunk */ ++ relocation = sym->value; ++ else ++ { ++ relocation = (sym->value + target_section->output_offset) - ++ (r->address + sec->output_offset); ++ if (size == 0) ++ relocation--; ++ addval = false; ++ copy = 0; ++ } ++ break; ++ ++ case 2: /* 32 bit reloc, abs. or relative */ ++ DPRINT(10,("32 bit\n")); ++ size=2; ++ if (target_section==bfd_abs_section_ptr) /* Ref to absolute hunk */ ++ relocation=sym->value; ++ else if (target_section==bfd_com_section_ptr) /* ref to common */ ++ { ++ relocation=0; ++ copy=true; ++ } ++ else ++ { ++ /* If we access a symbol in the .bss section, we have to convert ++ this to an access to .data section*/ ++ /* This is done through a change to the output section of ++ the symbol... */ ++ if (amiga_base_relative && (strcmp(sym->section->output_section->name, ++ ".bss")==0)) ++ { ++ /* get value for .data section */ ++ bfd *ibfd; ++ asection *s; ++ ++ ibfd=target_section->output_section->owner; ++ for (s=ibfd->sections;s!=NULL;s=s->next) ++ if (strcmp(s->name,".data")==0) ++ { ++ sym->section->output_section=s; ++ sym->section->output_offset+=s->_raw_size; ++ } ++ } ++ relocation=0; ++ copy=true; ++ } ++ DPRINT(10,("target->out=%s(%lx), sec->out=%s(%lx), symbol=%s\n", ++ target_section->output_section->name, ++ target_section->output_section,sec->output_section->name, ++ sec->output_section,sym->name)); ++ break; ++ ++ case 9: /* 16 bit base relative */ ++ case 10: /* 32 bit base relative */ ++ DPRINT(10,("32/16 bit baserel\n")); ++ /* We use the symbol ___a4_init as base */ ++ size=r->howto->type-8; ++ ++ baserel: ++ if (target_section==bfd_abs_section_ptr) ++ { ++ relocation=sym->value; ++ } ++ else if (target_section==bfd_com_section_ptr) /* Error.. */ ++ { ++ relocation=0; ++ copy=false; ++ ret=bfd_reloc_undefined; ++ fprintf(stderr,"Baserelative relocation to common \"%s\"\n", ++ sym->name); ++ ++ DPRINT(10,("Ref to common symbol...aout_perf_reloc\n")); ++ } ++ else /* Target section and sec need not be the same... */ ++ { ++ if (! (AMIGA_DATA (target_section->output_section->owner)->baserel)) ++ ++ { ++ fprintf(stderr,"Base symbol for base relative reloc not defined," ++ "section %s, reloc to symbol %s\n", sec->name, sym->name); ++ copy=false; ++ ret=bfd_reloc_notsupported; ++ DPRINT(10,("target->out=%s(%lx), sec->out=%s(%lx), symbol=%s\n", ++ target_section->output_section->name, ++ target_section->output_section, ++ sec->output_section->name, ++ sec->output_section,sym->name)); ++ ++ break; ++ } ++ ++ /* If target->out is .bss, add the value of the .data section.... ++ to sym, set new output_section */ ++ if (strcmp(target_section->output_section->name,".bss")==0) ++ { ++ bfd *ibfd; ++ asection *s; ++ ++ ibfd=target_section->output_section->owner; ++ ++ for (s=ibfd->sections;s!=NULL;s=s->next) ++ if (strcmp(s->name,".data")==0) ++ { ++ sym->section->output_offset+=s->_raw_size; ++ sym->section->output_section=s; ++ } ++ } ++ ++ relocation = sym->value+target_section->output_offset - 0x7ffe; ++ ++ /* if the symbol is in bss, subtract the offset that gas has put ++ into the opcode */ ++ if (target_section->index == 2) ++ relocation -= abfd->tdata.aout_data->a.datasec->_raw_size; ++ ++ addval = true; ++ copy = false; ++ sign = true; ++ ++ DPRINT (20, ("symbol=%s (0x%lx)\nsection %s (0x%lx; %s; output=0x%lx)" ++ "\nrelocation @0x%lx\n\n", sym->name, sym->value, ++ sym->section->name, (unsigned long)sym->section, ++ sym->section->owner->filename, sym->section->output_offset, ++ r->address)); ++ } ++ DPRINT(10,("target->out=%s(%lx), sec->out=%s(%lx), symbol=%s\n", ++ target_section->output_section->name, ++ target_section->output_section,sec->output_section->name, ++ sec->output_section,sym->name)); ++ break; ++ ++ default: ++ copy=false; ++ relocation=0; ++ ret=bfd_reloc_notsupported; ++ fprintf(stderr,"Unsupported reloc: %d\n",r->howto->type); ++ break; ++ ++ }/* Of switch */ ++ ++ /* Add in relocation */ ++ if (relocation!=0) ++ if (addval) ++ ret = my_add_to (data, r->address,size, relocation, sign); ++ else ++ ret = my_set_to (data, r->address, size, relocation, sign); ++ ++ if (copy)/* Copy reloc to output section */ ++ { ++ DPRINT(5,("Copying reloc\n")); ++ target_section=sec->output_section; ++ r->address+=sec->output_offset; ++ target_section->orelocation[target_section->reloc_count++]=r; ++ } ++ DPRINT(5,("Leaving aout_perf_reloc with %d (OK=%d)\n",ret,bfd_reloc_ok)); ++ return ret; ++} ++ ++ ++/* The final link routine, used both by Amiga and a.out backend*/ ++/* This is nearly a copy of _bfd_generic_final_link */ ++boolean ++amiga_final_link (abfd, info) ++ bfd *abfd; ++ struct bfd_link_info *info; ++{ ++ bfd *sub; ++ asection *o,*act_sec; ++ struct bfd_link_order *p; ++ size_t outsymalloc; ++ struct generic_write_global_symbol_info wginfo; ++ struct bfd_link_hash_entry *h = ++ bfd_link_hash_lookup (info->hash, "___a4_init", false, false, true); ++ ++ if (h && h->type == bfd_link_hash_defined) { ++ AMIGA_DATA (abfd)->baserel = true; ++ AMIGA_DATA (abfd)->a4init = h->u.def.value; ++ } ++ else ++ AMIGA_DATA (abfd)->baserel = false; ++ ++ DPRINT(5,("Entering final_link\n")); ++ ++ if (abfd->xvec->flavour == bfd_target_aout_flavour) ++ return amiga_aout_bfd_final_link(abfd, info); ++ ++ abfd->outsymbols = (asymbol **) NULL; ++ abfd->symcount = 0; ++ outsymalloc = 0; ++ ++ /* Mark all sections which will be included in the output file. */ ++ for (o = abfd->sections; o != NULL; o = o->next) ++ for (p = o->link_order_head; p != NULL; p = p->next) ++ if (p->type == bfd_indirect_link_order) ++ p->u.indirect.section->linker_mark = true; ++ ++ /* Build the output symbol table. */ ++ for (sub = info->input_bfds; sub != (bfd *) NULL; sub = sub->link_next) ++ if (! _bfd_generic_link_output_symbols (abfd, sub, info, &outsymalloc)) ++ return false; ++ ++ DPRINT(10,("Did build output symbol table\n")); ++ ++ /* Accumulate the global symbols. */ ++ wginfo.info = info; ++ wginfo.output_bfd = abfd; ++ wginfo.psymalloc = &outsymalloc; ++ _bfd_generic_link_hash_traverse (_bfd_generic_hash_table (info), ++ _bfd_generic_link_write_global_symbol, ++ (PTR) &wginfo); ++ ++ DPRINT(10,("Accumulated global symbols\n")); ++ ++ DPRINT(10,("Output bfd is %s(%lx)\n",abfd->filename,abfd)); ++ ++ /* Allocate space for the output relocs for each section. */ ++ /* We also handle base-relative linking special, by setting the .data ++ sections real length to it's length + .bss length */ ++ /* This is different to bfd_generic_final_link: We ALWAYS alloc space for ++ the relocs, because we may need it anyway */ ++ for (o = abfd->sections; ++ o != (asection *) NULL; ++ o = o->next) ++ { ++ /* If section is .data, find .bss and add that length */ ++ if (!info->relocateable && amiga_base_relative && ++ (strcmp(o->name,".data")==0)) ++ { ++ if (abfd->xvec->flavour!=bfd_target_amiga_flavour) /* oops */ ++ { ++ fprintf(stderr,"You can't use base relative linking with" ++ " partial links.\n"); ++ } ++ else ++ { ++#if 0 ++ for (act_sec=abfd->sections; act_sec!=NULL;act_sec=act_sec->next) ++ if (strcmp(act_sec->name,".bss")==0) ++ amiga_per_section(o)->disk_size = o->_raw_size + ++ act_sec->_raw_size; ++#endif ++ } ++ }/* Of base-relative linking */ ++ ++ DPRINT(10,("Section in output bfd is %s (%lx)\n",o->name,o)); ++ ++ o->reloc_count = 0; ++ for (p = o->link_order_head; ++ p != (struct bfd_link_order *) NULL; ++ p = p->next) ++ { ++ if (p->type == bfd_section_reloc_link_order ++ || p->type == bfd_symbol_reloc_link_order) ++ ++o->reloc_count; ++ else if (p->type == bfd_indirect_link_order) ++ { ++ asection *input_section; ++ bfd *input_bfd; ++ long relsize; ++ arelent **relocs; ++ asymbol **symbols; ++ long reloc_count; ++ ++ input_section = p->u.indirect.section; ++ input_bfd = input_section->owner; ++ ++ DPRINT(10,("\tIndirect section from bfd %s, section is %s(%lx)" ++ " (COM=%lx)\n", ++ input_bfd->filename,input_section->name,input_section, ++ bfd_com_section_ptr)); ++ ++ relsize = bfd_get_reloc_upper_bound (input_bfd, ++ input_section); ++ if (relsize < 0) ++ { ++ DPRINT(10,("Relsize<0.I..in bfd %s, sec %s\n", ++ input_bfd->filename, input_section->name)); ++ return false; ++ } ++ ++ relocs = (arelent **) malloc ((size_t) relsize); ++ ++ if (!relocs && relsize != 0) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ return false; ++ } ++ symbols = _bfd_generic_link_get_symbols (input_bfd); ++ reloc_count = bfd_canonicalize_reloc (input_bfd, ++ input_section, ++ relocs, ++ symbols); ++ if (reloc_count < 0) ++ { ++ DPRINT(10,("Relsize<0.II..in bfd %s, sec %s\n", ++ input_bfd->filename, input_section->name)); ++ return false; ++ } ++ ++ BFD_ASSERT (reloc_count == input_section->reloc_count); ++ o->reloc_count += reloc_count; ++ free (relocs); ++ } ++ } ++ if (o->reloc_count > 0) ++ { ++ o->orelocation = ((arelent **) ++ bfd_alloc (abfd, ++ (o->reloc_count ++ * sizeof (arelent *)))); ++ ++ if (!o->orelocation) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ return false; ++ } ++ /* o->flags |= SEC_RELOC; There may be no relocs. This can be ++ determined only later */ ++ /* Reset the count so that it can be used as an index ++ when putting in the output relocs. */ ++ o->reloc_count = 0; ++ } ++ } ++ ++ DPRINT(10,("Got all relocs\n")); ++ ++ /* Handle all the link order information for the sections. */ ++ for (o = abfd->sections; ++ o != (asection *) NULL; ++ o = o->next) ++ { ++ for (p = o->link_order_head; ++ p != (struct bfd_link_order *) NULL; ++ p = p->next) ++ { ++ switch (p->type) ++ { ++ case bfd_section_reloc_link_order: ++ case bfd_symbol_reloc_link_order: ++ if (! amiga_reloc_link_order (abfd, info, o, p)) /* We use an own routine */ ++ return false; ++ break; ++ case bfd_indirect_link_order: ++ if (! default_indirect_link_order (abfd, info, o, p, false)) ++ /* Calls our get_relocated_section_contents*/ ++ return false; ++ break; ++ default: ++ if (! _bfd_default_link_order (abfd, info, o, p)) ++ return false; ++ break; ++ } ++ } ++ } ++ if (abfd->xvec->flavour==bfd_target_amiga_flavour&&!info->relocateable) ++ AMIGA_DATA(abfd)->IsLoadFile=true; ++ ++ DPRINT(10,("Leaving final_link\n")); ++ return true; ++} ++ ++ ++/* Handle reloc link order . This is nearly a copy from generic_reloc_link_order ++ in linker.c*/ ++static boolean ++amiga_reloc_link_order(abfd, info, sec, link_order) ++ bfd *abfd; ++ struct bfd_link_info *info; ++ asection *sec; ++ struct bfd_link_order *link_order; ++{ ++ amiga_reloc_type *r; ++ ++ DPRINT(5,("Entering amiga_reloc_link_order\n")); ++ ++ /* We generate a new AMIGA style reloc */ ++ BFD_ASSERT(sec->orelocation!=NULL); ++ ++ if (sec->orelocation == (arelent **) NULL) ++ { ++ DPRINT(10,("aborting, since orelocation==NULL\n")); ++ abort (); ++ } ++ ++ r = (amiga_reloc_type *) bfd_zalloc (abfd, sizeof (amiga_reloc_type)); ++ if (r == NULL) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ DPRINT(5,("Leaving amiga_reloc_link, no mem\n")); ++ return false; ++ } ++ ++ r->relent.address = link_order->offset; ++ r->relent.howto = bfd_reloc_type_lookup (abfd, link_order->u.reloc.p->reloc); ++ if (r->relent.howto == NULL) ++ { ++ bfd_set_error (bfd_error_bad_value); ++ DPRINT(5,("Leaving amiga_reloc_link, bad value\n")); ++ return false; ++ } ++ ++ /* Get the symbol to use for the relocation. */ ++ if (link_order->type == bfd_section_reloc_link_order) ++ r->relent.sym_ptr_ptr = link_order->u.reloc.p->u.section->symbol_ptr_ptr; ++ else ++ { ++ struct generic_link_hash_entry *h; ++ ++ h = _bfd_generic_link_hash_lookup (_bfd_generic_hash_table (info), ++ link_order->u.reloc.p->u.name, ++ false, false, true); ++ if (h == (struct generic_link_hash_entry *) NULL ++ || ! h->written) ++ { ++ if (! ((*info->callbacks->unattached_reloc) ++ (info, link_order->u.reloc.p->u.name, ++ (bfd *) NULL, (asection *) NULL, (bfd_vma) 0))) ++ return false; ++ bfd_set_error (bfd_error_bad_value); ++ DPRINT(5,("Leaving amiga_reloc_link, bad value in hash lookup\n")); ++ return false; ++ } ++ r->relent.sym_ptr_ptr = &h->sym; ++ } ++ DPRINT(5,("Got symbol for relocation\n")); ++ /* Store the addend */ ++ r->relent.addend = link_order->u.reloc.p->addend; ++ ++ ++ /* If we are generating relocateable output, just add the reloc */ ++ if (info->relocateable) ++ { ++ DPRINT(5,("Adding reloc\n")); ++ sec->orelocation[sec->reloc_count] = (arelent *)r; ++ ++sec->reloc_count; ++ sec->flags|=SEC_RELOC; ++ } ++ else ++ { /* Try to apply the reloc */ ++ char *em=""; ++ PTR data; ++ bfd_reloc_status_type ret; ++ ++ DPRINT(5,("Apply link_order_reloc\n")); ++ /*FIXME: Maybe, we have to get the section contents, before we use them, ++ if they have not been ++ set by now.. */ ++ ++ BFD_ASSERT(sec->contents!=NULL); ++ data=(PTR)(sec->contents); ++ ++ if (bfd_get_flavour(abfd)==bfd_target_amiga_flavour) ++ ret=amiga_perform_reloc(abfd,(arelent *)r,data,sec,NULL,&em); ++ else ++ ret=aout_perform_reloc(abfd,(arelent *)r,data,sec,NULL,&em); ++ ++ if (ret!=bfd_reloc_ok) ++ { ++ DPRINT(5,("Leaving amiga_reloc_link, value false\n")); ++ return false; ++ } ++ } ++ DPRINT(5,("Leaving amiga_reloc_link\n")); ++ return true; ++} +diff -rup --new-file binutils-2.9.1/bfd/aout-amiga.c binutils-2.9.1/bfd/aout-amiga.c +--- binutils-2.9.1/bfd/aout-amiga.c Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/bfd/aout-amiga.c Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,50 @@ ++/* BFD backend for Amiga style a.out with flags set to 0 ++ Copyright (C) 1990, 91, 92, 93, 1994 Free Software Foundation, Inc. ++ Written by Stephan Thesing. ++ ++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., 675 Mass Ave, Cambridge, MA 02139, USA. */ ++ ++#define TARGETNAME "a.out-amiga" ++#define MY(OP) CAT(aout_amiga_,OP) ++ ++#include "bfd.h" ++ ++#define MY_exec_hdr_flags 0 ++ ++extern boolean ++amiga_final_link(bfd *,struct bfd_link_info *); ++#define MY_bfd_final_link amiga_final_link ++ ++extern bfd_byte * ++get_relocated_section_contents(bfd *, struct bfd_link_info *, ++ struct bfd_link_order *, bfd_byte *, ++ boolean , asymbol **); ++#define MY_bfd_get_relocated_section_contents get_relocated_section_contents ++ ++/* Include the usual a.out support. */ ++#include "aoutf1.h" ++ ++/* Final link routine. We need to use a call back to get the correct ++ offsets in the output file. */ ++ ++boolean ++amiga_aout_bfd_final_link (abfd, info) ++ bfd *abfd; ++ struct bfd_link_info *info; ++{ ++ return NAME(aout,final_link) (abfd, info, MY_final_link_callback); ++} +diff -rup --new-file binutils-2.9.1/bfd/aoutx.h binutils-2.9.1/bfd/aoutx.h +--- binutils-2.9.1/bfd/aoutx.h Fri May 1 08:48:01 1998 ++++ binutils-2.9.1/bfd/aoutx.h Sun Aug 23 00:00:00 1998 +@@ -135,7 +135,8 @@ DESCRIPTION + static boolean aout_get_external_symbols PARAMS ((bfd *)); + static boolean translate_from_native_sym_flags + PARAMS ((bfd *, aout_symbol_type *)); +-static boolean translate_to_native_sym_flags ++/*Amiga hack - used in amigaos.c, must be global */ ++/*static*/ boolean translate_to_native_sym_flags + PARAMS ((bfd *, asymbol *, struct external_nlist *)); + static void adjust_o_magic PARAMS ((bfd *, struct internal_exec *)); + static void adjust_z_magic PARAMS ((bfd *, struct internal_exec *)); +@@ -1576,7 +1577,7 @@ translate_from_native_sym_flags (abfd, c + + /* Set the fields of SYM_POINTER according to CACHE_PTR. */ + +-static boolean ++/*static*/ boolean + translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer) + bfd *abfd; + asymbol *cache_ptr; +@@ -1977,10 +1978,29 @@ NAME(aout,swap_std_reloc_out) (abfd, g, + + r_length = g->howto->size ; /* Size as a power of two */ + r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */ ++#if 1 ++ /* FIXME! "#if 1" is the wrong way to select this Amiga specific code. ++ We can't just test for __amigaos__ defined either, since we may be ++ building a cross compiler and __amigaos__ is only defined if the ++ compiler we are using is targeted for the Amiga. */ ++ /* Changed for cooperation with AMIGA backend */ ++ /* This only applies, if aout flavour 191194 ST*/ + /* XXX This relies on relocs coming from a.out files. */ ++ if (bfd_asymbol_bfd(sym)->xvec->flavour==bfd_target_aout_flavour) ++ { ++ r_baserel = (g->howto->type & 8) != 0; ++ r_jmptable = (g->howto->type & 16) != 0; ++ r_relative = (g->howto->type & 32) != 0; ++ } ++ else ++ { ++ r_baserel=r_jmptable=r_relative=0; ++ } ++#else + r_baserel = (g->howto->type & 8) != 0; + r_jmptable = (g->howto->type & 16) != 0; + r_relative = (g->howto->type & 32) != 0; ++#endif + + #if 0 + /* For a standard reloc, the addend is in the object file. */ +@@ -2273,8 +2293,12 @@ NAME(aout,swap_std_reloc_in) (abfd, byte + /* Base relative relocs are always against the symbol table, + regardless of the setting of r_extern. r_extern just reflects + whether the symbol the reloc is against is local or global. */ ++#if 0 ++ /* FIXME! "#if 0" is the wrong way to disable this code. See comment ++ earlier in file. */ + if (r_baserel) + r_extern = 1; ++#endif + + if (r_extern && r_index > symcount) + { +diff -rup --new-file binutils-2.9.1/bfd/archive.c binutils-2.9.1/bfd/archive.c +--- binutils-2.9.1/bfd/archive.c Fri May 1 08:48:01 1998 ++++ binutils-2.9.1/bfd/archive.c Sun Aug 23 00:00:00 1998 +@@ -870,6 +870,22 @@ do_slurp_coff_armap (abfd) + { + rawptr = raw_armap + i; + carsyms->file_offset = swap ((PTR) rawptr); ++ /* This is a hack to work around a bug in x86 BeOS linkers that did not ++ follow the PE spec and saved the file offsets in little endian mode. */ ++ { ++ file_ptr le_val; ++ le_val = bfd_getl32 ((PTR) rawptr); ++ if (carsyms->file_offset < 0) ++ { ++ /* Must have been little endian */ ++ carsyms->file_offset = le_val; ++ } ++ else if ((le_val > 0) && (le_val < carsyms->file_offset)) ++ { ++ /* Both values positive and le_val smaller, so use le_val. */ ++ carsyms->file_offset = le_val; ++ } ++ } + carsyms->name = stringbase; + stringbase += strlen (stringbase) + 1; + carsyms++; +diff -rup --new-file binutils-2.9.1/bfd/archures.c binutils-2.9.1/bfd/archures.c +--- binutils-2.9.1/bfd/archures.c Fri May 1 08:48:01 1998 ++++ binutils-2.9.1/bfd/archures.c Sun Aug 23 00:00:00 1998 +@@ -869,3 +869,7 @@ bfd_printable_arch_mach (arch, machine) + return ap->printable_name; + return "UNKNOWN!"; + } ++ ++#ifndef HAVE_i386pei_vec ++void pei_get_comdat_info(struct sec *pei_comdat_section){} ++#endif +diff -rup --new-file binutils-2.9.1/bfd/bfd-in.h binutils-2.9.1/bfd/bfd-in.h +--- binutils-2.9.1/bfd/bfd-in.h Fri May 1 08:48:01 1998 ++++ binutils-2.9.1/bfd/bfd-in.h Sun Aug 23 00:00:00 1998 +@@ -694,4 +694,9 @@ extern boolean bfd_coff_get_syment + extern boolean bfd_coff_get_auxent + PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *)); + ++/* Externally visible PEI routines */ ++ ++extern void pei_get_comdat_info ++ PARAMS ((struct sec *)); ++ + /* And more from the source. */ +diff -rup --new-file binutils-2.9.1/bfd/bfd-in2.h binutils-2.9.1/bfd/bfd-in2.h +--- binutils-2.9.1/bfd/bfd-in2.h Fri May 1 08:48:01 1998 ++++ binutils-2.9.1/bfd/bfd-in2.h Sun Aug 23 00:00:00 1998 +@@ -694,6 +694,11 @@ extern boolean bfd_coff_get_syment + extern boolean bfd_coff_get_auxent + PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *)); + ++/* Externally visible PEI routines */ ++ ++extern void pei_get_comdat_info ++ PARAMS ((struct sec *)); ++ + /* And more from the source. */ + void + bfd_init PARAMS ((void)); +@@ -797,6 +802,13 @@ bfd_create PARAMS ((CONST char *filename + #define bfd_h_get_signed_64(abfd, ptr) \ + BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr)) + ++typedef struct _comdat_info ++{ ++ int asoc_sec; ++ char name_buf[9]; ++ const char * comdat_sym; ++} comdat_info; ++ + typedef struct sec + { + /* The name of the section; the name isn't a copy, the pointer is +@@ -1078,6 +1090,8 @@ typedef struct sec + struct symbol_cache_entry *symbol; + struct symbol_cache_entry **symbol_ptr_ptr; + ++ comdat_info *pe_comdat_info; ++ + struct bfd_link_order *link_order_head; + struct bfd_link_order *link_order_tail; + } asection ; +@@ -2290,6 +2304,8 @@ struct _bfd + struct cisco_core_struct *cisco_core_data; + struct versados_data_struct *versados_data; + struct netbsd_core_struct *netbsd_core_data; ++ struct amiga_data_struct *amiga_data; ++ struct amiga_ardata_struct *amiga_ardata; + PTR any; + } tdata; + +@@ -2505,6 +2521,7 @@ core_file_matches_executable_p + #endif + enum bfd_flavour { + bfd_target_unknown_flavour, ++ bfd_target_amiga_flavour, + bfd_target_aout_flavour, + bfd_target_coff_flavour, + bfd_target_ecoff_flavour, +diff -rup --new-file binutils-2.9.1/bfd/bfd.c binutils-2.9.1/bfd/bfd.c +--- binutils-2.9.1/bfd/bfd.c Fri May 1 08:48:01 1998 ++++ binutils-2.9.1/bfd/bfd.c Sun Aug 23 00:00:00 1998 +@@ -177,6 +177,7 @@ CODE_FRAGMENT + . struct cisco_core_struct *cisco_core_data; + . struct versados_data_struct *versados_data; + . struct netbsd_core_struct *netbsd_core_data; ++. struct amiga_data_struct *amiga_data; + . PTR any; + . } tdata; + . +@@ -1153,3 +1154,4 @@ bfd_record_phdr (abfd, type, flags_valid + + return true; + } ++ +diff -rup --new-file binutils-2.9.1/bfd/coffcode.h binutils-2.9.1/bfd/coffcode.h +--- binutils-2.9.1/bfd/coffcode.h Fri May 1 08:48:05 1998 ++++ binutils-2.9.1/bfd/coffcode.h Sun Aug 23 00:00:00 1998 +@@ -577,7 +577,7 @@ styp_to_sec_flags (abfd, hdr, name) + if (styp_flags & IMAGE_SCN_LNK_REMOVE) + sec_flags |= SEC_EXCLUDE; + +- if (styp_flags & IMAGE_SCN_LNK_COMDAT) ++ if (styp_flags & IMAGE_SCN_LNK_COMDAT & 0 /* fnf hack for mwcc hijacking this bit */) + { + sec_flags |= SEC_LINK_ONCE; + +diff -rup --new-file binutils-2.9.1/bfd/coffgen.c binutils-2.9.1/bfd/coffgen.c +--- binutils-2.9.1/bfd/coffgen.c Fri May 1 08:48:05 1998 ++++ binutils-2.9.1/bfd/coffgen.c Sun Aug 23 00:00:00 1998 +@@ -41,6 +41,7 @@ Foundation, Inc., 59 Temple Place - Suit + #include "libbfd.h" + #include "coff/internal.h" + #include "libcoff.h" ++#include + + static void coff_fix_symbol_name + PARAMS ((bfd *, asymbol *, combined_entry_type *, bfd_size_type *, +@@ -654,6 +655,7 @@ coff_renumber_symbols (bfd_ptr, first_un + if (!newsyms) + return false; + bfd_ptr->outsymbols = newsyms; ++#ifndef HAVE_i386pei_vec + for (i = 0; i < symbol_count; i++) + if ((symbol_ptr_ptr[i]->flags & BSF_NOT_AT_END) != 0 + || (!bfd_is_und_section (symbol_ptr_ptr[i]->section) +@@ -670,6 +672,35 @@ coff_renumber_symbols (bfd_ptr, first_un + == BSF_GLOBAL))) + *newsyms++ = symbol_ptr_ptr[i]; + ++#else ++ /* link.exe depends on the symbols being sorted in ++ their natural order in each section. this is ++ as close as I could come without using backend data ++ otherwise it finds local labels and thinks they are comdats */ ++ for (i = 0; i < symbol_count; i++) ++ if ( (symbol_ptr_ptr[i]->flags & BSF_NOT_AT_END) != 0 ++ || ( !bfd_is_und_section (symbol_ptr_ptr[i]->section) ++ && !bfd_is_com_section (symbol_ptr_ptr[i]->section) ++ && !isalpha(symbol_ptr_ptr[i]->name[0]) ++ && ((symbol_ptr_ptr[i]->flags & (BSF_GLOBAL | BSF_FUNCTION)) != BSF_GLOBAL ) ++ ) ++ ) ++ *newsyms++ = symbol_ptr_ptr[i]; ++ ++ for (i = 0; i < symbol_count; i++) ++ if ( (symbol_ptr_ptr[i]->flags & BSF_NOT_AT_END) == 0 ++ && !bfd_is_und_section (symbol_ptr_ptr[i]->section) ++ && !isalpha(symbol_ptr_ptr[i]->name[0]) ++ && (bfd_is_com_section (symbol_ptr_ptr[i]->section) ++ || ((symbol_ptr_ptr[i]->flags & (BSF_GLOBAL | BSF_FUNCTION)) == BSF_GLOBAL) ++ ) ++ ) ++ *newsyms++ = symbol_ptr_ptr[i]; ++ /* for Scope etc.. */ ++ for (i = 0;i < symbol_count;i++) ++ if (isalpha(symbol_ptr_ptr[i]->name[0])) ++ *newsyms++ = symbol_ptr_ptr[i]; ++#endif + *first_undef = newsyms - bfd_ptr->outsymbols; + + for (i = 0; i < symbol_count; i++) +diff -rup --new-file binutils-2.9.1/bfd/cofflink.c binutils-2.9.1/bfd/cofflink.c +--- binutils-2.9.1/bfd/cofflink.c Fri May 1 08:48:05 1998 ++++ binutils-2.9.1/bfd/cofflink.c Sun Aug 23 00:00:00 1998 +@@ -34,6 +34,8 @@ static boolean coff_link_check_archive_e + static boolean coff_link_check_ar_symbols + PARAMS ((bfd *, struct bfd_link_info *, boolean *)); + static boolean coff_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *)); ++static asection *coff_get_first_section_of_archive ++ PARAMS ((struct bfd_link_info *, bfd *, CONST char *)); + static char *dores_com PARAMS ((char *, bfd *, int)); + static char *get_name PARAMS ((char *, char **)); + static int process_embedded_commands +@@ -2654,8 +2656,33 @@ _bfd_coff_generic_relocate_section (outp + + sec->output_offset); + } + ++ else if (coff_data(input_bfd)->pe ++ && h->class == C_SECTION ++ && h->root.type == bfd_link_hash_undefined) ++ { ++ /* Reference to an idata sub-section label, ++ currently undefined */ ++ asection *sec; ++ if (!strncmp(sym->n_name, "i4", (size_t)2 )) ++ sprintf(sym->n_name, ".idata$4"); ++ else ++ { ++ if (!strncmp(sym->n_name, "i5", (size_t)2 )) ++ sprintf(sym->n_name, ".idata$5"); ++ } ++ sec = coff_get_first_section_of_archive(info, ++ h->root.u.undef.abfd, ++ sym->n_name); ++ if (sec == NULL) ++ goto undef_sym; ++ val = (sec->output_section->vma ++ + sec->output_offset ++ - sec->vma); ++ } ++ + else if (! info->relocateable) + { ++undef_sym: + if (! ((*info->callbacks->undefined_symbol) + (info, h->root.root.string, input_bfd, input_section, + rel->r_vaddr - input_section->vma))) +@@ -2732,4 +2759,39 @@ _bfd_coff_generic_relocate_section (outp + } + return true; + } +- ++static asection * ++coff_get_first_section_of_archive(info, abfd, name) ++ struct bfd_link_info *info; ++ bfd *abfd; ++ CONST char *name; ++{ ++bfd *sub; ++asection *sect; ++asection *rtn = NULL; ++bfd_vma offset; ++ ++/* move abfd to containing archive */ ++if (abfd->my_archive == NULL) ++ return NULL; ++ ++abfd = abfd->my_archive; ++ ++for (sub = info->input_bfds; sub != NULL; sub = sub->link_next) ++ { ++ /* make sure that the bfd comes from the same archive */ ++ if (sub->my_archive == NULL || strcmp(abfd->filename, sub->my_archive->filename) ) ++ continue; ++ ++ for (sect = sub->sections; sect != NULL; sect = sect->next) ++ { ++ if (strcmp (sect->name, name)) ++ continue; ++ if (rtn == NULL || offset > sect->output_offset) ++ { ++ offset = sect->output_offset; ++ rtn = sect; ++ } ++ } ++ } ++ return rtn; ++} +diff -rup --new-file binutils-2.9.1/bfd/config.bfd binutils-2.9.1/bfd/config.bfd +--- binutils-2.9.1/bfd/config.bfd Fri May 1 08:48:05 1998 ++++ binutils-2.9.1/bfd/config.bfd Sun Aug 23 00:00:00 1998 +@@ -236,7 +236,7 @@ case "${targ}" in + targ_defvec=bfd_elf32_i386_vec + targ_selvecs="i386msdos_vec i386aout_vec" + ;; +- i[3456]86-*-mingw32* | i[3456]86-*-cygwin32* | i[3456]86-*-winnt | i[3456]86-*-pe) ++ i[3456]86-*-mingw32* | i[3456]86-*-cygwin32* | i[3456]86-*-winnt | i[3456]86-*-pe | i[3456]86-*-beos* ) + targ_defvec=i386pe_vec + targ_selvecs="i386pe_vec i386pei_vec" + ;; +@@ -284,6 +284,10 @@ case "${targ}" in + m68*-motorola-sysv*) + targ_defvec=m68ksysvcoff_vec + ;; ++ m68*-*-amigaos*) ++ targ_defvec=amiga_vec ++ targ_selvecs="aout_amiga_vec amiga_vec" ++ ;; + m68*-hp-bsd*) + targ_defvec=hp300bsd_vec + targ_underscore=yes +@@ -341,7 +345,7 @@ case "${targ}" in + targ_selvecs="m68kcoff_vec versados_vec tekhex_vec" + targ_underscore=yes + ;; +- m68*-cbm-*) ++ m68*-cbm-amix) + targ_defvec=bfd_elf32_m68k_vec + targ_selvecs=m68kcoff_vec + ;; +@@ -463,6 +467,14 @@ case "${targ}" in + + powerpc-*-aix* | powerpc-*-beos*) + targ_defvec=rs6000coff_vec ++ ;; ++ powerpc-*-amigaoshunk*) ++ targ_defvec=amiga_vec ++ targ_selvecs="bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec aout_amiga_vec" ++ ;; ++ powerpc-*-amigaos*) ++ targ_defvec=bfd_elf32_powerpc_vec ++ targ_selvecs="bfd_elf32_powerpcle_vec" + ;; + powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ + powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems*) +diff -rup --new-file binutils-2.9.1/bfd/configure binutils-2.9.1/bfd/configure +--- binutils-2.9.1/bfd/configure Fri May 1 08:48:05 1998 ++++ binutils-2.9.1/bfd/configure Thu Jan 21 19:39:34 1999 +@@ -1,7 +1,7 @@ + #! /bin/sh + + # Guess values for system-dependent variables and create Makefiles. +-# Generated automatically using autoconf version 2.12.1 ++# Generated automatically using autoconf version 2.13 + # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation +@@ -65,6 +65,10 @@ libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' ++guidedir='${prefix}/guide' ++htmldir='${prefix}/html' ++psdir='${prefix}/ps' ++dvidir='${prefix}/dvi' + mandir='${prefix}/man' + + # Initialize some other variables. +@@ -182,6 +186,10 @@ Directory and file names: + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] ++ --guidedir=DIR Amigaguide documentation in DIR [PREFIX/guide] ++ --htmldir=DIR HTML documentation in DIR [PREFIX/html] ++ --psdir=DIR postscript documentation in DIR [PREFIX/ps] ++ --dvidir=DIR TeX dvi documentation in DIR [PREFIX/dvi] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names +@@ -224,6 +232,22 @@ EOF + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + ++ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui) ++ ac_prev=guidedir ;; ++ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+ guidedir="$ac_optarg" ;; ++ ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+ htmldir="$ac_optarg" ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+ psdir="$ac_optarg" ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+ dvidir="$ac_optarg" ;; ++ + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) +@@ -354,7 +378,7 @@ EOF + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) +- echo "configure generated by autoconf version 2.12.1" ++ echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) +@@ -524,9 +548,11 @@ ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + ++ac_exeext= ++ac_objext=o + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then +@@ -588,7 +614,7 @@ else { echo "configure: error: can not r + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 +-echo "configure:592: checking host system type" >&5 ++echo "configure:618: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in +@@ -609,7 +635,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- + echo "$ac_t""$host" 1>&6 + + echo $ac_n "checking target system type""... $ac_c" 1>&6 +-echo "configure:613: checking target system type" >&5 ++echo "configure:639: checking target system type" >&5 + + target_alias=$target + case "$target_alias" in +@@ -627,7 +653,7 @@ target_os=`echo $target | sed 's/^\([^-] + echo "$ac_t""$target" 1>&6 + + echo $ac_n "checking build system type""... $ac_c" 1>&6 +-echo "configure:631: checking build system type" >&5 ++echo "configure:657: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in +@@ -652,15 +678,16 @@ test "$host_alias" != "$target_alias" && + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:656: checking for $ac_word" >&5 ++echo "configure:682: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -678,19 +705,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:712: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:745: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:774: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:685: checking for $ac_word" >&5 ++echo "configure:807: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -725,25 +848,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:859: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:890: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 901 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:906: \"$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 +@@ -757,18 +916,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:932: 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:772: checking whether we are using GNU C" >&5 ++echo "configure:937: 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 +@@ -777,7 +942,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:781: \"$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:946: \"$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 +@@ -788,11 +953,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:796: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:965: 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 +@@ -807,20 +976,47 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +-echo "configure:824: checking for POSIXized ISC" >&5 ++echo "configure:1020: checking for POSIXized ISC" >&5 + if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 + then +@@ -848,21 +1044,22 @@ fi + # SunOS /usr/etc/install + # IRIX /sbin/install + # AIX /bin/install ++# AmigaOS /c/install + # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:857: checking for a BSD compatible install" >&5 ++echo "configure:1054: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in +- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root +@@ -901,13 +1098,15 @@ echo "$ac_t""$INSTALL" 1>&6 + # It thinks the first close brace ends the variable substitution. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + + echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +-echo "configure:911: checking whether build environment is sane" >&5 ++echo "configure:1110: checking whether build environment is sane" >&5 + # Just in case + sleep 1 + echo timestamp > conftestfile +@@ -964,7 +1163,7 @@ test "$program_suffix" != NONE && + test "$program_transform_name" = "" && program_transform_name="s,x,x," + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-echo "configure:968: checking whether ${MAKE-make} sets \${MAKE}" >&5 ++echo "configure:1167: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1010,7 +1209,7 @@ EOF + + missing_dir=`cd $ac_aux_dir && pwd` + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +-echo "configure:1014: checking for working aclocal" >&5 ++echo "configure:1213: checking for working aclocal" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -1023,7 +1222,7 @@ else + fi + + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +-echo "configure:1027: checking for working autoconf" >&5 ++echo "configure:1226: checking for working autoconf" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -1036,7 +1235,7 @@ else + fi + + echo $ac_n "checking for working automake""... $ac_c" 1>&6 +-echo "configure:1040: checking for working automake" >&5 ++echo "configure:1239: checking for working automake" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -1049,7 +1248,7 @@ else + fi + + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +-echo "configure:1053: checking for working autoheader" >&5 ++echo "configure:1252: checking for working autoheader" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -1062,7 +1261,7 @@ else + fi + + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +-echo "configure:1066: checking for working makeinfo" >&5 ++echo "configure:1265: checking for working makeinfo" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -1085,15 +1284,16 @@ fi + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. + set dummy ${ac_tool_prefix}ar; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1089: checking for $ac_word" >&5 ++echo "configure:1288: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AR="${ac_tool_prefix}ar" +@@ -1113,18 +1313,68 @@ fi + + + ++ if test -z "$AR"; then ++ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. ++set dummy ${ac_tool_prefix}ar; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1321: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$AR"; then ++ ac_cv_prog_AR="$AR" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_AR="${ac_tool_prefix}ar" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" ++fi ++fi ++AR="$ac_cv_prog_AR" ++if test -n "$AR"; then ++ echo "$ac_t""$AR" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ ++ ++fi ++echo $ac_n "checking what flags $AR needs to create archives""... $ac_c" 1>&6 ++echo "configure:1352: checking what flags $AR needs to create archives" >&5 ++if eval "test \"`echo '$''{'gg_cv_arflags'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$CC" in ++ mwcc* | bcc*) ARFLAGS=${ARFLAGS-"-xml -o"} ;; ++ *) ARFLAGS=${ARFLAGS-"cr"} ;; ++esac ++gg_cv_arflags=$ARFLAGS ++ ++fi ++ARFLAGS="$gg_cv_arflags" ++echo "$ac_t""$ARFLAGS" 1>&6 ++ + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1120: checking for $ac_word" >&5 ++echo "configure:1369: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +@@ -1147,15 +1397,16 @@ if test -n "$ac_tool_prefix"; then + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1151: checking for $ac_word" >&5 ++echo "configure:1401: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" +@@ -1229,15 +1480,16 @@ fi + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1233: checking for $ac_word" >&5 ++echo "configure:1484: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" +@@ -1268,7 +1520,7 @@ ac_prog=ld + if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +-echo "configure:1272: checking for ld used by GCC" >&5 ++echo "configure:1524: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. +@@ -1286,10 +1538,10 @@ echo "configure:1272: checking for ld us + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +-echo "configure:1290: checking for GNU ld" >&5 ++echo "configure:1542: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +-echo "configure:1293: checking for non-GNU ld" >&5 ++echo "configure:1545: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1325,7 +1577,7 @@ fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +-echo "configure:1329: checking if the linker ($LD) is GNU ld" >&5 ++echo "configure:1581: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1341,7 +1593,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +-echo "configure:1345: checking for BSD-compatible nm" >&5 ++echo "configure:1597: checking for BSD-compatible nm" >&5 + if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1378,7 +1630,7 @@ echo "$ac_t""$NM" 1>&6 + + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:1382: checking whether ln -s works" >&5 ++echo "configure:1634: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1388,14 +1640,24 @@ then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" + else +- ac_cv_prog_LN_S=ln ++ if ln X conftestdata 2>/dev/null ++ then ++ rm -f conftestdata ++ ac_cv_prog_LN_S=ln ++ else ++ ac_cv_prog_LN_S=cp ++ fi + fi + fi + LN_S="$ac_cv_prog_LN_S" + if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 + else +- echo "$ac_t""no" 1>&6 ++ if test "$ac_cv_prog_LN_S" = "ln"; then ++ echo "$ac_t""no, using ln" 1>&6 ++ else ++ echo "$ac_t""no, and neither does ln, so using cp" 1>&6 ++ fi + fi + + # Always use our own libtool. +@@ -1414,8 +1676,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libto + case "$host" in + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 1418 "configure"' > conftest.$ac_ext +- if { (eval echo configure:1419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ echo '#line 1680 "configure"' > conftest.$ac_ext ++ if { (eval echo configure:1681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" +@@ -1515,7 +1777,7 @@ test "$program_transform_name" = "" && p + + + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +-echo "configure:1519: checking whether to enable maintainer-specific portions of Makefiles" >&5 ++echo "configure:1781: 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" +@@ -1533,19 +1795,19 @@ fi + + + echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 +-echo "configure:1537: checking for Cygwin32 environment" >&5 ++echo "configure:1799: checking for Cygwin32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_cygwin32'+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:1811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_cygwin32=yes + else +@@ -1562,19 +1824,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 + CYGWIN32= + test "$am_cv_cygwin32" = yes && CYGWIN32=yes + echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 +-echo "configure:1566: checking for Mingw32 environment" >&5 ++echo "configure:1828: checking for Mingw32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_mingw32=yes + else +@@ -1593,7 +1855,7 @@ test "$am_cv_mingw32" = yes && MINGW32=y + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +-echo "configure:1597: checking for executable suffix" >&5 ++echo "configure:1859: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1625,15 +1887,16 @@ target64=false + # 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:1629: checking for $ac_word" >&5 ++echo "configure:1891: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -1651,19 +1914,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1921: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1954: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1983: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:1658: checking for $ac_word" >&5 ++echo "configure:2016: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1698,25 +2057,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:2068: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:2099: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 2110 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2115: \"$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 +@@ -1730,18 +2125,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1740: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:2141: 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:1745: checking whether we are using GNU C" >&5 ++echo "configure:2146: 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 +@@ -1750,7 +2151,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1754: \"$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:2155: \"$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 +@@ -1761,11 +2162,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1769: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:2174: 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 +@@ -1780,18 +2185,45 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + + # Permit host specific settings. + . ${srcdir}/configure.host +@@ -1831,7 +2263,7 @@ if test "x$cross_compiling" = "xno"; the + EXEEXT_FOR_BUILD='$(EXEEXT)' + else + echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 +-echo "configure:1835: checking for build system executable suffix" >&5 ++echo "configure:2267: checking for build system executable suffix" >&5 + if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1853,7 +2285,7 @@ fi + + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1857: checking how to run the C preprocessor" >&5 ++echo "configure:2289: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -1868,14 +2300,14 @@ 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:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2310: \"$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 + : + else +@@ -1885,14 +2317,31 @@ 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:1895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2327: \"$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 ++ : ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ 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:2344: \"$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 + : + else +@@ -1905,6 +2354,8 @@ fi + rm -f conftest* + fi + rm -f conftest* ++fi ++rm -f conftest* + ac_cv_prog_CPP="$CPP" + fi + CPP="$ac_cv_prog_CPP" +@@ -1917,18 +2368,18 @@ for ac_hdr in stddef.h string.h strings. + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1921: checking for $ac_hdr" >&5 ++echo "configure:2372: 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:1931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2382: \"$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* + eval "ac_cv_header_$ac_safe=yes" +@@ -1957,18 +2408,18 @@ for ac_hdr in fcntl.h sys/file.h sys/tim + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1961: checking for $ac_hdr" >&5 ++echo "configure:2412: 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:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2422: \"$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* + eval "ac_cv_header_$ac_safe=yes" +@@ -1994,12 +2445,12 @@ fi + done + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +-echo "configure:1998: checking whether time.h and sys/time.h may both be included" >&5 ++echo "configure:2449: checking whether time.h and sys/time.h may both be included" >&5 + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -2008,7 +2459,7 @@ int main() { + struct tm *tp; + ; return 0; } + EOF +-if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes + else +@@ -2031,12 +2482,12 @@ fi + for ac_func in fcntl getpagesize setitimer sysconf fdopen + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2035: checking for $ac_func" >&5 ++echo "configure:2486: 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; then ++if { (eval echo configure:2514: \"$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 +@@ -2094,12 +2545,12 @@ EOF + esac + + echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 +-echo "configure:2098: checking whether strstr must be declared" >&5 ++echo "configure:2549: checking whether strstr must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2120,7 +2571,7 @@ int main() { + char *(*pfn) = (char *(*)) strstr + ; return 0; } + EOF +-if { (eval echo configure:2124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_strstr=no + else +@@ -2142,12 +2593,12 @@ EOF + fi + + echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 +-echo "configure:2146: checking whether malloc must be declared" >&5 ++echo "configure:2597: checking whether malloc must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2168,7 +2619,7 @@ int main() { + char *(*pfn) = (char *(*)) malloc + ; return 0; } + EOF +-if { (eval echo configure:2172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_malloc=no + else +@@ -2190,12 +2641,12 @@ EOF + fi + + echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 +-echo "configure:2194: checking whether realloc must be declared" >&5 ++echo "configure:2645: checking whether realloc must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2216,7 +2667,7 @@ int main() { + char *(*pfn) = (char *(*)) realloc + ; return 0; } + EOF +-if { (eval echo configure:2220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_realloc=no + else +@@ -2238,12 +2689,12 @@ EOF + fi + + echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 +-echo "configure:2242: checking whether free must be declared" >&5 ++echo "configure:2693: checking whether free must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2264,7 +2715,7 @@ int main() { + char *(*pfn) = (char *(*)) free + ; return 0; } + EOF +-if { (eval echo configure:2268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_free=no + else +@@ -2286,12 +2737,12 @@ EOF + fi + + echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 +-echo "configure:2290: checking whether getenv must be declared" >&5 ++echo "configure:2741: checking whether getenv must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2312,7 +2763,7 @@ int main() { + char *(*pfn) = (char *(*)) getenv + ; return 0; } + EOF +-if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_getenv=no + else +@@ -2587,19 +3038,19 @@ EOF + # Define HAVE_SYS_PROCFS_H if the file exists and defines + # prstatus_t. + echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6 +-echo "configure:2591: checking for sys/procfs.h" >&5 ++echo "configure:3042: checking for sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + prstatus_t t; + ; return 0; } + EOF +-if { (eval echo configure:2603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_header_sys_procfs_h=yes + else +@@ -2700,6 +3151,7 @@ do + # with the two vector lists in targets.c. + a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;; + a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; ++ amiga_vec) tb="$tb amigaos.lo amigaoslink.lo" ;; + armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;; + armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;; + armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;; +@@ -2707,6 +3159,7 @@ do + armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;; + armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;; + aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;; ++ aout_amiga_vec) tb="$tb aout-amiga.lo aout32.lo stab-syms.lo";; + aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;; + aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;; + aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;; +@@ -2910,18 +3363,18 @@ 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:2914: checking for $ac_hdr" >&5 ++echo "configure:3367: 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:2924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:3377: \"$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* + eval "ac_cv_header_$ac_safe=yes" +@@ -2949,12 +3402,12 @@ done + for ac_func in getpagesize + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2953: checking for $ac_func" >&5 ++echo "configure:3406: 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; then ++if { (eval echo configure:3434: \"$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 +@@ -3002,7 +3455,7 @@ fi + done + + echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +-echo "configure:3006: checking for working mmap" >&5 ++echo "configure:3459: 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 +@@ -3010,7 +3463,7 @@ else + ac_cv_func_mmap_fixed_mapped=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:3607: \"$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 +@@ -3175,12 +3628,12 @@ fi + for ac_func in madvise mprotect + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:3179: checking for $ac_func" >&5 ++echo "configure:3632: 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; then ++if { (eval echo configure:3660: \"$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 +@@ -3258,7 +3711,7 @@ EOF + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. + (set) 2>&1 | +- case `(ac_space=' '; set) 2>&1 | grep ac_space` in ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). +@@ -3304,7 +3757,9 @@ DEFS=-DHAVE_CONFIG_H + : ${CONFIG_STATUS=./config.status} + + echo creating $CONFIG_STATUS +-rm -f $CONFIG_STATUS ++# Some systems, like AmigaOS, won't allow you to remove a script that is ++# being executed, so just move it out of the way instead. ++if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi + cat > $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h +@@ -3636,6 +4099,7 @@ test -z "$CONFIG_HEADERS" || echo timest + exit 0 + EOF + chmod +x $CONFIG_STATUS ++rm -f CONFIG.STATUS.old + rm -fr confdefs* $ac_clean_files + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +diff -rup --new-file binutils-2.9.1/bfd/configure.host binutils-2.9.1/bfd/configure.host +--- binutils-2.9.1/bfd/configure.host Fri May 1 08:48:05 1998 ++++ binutils-2.9.1/bfd/configure.host Sun Aug 23 00:00:00 1998 +@@ -44,6 +44,7 @@ mips*-*-sysv*) HDEFINES="-G 4" ;; + mips*-*-riscos*) HDEFINES="-G 4" ;; + + m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;; ++m68*-*-amigaos*) HDEFINES=-mstackextend ;; + + *-*-solaris*) HOST_64BIT_TYPE="long long" + HOST_U_64BIT_TYPE="unsigned long long" +diff -rup --new-file binutils-2.9.1/bfd/configure.in binutils-2.9.1/bfd/configure.in +--- binutils-2.9.1/bfd/configure.in Fri May 1 08:48:05 1998 ++++ binutils-2.9.1/bfd/configure.in Sun Aug 23 00:00:00 1998 +@@ -12,6 +12,7 @@ AM_INIT_AUTOMAKE(bfd, 2.9.1) + dnl These must be called before AM_PROG_LIBTOOL, because it may want + dnl to call AC_CHECK_PROG. + AC_CHECK_TOOL(AR, ar) ++AC_ARFLAGS + AC_CHECK_TOOL(RANLIB, ranlib, :) + + dnl Default to a non shared library. This may be overridden by the +@@ -385,6 +386,7 @@ do + # with the two vector lists in targets.c. + a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;; + a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; ++ amiga_vec) tb="$tb amigaos.lo amigaoslink.lo" ;; + armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;; + armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;; + armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;; +@@ -392,6 +394,7 @@ do + armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;; + armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;; + aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;; ++ aout_amiga_vec) tb="$tb aout-amiga.lo aout32.lo stab-syms.lo";; + aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;; + aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;; + aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;; +diff -rup --new-file binutils-2.9.1/bfd/doc/ChangeLog binutils-2.9.1/bfd/doc/ChangeLog +--- binutils-2.9.1/bfd/doc/ChangeLog Fri May 1 08:48:02 1998 ++++ binutils-2.9.1/bfd/doc/ChangeLog Sun Aug 23 00:00:00 1998 +@@ -41,6 +41,10 @@ Wed Oct 1 14:41:28 1997 Ian Lance Tayl + elfcode.h as input files; they don't contribute anything. + * Makefile.in: Rebuild. + ++Mon Aug 25 16:32:00 1997 Steffen Opel ++ ++ * Makefile.in (docs): Add bfd.guide. ++ + Fri Aug 15 04:55:15 1997 Doug Evans + + * Makefile.am (libbfd.h, libcoff.h): Invoke $(MKDOC) as ./$(MKDOC). +diff -rup --new-file binutils-2.9.1/bfd/doc/Makefile.am binutils-2.9.1/bfd/doc/Makefile.am +--- binutils-2.9.1/bfd/doc/Makefile.am Fri May 1 08:48:02 1998 ++++ binutils-2.9.1/bfd/doc/Makefile.am Sun Aug 23 00:00:00 1998 +@@ -2,7 +2,7 @@ + + AUTOMAKE_OPTIONS = cygnus + +-DOCFILES = aoutx.texi archive.texi archures.texi \ ++DOCFILES = amiga.texi amigalink.texi aoutx.texi archive.texi archures.texi \ + bfdt.texi cache.texi coffcode.texi \ + core.texi elf.texi elfcode.texi format.texi libbfd.texi \ + opncls.texi reloc.texi section.texi \ +@@ -24,6 +24,7 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir) + $(srcdir)/../cache.c $(srcdir)/../coffcode.h \ + $(srcdir)/../corefile.c $(srcdir)/../elf.c \ + $(srcdir)/../elfcode.h $(srcdir)/../format.c \ ++ $(srcdir)/../amigaos.c $(srcdir)/../amigaoslink.c \ + $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \ + $(srcdir)/../reloc.c $(srcdir)/../section.c \ + $(srcdir)/../syms.c $(srcdir)/../targets.c \ +@@ -48,14 +49,14 @@ info_TEXINFOS = bfd.texinfo + MKDOC = chew$(EXEEXT_FOR_BUILD) + + $(MKDOC): chew.o +- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS) ++ $(CC_FOR_BUILD) $(H_CFLAGS) $(CFLAGS) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS) + + chew.o: chew.c + $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c + + protos: libbfd.h libcoff.h bfd.h + +-bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo ++bfd.info bfd.dvi bfd.guide: $(DOCFILES) bfdsumm.texi bfd.texinfo + + # We can't replace these rules with an implicit rule, because + # makes without VPATH support couldn't find the .h files in `..'. +@@ -182,6 +183,18 @@ s-linker: $(MKDOC) $(srcdir)/../linker.c + $(srcdir)/../../move-if-change linker.tmp linker.texi + touch s-linker + linker.texi: s-linker ++ ++s-amiga: $(MKDOC) $(srcdir)/../amigaos.c $(srcdir)/doc.str ++ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../amigaos.c >amiga.tmp ++ $(srcdir)/../../move-if-change amiga.tmp amiga.texi ++ touch s-amiga ++amiga.texi: s-amiga ++ ++s-amigalink: $(MKDOC) $(srcdir)/../amigaoslink.c $(srcdir)/doc.str ++ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../amigaoslink.c >amigalink.tmp ++ $(srcdir)/../../move-if-change amigalink.tmp amigalink.texi ++ touch s-amigalink ++amigalink.texi: s-amigalink + + libbfd.h: $(srcdir)/../libbfd-in.h \ + $(srcdir)/../init.c \ +diff -rup --new-file binutils-2.9.1/bfd/doc/Makefile.in binutils-2.9.1/bfd/doc/Makefile.in +--- binutils-2.9.1/bfd/doc/Makefile.in Fri May 1 08:48:02 1998 ++++ binutils-2.9.1/bfd/doc/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -1,4 +1,4 @@ +-# Makefile.in generated automatically by automake 1.2e from Makefile.am ++# Makefile.in generated automatically by automake 1.3 from Makefile.am + + # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation +@@ -11,7 +11,7 @@ + # PARTICULAR PURPOSE. + + +-SHELL = @SHELL@ ++SHELL = /bin/sh + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -28,10 +28,16 @@ sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ ++guidedir = @guidedir@ ++htmldir = @htmldir@ ++dvidir = @dvidir@ ++psdir = @psdir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + ++DISTDIR = ++ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +@@ -91,7 +97,7 @@ wordsize = @wordsize@ + + AUTOMAKE_OPTIONS = cygnus + +-DOCFILES = aoutx.texi archive.texi archures.texi \ ++DOCFILES = amiga.texi amigalink.texi aoutx.texi archive.texi archures.texi \ + bfdt.texi cache.texi coffcode.texi \ + core.texi elf.texi elfcode.texi format.texi libbfd.texi \ + opncls.texi reloc.texi section.texi \ +@@ -113,6 +119,7 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir) + $(srcdir)/../cache.c $(srcdir)/../coffcode.h \ + $(srcdir)/../corefile.c $(srcdir)/../elf.c \ + $(srcdir)/../elfcode.h $(srcdir)/../format.c \ ++ $(srcdir)/../amigaos.c $(srcdir)/../amigaoslink.c \ + $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \ + $(srcdir)/../reloc.c $(srcdir)/../section.c \ + $(srcdir)/../syms.c $(srcdir)/../targets.c \ +@@ -151,26 +158,35 @@ TEXINFO_TEX = $(top_srcdir)/../texinfo/t + INFO_DEPS = bfd.info + DVIS = bfd.dvi + TEXINFOS = bfd.texinfo ++GUIDES = bfd.guide ++GUIDE_DEPS = bfd.guide ++HTMLS = bfd.html ++HTML_DEPS = bfd.html ++PS_S = bfd.ps ++PS_DEPS = bfd.ps + DIST_COMMON = ChangeLog Makefile.am Makefile.in + + +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +- ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) \ ++ $(INFOS) $(GUIDES) $(HTMLS) $(MANS) + TAR = tar + GZIP = --best +-default: all ++all: Makefile + + .SUFFIXES: +-.SUFFIXES: .dvi .info .ps .texi .texinfo +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile ++.SUFFIXES: .dvi .guide .html .info .ps .texi .texinfo .txi ++$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus --include-deps doc/Makefile + +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + + bfd.info: bfd.texinfo ++bfd.guide: bfd.texinfo ++bfd.html: bfd.texinfo ++bfd.ps: bfd.dvi + bfd.dvi: bfd.texinfo + + +@@ -178,7 +194,7 @@ DVIPS = dvips + + .texi.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I$(srcdir) $< --output=$@ + + .texi.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ +@@ -186,39 +202,51 @@ DVIPS = dvips + + .texi: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi.info: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< ++ ++.txi.dvi: ++ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ ++ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< + .dvi.ps: + $(DVIPS) $< -o $@ + + install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(infodir) ++ $(mkinstalldirs) $(DESTDIR)$(infodir) + @for file in $(INFO_DEPS); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + if test -f $$d/$$ifile; then \ +- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \ +- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ + else : ; fi; \ + done; \ + done + @$(POST_INSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + for file in $(INFO_DEPS); do \ +- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\ +- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\ ++ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ ++ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ + done; \ + else : ; fi + +@@ -229,11 +257,11 @@ uninstall-info: + else ii=; fi; \ + for file in $(INFO_DEPS); do \ + test -z "$ii" \ +- || install-info --info-dir=$(infodir) --remove $$file; \ ++ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ + done +- $(NORMAL_UNINSTALL) ++ @$(NORMAL_UNINSTALL) + for file in $(INFO_DEPS); do \ +- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ ++ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + done + + dist-info: $(INFO_DEPS) +@@ -246,10 +274,140 @@ dist-info: $(INFO_DEPS) + done; \ + done + ++MAKEGUIDE= $(MAKEINFO) --amiga ++ ++MAKEHTML = texi2html -number -split_chapter ++ ++.texi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texinfo.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.txi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texi.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++.texinfo.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++install-guide: $(GUIDE_DEPS) ++ $(mkinstalldirs) $(guidedir) ++ for file in $(GUIDE_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(guidedir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-guide: ++ for file in *.guide*; do \ ++ rm -f $(guidedir)/$$file; \ ++ done ++ ++install-ps: $(PS_S) ++ $(mkinstalldirs) $(psdir) ++ for file in $(PS_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(psdir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-ps: ++ for file in *.ps*; do \ ++ rm -f $(psdir)/$$file; \ ++ done ++ ++install-dvi: $(DVIS) ++ $(mkinstalldirs) $(dvidir) ++ for file in $(DVIS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(dvidir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-dvi: ++ for file in *.dvi*; do \ ++ rm -f $(dvidir)/$$file; \ ++ done ++ ++install-html: $(HTML_DEPS) ++ $(mkinstalldirs) $(htmldir) ++ @touch $(HTML_DEPS) ++ @for file in $(HTML_DEPS); do \ ++ if test -f $$file; then d=.; else d=$(srcdir); fi; \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $$d && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ if test -f $$d/$$ifile; then \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile; \ ++ else : ; fi; \ ++ done; \ ++ done ++ @rm -f $(htmldir)/$(HTML_DEPS) ++ ++uninstall-html: ++ @for file in $(HTML_DEPS); do \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $(htmldir) && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ echo "removing: $(htmldir)/$$ifile"; \ ++ rm -f $(htmldir)/$$ifile; \ ++ done; \ ++ done ++ ++mostlyclean-guide: ++ rm -f bfd.aux bfd.cp bfd.cps bfd.dvi bfd.fn bfd.fns bfd.ky bfd.kys \ ++ bfd.ps bfd.log bfd.pg bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs \ ++ bfd.op bfd.tr bfd.cv bfd.cn bfd.guide bfd.html bfd.ps ++ ++clean-guide: ++ ++distclean-guide: ++ ++maintainer-clean-guide: ++ rm -f $(GUIDES) ++ ++mostlyclean-html: ++ rm -f bfd.aux bfd.cp bfd.cps bfd.dvi bfd.fn bfd.fns bfd.ky bfd.kys \ ++ bfd.ps bfd.log bfd.pg bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs \ ++ bfd.op bfd.tr bfd.cv bfd.cn bfd.guide bfd.html bfd.ps ++ ++clean-html: ++ ++distclean-html: ++ ++maintainer-clean-html: ++ rm -f $(HTMLS) ++ ++mostlyclean-ps: ++ rm -f bfd.aux bfd.cp bfd.cps bfd.dvi bfd.fn bfd.fns bfd.ky bfd.kys \ ++ bfd.ps bfd.log bfd.pg bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs \ ++ bfd.op bfd.tr bfd.cv bfd.cn bfd.guide bfd.html bfd.ps ++ ++clean-ps: ++ ++distclean-ps: ++ ++maintainer-clean-ps: ++ rm -f $(PS_S) ++ ++mostlyclean-dvi: ++ rm -f bfd.aux bfd.cp bfd.cps bfd.dvi bfd.fn bfd.fns bfd.ky bfd.kys \ ++ bfd.ps bfd.log bfd.pg bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs \ ++ bfd.op bfd.tr bfd.cv bfd.cn bfd.guide bfd.html bfd.ps ++ ++clean-dvi: ++ ++distclean-dvi: ++ ++maintainer-clean-dvi: ++ rm -f $(DVIS) ++ + mostlyclean-aminfo: + -rm -f bfd.aux bfd.cp bfd.cps bfd.dvi bfd.fn bfd.fns bfd.ky bfd.kys \ + bfd.ps bfd.log bfd.pg bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs \ +- bfd.op bfd.tr bfd.cv bfd.cn ++ bfd.op bfd.tr bfd.cv bfd.cn bfd.guide bfd.html bfd.ps + + clean-aminfo: + +@@ -280,6 +438,9 @@ distdir: $(DISTFILES) + done + $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info + info: $(INFO_DEPS) ++guide: $(GUIDE_DEPS) ++html: $(HTML_DEPS) ++ps: $(PS_DEPS) + dvi: $(DVIS) + check: + $(MAKE) +@@ -296,8 +457,6 @@ install: install-exec install-data all + + uninstall: + +-all: Makefile +- + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: +@@ -317,36 +476,45 @@ distclean-generic: + maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +-mostlyclean: mostlyclean-aminfo mostlyclean-generic ++mostlyclean: mostlyclean-aminfo mostlyclean-guide mostlyclean-html \ ++ mostlyclean-dvi mostlyclean-ps mostlyclean-generic + +-clean: clean-aminfo clean-generic mostlyclean ++clean: clean-aminfo clean-guide clean-html clean-dvi clean-ps \ ++ clean-generic mostlyclean + +-distclean: distclean-aminfo distclean-generic clean ++distclean: distclean-aminfo distclean-guide distclean-html \ ++ distclean-dvi distclean-ps distclean-generic clean + -rm -f config.status + -rm -f libtool + +-maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \ +- distclean ++maintainer-clean: maintainer-clean-aminfo maintainer-clean-guide \ ++ maintainer-clean-html maintainer-clean-dvi \ ++ maintainer-clean-ps maintainer-clean-generic distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +-.PHONY: default install-info-am uninstall-info mostlyclean-aminfo \ +-distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir info \ +-dvi installcheck install-info install-exec install-data install \ +-uninstall all installdirs mostlyclean-generic distclean-generic \ +-clean-generic maintainer-clean-generic clean mostlyclean distclean \ +-maintainer-clean ++.PHONY: install-info-am uninstall-info install-guide uninstall-guide \ ++install-ps uninstall-ps install-html uninstall-html install-dvi \ ++uninstall-dvi mostlyclean-guide distclean-guide clean-guide \ ++maintainer-clean-guide mostlyclean-html distclean-html clean-html \ ++maintainer-clean-html mostlyclean-ps distclean-ps clean-ps \ ++maintainer-clean-ps mostlyclean-dvi distclean-dvi clean-dvi \ ++maintainer-clean-dvi mostlyclean-aminfo distclean-aminfo clean-aminfo \ ++maintainer-clean-aminfo tags distdir info guide html ps dvi \ ++installcheck install-info install-exec install-data install uninstall \ ++all installdirs mostlyclean-generic distclean-generic clean-generic \ ++maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + + $(MKDOC): chew.o +- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS) ++ $(CC_FOR_BUILD) $(H_CFLAGS) $(CFLAGS) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS) + + chew.o: chew.c + $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c + + protos: libbfd.h libcoff.h bfd.h + +-bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo ++bfd.info bfd.dvi bfd.guide: $(DOCFILES) bfdsumm.texi bfd.texinfo + + # We can't replace these rules with an implicit rule, because + # makes without VPATH support couldn't find the .h files in `..'. +@@ -473,6 +641,18 @@ s-linker: $(MKDOC) $(srcdir)/../linker.c + $(srcdir)/../../move-if-change linker.tmp linker.texi + touch s-linker + linker.texi: s-linker ++ ++s-amiga: $(MKDOC) $(srcdir)/../amigaos.c $(srcdir)/doc.str ++ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../amigaos.c >amiga.tmp ++ $(srcdir)/../../move-if-change amiga.tmp amiga.texi ++ touch s-amiga ++amiga.texi: s-amiga ++ ++s-amigalink: $(MKDOC) $(srcdir)/../amigaoslink.c $(srcdir)/doc.str ++ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../amigaoslink.c >amigalink.tmp ++ $(srcdir)/../../move-if-change amigalink.tmp amigalink.texi ++ touch s-amigalink ++amigalink.texi: s-amigalink + + libbfd.h: $(srcdir)/../libbfd-in.h \ + $(srcdir)/../init.c \ +diff -rup --new-file binutils-2.9.1/bfd/doc/bfd.info binutils-2.9.1/bfd/doc/bfd.info +--- binutils-2.9.1/bfd/doc/bfd.info Fri May 1 08:48:03 1998 ++++ binutils-2.9.1/bfd/doc/bfd.info Wed Dec 31 17:00:00 1969 +@@ -1,95 +0,0 @@ +-This is Info file bfd.info, produced by Makeinfo version 1.68 from the +-input file bfd.texinfo. +- +-START-INFO-DIR-ENTRY +-* Bfd: (bfd). The Binary File Descriptor library. +-END-INFO-DIR-ENTRY +- +- This file documents the BFD library. +- +- Copyright (C) 1991 Free Software Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, subject to the +-terms of the GNU General Public License, which includes the provision +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-Indirect: +-bfd.info-1: 942 +-bfd.info-2: 37582 +-bfd.info-3: 78554 +-bfd.info-4: 113353 +-bfd.info-5: 162239 +-bfd.info-6: 188304 +- +-Tag Table: +-(Indirect) +-Node: Top942 +-Node: Overview1207 +-Node: History2257 +-Node: How It Works3198 +-Node: What BFD Version 2 Can Do4739 +-Node: BFD information loss6053 +-Node: Canonical format8576 +-Node: BFD front end12937 +-Node: Memory Usage31680 +-Node: Initialization32903 +-Node: Sections33280 +-Node: Section Input33758 +-Node: Section Output35114 +-Node: typedef asection37582 +-Node: section prototypes51158 +-Node: Symbols56978 +-Node: Reading Symbols58568 +-Node: Writing Symbols59742 +-Node: Mini Symbols61432 +-Node: typedef asymbol62397 +-Node: symbol handling functions67361 +-Node: Archives71416 +-Node: Formats75034 +-Node: Relocations77835 +-Node: typedef arelent78554 +-Node: howto manager93396 +-Node: Core Files110371 +-Node: Targets111392 +-Node: bfd_target113353 +-Node: Architectures131107 +-Node: Opening and Closing142532 +-Node: Internal146127 +-Node: File Caching151309 +-Node: Linker Functions154087 +-Node: Creating a Linker Hash Table155753 +-Node: Adding Symbols to the Hash Table157480 +-Node: Differing file formats158370 +-Node: Adding symbols from an object file160103 +-Node: Adding symbols from an archive162239 +-Node: Performing the Final Link164638 +-Node: Information provided by the linker165869 +-Node: Relocating the section contents167005 +-Node: Writing the symbol table168742 +-Node: Hash Tables171336 +-Node: Creating and Freeing a Hash Table172527 +-Node: Looking Up or Entering a String173683 +-Node: Traversing a Hash Table174925 +-Node: Deriving a New Hash Table Type175703 +-Node: Define the Derived Structures176758 +-Node: Write the Derived Creation Routine177824 +-Node: Write Other Derived Routines180523 +-Node: BFD back ends181823 +-Node: What to Put Where182042 +-Node: aout182180 +-Node: coff188304 +-Node: elf214335 +-Node: Index215168 +- +-End Tag Table +diff -rup --new-file binutils-2.9.1/bfd/doc/bfd.info-1 binutils-2.9.1/bfd/doc/bfd.info-1 +--- binutils-2.9.1/bfd/doc/bfd.info-1 Fri May 1 08:48:03 1998 ++++ binutils-2.9.1/bfd/doc/bfd.info-1 Wed Dec 31 17:00:00 1969 +@@ -1,1011 +0,0 @@ +-This is Info file bfd.info, produced by Makeinfo version 1.68 from the +-input file bfd.texinfo. +- +-START-INFO-DIR-ENTRY +-* Bfd: (bfd). The Binary File Descriptor library. +-END-INFO-DIR-ENTRY +- +- This file documents the BFD library. +- +- Copyright (C) 1991 Free Software Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, subject to the +-terms of the GNU General Public License, which includes the provision +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: bfd.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) +- +- This file documents the binary file descriptor library libbfd. +- +-* Menu: +- +-* Overview:: Overview of BFD +-* BFD front end:: BFD front end +-* BFD back ends:: BFD back ends +-* Index:: Index +- +- +-File: bfd.info, Node: Overview, Next: BFD front end, Prev: Top, Up: Top +- +-Introduction +-************ +- +- BFD is a package which allows applications to use the same routines +-to operate on object files whatever the object file format. A new +-object file format can be supported simply by creating a new BFD back +-end and adding it to the library. +- +- BFD is split into two parts: the front end, and the back ends (one +-for each object file format). +- * The front end of BFD provides the interface to the user. It manages +- memory and various canonical data structures. The front end also +- decides which back end to use and when to call back end routines. +- +- * The back ends provide BFD its view of the real world. Each back +- end provides a set of calls which the BFD front end can use to +- maintain its canonical form. The back ends also may keep around +- information for their own use, for greater efficiency. +- +-* Menu: +- +-* History:: History +-* How It Works:: How It Works +-* What BFD Version 2 Can Do:: What BFD Version 2 Can Do +- +- +-File: bfd.info, Node: History, Next: How It Works, Prev: Overview, Up: Overview +- +-History +-======= +- +- One spur behind BFD was the desire, on the part of the GNU 960 team +-at Intel Oregon, for interoperability of applications on their COFF and +-b.out file formats. Cygnus was providing GNU support for the team, and +-was contracted to provide the required functionality. +- +- The name came from a conversation David Wallace was having with +-Richard Stallman about the library: RMS said that it would be quite +-hard--David said "BFD". Stallman was right, but the name stuck. +- +- At the same time, Ready Systems wanted much the same thing, but for +-different object file formats: IEEE-695, Oasys, Srecords, a.out and 68k +-coff. +- +- BFD was first implemented by members of Cygnus Support; Steve +-Chamberlain (`sac@cygnus.com'), John Gilmore (`gnu@cygnus.com'), K. +-Richard Pixley (`rich@cygnus.com') and David Henkel-Wallace +-(`gumby@cygnus.com'). +- +- +-File: bfd.info, Node: How It Works, Next: What BFD Version 2 Can Do, Prev: History, Up: Overview +- +-How To Use BFD +-============== +- +- To use the library, include `bfd.h' and link with `libbfd.a'. +- +- BFD provides a common interface to the parts of an object file for a +-calling application. +- +- When an application sucessfully opens a target file (object, +-archive, or whatever), a pointer to an internal structure is returned. +-This pointer points to a structure called `bfd', described in `bfd.h'. +-Our convention is to call this pointer a BFD, and instances of it +-within code `abfd'. All operations on the target object file are +-applied as methods to the BFD. The mapping is defined within `bfd.h' +-in a set of macros, all beginning with `bfd_' to reduce namespace +-pollution. +- +- For example, this sequence does what you would probably expect: +-return the number of sections in an object file attached to a BFD +-`abfd'. +- +- #include "bfd.h" +- +- unsigned int number_of_sections(abfd) +- bfd *abfd; +- { +- return bfd_count_sections(abfd); +- } +- +- The abstraction used within BFD is that an object file has: +- +- * a header, +- +- * a number of sections containing raw data (*note Sections::.), +- +- * a set of relocations (*note Relocations::.), and +- +- * some symbol information (*note Symbols::.). +- +-Also, BFDs opened for archives have the additional attribute of an index +-and contain subordinate BFDs. This approach is fine for a.out and coff, +-but loses efficiency when applied to formats such as S-records and +-IEEE-695. +- +- +-File: bfd.info, Node: What BFD Version 2 Can Do, Prev: How It Works, Up: Overview +- +-What BFD Version 2 Can Do +-========================= +- +- When an object file is opened, BFD subroutines automatically +-determine the format of the input object file. They then build a +-descriptor in memory with pointers to routines that will be used to +-access elements of the object file's data structures. +- +- As different information from the the object files is required, BFD +-reads from different sections of the file and processes them. For +-example, a very common operation for the linker is processing symbol +-tables. Each BFD back end provides a routine for converting between +-the object file's representation of symbols and an internal canonical +-format. When the linker asks for the symbol table of an object file, it +-calls through a memory pointer to the routine from the relevant BFD +-back end which reads and converts the table into a canonical form. The +-linker then operates upon the canonical form. When the link is finished +-and the linker writes the output file's symbol table, another BFD back +-end routine is called to take the newly created symbol table and +-convert it into the chosen output format. +- +-* Menu: +- +-* BFD information loss:: Information Loss +-* Canonical format:: The BFD canonical object-file format +- +- +-File: bfd.info, Node: BFD information loss, Next: Canonical format, Up: What BFD Version 2 Can Do +- +-Information Loss +----------------- +- +- *Information can be lost during output.* The output formats +-supported by BFD do not provide identical facilities, and information +-which can be described in one form has nowhere to go in another format. +-One example of this is alignment information in `b.out'. There is +-nowhere in an `a.out' format file to store alignment information on the +-contained data, so when a file is linked from `b.out' and an `a.out' +-image is produced, alignment information will not propagate to the +-output file. (The linker will still use the alignment information +-internally, so the link is performed correctly). +- +- Another example is COFF section names. COFF files may contain an +-unlimited number of sections, each one with a textual section name. If +-the target of the link is a format which does not have many sections +-(e.g., `a.out') or has sections without names (e.g., the Oasys format), +-the link cannot be done simply. You can circumvent this problem by +-describing the desired input-to-output section mapping with the linker +-command language. +- +- *Information can be lost during canonicalization.* The BFD internal +-canonical form of the external formats is not exhaustive; there are +-structures in input formats for which there is no direct representation +-internally. This means that the BFD back ends cannot maintain all +-possible data richness through the transformation between external to +-internal and back to external formats. +- +- This limitation is only a problem when an application reads one +-format and writes another. Each BFD back end is responsible for +-maintaining as much data as possible, and the internal BFD canonical +-form has structures which are opaque to the BFD core, and exported only +-to the back ends. When a file is read in one format, the canonical form +-is generated for BFD and the application. At the same time, the back +-end saves away any information which may otherwise be lost. If the data +-is then written back in the same format, the back end routine will be +-able to use the canonical form provided by the BFD core as well as the +-information it prepared earlier. Since there is a great deal of +-commonality between back ends, there is no information lost when +-linking or copying big endian COFF to little endian COFF, or `a.out' to +-`b.out'. When a mixture of formats is linked, the information is only +-lost from the files whose format differs from the destination. +- +- +-File: bfd.info, Node: Canonical format, Prev: BFD information loss, Up: What BFD Version 2 Can Do +- +-The BFD canonical object-file format +------------------------------------- +- +- The greatest potential for loss of information occurs when there is +-the least overlap between the information provided by the source +-format, that stored by the canonical format, and that needed by the +-destination format. A brief description of the canonical form may help +-you understand which kinds of data you can count on preserving across +-conversions. +- +-*files* +- Information stored on a per-file basis includes target machine +- architecture, particular implementation format type, a demand +- pageable bit, and a write protected bit. Information like Unix +- magic numbers is not stored here--only the magic numbers' meaning, +- so a `ZMAGIC' file would have both the demand pageable bit and the +- write protected text bit set. The byte order of the target is +- stored on a per-file basis, so that big- and little-endian object +- files may be used with one another. +- +-*sections* +- Each section in the input file contains the name of the section, +- the section's original address in the object file, size and +- alignment information, various flags, and pointers into other BFD +- data structures. +- +-*symbols* +- Each symbol contains a pointer to the information for the object +- file which originally defined it, its name, its value, and various +- flag bits. When a BFD back end reads in a symbol table, it +- relocates all symbols to make them relative to the base of the +- section where they were defined. Doing this ensures that each +- symbol points to its containing section. Each symbol also has a +- varying amount of hidden private data for the BFD back end. Since +- the symbol points to the original file, the private data format +- for that symbol is accessible. `ld' can operate on a collection +- of symbols of wildly different formats without problems. +- +- Normal global and simple local symbols are maintained on output, +- so an output file (no matter its format) will retain symbols +- pointing to functions and to global, static, and common variables. +- Some symbol information is not worth retaining; in `a.out', type +- information is stored in the symbol table as long symbol names. +- This information would be useless to most COFF debuggers; the +- linker has command line switches to allow users to throw it away. +- +- There is one word of type information within the symbol, so if the +- format supports symbol type information within symbols (for +- example, COFF, IEEE, Oasys) and the type is simple enough to fit +- within one word (nearly everything but aggregates), the +- information will be preserved. +- +-*relocation level* +- Each canonical BFD relocation record contains a pointer to the +- symbol to relocate to, the offset of the data to relocate, the +- section the data is in, and a pointer to a relocation type +- descriptor. Relocation is performed by passing messages through +- the relocation type descriptor and the symbol pointer. Therefore, +- relocations can be performed on output data using a relocation +- method that is only available in one of the input formats. For +- instance, Oasys provides a byte relocation format. A relocation +- record requesting this relocation type would point indirectly to a +- routine to perform this, so the relocation may be performed on a +- byte being written to a 68k COFF file, even though 68k COFF has no +- such relocation type. +- +-*line numbers* +- Object formats can contain, for debugging purposes, some form of +- mapping between symbols, source line numbers, and addresses in the +- output file. These addresses have to be relocated along with the +- symbol information. Each symbol with an associated list of line +- number records points to the first record of the list. The head +- of a line number list consists of a pointer to the symbol, which +- allows finding out the address of the function whose line number +- is being described. The rest of the list is made up of pairs: +- offsets into the section and line numbers. Any format which can +- simply derive this information can pass it successfully between +- formats (COFF, IEEE and Oasys). +- +- +-File: bfd.info, Node: BFD front end, Next: BFD back ends, Prev: Overview, Up: Top +- +-BFD front end +-************* +- +-`typedef bfd' +-============= +- +- A BFD has type `bfd'; objects of this type are the cornerstone of +-any application using BFD. Using BFD consists of making references +-though the BFD and to data in the BFD. +- +- Here is the structure that defines the type `bfd'. It contains the +-major data about the file and pointers to the rest of the data. +- +- +- struct _bfd +- { +- /* The filename the application opened the BFD with. */ +- CONST char *filename; +- +- /* A pointer to the target jump table. */ +- const struct bfd_target *xvec; +- +- /* To avoid dragging too many header files into every file that +- includes ``bfd.h'', IOSTREAM has been declared as a "char +- *", and MTIME as a "long". Their correct types, to which they +- are cast when used, are "FILE *" and "time_t". The iostream +- is the result of an fopen on the filename. However, if the +- BFD_IN_MEMORY flag is set, then iostream is actually a pointer +- to a bfd_in_memory struct. */ +- PTR iostream; +- +- /* Is the file descriptor being cached? That is, can it be closed as +- needed, and re-opened when accessed later? */ +- +- boolean cacheable; +- +- /* Marks whether there was a default target specified when the +- BFD was opened. This is used to select which matching algorithm +- to use to choose the back end. */ +- +- boolean target_defaulted; +- +- /* The caching routines use these to maintain a +- least-recently-used list of BFDs */ +- +- struct _bfd *lru_prev, *lru_next; +- +- /* When a file is closed by the caching routines, BFD retains +- state information on the file here: */ +- +- file_ptr where; +- +- /* and here: (``once'' means at least once) */ +- +- boolean opened_once; +- +- /* Set if we have a locally maintained mtime value, rather than +- getting it from the file each time: */ +- +- boolean mtime_set; +- +- /* File modified time, if mtime_set is true: */ +- +- long mtime; +- +- /* Reserved for an unimplemented file locking extension.*/ +- +- int ifd; +- +- /* The format which belongs to the BFD. (object, core, etc.) */ +- +- bfd_format format; +- +- /* The direction the BFD was opened with*/ +- +- enum bfd_direction {no_direction = 0, +- read_direction = 1, +- write_direction = 2, +- both_direction = 3} direction; +- +- /* Format_specific flags*/ +- +- flagword flags; +- +- /* Currently my_archive is tested before adding origin to +- anything. I believe that this can become always an add of +- origin, with origin set to 0 for non archive files. */ +- +- file_ptr origin; +- +- /* Remember when output has begun, to stop strange things +- from happening. */ +- boolean output_has_begun; +- +- /* Pointer to linked list of sections*/ +- struct sec *sections; +- +- /* The number of sections */ +- unsigned int section_count; +- +- /* Stuff only useful for object files: +- The start address. */ +- bfd_vma start_address; +- +- /* Used for input and output*/ +- unsigned int symcount; +- +- /* Symbol table for output BFD (with symcount entries) */ +- struct symbol_cache_entry **outsymbols; +- +- /* Pointer to structure which contains architecture information*/ +- const struct bfd_arch_info *arch_info; +- +- /* Stuff only useful for archives:*/ +- PTR arelt_data; +- struct _bfd *my_archive; /* The containing archive BFD. */ +- struct _bfd *next; /* The next BFD in the archive. */ +- struct _bfd *archive_head; /* The first BFD in the archive. */ +- boolean has_armap; +- +- /* A chain of BFD structures involved in a link. */ +- struct _bfd *link_next; +- +- /* A field used by _bfd_generic_link_add_archive_symbols. This will +- be used only for archive elements. */ +- int archive_pass; +- +- /* Used by the back end to hold private data. */ +- +- union +- { +- struct aout_data_struct *aout_data; +- struct artdata *aout_ar_data; +- struct _oasys_data *oasys_obj_data; +- struct _oasys_ar_data *oasys_ar_data; +- struct coff_tdata *coff_obj_data; +- struct pe_tdata *pe_obj_data; +- struct xcoff_tdata *xcoff_obj_data; +- struct ecoff_tdata *ecoff_obj_data; +- struct ieee_data_struct *ieee_data; +- struct ieee_ar_data_struct *ieee_ar_data; +- struct srec_data_struct *srec_data; +- struct ihex_data_struct *ihex_data; +- struct tekhex_data_struct *tekhex_data; +- struct elf_obj_tdata *elf_obj_data; +- struct nlm_obj_tdata *nlm_obj_data; +- struct bout_data_struct *bout_data; +- struct sun_core_struct *sun_core_data; +- struct trad_core_struct *trad_core_data; +- struct som_data_struct *som_data; +- struct hpux_core_struct *hpux_core_data; +- struct hppabsd_core_struct *hppabsd_core_data; +- struct sgi_core_struct *sgi_core_data; +- struct lynx_core_struct *lynx_core_data; +- struct osf_core_struct *osf_core_data; +- struct cisco_core_struct *cisco_core_data; +- struct versados_data_struct *versados_data; +- struct netbsd_core_struct *netbsd_core_data; +- PTR any; +- } tdata; +- +- /* Used by the application to hold private data*/ +- PTR usrdata; +- +- /* Where all the allocated stuff under this BFD goes. This is a +- struct objalloc *, but we use PTR to avoid requiring the inclusion of +- objalloc.h. */ +- PTR memory; +- }; +- +-Error reporting +-=============== +- +- Most BFD functions return nonzero on success (check their individual +-documentation for precise semantics). On an error, they call +-`bfd_set_error' to set an error condition that callers can check by +-calling `bfd_get_error'. If that returns `bfd_error_system_call', then +-check `errno'. +- +- The easiest way to report a BFD error to the user is to use +-`bfd_perror'. +- +-Type `bfd_error_type' +---------------------- +- +- The values returned by `bfd_get_error' are defined by the enumerated +-type `bfd_error_type'. +- +- +- typedef enum bfd_error +- { +- bfd_error_no_error = 0, +- bfd_error_system_call, +- bfd_error_invalid_target, +- bfd_error_wrong_format, +- bfd_error_invalid_operation, +- bfd_error_no_memory, +- bfd_error_no_symbols, +- bfd_error_no_armap, +- bfd_error_no_more_archived_files, +- bfd_error_malformed_archive, +- bfd_error_file_not_recognized, +- bfd_error_file_ambiguously_recognized, +- bfd_error_no_contents, +- bfd_error_nonrepresentable_section, +- bfd_error_no_debug_section, +- bfd_error_bad_value, +- bfd_error_file_truncated, +- bfd_error_file_too_big, +- bfd_error_invalid_error_code +- } bfd_error_type; +- +-`bfd_get_error' +-............... +- +- *Synopsis* +- bfd_error_type bfd_get_error (void); +- *Description* +-Return the current BFD error condition. +- +-`bfd_set_error' +-............... +- +- *Synopsis* +- void bfd_set_error (bfd_error_type error_tag); +- *Description* +-Set the BFD error condition to be ERROR_TAG. +- +-`bfd_errmsg' +-............ +- +- *Synopsis* +- CONST char *bfd_errmsg (bfd_error_type error_tag); +- *Description* +-Return a string describing the error ERROR_TAG, or the system error if +-ERROR_TAG is `bfd_error_system_call'. +- +-`bfd_perror' +-............ +- +- *Synopsis* +- void bfd_perror (CONST char *message); +- *Description* +-Print to the standard error stream a string describing the last BFD +-error that occurred, or the last system error if the last BFD error was +-a system call failure. If MESSAGE is non-NULL and non-empty, the error +-string printed is preceded by MESSAGE, a colon, and a space. It is +-followed by a newline. +- +-BFD error handler +------------------ +- +- Some BFD functions want to print messages describing the problem. +-They call a BFD error handler function. This function may be overriden +-by the program. +- +- The BFD error handler acts like printf. +- +- +- typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...)); +- +-`bfd_set_error_handler' +-....................... +- +- *Synopsis* +- bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type); +- *Description* +-Set the BFD error handler function. Returns the previous function. +- +-`bfd_set_error_program_name' +-............................ +- +- *Synopsis* +- void bfd_set_error_program_name (const char *); +- *Description* +-Set the program name to use when printing a BFD error. This is printed +-before the error message followed by a colon and space. The string +-must not be changed after it is passed to this function. +- +-`bfd_get_error_handler' +-....................... +- +- *Synopsis* +- bfd_error_handler_type bfd_get_error_handler (void); +- *Description* +-Return the BFD error handler function. +- +-Symbols +-======= +- +-`bfd_get_reloc_upper_bound' +-........................... +- +- *Synopsis* +- long bfd_get_reloc_upper_bound(bfd *abfd, asection *sect); +- *Description* +-Return the number of bytes required to store the relocation information +-associated with section SECT attached to bfd ABFD. If an error occurs, +-return -1. +- +-`bfd_canonicalize_reloc' +-........................ +- +- *Synopsis* +- long bfd_canonicalize_reloc +- (bfd *abfd, +- asection *sec, +- arelent **loc, +- asymbol **syms); +- *Description* +-Call the back end associated with the open BFD ABFD and translate the +-external form of the relocation information attached to SEC into the +-internal canonical form. Place the table into memory at LOC, which has +-been preallocated, usually by a call to `bfd_get_reloc_upper_bound'. +-Returns the number of relocs, or -1 on error. +- +- The SYMS table is also needed for horrible internal magic reasons. +- +-`bfd_set_reloc' +-............... +- +- *Synopsis* +- void bfd_set_reloc +- (bfd *abfd, asection *sec, arelent **rel, unsigned int count) +- *Description* +-Set the relocation pointer and count within section SEC to the values +-REL and COUNT. The argument ABFD is ignored. +- +-`bfd_set_file_flags' +-.................... +- +- *Synopsis* +- boolean bfd_set_file_flags(bfd *abfd, flagword flags); +- *Description* +-Set the flag word in the BFD ABFD to the value FLAGS. +- +- Possible errors are: +- * `bfd_error_wrong_format' - The target bfd was not of object format. +- +- * `bfd_error_invalid_operation' - The target bfd was open for +- reading. +- +- * `bfd_error_invalid_operation' - The flag word contained a bit +- which was not applicable to the type of file. E.g., an attempt +- was made to set the `D_PAGED' bit on a BFD format which does not +- support demand paging. +- +-`bfd_set_start_address' +-....................... +- +- *Synopsis* +- boolean bfd_set_start_address(bfd *abfd, bfd_vma vma); +- *Description* +-Make VMA the entry point of output BFD ABFD. +- +- *Returns* +-Returns `true' on success, `false' otherwise. +- +-`bfd_get_mtime' +-............... +- +- *Synopsis* +- long bfd_get_mtime(bfd *abfd); +- *Description* +-Return the file modification time (as read from the file system, or +-from the archive header for archive members). +- +-`bfd_get_size' +-.............. +- +- *Synopsis* +- long bfd_get_size(bfd *abfd); +- *Description* +-Return the file size (as read from file system) for the file associated +-with BFD ABFD. +- +- The initial motivation for, and use of, this routine is not so we +-can get the exact size of the object the BFD applies to, since that +-might not be generally possible (archive members for example). It +-would be ideal if someone could eventually modify it so that such +-results were guaranteed. +- +- Instead, we want to ask questions like "is this NNN byte sized +-object I'm about to try read from file offset YYY reasonable?" As as +-example of where we might do this, some object formats use string +-tables for which the first `sizeof(long)' bytes of the table contain +-the size of the table itself, including the size bytes. If an +-application tries to read what it thinks is one of these string tables, +-without some way to validate the size, and for some reason the size is +-wrong (byte swapping error, wrong location for the string table, etc.), +-the only clue is likely to be a read error when it tries to read the +-table, or a "virtual memory exhausted" error when it tries to allocate +-15 bazillon bytes of space for the 15 bazillon byte table it is about +-to read. This function at least allows us to answer the quesion, "is +-the size reasonable?". +- +-`bfd_get_gp_size' +-................. +- +- *Synopsis* +- int bfd_get_gp_size(bfd *abfd); +- *Description* +-Return the maximum size of objects to be optimized using the GP +-register under MIPS ECOFF. This is typically set by the `-G' argument +-to the compiler, assembler or linker. +- +-`bfd_set_gp_size' +-................. +- +- *Synopsis* +- void bfd_set_gp_size(bfd *abfd, int i); +- *Description* +-Set the maximum size of objects to be optimized using the GP register +-under ECOFF or MIPS ELF. This is typically set by the `-G' argument to +-the compiler, assembler or linker. +- +-`bfd_scan_vma' +-.............. +- +- *Synopsis* +- bfd_vma bfd_scan_vma(CONST char *string, CONST char **end, int base); +- *Description* +-Convert, like `strtoul', a numerical expression STRING into a `bfd_vma' +-integer, and return that integer. (Though without as many bells and +-whistles as `strtoul'.) The expression is assumed to be unsigned +-(i.e., positive). If given a BASE, it is used as the base for +-conversion. A base of 0 causes the function to interpret the string in +-hex if a leading "0x" or "0X" is found, otherwise in octal if a leading +-zero is found, otherwise in decimal. +- +- Overflow is not detected. +- +-`bfd_copy_private_bfd_data' +-........................... +- +- *Synopsis* +- boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd); +- *Description* +-Copy private BFD information from the BFD IBFD to the the BFD OBFD. +-Return `true' on success, `false' on error. Possible error returns are: +- +- * `bfd_error_no_memory' - Not enough memory exists to create private +- data for OBFD. +- #define bfd_copy_private_bfd_data(ibfd, obfd) \ +- BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ +- (ibfd, obfd)) +- +-`bfd_merge_private_bfd_data' +-............................ +- +- *Synopsis* +- boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd); +- *Description* +-Merge private BFD information from the BFD IBFD to the the output file +-BFD OBFD when linking. Return `true' on success, `false' on error. +-Possible error returns are: +- +- * `bfd_error_no_memory' - Not enough memory exists to create private +- data for OBFD. +- #define bfd_merge_private_bfd_data(ibfd, obfd) \ +- BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ +- (ibfd, obfd)) +- +-`bfd_set_private_flags' +-....................... +- +- *Synopsis* +- boolean bfd_set_private_flags(bfd *abfd, flagword flags); +- *Description* +-Set private BFD flag information in the BFD ABFD. Return `true' on +-success, `false' on error. Possible error returns are: +- +- * `bfd_error_no_memory' - Not enough memory exists to create private +- data for OBFD. +- #define bfd_set_private_flags(abfd, flags) \ +- BFD_SEND (abfd, _bfd_set_private_flags, \ +- (abfd, flags)) +- +-`stuff' +-....... +- +- *Description* +-Stuff which should be documented: +- #define bfd_sizeof_headers(abfd, reloc) \ +- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc)) +- +- #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ +- BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line)) +- +- /* Do these three do anything useful at all, for any back end? */ +- #define bfd_debug_info_start(abfd) \ +- BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) +- +- #define bfd_debug_info_end(abfd) \ +- BFD_SEND (abfd, _bfd_debug_info_end, (abfd)) +- +- #define bfd_debug_info_accumulate(abfd, section) \ +- BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section)) +- +- +- #define bfd_stat_arch_elt(abfd, stat) \ +- BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat)) +- +- #define bfd_update_armap_timestamp(abfd) \ +- BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd)) +- +- #define bfd_set_arch_mach(abfd, arch, mach)\ +- BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) +- +- #define bfd_relax_section(abfd, section, link_info, again) \ +- BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again)) +- +- #define bfd_link_hash_table_create(abfd) \ +- BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd)) +- +- #define bfd_link_add_symbols(abfd, info) \ +- BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) +- +- #define bfd_final_link(abfd, info) \ +- BFD_SEND (abfd, _bfd_final_link, (abfd, info)) +- +- #define bfd_free_cached_info(abfd) \ +- BFD_SEND (abfd, _bfd_free_cached_info, (abfd)) +- +- #define bfd_get_dynamic_symtab_upper_bound(abfd) \ +- BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd)) +- +- #define bfd_print_private_bfd_data(abfd, file)\ +- BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file)) +- +- #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ +- BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) +- +- #define bfd_get_dynamic_reloc_upper_bound(abfd) \ +- BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) +- +- #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \ +- BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms)) +- +- extern bfd_byte *bfd_get_relocated_section_contents +- PARAMS ((bfd *, struct bfd_link_info *, +- struct bfd_link_order *, bfd_byte *, +- boolean, asymbol **)); +- +-* Menu: +- +-* Memory Usage:: +-* Initialization:: +-* Sections:: +-* Symbols:: +-* Archives:: +-* Formats:: +-* Relocations:: +-* Core Files:: +-* Targets:: +-* Architectures:: +-* Opening and Closing:: +-* Internal:: +-* File Caching:: +-* Linker Functions:: +-* Hash Tables:: +- +- +-File: bfd.info, Node: Memory Usage, Next: Initialization, Prev: BFD front end, Up: BFD front end +- +-Memory usage +-============ +- +- BFD keeps all of its internal structures in obstacks. There is one +-obstack per open BFD file, into which the current state is stored. When +-a BFD is closed, the obstack is deleted, and so everything which has +-been allocated by BFD for the closing file is thrown away. +- +- BFD does not free anything created by an application, but pointers +-into `bfd' structures become invalid on a `bfd_close'; for example, +-after a `bfd_close' the vector passed to `bfd_canonicalize_symtab' is +-still around, since it has been allocated by the application, but the +-data that it pointed to are lost. +- +- The general rule is to not close a BFD until all operations dependent +-upon data from the BFD have been completed, or all the data from within +-the file has been copied. To help with the management of memory, there +-is a function (`bfd_alloc_size') which returns the number of bytes in +-obstacks associated with the supplied BFD. This could be used to select +-the greediest open BFD, close it to reclaim the memory, perform some +-operation and reopen the BFD again, to get a fresh copy of the data +-structures. +- +- +-File: bfd.info, Node: Initialization, Next: Sections, Prev: Memory Usage, Up: BFD front end +- +-Initialization +-============== +- +- These are the functions that handle initializing a BFD. +- +-`bfd_init' +-.......... +- +- *Synopsis* +- void bfd_init(void); +- *Description* +-This routine must be called before any other BFD function to initialize +-magical internal data structures. +- +- +-File: bfd.info, Node: Sections, Next: Symbols, Prev: Initialization, Up: BFD front end +- +-Sections +-======== +- +- The raw data contained within a BFD is maintained through the +-section abstraction. A single BFD may have any number of sections. It +-keeps hold of them by pointing to the first; each one points to the +-next in the list. +- +- Sections are supported in BFD in `section.c'. +- +-* Menu: +- +-* Section Input:: +-* Section Output:: +-* typedef asection:: +-* section prototypes:: +- +- +-File: bfd.info, Node: Section Input, Next: Section Output, Prev: Sections, Up: Sections +- +-Section input +-------------- +- +- When a BFD is opened for reading, the section structures are created +-and attached to the BFD. +- +- Each section has a name which describes the section in the outside +-world--for example, `a.out' would contain at least three sections, +-called `.text', `.data' and `.bss'. +- +- Names need not be unique; for example a COFF file may have several +-sections named `.data'. +- +- Sometimes a BFD will contain more than the "natural" number of +-sections. A back end may attach other sections containing constructor +-data, or an application may add a section (using `bfd_make_section') to +-the sections attached to an already open BFD. For example, the linker +-creates an extra section `COMMON' for each input file's BFD to hold +-information about common storage. +- +- The raw data is not necessarily read in when the section descriptor +-is created. Some targets may leave the data in place until a +-`bfd_get_section_contents' call is made. Other back ends may read in +-all the data at once. For example, an S-record file has to be read +-once to determine the size of the data. An IEEE-695 file doesn't +-contain raw data in sections, but data and relocation expressions +-intermixed, so the data area has to be parsed to get out the data and +-relocations. +- +- +-File: bfd.info, Node: Section Output, Next: typedef asection, Prev: Section Input, Up: Sections +- +-Section output +--------------- +- +- To write a new object style BFD, the various sections to be written +-have to be created. They are attached to the BFD in the same way as +-input sections; data is written to the sections using +-`bfd_set_section_contents'. +- +- Any program that creates or combines sections (e.g., the assembler +-and linker) must use the `asection' fields `output_section' and +-`output_offset' to indicate the file sections to which each section +-must be written. (If the section is being created from scratch, +-`output_section' should probably point to the section itself and +-`output_offset' should probably be zero.) +- +- The data to be written comes from input sections attached (via +-`output_section' pointers) to the output sections. The output section +-structure can be considered a filter for the input section: the output +-section determines the vma of the output data and the name, but the +-input section determines the offset into the output section of the data +-to be written. +- +- E.g., to create a section "O", starting at 0x100, 0x123 long, +-containing two subsections, "A" at offset 0x0 (i.e., at vma 0x100) and +-"B" at offset 0x20 (i.e., at vma 0x120) the `asection' structures would +-look like: +- +- section name "A" +- output_offset 0x00 +- size 0x20 +- output_section -----------> section name "O" +- | vma 0x100 +- section name "B" | size 0x123 +- output_offset 0x20 | +- size 0x103 | +- output_section --------| +- +-Link orders +------------ +- +- The data within a section is stored in a "link_order". These are +-much like the fixups in `gas'. The link_order abstraction allows a +-section to grow and shrink within itself. +- +- A link_order knows how big it is, and which is the next link_order +-and where the raw data for it is; it also points to a list of +-relocations which apply to it. +- +- The link_order is used by the linker to perform relaxing on final +-code. The compiler creates code which is as big as necessary to make +-it work without relaxing, and the user can select whether to relax. +-Sometimes relaxing takes a lot of time. The linker runs around the +-relocations to see if any are attached to data which can be shrunk, if +-so it does it on a link_order by link_order basis. +- +diff -rup --new-file binutils-2.9.1/bfd/doc/bfd.info-2 binutils-2.9.1/bfd/doc/bfd.info-2 +--- binutils-2.9.1/bfd/doc/bfd.info-2 Fri May 1 08:48:03 1998 ++++ binutils-2.9.1/bfd/doc/bfd.info-2 Wed Dec 31 17:00:00 1969 +@@ -1,1113 +0,0 @@ +-This is Info file bfd.info, produced by Makeinfo version 1.68 from the +-input file bfd.texinfo. +- +-START-INFO-DIR-ENTRY +-* Bfd: (bfd). The Binary File Descriptor library. +-END-INFO-DIR-ENTRY +- +- This file documents the BFD library. +- +- Copyright (C) 1991 Free Software Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, subject to the +-terms of the GNU General Public License, which includes the provision +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: bfd.info, Node: typedef asection, Next: section prototypes, Prev: Section Output, Up: Sections +- +-typedef asection +----------------- +- +- Here is the section structure: +- +- +- typedef struct sec +- { +- /* The name of the section; the name isn't a copy, the pointer is +- the same as that passed to bfd_make_section. */ +- +- CONST char *name; +- +- /* Which section is it; 0..nth. */ +- +- int index; +- +- /* The next section in the list belonging to the BFD, or NULL. */ +- +- struct sec *next; +- +- /* The field flags contains attributes of the section. Some +- flags are read in from the object file, and some are +- synthesized from other information. */ +- +- flagword flags; +- +- #define SEC_NO_FLAGS 0x000 +- +- /* Tells the OS to allocate space for this section when loading. +- This is clear for a section containing debug information +- only. */ +- #define SEC_ALLOC 0x001 +- +- /* Tells the OS to load the section from the file when loading. +- This is clear for a .bss section. */ +- #define SEC_LOAD 0x002 +- +- /* The section contains data still to be relocated, so there is +- some relocation information too. */ +- #define SEC_RELOC 0x004 +- +- #if 0 /* Obsolete ? */ +- #define SEC_BALIGN 0x008 +- #endif +- +- /* A signal to the OS that the section contains read only +- data. */ +- #define SEC_READONLY 0x010 +- +- /* The section contains code only. */ +- #define SEC_CODE 0x020 +- +- /* The section contains data only. */ +- #define SEC_DATA 0x040 +- +- /* The section will reside in ROM. */ +- #define SEC_ROM 0x080 +- +- /* The section contains constructor information. This section +- type is used by the linker to create lists of constructors and +- destructors used by `g++'. When a back end sees a symbol +- which should be used in a constructor list, it creates a new +- section for the type of name (e.g., `__CTOR_LIST__'), attaches +- the symbol to it, and builds a relocation. To build the lists +- of constructors, all the linker has to do is catenate all the +- sections called `__CTOR_LIST__' and relocate the data +- contained within - exactly the operations it would peform on +- standard data. */ +- #define SEC_CONSTRUCTOR 0x100 +- +- /* The section is a constuctor, and should be placed at the +- end of the text, data, or bss section(?). */ +- #define SEC_CONSTRUCTOR_TEXT 0x1100 +- #define SEC_CONSTRUCTOR_DATA 0x2100 +- #define SEC_CONSTRUCTOR_BSS 0x3100 +- +- /* The section has contents - a data section could be +- `SEC_ALLOC' | `SEC_HAS_CONTENTS'; a debug section could be +- `SEC_HAS_CONTENTS' */ +- #define SEC_HAS_CONTENTS 0x200 +- +- /* An instruction to the linker to not output the section +- even if it has information which would normally be written. */ +- #define SEC_NEVER_LOAD 0x400 +- +- /* The section is a COFF shared library section. This flag is +- only for the linker. If this type of section appears in +- the input file, the linker must copy it to the output file +- without changing the vma or size. FIXME: Although this +- was originally intended to be general, it really is COFF +- specific (and the flag was renamed to indicate this). It +- might be cleaner to have some more general mechanism to +- allow the back end to control what the linker does with +- sections. */ +- #define SEC_COFF_SHARED_LIBRARY 0x800 +- +- /* The section contains common symbols (symbols may be defined +- multiple times, the value of a symbol is the amount of +- space it requires, and the largest symbol value is the one +- used). Most targets have exactly one of these (which we +- translate to bfd_com_section_ptr), but ECOFF has two. */ +- #define SEC_IS_COMMON 0x8000 +- +- /* The section contains only debugging information. For +- example, this is set for ELF .debug and .stab sections. +- strip tests this flag to see if a section can be +- discarded. */ +- #define SEC_DEBUGGING 0x10000 +- +- /* The contents of this section are held in memory pointed to +- by the contents field. This is checked by +- bfd_get_section_contents, and the data is retrieved from +- memory if appropriate. */ +- #define SEC_IN_MEMORY 0x20000 +- +- /* The contents of this section are to be excluded by the +- linker for executable and shared objects unless those +- objects are to be further relocated. */ +- #define SEC_EXCLUDE 0x40000 +- +- /* The contents of this section are to be sorted by the +- based on the address specified in the associated symbol +- table. */ +- #define SEC_SORT_ENTRIES 0x80000 +- +- /* When linking, duplicate sections of the same name should be +- discarded, rather than being combined into a single section as +- is usually done. This is similar to how common symbols are +- handled. See SEC_LINK_DUPLICATES below. */ +- #define SEC_LINK_ONCE 0x100000 +- +- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker +- should handle duplicate sections. */ +- #define SEC_LINK_DUPLICATES 0x600000 +- +- /* This value for SEC_LINK_DUPLICATES means that duplicate +- sections with the same name should simply be discarded. */ +- #define SEC_LINK_DUPLICATES_DISCARD 0x0 +- +- /* This value for SEC_LINK_DUPLICATES means that the linker +- should warn if there are any duplicate sections, although +- it should still only link one copy. */ +- #define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000 +- +- /* This value for SEC_LINK_DUPLICATES means that the linker +- should warn if any duplicate sections are a different size. */ +- #define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000 +- +- /* This value for SEC_LINK_DUPLICATES means that the linker +- should warn if any duplicate sections contain different +- contents. */ +- #define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000 +- +- /* This section was created by the linker as part of dynamic +- relocation or other arcane processing. It is skipped when +- going through the first-pass output, trusting that someone +- else up the line will take care of it later. */ +- #define SEC_LINKER_CREATED 0x800000 +- +- /* End of section flags. */ +- +- /* Some internal packed boolean fields. */ +- +- /* See the vma field. */ +- unsigned int user_set_vma : 1; +- +- /* Whether relocations have been processed. */ +- unsigned int reloc_done : 1; +- +- /* A mark flag used by some of the linker backends. */ +- unsigned int linker_mark : 1; +- +- /* End of internal packed boolean fields. */ +- +- /* The virtual memory address of the section - where it will be +- at run time. The symbols are relocated against this. The +- user_set_vma flag is maintained by bfd; if it's not set, the +- backend can assign addresses (for example, in `a.out', where +- the default address for `.data' is dependent on the specific +- target and various flags). */ +- +- bfd_vma vma; +- +- /* The load address of the section - where it would be in a +- rom image; really only used for writing section header +- information. */ +- +- bfd_vma lma; +- +- /* The size of the section in bytes, as it will be output. +- contains a value even if the section has no contents (e.g., the +- size of `.bss'). This will be filled in after relocation */ +- +- bfd_size_type _cooked_size; +- +- /* The original size on disk of the section, in bytes. Normally this +- value is the same as the size, but if some relaxing has +- been done, then this value will be bigger. */ +- +- bfd_size_type _raw_size; +- +- /* If this section is going to be output, then this value is the +- offset into the output section of the first byte in the input +- section. E.g., if this was going to start at the 100th byte in +- the output section, this value would be 100. */ +- +- bfd_vma output_offset; +- +- /* The output section through which to map on output. */ +- +- struct sec *output_section; +- +- /* The alignment requirement of the section, as an exponent of 2 - +- e.g., 3 aligns to 2^3 (or 8). */ +- +- unsigned int alignment_power; +- +- /* If an input section, a pointer to a vector of relocation +- records for the data in this section. */ +- +- struct reloc_cache_entry *relocation; +- +- /* If an output section, a pointer to a vector of pointers to +- relocation records for the data in this section. */ +- +- struct reloc_cache_entry **orelocation; +- +- /* The number of relocation records in one of the above */ +- +- unsigned reloc_count; +- +- /* Information below is back end specific - and not always used +- or updated. */ +- +- /* File position of section data */ +- +- file_ptr filepos; +- +- /* File position of relocation info */ +- +- file_ptr rel_filepos; +- +- /* File position of line data */ +- +- file_ptr line_filepos; +- +- /* Pointer to data for applications */ +- +- PTR userdata; +- +- /* If the SEC_IN_MEMORY flag is set, this points to the actual +- contents. */ +- unsigned char *contents; +- +- /* Attached line number information */ +- +- alent *lineno; +- +- /* Number of line number records */ +- +- unsigned int lineno_count; +- +- /* When a section is being output, this value changes as more +- linenumbers are written out */ +- +- file_ptr moving_line_filepos; +- +- /* What the section number is in the target world */ +- +- int target_index; +- +- PTR used_by_bfd; +- +- /* If this is a constructor section then here is a list of the +- relocations created to relocate items within it. */ +- +- struct relent_chain *constructor_chain; +- +- /* The BFD which owns the section. */ +- +- bfd *owner; +- +- /* A symbol which points at this section only */ +- struct symbol_cache_entry *symbol; +- struct symbol_cache_entry **symbol_ptr_ptr; +- +- struct bfd_link_order *link_order_head; +- struct bfd_link_order *link_order_tail; +- } asection ; +- +- /* These sections are global, and are managed by BFD. The application +- and target back end are not permitted to change the values in +- these sections. New code should use the section_ptr macros rather +- than referring directly to the const sections. The const sections +- may eventually vanish. */ +- #define BFD_ABS_SECTION_NAME "*ABS*" +- #define BFD_UND_SECTION_NAME "*UND*" +- #define BFD_COM_SECTION_NAME "*COM*" +- #define BFD_IND_SECTION_NAME "*IND*" +- +- /* the absolute section */ +- extern const asection bfd_abs_section; +- #define bfd_abs_section_ptr ((asection *) &bfd_abs_section) +- #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) +- /* Pointer to the undefined section */ +- extern const asection bfd_und_section; +- #define bfd_und_section_ptr ((asection *) &bfd_und_section) +- #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) +- /* Pointer to the common section */ +- extern const asection bfd_com_section; +- #define bfd_com_section_ptr ((asection *) &bfd_com_section) +- /* Pointer to the indirect section */ +- extern const asection bfd_ind_section; +- #define bfd_ind_section_ptr ((asection *) &bfd_ind_section) +- #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) +- +- extern const struct symbol_cache_entry * const bfd_abs_symbol; +- extern const struct symbol_cache_entry * const bfd_com_symbol; +- extern const struct symbol_cache_entry * const bfd_und_symbol; +- extern const struct symbol_cache_entry * const bfd_ind_symbol; +- #define bfd_get_section_size_before_reloc(section) \ +- (section->reloc_done ? (abort(),1): (section)->_raw_size) +- #define bfd_get_section_size_after_reloc(section) \ +- ((section->reloc_done) ? (section)->_cooked_size: (abort(),1)) +- +- +-File: bfd.info, Node: section prototypes, Prev: typedef asection, Up: Sections +- +-Section prototypes +------------------- +- +- These are the functions exported by the section handling part of BFD. +- +-`bfd_get_section_by_name' +-......................... +- +- *Synopsis* +- asection *bfd_get_section_by_name(bfd *abfd, CONST char *name); +- *Description* +-Run through ABFD and return the one of the `asection's whose name +-matches NAME, otherwise `NULL'. *Note Sections::, for more information. +- +- This should only be used in special cases; the normal way to process +-all sections of a given name is to use `bfd_map_over_sections' and +-`strcmp' on the name (or better yet, base it on the section flags or +-something else) for each section. +- +-`bfd_make_section_old_way' +-.......................... +- +- *Synopsis* +- asection *bfd_make_section_old_way(bfd *abfd, CONST char *name); +- *Description* +-Create a new empty section called NAME and attach it to the end of the +-chain of sections for the BFD ABFD. An attempt to create a section with +-a name which is already in use returns its pointer without changing the +-section chain. +- +- It has the funny name since this is the way it used to be before it +-was rewritten.... +- +- Possible errors are: +- * `bfd_error_invalid_operation' - If output has already started for +- this BFD. +- +- * `bfd_error_no_memory' - If memory allocation fails. +- +-`bfd_make_section_anyway' +-......................... +- +- *Synopsis* +- asection *bfd_make_section_anyway(bfd *abfd, CONST char *name); +- *Description* +-Create a new empty section called NAME and attach it to the end of the +-chain of sections for ABFD. Create a new section even if there is +-already a section with that name. +- +- Return `NULL' and set `bfd_error' on error; possible errors are: +- * `bfd_error_invalid_operation' - If output has already started for +- ABFD. +- +- * `bfd_error_no_memory' - If memory allocation fails. +- +-`bfd_make_section' +-.................. +- +- *Synopsis* +- asection *bfd_make_section(bfd *, CONST char *name); +- *Description* +-Like `bfd_make_section_anyway', but return `NULL' (without calling +-bfd_set_error ()) without changing the section chain if there is +-already a section named NAME. If there is an error, return `NULL' and +-set `bfd_error'. +- +-`bfd_set_section_flags' +-....................... +- +- *Synopsis* +- boolean bfd_set_section_flags(bfd *abfd, asection *sec, flagword flags); +- *Description* +-Set the attributes of the section SEC in the BFD ABFD to the value +-FLAGS. Return `true' on success, `false' on error. Possible error +-returns are: +- +- * `bfd_error_invalid_operation' - The section cannot have one or +- more of the attributes requested. For example, a .bss section in +- `a.out' may not have the `SEC_HAS_CONTENTS' field set. +- +-`bfd_map_over_sections' +-....................... +- +- *Synopsis* +- void bfd_map_over_sections(bfd *abfd, +- void (*func)(bfd *abfd, +- asection *sect, +- PTR obj), +- PTR obj); +- *Description* +-Call the provided function FUNC for each section attached to the BFD +-ABFD, passing OBJ as an argument. The function will be called as if by +- +- func(abfd, the_section, obj); +- +- This is the prefered method for iterating over sections; an +-alternative would be to use a loop: +- +- section *p; +- for (p = abfd->sections; p != NULL; p = p->next) +- func(abfd, p, ...) +- +-`bfd_set_section_size' +-...................... +- +- *Synopsis* +- boolean bfd_set_section_size(bfd *abfd, asection *sec, bfd_size_type val); +- *Description* +-Set SEC to the size VAL. If the operation is ok, then `true' is +-returned, else `false'. +- +- Possible error returns: +- * `bfd_error_invalid_operation' - Writing has started to the BFD, so +- setting the size is invalid. +- +-`bfd_set_section_contents' +-.......................... +- +- *Synopsis* +- boolean bfd_set_section_contents +- (bfd *abfd, +- asection *section, +- PTR data, +- file_ptr offset, +- bfd_size_type count); +- *Description* +-Sets the contents of the section SECTION in BFD ABFD to the data +-starting in memory at DATA. The data is written to the output section +-starting at offset OFFSET for COUNT bytes. +- +- Normally `true' is returned, else `false'. Possible error returns +-are: +- * `bfd_error_no_contents' - The output section does not have the +- `SEC_HAS_CONTENTS' attribute, so nothing can be written to it. +- +- * and some more too This routine is front end to the back end +-function `_bfd_set_section_contents'. +- +-`bfd_get_section_contents' +-.......................... +- +- *Synopsis* +- boolean bfd_get_section_contents +- (bfd *abfd, asection *section, PTR location, +- file_ptr offset, bfd_size_type count); +- *Description* +-Read data from SECTION in BFD ABFD into memory starting at LOCATION. +-The data is read at an offset of OFFSET from the start of the input +-section, and is read for COUNT bytes. +- +- If the contents of a constructor with the `SEC_CONSTRUCTOR' flag set +-are requested or if the section does not have the `SEC_HAS_CONTENTS' +-flag set, then the LOCATION is filled with zeroes. If no errors occur, +-`true' is returned, else `false'. +- +-`bfd_copy_private_section_data' +-............................... +- +- *Synopsis* +- boolean bfd_copy_private_section_data(bfd *ibfd, asection *isec, bfd *obfd, asection *osec); +- *Description* +-Copy private section information from ISEC in the BFD IBFD to the +-section OSEC in the BFD OBFD. Return `true' on success, `false' on +-error. Possible error returns are: +- +- * `bfd_error_no_memory' - Not enough memory exists to create private +- data for OSEC. +- #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ +- BFD_SEND (obfd, _bfd_copy_private_section_data, \ +- (ibfd, isection, obfd, osection)) +- +- +-File: bfd.info, Node: Symbols, Next: Archives, Prev: Sections, Up: BFD front end +- +-Symbols +-======= +- +- BFD tries to maintain as much symbol information as it can when it +-moves information from file to file. BFD passes information to +-applications though the `asymbol' structure. When the application +-requests the symbol table, BFD reads the table in the native form and +-translates parts of it into the internal format. To maintain more than +-the information passed to applications, some targets keep some +-information "behind the scenes" in a structure only the particular back +-end knows about. For example, the coff back end keeps the original +-symbol table structure as well as the canonical structure when a BFD is +-read in. On output, the coff back end can reconstruct the output symbol +-table so that no information is lost, even information unique to coff +-which BFD doesn't know or understand. If a coff symbol table were read, +-but were written through an a.out back end, all the coff specific +-information would be lost. The symbol table of a BFD is not necessarily +-read in until a canonicalize request is made. Then the BFD back end +-fills in a table provided by the application with pointers to the +-canonical information. To output symbols, the application provides BFD +-with a table of pointers to pointers to `asymbol's. This allows +-applications like the linker to output a symbol as it was read, since +-the "behind the scenes" information will be still available. +- +-* Menu: +- +-* Reading Symbols:: +-* Writing Symbols:: +-* Mini Symbols:: +-* typedef asymbol:: +-* symbol handling functions:: +- +- +-File: bfd.info, Node: Reading Symbols, Next: Writing Symbols, Prev: Symbols, Up: Symbols +- +-Reading symbols +---------------- +- +- There are two stages to reading a symbol table from a BFD: +-allocating storage, and the actual reading process. This is an excerpt +-from an application which reads the symbol table: +- +- long storage_needed; +- asymbol **symbol_table; +- long number_of_symbols; +- long i; +- +- storage_needed = bfd_get_symtab_upper_bound (abfd); +- +- if (storage_needed < 0) +- FAIL +- +- if (storage_needed == 0) { +- return ; +- } +- symbol_table = (asymbol **) xmalloc (storage_needed); +- ... +- number_of_symbols = +- bfd_canonicalize_symtab (abfd, symbol_table); +- +- if (number_of_symbols < 0) +- FAIL +- +- for (i = 0; i < number_of_symbols; i++) { +- process_symbol (symbol_table[i]); +- } +- +- All storage for the symbols themselves is in an objalloc connected +-to the BFD; it is freed when the BFD is closed. +- +- +-File: bfd.info, Node: Writing Symbols, Next: Mini Symbols, Prev: Reading Symbols, Up: Symbols +- +-Writing symbols +---------------- +- +- Writing of a symbol table is automatic when a BFD open for writing +-is closed. The application attaches a vector of pointers to pointers to +-symbols to the BFD being written, and fills in the symbol count. The +-close and cleanup code reads through the table provided and performs +-all the necessary operations. The BFD output code must always be +-provided with an "owned" symbol: one which has come from another BFD, +-or one which has been created using `bfd_make_empty_symbol'. Here is an +-example showing the creation of a symbol table with only one element: +- +- #include "bfd.h" +- main() +- { +- bfd *abfd; +- asymbol *ptrs[2]; +- asymbol *new; +- +- abfd = bfd_openw("foo","a.out-sunos-big"); +- bfd_set_format(abfd, bfd_object); +- new = bfd_make_empty_symbol(abfd); +- new->name = "dummy_symbol"; +- new->section = bfd_make_section_old_way(abfd, ".text"); +- new->flags = BSF_GLOBAL; +- new->value = 0x12345; +- +- ptrs[0] = new; +- ptrs[1] = (asymbol *)0; +- +- bfd_set_symtab(abfd, ptrs, 1); +- bfd_close(abfd); +- } +- +- ./makesym +- nm foo +- 00012345 A dummy_symbol +- +- Many formats cannot represent arbitary symbol information; for +-instance, the `a.out' object format does not allow an arbitary number +-of sections. A symbol pointing to a section which is not one of +-`.text', `.data' or `.bss' cannot be described. +- +- +-File: bfd.info, Node: Mini Symbols, Next: typedef asymbol, Prev: Writing Symbols, Up: Symbols +- +-Mini Symbols +------------- +- +- Mini symbols provide read-only access to the symbol table. They use +-less memory space, but require more time to access. They can be useful +-for tools like nm or objdump, which may have to handle symbol tables of +-extremely large executables. +- +- The `bfd_read_minisymbols' function will read the symbols into +-memory in an internal form. It will return a `void *' pointer to a +-block of memory, a symbol count, and the size of each symbol. The +-pointer is allocated using `malloc', and should be freed by the caller +-when it is no longer needed. +- +- The function `bfd_minisymbol_to_symbol' will take a pointer to a +-minisymbol, and a pointer to a structure returned by +-`bfd_make_empty_symbol', and return a `asymbol' structure. The return +-value may or may not be the same as the value from +-`bfd_make_empty_symbol' which was passed in. +- +- +-File: bfd.info, Node: typedef asymbol, Next: symbol handling functions, Prev: Mini Symbols, Up: Symbols +- +-typedef asymbol +---------------- +- +- An `asymbol' has the form: +- +- +- typedef struct symbol_cache_entry +- { +- /* A pointer to the BFD which owns the symbol. This information +- is necessary so that a back end can work out what additional +- information (invisible to the application writer) is carried +- with the symbol. +- +- This field is *almost* redundant, since you can use section->owner +- instead, except that some symbols point to the global sections +- bfd_{abs,com,und}_section. This could be fixed by making +- these globals be per-bfd (or per-target-flavor). FIXME. */ +- +- struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */ +- +- /* The text of the symbol. The name is left alone, and not copied; the +- application may not alter it. */ +- CONST char *name; +- +- /* The value of the symbol. This really should be a union of a +- numeric value with a pointer, since some flags indicate that +- a pointer to another symbol is stored here. */ +- symvalue value; +- +- /* Attributes of a symbol: */ +- +- #define BSF_NO_FLAGS 0x00 +- +- /* The symbol has local scope; `static' in `C'. The value +- is the offset into the section of the data. */ +- #define BSF_LOCAL 0x01 +- +- /* The symbol has global scope; initialized data in `C'. The +- value is the offset into the section of the data. */ +- #define BSF_GLOBAL 0x02 +- +- /* The symbol has global scope and is exported. The value is +- the offset into the section of the data. */ +- #define BSF_EXPORT BSF_GLOBAL /* no real difference */ +- +- /* A normal C symbol would be one of: +- `BSF_LOCAL', `BSF_FORT_COMM', `BSF_UNDEFINED' or +- `BSF_GLOBAL' */ +- +- /* The symbol is a debugging record. The value has an arbitary +- meaning. */ +- #define BSF_DEBUGGING 0x08 +- +- /* The symbol denotes a function entry point. Used in ELF, +- perhaps others someday. */ +- #define BSF_FUNCTION 0x10 +- +- /* Used by the linker. */ +- #define BSF_KEEP 0x20 +- #define BSF_KEEP_G 0x40 +- +- /* A weak global symbol, overridable without warnings by +- a regular global symbol of the same name. */ +- #define BSF_WEAK 0x80 +- +- /* This symbol was created to point to a section, e.g. ELF's +- STT_SECTION symbols. */ +- #define BSF_SECTION_SYM 0x100 +- +- /* The symbol used to be a common symbol, but now it is +- allocated. */ +- #define BSF_OLD_COMMON 0x200 +- +- /* The default value for common data. */ +- #define BFD_FORT_COMM_DEFAULT_VALUE 0 +- +- /* In some files the type of a symbol sometimes alters its +- location in an output file - ie in coff a `ISFCN' symbol +- which is also `C_EXT' symbol appears where it was +- declared and not at the end of a section. This bit is set +- by the target BFD part to convey this information. */ +- +- #define BSF_NOT_AT_END 0x400 +- +- /* Signal that the symbol is the label of constructor section. */ +- #define BSF_CONSTRUCTOR 0x800 +- +- /* Signal that the symbol is a warning symbol. The name is a +- warning. The name of the next symbol is the one to warn about; +- if a reference is made to a symbol with the same name as the next +- symbol, a warning is issued by the linker. */ +- #define BSF_WARNING 0x1000 +- +- /* Signal that the symbol is indirect. This symbol is an indirect +- pointer to the symbol with the same name as the next symbol. */ +- #define BSF_INDIRECT 0x2000 +- +- /* BSF_FILE marks symbols that contain a file name. This is used +- for ELF STT_FILE symbols. */ +- #define BSF_FILE 0x4000 +- +- /* Symbol is from dynamic linking information. */ +- #define BSF_DYNAMIC 0x8000 +- +- /* The symbol denotes a data object. Used in ELF, and perhaps +- others someday. */ +- #define BSF_OBJECT 0x10000 +- +- flagword flags; +- +- /* A pointer to the section to which this symbol is +- relative. This will always be non NULL, there are special +- sections for undefined and absolute symbols. */ +- struct sec *section; +- +- /* Back end special data. */ +- union +- { +- PTR p; +- bfd_vma i; +- } udata; +- +- } asymbol; +- +- +-File: bfd.info, Node: symbol handling functions, Prev: typedef asymbol, Up: Symbols +- +-Symbol handling functions +-------------------------- +- +-`bfd_get_symtab_upper_bound' +-............................ +- +- *Description* +-Return the number of bytes required to store a vector of pointers to +-`asymbols' for all the symbols in the BFD ABFD, including a terminal +-NULL pointer. If there are no symbols in the BFD, then return 0. If an +-error occurs, return -1. +- #define bfd_get_symtab_upper_bound(abfd) \ +- BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) +- +-`bfd_is_local_label' +-.................... +- +- *Synopsis* +- boolean bfd_is_local_label(bfd *abfd, asymbol *sym); +- *Description* +-Return true if the given symbol SYM in the BFD ABFD is a compiler +-generated local label, else return false. +- +-`bfd_is_local_label_name' +-......................... +- +- *Synopsis* +- boolean bfd_is_local_label_name(bfd *abfd, const char *name); +- *Description* +-Return true if a symbol with the name NAME in the BFD ABFD is a +-compiler generated local label, else return false. This just checks +-whether the name has the form of a local label. +- #define bfd_is_local_label_name(abfd, name) \ +- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) +- +-`bfd_canonicalize_symtab' +-......................... +- +- *Description* +-Read the symbols from the BFD ABFD, and fills in the vector LOCATION +-with pointers to the symbols and a trailing NULL. Return the actual +-number of symbol pointers, not including the NULL. +- #define bfd_canonicalize_symtab(abfd, location) \ +- BFD_SEND (abfd, _bfd_canonicalize_symtab,\ +- (abfd, location)) +- +-`bfd_set_symtab' +-................ +- +- *Synopsis* +- boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); +- *Description* +-Arrange that when the output BFD ABFD is closed, the table LOCATION of +-COUNT pointers to symbols will be written. +- +-`bfd_print_symbol_vandf' +-........................ +- +- *Synopsis* +- void bfd_print_symbol_vandf(PTR file, asymbol *symbol); +- *Description* +-Print the value and flags of the SYMBOL supplied to the stream FILE. +- +-`bfd_make_empty_symbol' +-....................... +- +- *Description* +-Create a new `asymbol' structure for the BFD ABFD and return a pointer +-to it. +- +- This routine is necessary because each back end has private +-information surrounding the `asymbol'. Building your own `asymbol' and +-pointing to it will not create the private information, and will cause +-problems later on. +- #define bfd_make_empty_symbol(abfd) \ +- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) +- +-`bfd_make_debug_symbol' +-....................... +- +- *Description* +-Create a new `asymbol' structure for the BFD ABFD, to be used as a +-debugging symbol. Further details of its use have yet to be worked out. +- #define bfd_make_debug_symbol(abfd,ptr,size) \ +- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) +- +-`bfd_decode_symclass' +-..................... +- +- *Description* +-Return a character corresponding to the symbol class of SYMBOL, or '?' +-for an unknown class. +- +- *Synopsis* +- int bfd_decode_symclass(asymbol *symbol); +- +-`bfd_symbol_info' +-................. +- +- *Description* +-Fill in the basic info about symbol that nm needs. Additional info may +-be added by the back-ends after calling this function. +- +- *Synopsis* +- void bfd_symbol_info(asymbol *symbol, symbol_info *ret); +- +-`bfd_copy_private_symbol_data' +-.............................. +- +- *Synopsis* +- boolean bfd_copy_private_symbol_data(bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); +- *Description* +-Copy private symbol information from ISYM in the BFD IBFD to the symbol +-OSYM in the BFD OBFD. Return `true' on success, `false' on error. +-Possible error returns are: +- +- * `bfd_error_no_memory' - Not enough memory exists to create private +- data for OSEC. +- #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ +- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ +- (ibfd, isymbol, obfd, osymbol)) +- +- +-File: bfd.info, Node: Archives, Next: Formats, Prev: Symbols, Up: BFD front end +- +-Archives +-======== +- +- *Description* +-An archive (or library) is just another BFD. It has a symbol table, +-although there's not much a user program will do with it. +- +- The big difference between an archive BFD and an ordinary BFD is +-that the archive doesn't have sections. Instead it has a chain of BFDs +-that are considered its contents. These BFDs can be manipulated like +-any other. The BFDs contained in an archive opened for reading will +-all be opened for reading. You may put either input or output BFDs +-into an archive opened for output; they will be handled correctly when +-the archive is closed. +- +- Use `bfd_openr_next_archived_file' to step through the contents of +-an archive opened for input. You don't have to read the entire archive +-if you don't want to! Read it until you find what you want. +- +- Archive contents of output BFDs are chained through the `next' +-pointer in a BFD. The first one is findable through the `archive_head' +-slot of the archive. Set it with `bfd_set_archive_head' (q.v.). A +-given BFD may be in only one open output archive at a time. +- +- As expected, the BFD archive code is more general than the archive +-code of any given environment. BFD archives may contain files of +-different formats (e.g., a.out and coff) and even different +-architectures. You may even place archives recursively into archives! +- +- This can cause unexpected confusion, since some archive formats are +-more expressive than others. For instance, Intel COFF archives can +-preserve long filenames; SunOS a.out archives cannot. If you move a +-file from the first to the second format and back again, the filename +-may be truncated. Likewise, different a.out environments have different +-conventions as to how they truncate filenames, whether they preserve +-directory names in filenames, etc. When interoperating with native +-tools, be sure your files are homogeneous. +- +- Beware: most of these formats do not react well to the presence of +-spaces in filenames. We do the best we can, but can't always handle +-this case due to restrictions in the format of archives. Many Unix +-utilities are braindead in regards to spaces and such in filenames +-anyway, so this shouldn't be much of a restriction. +- +- Archives are supported in BFD in `archive.c'. +- +-`bfd_get_next_mapent' +-..................... +- +- *Synopsis* +- symindex bfd_get_next_mapent(bfd *abfd, symindex previous, carsym **sym); +- *Description* +-Step through archive ABFD's symbol table (if it has one). Successively +-update SYM with the next symbol's information, returning that symbol's +-(internal) index into the symbol table. +- +- Supply `BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first +-one; returns `BFD_NO_MORE_SYMBOLS' when you've already got the last one. +- +- A `carsym' is a canonical archive symbol. The only user-visible +-element is its name, a null-terminated string. +- +-`bfd_set_archive_head' +-...................... +- +- *Synopsis* +- boolean bfd_set_archive_head(bfd *output, bfd *new_head); +- *Description* +-Set the head of the chain of BFDs contained in the archive OUTPUT to +-NEW_HEAD. +- +-`bfd_openr_next_archived_file' +-.............................. +- +- *Synopsis* +- bfd *bfd_openr_next_archived_file(bfd *archive, bfd *previous); +- *Description* +-Provided a BFD, ARCHIVE, containing an archive and NULL, open an input +-BFD on the first contained element and returns that. Subsequent calls +-should pass the archive and the previous return value to return a +-created BFD to the next contained element. NULL is returned when there +-are no more. +- +- +-File: bfd.info, Node: Formats, Next: Relocations, Prev: Archives, Up: BFD front end +- +-File formats +-============ +- +- A format is a BFD concept of high level file contents type. The +-formats supported by BFD are: +- +- * `bfd_object' The BFD may contain data, symbols, relocations and +-debug info. +- +- * `bfd_archive' The BFD contains other BFDs and an optional index. +- +- * `bfd_core' The BFD contains the result of an executable core dump. +- +-`bfd_check_format' +-.................. +- +- *Synopsis* +- boolean bfd_check_format(bfd *abfd, bfd_format format); +- *Description* +-Verify if the file attached to the BFD ABFD is compatible with the +-format FORMAT (i.e., one of `bfd_object', `bfd_archive' or `bfd_core'). +- +- If the BFD has been set to a specific target before the call, only +-the named target and format combination is checked. If the target has +-not been set, or has been set to `default', then all the known target +-backends is interrogated to determine a match. If the default target +-matches, it is used. If not, exactly one target must recognize the +-file, or an error results. +- +- The function returns `true' on success, otherwise `false' with one +-of the following error codes: +- +- * `bfd_error_invalid_operation' - if `format' is not one of +- `bfd_object', `bfd_archive' or `bfd_core'. +- +- * `bfd_error_system_call' - if an error occured during a read - even +- some file mismatches can cause bfd_error_system_calls. +- +- * `file_not_recognised' - none of the backends recognised the file +- format. +- +- * `bfd_error_file_ambiguously_recognized' - more than one backend +- recognised the file format. +- +-`bfd_check_format_matches' +-.......................... +- +- *Synopsis* +- boolean bfd_check_format_matches(bfd *abfd, bfd_format format, char ***matching); +- *Description* +-Like `bfd_check_format', except when it returns false with `bfd_errno' +-set to `bfd_error_file_ambiguously_recognized'. In that case, if +-MATCHING is not NULL, it will be filled in with a NULL-terminated list +-of the names of the formats that matched, allocated with `malloc'. +-Then the user may choose a format and try again. +- +- When done with the list that MATCHING points to, the caller should +-free it. +- +-`bfd_set_format' +-................ +- +- *Synopsis* +- boolean bfd_set_format(bfd *abfd, bfd_format format); +- *Description* +-This function sets the file format of the BFD ABFD to the format +-FORMAT. If the target set in the BFD does not support the format +-requested, the format is invalid, or the BFD is not open for writing, +-then an error occurs. +- +-`bfd_format_string' +-................... +- +- *Synopsis* +- CONST char *bfd_format_string(bfd_format format); +- *Description* +-Return a pointer to a const string `invalid', `object', `archive', +-`core', or `unknown', depending upon the value of FORMAT. +- +- +-File: bfd.info, Node: Relocations, Next: Core Files, Prev: Formats, Up: BFD front end +- +-Relocations +-=========== +- +- BFD maintains relocations in much the same way it maintains symbols: +-they are left alone until required, then read in en-mass and translated +-into an internal form. A common routine `bfd_perform_relocation' acts +-upon the canonical form to do the fixup. +- +- Relocations are maintained on a per section basis, while symbols are +-maintained on a per BFD basis. +- +- All that a back end has to do to fit the BFD interface is to create +-a `struct reloc_cache_entry' for each relocation in a particular +-section, and fill in the right bits of the structures. +- +-* Menu: +- +-* typedef arelent:: +-* howto manager:: +- +diff -rup --new-file binutils-2.9.1/bfd/doc/bfd.info-3 binutils-2.9.1/bfd/doc/bfd.info-3 +--- binutils-2.9.1/bfd/doc/bfd.info-3 Fri May 1 08:48:03 1998 ++++ binutils-2.9.1/bfd/doc/bfd.info-3 Wed Dec 31 17:00:00 1969 +@@ -1,1029 +0,0 @@ +-This is Info file bfd.info, produced by Makeinfo version 1.68 from the +-input file bfd.texinfo. +- +-START-INFO-DIR-ENTRY +-* Bfd: (bfd). The Binary File Descriptor library. +-END-INFO-DIR-ENTRY +- +- This file documents the BFD library. +- +- Copyright (C) 1991 Free Software Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, subject to the +-terms of the GNU General Public License, which includes the provision +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: bfd.info, Node: typedef arelent, Next: howto manager, Prev: Relocations, Up: Relocations +- +-typedef arelent +---------------- +- +- This is the structure of a relocation entry: +- +- +- typedef enum bfd_reloc_status +- { +- /* No errors detected */ +- bfd_reloc_ok, +- +- /* The relocation was performed, but there was an overflow. */ +- bfd_reloc_overflow, +- +- /* The address to relocate was not within the section supplied. */ +- bfd_reloc_outofrange, +- +- /* Used by special functions */ +- bfd_reloc_continue, +- +- /* Unsupported relocation size requested. */ +- bfd_reloc_notsupported, +- +- /* Unused */ +- bfd_reloc_other, +- +- /* The symbol to relocate against was undefined. */ +- bfd_reloc_undefined, +- +- /* The relocation was performed, but may not be ok - presently +- generated only when linking i960 coff files with i960 b.out +- symbols. If this type is returned, the error_message argument +- to bfd_perform_relocation will be set. */ +- bfd_reloc_dangerous +- } +- bfd_reloc_status_type; +- +- +- typedef struct reloc_cache_entry +- { +- /* A pointer into the canonical table of pointers */ +- struct symbol_cache_entry **sym_ptr_ptr; +- +- /* offset in section */ +- bfd_size_type address; +- +- /* addend for relocation value */ +- bfd_vma addend; +- +- /* Pointer to how to perform the required relocation */ +- reloc_howto_type *howto; +- +- } arelent; +- *Description* +-Here is a description of each of the fields within an `arelent': +- +- * `sym_ptr_ptr' The symbol table pointer points to a pointer to the +-symbol associated with the relocation request. It is the pointer into +-the table returned by the back end's `get_symtab' action. *Note +-Symbols::. The symbol is referenced through a pointer to a pointer so +-that tools like the linker can fix up all the symbols of the same name +-by modifying only one pointer. The relocation routine looks in the +-symbol and uses the base of the section the symbol is attached to and +-the value of the symbol as the initial relocation offset. If the symbol +-pointer is zero, then the section provided is looked up. +- +- * `address' The `address' field gives the offset in bytes from the +-base of the section data which owns the relocation record to the first +-byte of relocatable information. The actual data relocated will be +-relative to this point; for example, a relocation type which modifies +-the bottom two bytes of a four byte word would not touch the first byte +-pointed to in a big endian world. +- +- * `addend' The `addend' is a value provided by the back end to be +-added (!) to the relocation offset. Its interpretation is dependent +-upon the howto. For example, on the 68k the code: +- +- char foo[]; +- main() +- { +- return foo[0x12345678]; +- } +- +- Could be compiled into: +- +- linkw fp,#-4 +- moveb @#12345678,d0 +- extbl d0 +- unlk fp +- rts +- +- This could create a reloc pointing to `foo', but leave the offset in +-the data, something like: +- +- RELOCATION RECORDS FOR [.text]: +- offset type value +- 00000006 32 _foo +- +- 00000000 4e56 fffc ; linkw fp,#-4 +- 00000004 1039 1234 5678 ; moveb @#12345678,d0 +- 0000000a 49c0 ; extbl d0 +- 0000000c 4e5e ; unlk fp +- 0000000e 4e75 ; rts +- +- Using coff and an 88k, some instructions don't have enough space in +-them to represent the full address range, and pointers have to be +-loaded in two parts. So you'd get something like: +- +- or.u r13,r0,hi16(_foo+0x12345678) +- ld.b r2,r13,lo16(_foo+0x12345678) +- jmp r1 +- +- This should create two relocs, both pointing to `_foo', and with +-0x12340000 in their addend field. The data would consist of: +- +- RELOCATION RECORDS FOR [.text]: +- offset type value +- 00000002 HVRT16 _foo+0x12340000 +- 00000006 LVRT16 _foo+0x12340000 +- +- 00000000 5da05678 ; or.u r13,r0,0x5678 +- 00000004 1c4d5678 ; ld.b r2,r13,0x5678 +- 00000008 f400c001 ; jmp r1 +- +- The relocation routine digs out the value from the data, adds it to +-the addend to get the original offset, and then adds the value of +-`_foo'. Note that all 32 bits have to be kept around somewhere, to cope +-with carry from bit 15 to bit 16. +- +- One further example is the sparc and the a.out format. The sparc has +-a similar problem to the 88k, in that some instructions don't have room +-for an entire offset, but on the sparc the parts are created in odd +-sized lumps. The designers of the a.out format chose to not use the +-data within the section for storing part of the offset; all the offset +-is kept within the reloc. Anything in the data should be ignored. +- +- save %sp,-112,%sp +- sethi %hi(_foo+0x12345678),%g2 +- ldsb [%g2+%lo(_foo+0x12345678)],%i0 +- ret +- restore +- +- Both relocs contain a pointer to `foo', and the offsets contain junk. +- +- RELOCATION RECORDS FOR [.text]: +- offset type value +- 00000004 HI22 _foo+0x12345678 +- 00000008 LO10 _foo+0x12345678 +- +- 00000000 9de3bf90 ; save %sp,-112,%sp +- 00000004 05000000 ; sethi %hi(_foo+0),%g2 +- 00000008 f048a000 ; ldsb [%g2+%lo(_foo+0)],%i0 +- 0000000c 81c7e008 ; ret +- 00000010 81e80000 ; restore +- +- * `howto' The `howto' field can be imagined as a relocation +-instruction. It is a pointer to a structure which contains information +-on what to do with all of the other information in the reloc record and +-data section. A back end would normally have a relocation instruction +-set and turn relocations into pointers to the correct structure on +-input - but it would be possible to create each howto field on demand. +- +-`enum complain_overflow' +-........................ +- +- Indicates what sort of overflow checking should be done when +-performing a relocation. +- +- +- enum complain_overflow +- { +- /* Do not complain on overflow. */ +- complain_overflow_dont, +- +- /* Complain if the bitfield overflows, whether it is considered +- as signed or unsigned. */ +- complain_overflow_bitfield, +- +- /* Complain if the value overflows when considered as signed +- number. */ +- complain_overflow_signed, +- +- /* Complain if the value overflows when considered as an +- unsigned number. */ +- complain_overflow_unsigned +- }; +- +-`reloc_howto_type' +-.................. +- +- The `reloc_howto_type' is a structure which contains all the +-information that libbfd needs to know to tie up a back end's data. +- +- struct symbol_cache_entry; /* Forward declaration */ +- +- struct reloc_howto_struct +- { +- /* The type field has mainly a documentary use - the back end can +- do what it wants with it, though normally the back end's +- external idea of what a reloc number is stored +- in this field. For example, a PC relative word relocation +- in a coff environment has the type 023 - because that's +- what the outside world calls a R_PCRWORD reloc. */ +- unsigned int type; +- +- /* The value the final relocation is shifted right by. This drops +- unwanted data from the relocation. */ +- unsigned int rightshift; +- +- /* The size of the item to be relocated. This is *not* a +- power-of-two measure. To get the number of bytes operated +- on by a type of relocation, use bfd_get_reloc_size. */ +- int size; +- +- /* The number of bits in the item to be relocated. This is used +- when doing overflow checking. */ +- unsigned int bitsize; +- +- /* Notes that the relocation is relative to the location in the +- data section of the addend. The relocation function will +- subtract from the relocation value the address of the location +- being relocated. */ +- boolean pc_relative; +- +- /* The bit position of the reloc value in the destination. +- The relocated value is left shifted by this amount. */ +- unsigned int bitpos; +- +- /* What type of overflow error should be checked for when +- relocating. */ +- enum complain_overflow complain_on_overflow; +- +- /* If this field is non null, then the supplied function is +- called rather than the normal function. This allows really +- strange relocation methods to be accomodated (e.g., i960 callj +- instructions). */ +- bfd_reloc_status_type (*special_function) +- PARAMS ((bfd *abfd, +- arelent *reloc_entry, +- struct symbol_cache_entry *symbol, +- PTR data, +- asection *input_section, +- bfd *output_bfd, +- char **error_message)); +- +- /* The textual name of the relocation type. */ +- char *name; +- +- /* When performing a partial link, some formats must modify the +- relocations rather than the data - this flag signals this.*/ +- boolean partial_inplace; +- +- /* The src_mask selects which parts of the read in data +- are to be used in the relocation sum. E.g., if this was an 8 bit +- bit of data which we read and relocated, this would be +- 0x000000ff. When we have relocs which have an addend, such as +- sun4 extended relocs, the value in the offset part of a +- relocating field is garbage so we never use it. In this case +- the mask would be 0x00000000. */ +- bfd_vma src_mask; +- +- /* The dst_mask selects which parts of the instruction are replaced +- into the instruction. In most cases src_mask == dst_mask, +- except in the above special case, where dst_mask would be +- 0x000000ff, and src_mask would be 0x00000000. */ +- bfd_vma dst_mask; +- +- /* When some formats create PC relative instructions, they leave +- the value of the pc of the place being relocated in the offset +- slot of the instruction, so that a PC relative relocation can +- be made just by adding in an ordinary offset (e.g., sun3 a.out). +- Some formats leave the displacement part of an instruction +- empty (e.g., m88k bcs); this flag signals the fact.*/ +- boolean pcrel_offset; +- +- }; +- +-`The HOWTO Macro' +-................. +- +- *Description* +-The HOWTO define is horrible and will go away. +- #define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ +- {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC} +- +- *Description* +-And will be replaced with the totally magic way. But for the moment, we +-are compatible, so do it this way. +- #define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN) +- +- *Description* +-Helper routine to turn a symbol into a relocation value. +- #define HOWTO_PREPARE(relocation, symbol) \ +- { \ +- if (symbol != (asymbol *)NULL) { \ +- if (bfd_is_com_section (symbol->section)) { \ +- relocation = 0; \ +- } \ +- else { \ +- relocation = symbol->value; \ +- } \ +- } \ +- } +- +-`bfd_get_reloc_size' +-.................... +- +- *Synopsis* +- unsigned int bfd_get_reloc_size (reloc_howto_type *); +- *Description* +-For a reloc_howto_type that operates on a fixed number of bytes, this +-returns the number of bytes operated on. +- +-`arelent_chain' +-............... +- +- *Description* +-How relocs are tied together in an `asection': +- typedef struct relent_chain { +- arelent relent; +- struct relent_chain *next; +- } arelent_chain; +- +-`bfd_check_overflow' +-.................... +- +- *Synopsis* +- bfd_reloc_status_type +- bfd_check_overflow +- (enum complain_overflow how, +- unsigned int bitsize, +- unsigned int rightshift, +- bfd_vma relocation); +- *Description* +-Perform overflow checking on RELOCATION which has BITSIZE significant +-bits and will be shifted right by RIGHTSHIFT bits. The result is +-either of `bfd_reloc_ok' or `bfd_reloc_overflow'. +- +-`bfd_perform_relocation' +-........................ +- +- *Synopsis* +- bfd_reloc_status_type +- bfd_perform_relocation +- (bfd *abfd, +- arelent *reloc_entry, +- PTR data, +- asection *input_section, +- bfd *output_bfd, +- char **error_message); +- *Description* +-If OUTPUT_BFD is supplied to this function, the generated image will be +-relocatable; the relocations are copied to the output file after they +-have been changed to reflect the new state of the world. There are two +-ways of reflecting the results of partial linkage in an output file: by +-modifying the output data in place, and by modifying the relocation +-record. Some native formats (e.g., basic a.out and basic coff) have no +-way of specifying an addend in the relocation type, so the addend has +-to go in the output data. This is no big deal since in these formats +-the output data slot will always be big enough for the addend. Complex +-reloc types with addends were invented to solve just this problem. The +-ERROR_MESSAGE argument is set to an error message if this return +-`bfd_reloc_dangerous'. +- +-`bfd_install_relocation' +-........................ +- +- *Synopsis* +- bfd_reloc_status_type +- bfd_install_relocation +- (bfd *abfd, +- arelent *reloc_entry, +- PTR data, bfd_vma data_start, +- asection *input_section, +- char **error_message); +- *Description* +-This looks remarkably like `bfd_perform_relocation', except it does not +-expect that the section contents have been filled in. I.e., it's +-suitable for use when creating, rather than applying a relocation. +- +- For now, this function should be considered reserved for the +-assembler. +- +- +-File: bfd.info, Node: howto manager, Prev: typedef arelent, Up: Relocations +- +-The howto manager +-================= +- +- When an application wants to create a relocation, but doesn't know +-what the target machine might call it, it can find out by using this +-bit of code. +- +-`bfd_reloc_code_type' +-..................... +- +- *Description* +-The insides of a reloc code. The idea is that, eventually, there will +-be one enumerator for every type of relocation we ever do. Pass one of +-these values to `bfd_reloc_type_lookup', and it'll return a howto +-pointer. +- +- This does mean that the application must determine the correct +-enumerator value; you can't get a howto pointer from a random set of +-attributes. +- +- Here are the possible values for `enum bfd_reloc_code_real': +- +- - : BFD_RELOC_64 +- - : BFD_RELOC_32 +- - : BFD_RELOC_26 +- - : BFD_RELOC_24 +- - : BFD_RELOC_16 +- - : BFD_RELOC_14 +- - : BFD_RELOC_8 +- Basic absolute relocations of N bits. +- +- - : BFD_RELOC_64_PCREL +- - : BFD_RELOC_32_PCREL +- - : BFD_RELOC_24_PCREL +- - : BFD_RELOC_16_PCREL +- - : BFD_RELOC_12_PCREL +- - : BFD_RELOC_8_PCREL +- PC-relative relocations. Sometimes these are relative to the +- address of the relocation itself; sometimes they are relative to +- the start of the section containing the relocation. It depends on +- the specific target. +- +- The 24-bit relocation is used in some Intel 960 configurations. +- +- - : BFD_RELOC_32_GOT_PCREL +- - : BFD_RELOC_16_GOT_PCREL +- - : BFD_RELOC_8_GOT_PCREL +- - : BFD_RELOC_32_GOTOFF +- - : BFD_RELOC_16_GOTOFF +- - : BFD_RELOC_LO16_GOTOFF +- - : BFD_RELOC_HI16_GOTOFF +- - : BFD_RELOC_HI16_S_GOTOFF +- - : BFD_RELOC_8_GOTOFF +- - : BFD_RELOC_32_PLT_PCREL +- - : BFD_RELOC_24_PLT_PCREL +- - : BFD_RELOC_16_PLT_PCREL +- - : BFD_RELOC_8_PLT_PCREL +- - : BFD_RELOC_32_PLTOFF +- - : BFD_RELOC_16_PLTOFF +- - : BFD_RELOC_LO16_PLTOFF +- - : BFD_RELOC_HI16_PLTOFF +- - : BFD_RELOC_HI16_S_PLTOFF +- - : BFD_RELOC_8_PLTOFF +- For ELF. +- +- - : BFD_RELOC_68K_GLOB_DAT +- - : BFD_RELOC_68K_JMP_SLOT +- - : BFD_RELOC_68K_RELATIVE +- Relocations used by 68K ELF. +- +- - : BFD_RELOC_32_BASEREL +- - : BFD_RELOC_16_BASEREL +- - : BFD_RELOC_LO16_BASEREL +- - : BFD_RELOC_HI16_BASEREL +- - : BFD_RELOC_HI16_S_BASEREL +- - : BFD_RELOC_8_BASEREL +- - : BFD_RELOC_RVA +- Linkage-table relative. +- +- - : BFD_RELOC_8_FFnn +- Absolute 8-bit relocation, but used to form an address like 0xFFnn. +- +- - : BFD_RELOC_32_PCREL_S2 +- - : BFD_RELOC_16_PCREL_S2 +- - : BFD_RELOC_23_PCREL_S2 +- These PC-relative relocations are stored as word displacements - +- i.e., byte displacements shifted right two bits. The 30-bit word +- displacement (<<32_PCREL_S2>> - 32 bits, shifted 2) is used on the +- SPARC. (SPARC tools generally refer to this as <>.) The +- signed 16-bit displacement is used on the MIPS, and the 23-bit +- displacement is used on the Alpha. +- +- - : BFD_RELOC_HI22 +- - : BFD_RELOC_LO10 +- High 22 bits and low 10 bits of 32-bit value, placed into lower +- bits of the target word. These are used on the SPARC. +- +- - : BFD_RELOC_GPREL16 +- - : BFD_RELOC_GPREL32 +- For systems that allocate a Global Pointer register, these are +- displacements off that register. These relocation types are +- handled specially, because the value the register will have is +- decided relatively late. +- +- - : BFD_RELOC_I960_CALLJ +- Reloc types used for i960/b.out. +- +- - : BFD_RELOC_NONE +- - : BFD_RELOC_SPARC_WDISP22 +- - : BFD_RELOC_SPARC22 +- - : BFD_RELOC_SPARC13 +- - : BFD_RELOC_SPARC_GOT10 +- - : BFD_RELOC_SPARC_GOT13 +- - : BFD_RELOC_SPARC_GOT22 +- - : BFD_RELOC_SPARC_PC10 +- - : BFD_RELOC_SPARC_PC22 +- - : BFD_RELOC_SPARC_WPLT30 +- - : BFD_RELOC_SPARC_COPY +- - : BFD_RELOC_SPARC_GLOB_DAT +- - : BFD_RELOC_SPARC_JMP_SLOT +- - : BFD_RELOC_SPARC_RELATIVE +- - : BFD_RELOC_SPARC_UA32 +- SPARC ELF relocations. There is probably some overlap with other +- relocation types already defined. +- +- - : BFD_RELOC_SPARC_BASE13 +- - : BFD_RELOC_SPARC_BASE22 +- I think these are specific to SPARC a.out (e.g., Sun 4). +- +- - : BFD_RELOC_SPARC_64 +- - : BFD_RELOC_SPARC_10 +- - : BFD_RELOC_SPARC_11 +- - : BFD_RELOC_SPARC_OLO10 +- - : BFD_RELOC_SPARC_HH22 +- - : BFD_RELOC_SPARC_HM10 +- - : BFD_RELOC_SPARC_LM22 +- - : BFD_RELOC_SPARC_PC_HH22 +- - : BFD_RELOC_SPARC_PC_HM10 +- - : BFD_RELOC_SPARC_PC_LM22 +- - : BFD_RELOC_SPARC_WDISP16 +- - : BFD_RELOC_SPARC_WDISP19 +- - : BFD_RELOC_SPARC_7 +- - : BFD_RELOC_SPARC_6 +- - : BFD_RELOC_SPARC_5 +- - : BFD_RELOC_SPARC_DISP64 +- - : BFD_RELOC_SPARC_PLT64 +- - : BFD_RELOC_SPARC_HIX22 +- - : BFD_RELOC_SPARC_LOX10 +- - : BFD_RELOC_SPARC_H44 +- - : BFD_RELOC_SPARC_M44 +- - : BFD_RELOC_SPARC_L44 +- - : BFD_RELOC_SPARC_REGISTER +- SPARC64 relocations +- +- - : BFD_RELOC_ALPHA_GPDISP_HI16 +- Alpha ECOFF and ELF relocations. Some of these treat the symbol or +- "addend" in some special way. For GPDISP_HI16 ("gpdisp") +- relocations, the symbol is ignored when writing; when reading, it +- will be the absolute section symbol. The addend is the +- displacement in bytes of the "lda" instruction from the "ldah" +- instruction (which is at the address of this reloc). +- +- - : BFD_RELOC_ALPHA_GPDISP_LO16 +- For GPDISP_LO16 ("ignore") relocations, the symbol is handled as +- with GPDISP_HI16 relocs. The addend is ignored when writing the +- relocations out, and is filled in with the file's GP value on +- reading, for convenience. +- +- - : BFD_RELOC_ALPHA_GPDISP +- The ELF GPDISP relocation is exactly the same as the GPDISP_HI16 +- relocation except that there is no accompanying GPDISP_LO16 +- relocation. +- +- - : BFD_RELOC_ALPHA_LITERAL +- - : BFD_RELOC_ALPHA_ELF_LITERAL +- - : BFD_RELOC_ALPHA_LITUSE +- The Alpha LITERAL/LITUSE relocs are produced by a symbol reference; +- the assembler turns it into a LDQ instruction to load the address +- of the symbol, and then fills in a register in the real +- instruction. +- +- The LITERAL reloc, at the LDQ instruction, refers to the .lita +- section symbol. The addend is ignored when writing, but is filled +- in with the file's GP value on reading, for convenience, as with +- the GPDISP_LO16 reloc. +- +- The ELF_LITERAL reloc is somewhere between 16_GOTOFF and +- GPDISP_LO16. It should refer to the symbol to be referenced, as +- with 16_GOTOFF, but it generates output not based on the position +- within the .got section, but relative to the GP value chosen for +- the file during the final link stage. +- +- The LITUSE reloc, on the instruction using the loaded address, +- gives information to the linker that it might be able to use to +- optimize away some literal section references. The symbol is +- ignored (read as the absolute section symbol), and the "addend" +- indicates the type of instruction using the register: 1 - "memory" +- fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target +- of branch) +- +- The GNU linker currently doesn't do any of this optimizing. +- +- - : BFD_RELOC_ALPHA_HINT +- The HINT relocation indicates a value that should be filled into +- the "hint" field of a jmp/jsr/ret instruction, for possible branch- +- prediction logic which may be provided on some processors. +- +- - : BFD_RELOC_ALPHA_LINKAGE +- The LINKAGE relocation outputs a linkage pair in the object file, +- which is filled by the linker. +- +- - : BFD_RELOC_ALPHA_CODEADDR +- The CODEADDR relocation outputs a STO_CA in the object file, which +- is filled by the linker. +- +- - : BFD_RELOC_MIPS_JMP +- Bits 27..2 of the relocation address shifted right 2 bits; simple +- reloc otherwise. +- +- - : BFD_RELOC_MIPS16_JMP +- The MIPS16 jump instruction. +- +- - : BFD_RELOC_MIPS16_GPREL +- MIPS16 GP relative reloc. +- +- - : BFD_RELOC_HI16 +- High 16 bits of 32-bit value; simple reloc. +- +- - : BFD_RELOC_HI16_S +- High 16 bits of 32-bit value but the low 16 bits will be sign +- extended and added to form the final result. If the low 16 bits +- form a negative number, we need to add one to the high value to +- compensate for the borrow when the low bits are added. +- +- - : BFD_RELOC_LO16 +- Low 16 bits. +- +- - : BFD_RELOC_PCREL_HI16_S +- Like BFD_RELOC_HI16_S, but PC relative. +- +- - : BFD_RELOC_PCREL_LO16 +- Like BFD_RELOC_LO16, but PC relative. +- +- - : BFD_RELOC_MIPS_GPREL +- Relocation relative to the global pointer. +- +- - : BFD_RELOC_MIPS_LITERAL +- Relocation against a MIPS literal section. +- +- - : BFD_RELOC_MIPS_GOT16 +- - : BFD_RELOC_MIPS_CALL16 +- - : BFD_RELOC_MIPS_GPREL32 +- - : BFD_RELOC_MIPS_GOT_HI16 +- - : BFD_RELOC_MIPS_GOT_LO16 +- - : BFD_RELOC_MIPS_CALL_HI16 +- - : BFD_RELOC_MIPS_CALL_LO16 +- MIPS ELF relocations. +- +- - : BFD_RELOC_386_GOT32 +- - : BFD_RELOC_386_PLT32 +- - : BFD_RELOC_386_COPY +- - : BFD_RELOC_386_GLOB_DAT +- - : BFD_RELOC_386_JUMP_SLOT +- - : BFD_RELOC_386_RELATIVE +- - : BFD_RELOC_386_GOTOFF +- - : BFD_RELOC_386_GOTPC +- i386/elf relocations +- +- - : BFD_RELOC_NS32K_IMM_8 +- - : BFD_RELOC_NS32K_IMM_16 +- - : BFD_RELOC_NS32K_IMM_32 +- - : BFD_RELOC_NS32K_IMM_8_PCREL +- - : BFD_RELOC_NS32K_IMM_16_PCREL +- - : BFD_RELOC_NS32K_IMM_32_PCREL +- - : BFD_RELOC_NS32K_DISP_8 +- - : BFD_RELOC_NS32K_DISP_16 +- - : BFD_RELOC_NS32K_DISP_32 +- - : BFD_RELOC_NS32K_DISP_8_PCREL +- - : BFD_RELOC_NS32K_DISP_16_PCREL +- - : BFD_RELOC_NS32K_DISP_32_PCREL +- ns32k relocations +- +- - : BFD_RELOC_PPC_B26 +- - : BFD_RELOC_PPC_BA26 +- - : BFD_RELOC_PPC_TOC16 +- - : BFD_RELOC_PPC_B16 +- - : BFD_RELOC_PPC_B16_BRTAKEN +- - : BFD_RELOC_PPC_B16_BRNTAKEN +- - : BFD_RELOC_PPC_BA16 +- - : BFD_RELOC_PPC_BA16_BRTAKEN +- - : BFD_RELOC_PPC_BA16_BRNTAKEN +- - : BFD_RELOC_PPC_COPY +- - : BFD_RELOC_PPC_GLOB_DAT +- - : BFD_RELOC_PPC_JMP_SLOT +- - : BFD_RELOC_PPC_RELATIVE +- - : BFD_RELOC_PPC_LOCAL24PC +- - : BFD_RELOC_PPC_EMB_NADDR32 +- - : BFD_RELOC_PPC_EMB_NADDR16 +- - : BFD_RELOC_PPC_EMB_NADDR16_LO +- - : BFD_RELOC_PPC_EMB_NADDR16_HI +- - : BFD_RELOC_PPC_EMB_NADDR16_HA +- - : BFD_RELOC_PPC_EMB_SDAI16 +- - : BFD_RELOC_PPC_EMB_SDA2I16 +- - : BFD_RELOC_PPC_EMB_SDA2REL +- - : BFD_RELOC_PPC_EMB_SDA21 +- - : BFD_RELOC_PPC_EMB_MRKREF +- - : BFD_RELOC_PPC_EMB_RELSEC16 +- - : BFD_RELOC_PPC_EMB_RELST_LO +- - : BFD_RELOC_PPC_EMB_RELST_HI +- - : BFD_RELOC_PPC_EMB_RELST_HA +- - : BFD_RELOC_PPC_EMB_BIT_FLD +- - : BFD_RELOC_PPC_EMB_RELSDA +- Power(rs6000) and PowerPC relocations. +- +- - : BFD_RELOC_CTOR +- The type of reloc used to build a contructor table - at the moment +- probably a 32 bit wide absolute relocation, but the target can +- choose. It generally does map to one of the other relocation +- types. +- +- - : BFD_RELOC_ARM_PCREL_BRANCH +- ARM 26 bit pc-relative branch. The lowest two bits must be zero +- and are not stored in the instruction. +- +- - : BFD_RELOC_ARM_IMMEDIATE +- - : BFD_RELOC_ARM_OFFSET_IMM +- - : BFD_RELOC_ARM_SHIFT_IMM +- - : BFD_RELOC_ARM_SWI +- - : BFD_RELOC_ARM_MULTI +- - : BFD_RELOC_ARM_CP_OFF_IMM +- - : BFD_RELOC_ARM_ADR_IMM +- - : BFD_RELOC_ARM_LDR_IMM +- - : BFD_RELOC_ARM_LITERAL +- - : BFD_RELOC_ARM_IN_POOL +- - : BFD_RELOC_ARM_OFFSET_IMM8 +- - : BFD_RELOC_ARM_HWLITERAL +- - : BFD_RELOC_ARM_THUMB_ADD +- - : BFD_RELOC_ARM_THUMB_IMM +- - : BFD_RELOC_ARM_THUMB_SHIFT +- - : BFD_RELOC_ARM_THUMB_OFFSET +- These relocs are only used within the ARM assembler. They are not +- (at present) written to any object files. +- +- - : BFD_RELOC_SH_PCDISP8BY2 +- - : BFD_RELOC_SH_PCDISP12BY2 +- - : BFD_RELOC_SH_IMM4 +- - : BFD_RELOC_SH_IMM4BY2 +- - : BFD_RELOC_SH_IMM4BY4 +- - : BFD_RELOC_SH_IMM8 +- - : BFD_RELOC_SH_IMM8BY2 +- - : BFD_RELOC_SH_IMM8BY4 +- - : BFD_RELOC_SH_PCRELIMM8BY2 +- - : BFD_RELOC_SH_PCRELIMM8BY4 +- - : BFD_RELOC_SH_SWITCH16 +- - : BFD_RELOC_SH_SWITCH32 +- - : BFD_RELOC_SH_USES +- - : BFD_RELOC_SH_COUNT +- - : BFD_RELOC_SH_ALIGN +- - : BFD_RELOC_SH_CODE +- - : BFD_RELOC_SH_DATA +- - : BFD_RELOC_SH_LABEL +- Hitachi SH relocs. Not all of these appear in object files. +- +- - : BFD_RELOC_THUMB_PCREL_BRANCH9 +- - : BFD_RELOC_THUMB_PCREL_BRANCH12 +- - : BFD_RELOC_THUMB_PCREL_BRANCH23 +- Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must +- be zero and is not stored in the instruction. +- +- - : BFD_RELOC_ARC_B22_PCREL +- Argonaut RISC Core (ARC) relocs. ARC 22 bit pc-relative branch. +- The lowest two bits must be zero and are not stored in the +- instruction. The high 20 bits are installed in bits 26 through 7 +- of the instruction. +- +- - : BFD_RELOC_ARC_B26 +- ARC 26 bit absolute branch. The lowest two bits must be zero and +- are not stored in the instruction. The high 24 bits are installed +- in bits 23 through 0. +- +- - : BFD_RELOC_D10V_10_PCREL_R +- Mitsubishi D10V relocs. This is a 10-bit reloc with the right 2 +- bits assumed to be 0. +- +- - : BFD_RELOC_D10V_10_PCREL_L +- Mitsubishi D10V relocs. This is a 10-bit reloc with the right 2 +- bits assumed to be 0. This is the same as the previous reloc +- except it is in the left container, i.e., shifted left 15 bits. +- +- - : BFD_RELOC_D10V_18 +- This is an 18-bit reloc with the right 2 bits assumed to be 0. +- +- - : BFD_RELOC_D10V_18_PCREL +- This is an 18-bit reloc with the right 2 bits assumed to be 0. +- +- - : BFD_RELOC_M32R_24 +- Mitsubishi M32R relocs. This is a 24 bit absolute address. +- +- - : BFD_RELOC_M32R_10_PCREL +- This is a 10-bit pc-relative reloc with the right 2 bits assumed +- to be 0. +- +- - : BFD_RELOC_M32R_18_PCREL +- This is an 18-bit reloc with the right 2 bits assumed to be 0. +- +- - : BFD_RELOC_M32R_26_PCREL +- This is a 26-bit reloc with the right 2 bits assumed to be 0. +- +- - : BFD_RELOC_M32R_HI16_ULO +- This is a 16-bit reloc containing the high 16 bits of an address +- used when the lower 16 bits are treated as unsigned. +- +- - : BFD_RELOC_M32R_HI16_SLO +- This is a 16-bit reloc containing the high 16 bits of an address +- used when the lower 16 bits are treated as signed. +- +- - : BFD_RELOC_M32R_LO16 +- This is a 16-bit reloc containing the lower 16 bits of an address. +- +- - : BFD_RELOC_M32R_SDA16 +- This is a 16-bit reloc containing the small data area offset for +- use in add3, load, and store instructions. +- +- - : BFD_RELOC_V850_9_PCREL +- This is a 9-bit reloc +- +- - : BFD_RELOC_V850_22_PCREL +- This is a 22-bit reloc +- +- - : BFD_RELOC_V850_SDA_16_16_OFFSET +- This is a 16 bit offset from the short data area pointer. +- +- - : BFD_RELOC_V850_SDA_15_16_OFFSET +- This is a 16 bit offset (of which only 15 bits are used) from the +- short data area pointer. +- +- - : BFD_RELOC_V850_ZDA_16_16_OFFSET +- This is a 16 bit offset from the zero data area pointer. +- +- - : BFD_RELOC_V850_ZDA_15_16_OFFSET +- This is a 16 bit offset (of which only 15 bits are used) from the +- zero data area pointer. +- +- - : BFD_RELOC_V850_TDA_6_8_OFFSET +- This is an 8 bit offset (of which only 6 bits are used) from the +- tiny data area pointer. +- +- - : BFD_RELOC_V850_TDA_7_8_OFFSET +- This is an 8bit offset (of which only 7 bits are used) from the +- tiny data area pointer. +- +- - : BFD_RELOC_V850_TDA_7_7_OFFSET +- This is a 7 bit offset from the tiny data area pointer. +- +- - : BFD_RELOC_V850_TDA_16_16_OFFSET +- This is a 16 bit offset from the tiny data area pointer. +- +- - : BFD_RELOC_MN10300_32_PCREL +- This is a 32bit pcrel reloc for the mn10300, offset by two bytes +- in the instruction. +- +- - : BFD_RELOC_MN10300_16_PCREL +- This is a 16bit pcrel reloc for the mn10300, offset by two bytes +- in the instruction. +- +- - : BFD_RELOC_TIC30_LDP +- This is a 8bit DP reloc for the tms320c30, where the most +- significant 8 bits of a 24 bit word are placed into the least +- significant 8 bits of the opcode. +- +- +- typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; +- +-`bfd_reloc_type_lookup' +-....................... +- +- *Synopsis* +- reloc_howto_type * +- bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code); +- *Description* +-Return a pointer to a howto structure which, when invoked, will perform +-the relocation CODE on data from the architecture noted. +- +-`bfd_default_reloc_type_lookup' +-............................... +- +- *Synopsis* +- reloc_howto_type *bfd_default_reloc_type_lookup +- (bfd *abfd, bfd_reloc_code_real_type code); +- *Description* +-Provides a default relocation lookup routine for any architecture. +- +-`bfd_get_reloc_code_name' +-......................... +- +- *Synopsis* +- const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); +- *Description* +-Provides a printable name for the supplied relocation code. Useful +-mainly for printing error messages. +- +-`bfd_generic_relax_section' +-........................... +- +- *Synopsis* +- boolean bfd_generic_relax_section +- (bfd *abfd, +- asection *section, +- struct bfd_link_info *, +- boolean *); +- *Description* +-Provides default handling for relaxing for back ends which don't do +-relaxing - i.e., does nothing. +- +-`bfd_generic_get_relocated_section_contents' +-............................................ +- +- *Synopsis* +- bfd_byte * +- bfd_generic_get_relocated_section_contents (bfd *abfd, +- struct bfd_link_info *link_info, +- struct bfd_link_order *link_order, +- bfd_byte *data, +- boolean relocateable, +- asymbol **symbols); +- *Description* +-Provides default handling of relocation effort for back ends which +-can't be bothered to do it efficiently. +- +- +-File: bfd.info, Node: Core Files, Next: Targets, Prev: Relocations, Up: BFD front end +- +-Core files +-========== +- +- *Description* +-These are functions pertaining to core files. +- +-`bfd_core_file_failing_command' +-............................... +- +- *Synopsis* +- CONST char *bfd_core_file_failing_command(bfd *abfd); +- *Description* +-Return a read-only string explaining which program was running when it +-failed and produced the core file ABFD. +- +-`bfd_core_file_failing_signal' +-.............................. +- +- *Synopsis* +- int bfd_core_file_failing_signal(bfd *abfd); +- *Description* +-Returns the signal number which caused the core dump which generated +-the file the BFD ABFD is attached to. +- +-`core_file_matches_executable_p' +-................................ +- +- *Synopsis* +- boolean core_file_matches_executable_p +- (bfd *core_bfd, bfd *exec_bfd); +- *Description* +-Return `true' if the core file attached to CORE_BFD was generated by a +-run of the executable file attached to EXEC_BFD, `false' otherwise. +- +- +-File: bfd.info, Node: Targets, Next: Architectures, Prev: Core Files, Up: BFD front end +- +-Targets +-======= +- +- *Description* +-Each port of BFD to a different machine requries the creation of a +-target back end. All the back end provides to the root part of BFD is a +-structure containing pointers to functions which perform certain low +-level operations on files. BFD translates the applications's requests +-through a pointer into calls to the back end routines. +- +- When a file is opened with `bfd_openr', its format and target are +-unknown. BFD uses various mechanisms to determine how to interpret the +-file. The operations performed are: +- +- * Create a BFD by calling the internal routine `_bfd_new_bfd', then +- call `bfd_find_target' with the target string supplied to +- `bfd_openr' and the new BFD pointer. +- +- * If a null target string was provided to `bfd_find_target', look up +- the environment variable `GNUTARGET' and use that as the target +- string. +- +- * If the target string is still `NULL', or the target string is +- `default', then use the first item in the target vector as the +- target type, and set `target_defaulted' in the BFD to cause +- `bfd_check_format' to loop through all the targets. *Note +- bfd_target::. *Note Formats::. +- +- * Otherwise, inspect the elements in the target vector one by one, +- until a match on target name is found. When found, use it. +- +- * Otherwise return the error `bfd_error_invalid_target' to +- `bfd_openr'. +- +- * `bfd_openr' attempts to open the file using `bfd_open_file', and +- returns the BFD. Once the BFD has been opened and the target +-selected, the file format may be determined. This is done by calling +-`bfd_check_format' on the BFD with a suggested format. If +-`target_defaulted' has been set, each possible target type is tried to +-see if it recognizes the specified format. `bfd_check_format' returns +-`true' when the caller guesses right. +- +-* Menu: +- +-* bfd_target:: +- +diff -rup --new-file binutils-2.9.1/bfd/doc/bfd.info-4 binutils-2.9.1/bfd/doc/bfd.info-4 +--- binutils-2.9.1/bfd/doc/bfd.info-4 Fri May 1 08:48:03 1998 ++++ binutils-2.9.1/bfd/doc/bfd.info-4 Wed Dec 31 17:00:00 1969 +@@ -1,1248 +0,0 @@ +-This is Info file bfd.info, produced by Makeinfo version 1.68 from the +-input file bfd.texinfo. +- +-START-INFO-DIR-ENTRY +-* Bfd: (bfd). The Binary File Descriptor library. +-END-INFO-DIR-ENTRY +- +- This file documents the BFD library. +- +- Copyright (C) 1991 Free Software Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, subject to the +-terms of the GNU General Public License, which includes the provision +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: bfd.info, Node: bfd_target, Prev: Targets, Up: Targets +- +-bfd_target +----------- +- +- *Description* +-This structure contains everything that BFD knows about a target. It +-includes things like its byte order, name, and which routines to call +-to do various operations. +- +- Every BFD points to a target structure with its `xvec' member. +- +- The macros below are used to dispatch to functions through the +-`bfd_target' vector. They are used in a number of macros further down +-in `bfd.h', and are also used when calling various routines by hand +-inside the BFD implementation. The ARGLIST argument must be +-parenthesized; it contains all the arguments to the called function. +- +- They make the documentation (more) unpleasant to read, so if someone +-wants to fix this and not break the above, please do. +- #define BFD_SEND(bfd, message, arglist) \ +- ((*((bfd)->xvec->message)) arglist) +- +- #ifdef DEBUG_BFD_SEND +- #undef BFD_SEND +- #define BFD_SEND(bfd, message, arglist) \ +- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ +- ((*((bfd)->xvec->message)) arglist) : \ +- (bfd_assert (__FILE__,__LINE__), NULL)) +- #endif +- For operations which index on the BFD format: +- #define BFD_SEND_FMT(bfd, message, arglist) \ +- (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) +- +- #ifdef DEBUG_BFD_SEND +- #undef BFD_SEND_FMT +- #define BFD_SEND_FMT(bfd, message, arglist) \ +- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ +- (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \ +- (bfd_assert (__FILE__,__LINE__), NULL)) +- #endif +- This is the structure which defines the type of BFD this is. The +-`xvec' member of the struct `bfd' itself points here. Each module that +-implements access to a different target under BFD, defines one of these. +- +- FIXME, these names should be rationalised with the names of the +-entry points which call them. Too bad we can't have one macro to define +-them both! +- enum bfd_flavour { +- bfd_target_unknown_flavour, +- bfd_target_aout_flavour, +- bfd_target_coff_flavour, +- bfd_target_ecoff_flavour, +- bfd_target_elf_flavour, +- bfd_target_ieee_flavour, +- bfd_target_nlm_flavour, +- bfd_target_oasys_flavour, +- bfd_target_tekhex_flavour, +- bfd_target_srec_flavour, +- bfd_target_ihex_flavour, +- bfd_target_som_flavour, +- bfd_target_os9k_flavour, +- bfd_target_versados_flavour, +- bfd_target_msdos_flavour, +- bfd_target_evax_flavour +- }; +- +- enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; +- +- /* Forward declaration. */ +- typedef struct bfd_link_info _bfd_link_info; +- +- typedef struct bfd_target +- { +- Identifies the kind of target, e.g., SunOS4, Ultrix, etc. +- char *name; +- The "flavour" of a back end is a general indication about the +-contents of a file. +- enum bfd_flavour flavour; +- The order of bytes within the data area of a file. +- enum bfd_endian byteorder; +- The order of bytes within the header parts of a file. +- enum bfd_endian header_byteorder; +- A mask of all the flags which an executable may have set - from the +-set `BFD_NO_FLAGS', `HAS_RELOC', ...`D_PAGED'. +- flagword object_flags; +- A mask of all the flags which a section may have set - from the set +-`SEC_NO_FLAGS', `SEC_ALLOC', ...`SET_NEVER_LOAD'. +- flagword section_flags; +- The character normally found at the front of a symbol (if any), +-perhaps `_'. +- char symbol_leading_char; +- The pad character for file names within an archive header. +- char ar_pad_char; +- The maximum number of characters in an archive header. +- unsigned short ar_max_namelen; +- Entries for byte swapping for data. These are different from the +-other entry points, since they don't take a BFD asthe first argument. +-Certain other handlers could do the same. +- bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *)); +- bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *)); +- void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *)); +- bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *)); +- bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *)); +- void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *)); +- bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *)); +- bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *)); +- void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *)); +- Byte swapping for the headers +- bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *)); +- bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *)); +- void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *)); +- bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *)); +- bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *)); +- void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *)); +- bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *)); +- bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *)); +- void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *)); +- Format dependent routines: these are vectors of entry points within +-the target vector structure, one for each format to check. +- +- Check the format of a file being read. Return a `bfd_target *' or +-zero. +- const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *)); +- Set the format of a file being written. +- boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *)); +- Write cached information into a file being written, at `bfd_close'. +- boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *)); +- The general target vector. +- +- /* Generic entry points. */ +- #define BFD_JUMP_TABLE_GENERIC(NAME)\ +- CAT(NAME,_close_and_cleanup),\ +- CAT(NAME,_bfd_free_cached_info),\ +- CAT(NAME,_new_section_hook),\ +- CAT(NAME,_get_section_contents),\ +- CAT(NAME,_get_section_contents_in_window) +- +- /* Called when the BFD is being closed to do any necessary cleanup. */ +- boolean (*_close_and_cleanup) PARAMS ((bfd *)); +- /* Ask the BFD to free all cached information. */ +- boolean (*_bfd_free_cached_info) PARAMS ((bfd *)); +- /* Called when a new section is created. */ +- boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr)); +- /* Read the contents of a section. */ +- boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, +- file_ptr, bfd_size_type)); +- boolean (*_bfd_get_section_contents_in_window) +- PARAMS ((bfd *, sec_ptr, bfd_window *, +- file_ptr, bfd_size_type)); +- +- /* Entry points to copy private data. */ +- #define BFD_JUMP_TABLE_COPY(NAME)\ +- CAT(NAME,_bfd_copy_private_bfd_data),\ +- CAT(NAME,_bfd_merge_private_bfd_data),\ +- CAT(NAME,_bfd_copy_private_section_data),\ +- CAT(NAME,_bfd_copy_private_symbol_data),\ +- CAT(NAME,_bfd_set_private_flags),\ +- CAT(NAME,_bfd_print_private_bfd_data)\ +- /* Called to copy BFD general private data from one object file +- to another. */ +- boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *)); +- /* Called to merge BFD general private data from one object file +- to a common output file when linking. */ +- boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *)); +- /* Called to copy BFD private section data from one object file +- to another. */ +- boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr, +- bfd *, sec_ptr)); +- /* Called to copy BFD private symbol data from one symbol +- to another. */ +- boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *, +- bfd *, asymbol *)); +- /* Called to set private backend flags */ +- boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword)); +- +- /* Called to print private BFD data */ +- boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR)); +- +- /* Core file entry points. */ +- #define BFD_JUMP_TABLE_CORE(NAME)\ +- CAT(NAME,_core_file_failing_command),\ +- CAT(NAME,_core_file_failing_signal),\ +- CAT(NAME,_core_file_matches_executable_p) +- char * (*_core_file_failing_command) PARAMS ((bfd *)); +- int (*_core_file_failing_signal) PARAMS ((bfd *)); +- boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *)); +- +- /* Archive entry points. */ +- #define BFD_JUMP_TABLE_ARCHIVE(NAME)\ +- CAT(NAME,_slurp_armap),\ +- CAT(NAME,_slurp_extended_name_table),\ +- CAT(NAME,_construct_extended_name_table),\ +- CAT(NAME,_truncate_arname),\ +- CAT(NAME,_write_armap),\ +- CAT(NAME,_read_ar_hdr),\ +- CAT(NAME,_openr_next_archived_file),\ +- CAT(NAME,_get_elt_at_index),\ +- CAT(NAME,_generic_stat_arch_elt),\ +- CAT(NAME,_update_armap_timestamp) +- boolean (*_bfd_slurp_armap) PARAMS ((bfd *)); +- boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *)); +- boolean (*_bfd_construct_extended_name_table) +- PARAMS ((bfd *, char **, bfd_size_type *, const char **)); +- void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *)); +- boolean (*write_armap) PARAMS ((bfd *arch, +- unsigned int elength, +- struct orl *map, +- unsigned int orl_count, +- int stridx)); +- PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *)); +- bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev)); +- #define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i)) +- bfd * (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex)); +- int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *)); +- boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *)); +- +- /* Entry points used for symbols. */ +- #define BFD_JUMP_TABLE_SYMBOLS(NAME)\ +- CAT(NAME,_get_symtab_upper_bound),\ +- CAT(NAME,_get_symtab),\ +- CAT(NAME,_make_empty_symbol),\ +- CAT(NAME,_print_symbol),\ +- CAT(NAME,_get_symbol_info),\ +- CAT(NAME,_bfd_is_local_label_name),\ +- CAT(NAME,_get_lineno),\ +- CAT(NAME,_find_nearest_line),\ +- CAT(NAME,_bfd_make_debug_symbol),\ +- CAT(NAME,_read_minisymbols),\ +- CAT(NAME,_minisymbol_to_symbol) +- long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *)); +- long (*_bfd_canonicalize_symtab) PARAMS ((bfd *, +- struct symbol_cache_entry **)); +- struct symbol_cache_entry * +- (*_bfd_make_empty_symbol) PARAMS ((bfd *)); +- void (*_bfd_print_symbol) PARAMS ((bfd *, PTR, +- struct symbol_cache_entry *, +- bfd_print_symbol_type)); +- #define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e)) +- void (*_bfd_get_symbol_info) PARAMS ((bfd *, +- struct symbol_cache_entry *, +- symbol_info *)); +- #define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e)) +- boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *)); +- +- alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *)); +- boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd, +- struct sec *section, struct symbol_cache_entry **symbols, +- bfd_vma offset, CONST char **file, CONST char **func, +- unsigned int *line)); +- /* Back-door to allow format-aware applications to create debug symbols +- while using BFD for everything else. Currently used by the assembler +- when creating COFF files. */ +- asymbol * (*_bfd_make_debug_symbol) PARAMS (( +- bfd *abfd, +- void *ptr, +- unsigned long size)); +- #define bfd_read_minisymbols(b, d, m, s) \ +- BFD_SEND (b, _read_minisymbols, (b, d, m, s)) +- long (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *, +- unsigned int *)); +- #define bfd_minisymbol_to_symbol(b, d, m, f) \ +- BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) +- asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR, +- asymbol *)); +- +- /* Routines for relocs. */ +- #define BFD_JUMP_TABLE_RELOCS(NAME)\ +- CAT(NAME,_get_reloc_upper_bound),\ +- CAT(NAME,_canonicalize_reloc),\ +- CAT(NAME,_bfd_reloc_type_lookup) +- long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr)); +- long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, +- struct symbol_cache_entry **)); +- /* See documentation on reloc types. */ +- reloc_howto_type * +- (*reloc_type_lookup) PARAMS ((bfd *abfd, +- bfd_reloc_code_real_type code)); +- +- /* Routines used when writing an object file. */ +- #define BFD_JUMP_TABLE_WRITE(NAME)\ +- CAT(NAME,_set_arch_mach),\ +- CAT(NAME,_set_section_contents) +- boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture, +- unsigned long)); +- boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR, +- file_ptr, bfd_size_type)); +- +- /* Routines used by the linker. */ +- #define BFD_JUMP_TABLE_LINK(NAME)\ +- CAT(NAME,_sizeof_headers),\ +- CAT(NAME,_bfd_get_relocated_section_contents),\ +- CAT(NAME,_bfd_relax_section),\ +- CAT(NAME,_bfd_link_hash_table_create),\ +- CAT(NAME,_bfd_link_add_symbols),\ +- CAT(NAME,_bfd_final_link),\ +- CAT(NAME,_bfd_link_split_section) +- int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean)); +- bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *, +- struct bfd_link_info *, struct bfd_link_order *, +- bfd_byte *data, boolean relocateable, +- struct symbol_cache_entry **)); +- +- boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *, +- struct bfd_link_info *, boolean *again)); +- +- /* Create a hash table for the linker. Different backends store +- different information in this table. */ +- struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *)); +- +- /* Add symbols from this object file into the hash table. */ +- boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *)); +- +- /* Do a link based on the link_order structures attached to each +- section of the BFD. */ +- boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *)); +- +- /* Should this section be split up into smaller pieces during linking. */ +- boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *)); +- +- /* Routines to handle dynamic symbols and relocs. */ +- #define BFD_JUMP_TABLE_DYNAMIC(NAME)\ +- CAT(NAME,_get_dynamic_symtab_upper_bound),\ +- CAT(NAME,_canonicalize_dynamic_symtab),\ +- CAT(NAME,_get_dynamic_reloc_upper_bound),\ +- CAT(NAME,_canonicalize_dynamic_reloc) +- /* Get the amount of memory required to hold the dynamic symbols. */ +- long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *)); +- /* Read in the dynamic symbols. */ +- long (*_bfd_canonicalize_dynamic_symtab) +- PARAMS ((bfd *, struct symbol_cache_entry **)); +- /* Get the amount of memory required to hold the dynamic relocs. */ +- long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *)); +- /* Read in the dynamic relocs. */ +- long (*_bfd_canonicalize_dynamic_reloc) +- PARAMS ((bfd *, arelent **, struct symbol_cache_entry **)); +- Data for use by back-end routines, which isn't generic enough to +-belong in this structure. +- PTR backend_data; +- } bfd_target; +- +-`bfd_set_default_target' +-........................ +- +- *Synopsis* +- boolean bfd_set_default_target (const char *name); +- *Description* +-Set the default target vector to use when recognizing a BFD. This +-takes the name of the target, which may be a BFD target name or a +-configuration triplet. +- +-`bfd_find_target' +-................. +- +- *Synopsis* +- const bfd_target *bfd_find_target(CONST char *target_name, bfd *abfd); +- *Description* +-Return a pointer to the transfer vector for the object target named +-TARGET_NAME. If TARGET_NAME is `NULL', choose the one in the +-environment variable `GNUTARGET'; if that is null or not defined, then +-choose the first entry in the target list. Passing in the string +-"default" or setting the environment variable to "default" will cause +-the first entry in the target list to be returned, and +-"target_defaulted" will be set in the BFD. This causes +-`bfd_check_format' to loop over all the targets to find the one that +-matches the file being read. +- +-`bfd_target_list' +-................. +- +- *Synopsis* +- const char **bfd_target_list(void); +- *Description* +-Return a freshly malloced NULL-terminated vector of the names of all +-the valid BFD targets. Do not modify the names. +- +- +-File: bfd.info, Node: Architectures, Next: Opening and Closing, Prev: Targets, Up: BFD front end +- +-Architectures +-============= +- +- BFD keeps one atom in a BFD describing the architecture of the data +-attached to the BFD: a pointer to a `bfd_arch_info_type'. +- +- Pointers to structures can be requested independently of a BFD so +-that an architecture's information can be interrogated without access +-to an open BFD. +- +- The architecture information is provided by each architecture +-package. The set of default architectures is selected by the macro +-`SELECT_ARCHITECTURES'. This is normally set up in the +-`config/TARGET.mt' file of your choice. If the name is not defined, +-then all the architectures supported are included. +- +- When BFD starts up, all the architectures are called with an +-initialize method. It is up to the architecture back end to insert as +-many items into the list of architectures as it wants to; generally +-this would be one for each machine and one for the default case (an +-item with a machine field of 0). +- +- BFD's idea of an architecture is implemented in `archures.c'. +- +-bfd_architecture +----------------- +- +- *Description* +-This enum gives the object file's CPU architecture, in a global +-sense--i.e., what processor family does it belong to? Another field +-indicates which processor within the family is in use. The machine +-gives a number which distinguishes different versions of the +-architecture, containing, for example, 2 and 3 for Intel i960 KA and +-i960 KB, and 68020 and 68030 for Motorola 68020 and 68030. +- enum bfd_architecture +- { +- bfd_arch_unknown, /* File arch not known */ +- bfd_arch_obscure, /* Arch known, not one of these */ +- bfd_arch_m68k, /* Motorola 68xxx */ +- #define bfd_mach_m68000 1 +- #define bfd_mach_m68008 2 +- #define bfd_mach_m68010 3 +- #define bfd_mach_m68020 4 +- #define bfd_mach_m68030 5 +- #define bfd_mach_m68040 6 +- #define bfd_mach_m68060 7 +- bfd_arch_vax, /* DEC Vax */ +- bfd_arch_i960, /* Intel 960 */ +- /* The order of the following is important. +- lower number indicates a machine type that +- only accepts a subset of the instructions +- available to machines with higher numbers. +- The exception is the "ca", which is +- incompatible with all other machines except +- "core". */ +- +- #define bfd_mach_i960_core 1 +- #define bfd_mach_i960_ka_sa 2 +- #define bfd_mach_i960_kb_sb 3 +- #define bfd_mach_i960_mc 4 +- #define bfd_mach_i960_xa 5 +- #define bfd_mach_i960_ca 6 +- #define bfd_mach_i960_jx 7 +- #define bfd_mach_i960_hx 8 +- +- bfd_arch_a29k, /* AMD 29000 */ +- bfd_arch_sparc, /* SPARC */ +- #define bfd_mach_sparc 1 +- /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ +- #define bfd_mach_sparc_sparclet 2 +- #define bfd_mach_sparc_sparclite 3 +- #define bfd_mach_sparc_v8plus 4 +- #define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */ +- #define bfd_mach_sparc_v9 6 +- #define bfd_mach_sparc_v9a 7 /* with ultrasparc add'ns */ +- /* Nonzero if MACH has the v9 instruction set. */ +- #define bfd_mach_sparc_v9_p(mach) \ +- ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a) +- bfd_arch_mips, /* MIPS Rxxxx */ +- #define bfd_mach_mips3000 3000 +- #define bfd_mach_mips3900 3900 +- #define bfd_mach_mips4000 4000 +- #define bfd_mach_mips4010 4010 +- #define bfd_mach_mips4100 4100 +- #define bfd_mach_mips4300 4300 +- #define bfd_mach_mips4400 4400 +- #define bfd_mach_mips4600 4600 +- #define bfd_mach_mips4650 4650 +- #define bfd_mach_mips5000 5000 +- #define bfd_mach_mips6000 6000 +- #define bfd_mach_mips8000 8000 +- #define bfd_mach_mips10000 10000 +- #define bfd_mach_mips16 16 +- bfd_arch_i386, /* Intel 386 */ +- #define bfd_mach_i386_i386 0 +- #define bfd_mach_i386_i8086 1 +- bfd_arch_we32k, /* AT&T WE32xxx */ +- bfd_arch_tahoe, /* CCI/Harris Tahoe */ +- bfd_arch_i860, /* Intel 860 */ +- bfd_arch_romp, /* IBM ROMP PC/RT */ +- bfd_arch_alliant, /* Alliant */ +- bfd_arch_convex, /* Convex */ +- bfd_arch_m88k, /* Motorola 88xxx */ +- bfd_arch_pyramid, /* Pyramid Technology */ +- bfd_arch_h8300, /* Hitachi H8/300 */ +- #define bfd_mach_h8300 1 +- #define bfd_mach_h8300h 2 +- #define bfd_mach_h8300s 3 +- bfd_arch_powerpc, /* PowerPC */ +- bfd_arch_rs6000, /* IBM RS/6000 */ +- bfd_arch_hppa, /* HP PA RISC */ +- bfd_arch_d10v, /* Mitsubishi D10V */ +- bfd_arch_z8k, /* Zilog Z8000 */ +- #define bfd_mach_z8001 1 +- #define bfd_mach_z8002 2 +- bfd_arch_h8500, /* Hitachi H8/500 */ +- bfd_arch_sh, /* Hitachi SH */ +- #define bfd_mach_sh 0 +- #define bfd_mach_sh3 0x30 +- #define bfd_mach_sh3e 0x3e +- #define bfd_mach_sh4 0x40 +- bfd_arch_alpha, /* Dec Alpha */ +- bfd_arch_arm, /* Advanced Risc Machines ARM */ +- #define bfd_mach_arm_2 1 +- #define bfd_mach_arm_2a 2 +- #define bfd_mach_arm_3 3 +- #define bfd_mach_arm_3M 4 +- #define bfd_mach_arm_4 5 +- #define bfd_mach_arm_4T 6 +- bfd_arch_ns32k, /* National Semiconductors ns32000 */ +- bfd_arch_w65, /* WDC 65816 */ +- bfd_arch_tic30, /* Texas Instruments TMS320C30 */ +- bfd_arch_v850, /* NEC V850 */ +- #define bfd_mach_v850 0 +- bfd_arch_arc, /* Argonaut RISC Core */ +- #define bfd_mach_arc_base 0 +- bfd_arch_m32r, /* Mitsubishi M32R/D */ +- #define bfd_mach_m32r 0 /* backwards compatibility */ +- bfd_arch_mn10200, /* Matsushita MN10200 */ +- bfd_arch_mn10300, /* Matsushita MN10300 */ +- bfd_arch_last +- }; +- +-bfd_arch_info +-------------- +- +- *Description* +-This structure contains information on architectures for use within BFD. +- +- typedef struct bfd_arch_info +- { +- int bits_per_word; +- int bits_per_address; +- int bits_per_byte; +- enum bfd_architecture arch; +- unsigned long mach; +- const char *arch_name; +- const char *printable_name; +- unsigned int section_align_power; +- /* true if this is the default machine for the architecture */ +- boolean the_default; +- const struct bfd_arch_info * (*compatible) +- PARAMS ((const struct bfd_arch_info *a, +- const struct bfd_arch_info *b)); +- +- boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *)); +- +- const struct bfd_arch_info *next; +- } bfd_arch_info_type; +- +-`bfd_printable_name' +-.................... +- +- *Synopsis* +- const char *bfd_printable_name(bfd *abfd); +- *Description* +-Return a printable string representing the architecture and machine +-from the pointer to the architecture info structure. +- +-`bfd_scan_arch' +-............... +- +- *Synopsis* +- const bfd_arch_info_type *bfd_scan_arch(const char *string); +- *Description* +-Figure out if BFD supports any cpu which could be described with the +-name STRING. Return a pointer to an `arch_info' structure if a machine +-is found, otherwise NULL. +- +-`bfd_arch_list' +-............... +- +- *Synopsis* +- const char **bfd_arch_list(void); +- *Description* +-Return a freshly malloced NULL-terminated vector of the names of all +-the valid BFD architectures. Do not modify the names. +- +-`bfd_arch_get_compatible' +-......................... +- +- *Synopsis* +- const bfd_arch_info_type *bfd_arch_get_compatible( +- const bfd *abfd, +- const bfd *bbfd); +- *Description* +-Determine whether two BFDs' architectures and machine types are +-compatible. Calculates the lowest common denominator between the two +-architectures and machine types implied by the BFDs and returns a +-pointer to an `arch_info' structure describing the compatible machine. +- +-`bfd_default_arch_struct' +-......................... +- +- *Description* +-The `bfd_default_arch_struct' is an item of `bfd_arch_info_type' which +-has been initialized to a fairly generic state. A BFD starts life by +-pointing to this structure, until the correct back end has determined +-the real architecture of the file. +- extern const bfd_arch_info_type bfd_default_arch_struct; +- +-`bfd_set_arch_info' +-................... +- +- *Synopsis* +- void bfd_set_arch_info(bfd *abfd, const bfd_arch_info_type *arg); +- *Description* +-Set the architecture info of ABFD to ARG. +- +-`bfd_default_set_arch_mach' +-........................... +- +- *Synopsis* +- boolean bfd_default_set_arch_mach(bfd *abfd, +- enum bfd_architecture arch, +- unsigned long mach); +- *Description* +-Set the architecture and machine type in BFD ABFD to ARCH and MACH. +-Find the correct pointer to a structure and insert it into the +-`arch_info' pointer. +- +-`bfd_get_arch' +-.............. +- +- *Synopsis* +- enum bfd_architecture bfd_get_arch(bfd *abfd); +- *Description* +-Return the enumerated type which describes the BFD ABFD's architecture. +- +-`bfd_get_mach' +-.............. +- +- *Synopsis* +- unsigned long bfd_get_mach(bfd *abfd); +- *Description* +-Return the long type which describes the BFD ABFD's machine. +- +-`bfd_arch_bits_per_byte' +-........................ +- +- *Synopsis* +- unsigned int bfd_arch_bits_per_byte(bfd *abfd); +- *Description* +-Return the number of bits in one of the BFD ABFD's architecture's bytes. +- +-`bfd_arch_bits_per_address' +-........................... +- +- *Synopsis* +- unsigned int bfd_arch_bits_per_address(bfd *abfd); +- *Description* +-Return the number of bits in one of the BFD ABFD's architecture's +-addresses. +- +-`bfd_default_compatible' +-........................ +- +- *Synopsis* +- const bfd_arch_info_type *bfd_default_compatible +- (const bfd_arch_info_type *a, +- const bfd_arch_info_type *b); +- *Description* +-The default function for testing for compatibility. +- +-`bfd_default_scan' +-.................. +- +- *Synopsis* +- boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string); +- *Description* +-The default function for working out whether this is an architecture +-hit and a machine hit. +- +-`bfd_get_arch_info' +-................... +- +- *Synopsis* +- const bfd_arch_info_type * bfd_get_arch_info(bfd *abfd); +- *Description* +-Return the architecture info struct in ABFD. +- +-`bfd_lookup_arch' +-................. +- +- *Synopsis* +- const bfd_arch_info_type *bfd_lookup_arch +- (enum bfd_architecture +- arch, +- unsigned long machine); +- *Description* +-Look for the architecure info structure which matches the arguments +-ARCH and MACHINE. A machine of 0 matches the machine/architecture +-structure which marks itself as the default. +- +-`bfd_printable_arch_mach' +-......................... +- +- *Synopsis* +- const char *bfd_printable_arch_mach +- (enum bfd_architecture arch, unsigned long machine); +- *Description* +-Return a printable string representing the architecture and machine +-type. +- +- This routine is depreciated. +- +- +-File: bfd.info, Node: Opening and Closing, Next: Internal, Prev: Architectures, Up: BFD front end +- +-Opening and closing BFDs +-======================== +- +-`bfd_openr' +-........... +- +- *Synopsis* +- bfd *bfd_openr(CONST char *filename, CONST char *target); +- *Description* +-Open the file FILENAME (using `fopen') with the target TARGET. Return +-a pointer to the created BFD. +- +- Calls `bfd_find_target', so TARGET is interpreted as by that +-function. +- +- If `NULL' is returned then an error has occured. Possible errors +-are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call' +-error. +- +-`bfd_fdopenr' +-............. +- +- *Synopsis* +- bfd *bfd_fdopenr(CONST char *filename, CONST char *target, int fd); +- *Description* +-`bfd_fdopenr' is to `bfd_fopenr' much like `fdopen' is to `fopen'. It +-opens a BFD on a file already described by the FD supplied. +- +- When the file is later `bfd_close'd, the file descriptor will be +-closed. +- +- If the caller desires that this file descriptor be cached by BFD +-(opened as needed, closed as needed to free descriptors for other +-opens), with the supplied FD used as an initial file descriptor (but +-subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the +-returned BFD. The default is to assume no cacheing; the file +-descriptor will remain open until `bfd_close', and will not be affected +-by BFD operations on other files. +- +- Possible errors are `bfd_error_no_memory', +-`bfd_error_invalid_target' and `bfd_error_system_call'. +- +-`bfd_openstreamr' +-................. +- +- *Synopsis* +- bfd *bfd_openstreamr(const char *, const char *, PTR); +- *Description* +-Open a BFD for read access on an existing stdio stream. When the BFD +-is passed to `bfd_close', the stream will be closed. +- +-`bfd_openw' +-........... +- +- *Synopsis* +- bfd *bfd_openw(CONST char *filename, CONST char *target); +- *Description* +-Create a BFD, associated with file FILENAME, using the file format +-TARGET, and return a pointer to it. +- +- Possible errors are `bfd_error_system_call', `bfd_error_no_memory', +-`bfd_error_invalid_target'. +- +-`bfd_close' +-........... +- +- *Synopsis* +- boolean bfd_close(bfd *abfd); +- *Description* +-Close a BFD. If the BFD was open for writing, then pending operations +-are completed and the file written out and closed. If the created file +-is executable, then `chmod' is called to mark it as such. +- +- All memory attached to the BFD is released. +- +- The file descriptor associated with the BFD is closed (even if it +-was passed in to BFD by `bfd_fdopenr'). +- +- *Returns* +-`true' is returned if all is ok, otherwise `false'. +- +-`bfd_close_all_done' +-.................... +- +- *Synopsis* +- boolean bfd_close_all_done(bfd *); +- *Description* +-Close a BFD. Differs from `bfd_close' since it does not complete any +-pending operations. This routine would be used if the application had +-just used BFD for swapping and didn't want to use any of the writing +-code. +- +- If the created file is executable, then `chmod' is called to mark it +-as such. +- +- All memory attached to the BFD is released. +- +- *Returns* +-`true' is returned if all is ok, otherwise `false'. +- +-`bfd_create' +-............ +- +- *Synopsis* +- bfd *bfd_create(CONST char *filename, bfd *templ); +- *Description* +-Create a new BFD in the manner of `bfd_openw', but without opening a +-file. The new BFD takes the target from the target used by TEMPLATE. The +-format is always set to `bfd_object'. +- +-`bfd_alloc' +-........... +- +- *Synopsis* +- PTR bfd_alloc (bfd *abfd, size_t wanted); +- *Description* +-Allocate a block of WANTED bytes of memory attached to `abfd' and +-return a pointer to it. +- +- +-File: bfd.info, Node: Internal, Next: File Caching, Prev: Opening and Closing, Up: BFD front end +- +-Internal functions +-================== +- +- *Description* +-These routines are used within BFD. They are not intended for export, +-but are documented here for completeness. +- +-`bfd_write_bigendian_4byte_int' +-............................... +- +- *Synopsis* +- void bfd_write_bigendian_4byte_int(bfd *abfd, int i); +- *Description* +-Write a 4 byte integer I to the output BFD ABFD, in big endian order +-regardless of what else is going on. This is useful in archives. +- +-`bfd_put_size' +-.............. +- +-`bfd_get_size' +-.............. +- +- *Description* +-These macros as used for reading and writing raw data in sections; each +-access (except for bytes) is vectored through the target format of the +-BFD and mangled accordingly. The mangling performs any necessary endian +-translations and removes alignment restrictions. Note that types +-accepted and returned by these macros are identical so they can be +-swapped around in macros--for example, `libaout.h' defines `GET_WORD' +-to either `bfd_get_32' or `bfd_get_64'. +- +- In the put routines, VAL must be a `bfd_vma'. If we are on a system +-without prototypes, the caller is responsible for making sure that is +-true, with a cast if necessary. We don't cast them in the macro +-definitions because that would prevent `lint' or `gcc -Wall' from +-detecting sins such as passing a pointer. To detect calling these with +-less than a `bfd_vma', use `gcc -Wconversion' on a host with 64 bit +-`bfd_vma''s. +- +- /* Byte swapping macros for user section data. */ +- +- #define bfd_put_8(abfd, val, ptr) \ +- (*((unsigned char *)(ptr)) = (unsigned char)(val)) +- #define bfd_put_signed_8 \ +- bfd_put_8 +- #define bfd_get_8(abfd, ptr) \ +- (*(unsigned char *)(ptr)) +- #define bfd_get_signed_8(abfd, ptr) \ +- ((*(unsigned char *)(ptr) ^ 0x80) - 0x80) +- +- #define bfd_put_16(abfd, val, ptr) \ +- BFD_SEND(abfd, bfd_putx16, ((val),(ptr))) +- #define bfd_put_signed_16 \ +- bfd_put_16 +- #define bfd_get_16(abfd, ptr) \ +- BFD_SEND(abfd, bfd_getx16, (ptr)) +- #define bfd_get_signed_16(abfd, ptr) \ +- BFD_SEND (abfd, bfd_getx_signed_16, (ptr)) +- +- #define bfd_put_32(abfd, val, ptr) \ +- BFD_SEND(abfd, bfd_putx32, ((val),(ptr))) +- #define bfd_put_signed_32 \ +- bfd_put_32 +- #define bfd_get_32(abfd, ptr) \ +- BFD_SEND(abfd, bfd_getx32, (ptr)) +- #define bfd_get_signed_32(abfd, ptr) \ +- BFD_SEND(abfd, bfd_getx_signed_32, (ptr)) +- +- #define bfd_put_64(abfd, val, ptr) \ +- BFD_SEND(abfd, bfd_putx64, ((val), (ptr))) +- #define bfd_put_signed_64 \ +- bfd_put_64 +- #define bfd_get_64(abfd, ptr) \ +- BFD_SEND(abfd, bfd_getx64, (ptr)) +- #define bfd_get_signed_64(abfd, ptr) \ +- BFD_SEND(abfd, bfd_getx_signed_64, (ptr)) +- +-`bfd_h_put_size' +-................ +- +- *Description* +-These macros have the same function as their `bfd_get_x' bretheren, +-except that they are used for removing information for the header +-records of object files. Believe it or not, some object files keep +-their header records in big endian order and their data in little +-endian order. +- +- /* Byte swapping macros for file header data. */ +- +- #define bfd_h_put_8(abfd, val, ptr) \ +- bfd_put_8 (abfd, val, ptr) +- #define bfd_h_put_signed_8(abfd, val, ptr) \ +- bfd_put_8 (abfd, val, ptr) +- #define bfd_h_get_8(abfd, ptr) \ +- bfd_get_8 (abfd, ptr) +- #define bfd_h_get_signed_8(abfd, ptr) \ +- bfd_get_signed_8 (abfd, ptr) +- +- #define bfd_h_put_16(abfd, val, ptr) \ +- BFD_SEND(abfd, bfd_h_putx16,(val,ptr)) +- #define bfd_h_put_signed_16 \ +- bfd_h_put_16 +- #define bfd_h_get_16(abfd, ptr) \ +- BFD_SEND(abfd, bfd_h_getx16,(ptr)) +- #define bfd_h_get_signed_16(abfd, ptr) \ +- BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr)) +- +- #define bfd_h_put_32(abfd, val, ptr) \ +- BFD_SEND(abfd, bfd_h_putx32,(val,ptr)) +- #define bfd_h_put_signed_32 \ +- bfd_h_put_32 +- #define bfd_h_get_32(abfd, ptr) \ +- BFD_SEND(abfd, bfd_h_getx32,(ptr)) +- #define bfd_h_get_signed_32(abfd, ptr) \ +- BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr)) +- +- #define bfd_h_put_64(abfd, val, ptr) \ +- BFD_SEND(abfd, bfd_h_putx64,(val, ptr)) +- #define bfd_h_put_signed_64 \ +- bfd_h_put_64 +- #define bfd_h_get_64(abfd, ptr) \ +- BFD_SEND(abfd, bfd_h_getx64,(ptr)) +- #define bfd_h_get_signed_64(abfd, ptr) \ +- BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr)) +- +-`bfd_log2' +-.......... +- +- *Synopsis* +- unsigned int bfd_log2(bfd_vma x); +- *Description* +-Return the log base 2 of the value supplied, rounded up. E.g., an X of +-1025 returns 11. +- +- +-File: bfd.info, Node: File Caching, Next: Linker Functions, Prev: Internal, Up: BFD front end +- +-File caching +-============ +- +- The file caching mechanism is embedded within BFD and allows the +-application to open as many BFDs as it wants without regard to the +-underlying operating system's file descriptor limit (often as low as 20 +-open files). The module in `cache.c' maintains a least recently used +-list of `BFD_CACHE_MAX_OPEN' files, and exports the name +-`bfd_cache_lookup', which runs around and makes sure that the required +-BFD is open. If not, then it chooses a file to close, closes it and +-opens the one wanted, returning its file handle. +- +-`BFD_CACHE_MAX_OPEN macro' +-.......................... +- +- *Description* +-The maximum number of files which the cache will keep open at one time. +- #define BFD_CACHE_MAX_OPEN 10 +- +-`bfd_last_cache' +-................ +- +- *Synopsis* +- extern bfd *bfd_last_cache; +- *Description* +-Zero, or a pointer to the topmost BFD on the chain. This is used by +-the `bfd_cache_lookup' macro in `libbfd.h' to determine when it can +-avoid a function call. +- +-`bfd_cache_lookup' +-.................. +- +- *Description* +-Check to see if the required BFD is the same as the last one looked up. +-If so, then it can use the stream in the BFD with impunity, since it +-can't have changed since the last lookup; otherwise, it has to perform +-the complicated lookup function. +- #define bfd_cache_lookup(x) \ +- ((x)==bfd_last_cache? \ +- (FILE*)(bfd_last_cache->iostream): \ +- bfd_cache_lookup_worker(x)) +- +-`bfd_cache_init' +-................ +- +- *Synopsis* +- boolean bfd_cache_init (bfd *abfd); +- *Description* +-Add a newly opened BFD to the cache. +- +-`bfd_cache_close' +-................. +- +- *Synopsis* +- boolean bfd_cache_close (bfd *abfd); +- *Description* +-Remove the BFD ABFD from the cache. If the attached file is open, then +-close it too. +- +- *Returns* +-`false' is returned if closing the file fails, `true' is returned if +-all is well. +- +-`bfd_open_file' +-............... +- +- *Synopsis* +- FILE* bfd_open_file(bfd *abfd); +- *Description* +-Call the OS to open a file for ABFD. Return the `FILE *' (possibly +-`NULL') that results from this operation. Set up the BFD so that +-future accesses know the file is open. If the `FILE *' returned is +-`NULL', then it won't have been put in the cache, so it won't have to +-be removed from it. +- +-`bfd_cache_lookup_worker' +-......................... +- +- *Synopsis* +- FILE *bfd_cache_lookup_worker(bfd *abfd); +- *Description* +-Called when the macro `bfd_cache_lookup' fails to find a quick answer. +-Find a file descriptor for ABFD. If necessary, it open it. If there +-are already more than `BFD_CACHE_MAX_OPEN' files open, it tries to +-close one first, to avoid running out of file descriptors. +- +- +-File: bfd.info, Node: Linker Functions, Next: Hash Tables, Prev: File Caching, Up: BFD front end +- +-Linker Functions +-================ +- +- The linker uses three special entry points in the BFD target vector. +-It is not necessary to write special routines for these entry points +-when creating a new BFD back end, since generic versions are provided. +-However, writing them can speed up linking and make it use +-significantly less runtime memory. +- +- The first routine creates a hash table used by the other routines. +-The second routine adds the symbols from an object file to the hash +-table. The third routine takes all the object files and links them +-together to create the output file. These routines are designed so +-that the linker proper does not need to know anything about the symbols +-in the object files that it is linking. The linker merely arranges the +-sections as directed by the linker script and lets BFD handle the +-details of symbols and relocs. +- +- The second routine and third routines are passed a pointer to a +-`struct bfd_link_info' structure (defined in `bfdlink.h') which holds +-information relevant to the link, including the linker hash table +-(which was created by the first routine) and a set of callback +-functions to the linker proper. +- +- The generic linker routines are in `linker.c', and use the header +-file `genlink.h'. As of this writing, the only back ends which have +-implemented versions of these routines are a.out (in `aoutx.h') and +-ECOFF (in `ecoff.c'). The a.out routines are used as examples +-throughout this section. +- +-* Menu: +- +-* Creating a Linker Hash Table:: +-* Adding Symbols to the Hash Table:: +-* Performing the Final Link:: +- +- +-File: bfd.info, Node: Creating a Linker Hash Table, Next: Adding Symbols to the Hash Table, Prev: Linker Functions, Up: Linker Functions +- +-Creating a linker hash table +----------------------------- +- +- The linker routines must create a hash table, which must be derived +-from `struct bfd_link_hash_table' described in `bfdlink.c'. *Note Hash +-Tables:: for information on how to create a derived hash table. This +-entry point is called using the target vector of the linker output file. +- +- The `_bfd_link_hash_table_create' entry point must allocate and +-initialize an instance of the desired hash table. If the back end does +-not require any additional information to be stored with the entries in +-the hash table, the entry point may simply create a `struct +-bfd_link_hash_table'. Most likely, however, some additional +-information will be needed. +- +- For example, with each entry in the hash table the a.out linker +-keeps the index the symbol has in the final output file (this index +-number is used so that when doing a relocateable link the symbol index +-used in the output file can be quickly filled in when copying over a +-reloc). The a.out linker code defines the required structures and +-functions for a hash table derived from `struct bfd_link_hash_table'. +-The a.out linker hash table is created by the function +-`NAME(aout,link_hash_table_create)'; it simply allocates space for the +-hash table, initializes it, and returns a pointer to it. +- +- When writing the linker routines for a new back end, you will +-generally not know exactly which fields will be required until you have +-finished. You should simply create a new hash table which defines no +-additional fields, and then simply add fields as they become necessary. +- +- +-File: bfd.info, Node: Adding Symbols to the Hash Table, Next: Performing the Final Link, Prev: Creating a Linker Hash Table, Up: Linker Functions +- +-Adding symbols to the hash table +--------------------------------- +- +- The linker proper will call the `_bfd_link_add_symbols' entry point +-for each object file or archive which is to be linked (typically these +-are the files named on the command line, but some may also come from +-the linker script). The entry point is responsible for examining the +-file. For an object file, BFD must add any relevant symbol information +-to the hash table. For an archive, BFD must determine which elements +-of the archive should be used and adding them to the link. +- +- The a.out version of this entry point is +-`NAME(aout,link_add_symbols)'. +- +-* Menu: +- +-* Differing file formats:: +-* Adding symbols from an object file:: +-* Adding symbols from an archive:: +- +- +-File: bfd.info, Node: Differing file formats, Next: Adding symbols from an object file, Prev: Adding Symbols to the Hash Table, Up: Adding Symbols to the Hash Table +- +-Differing file formats +-...................... +- +- Normally all the files involved in a link will be of the same +-format, but it is also possible to link together different format +-object files, and the back end must support that. The +-`_bfd_link_add_symbols' entry point is called via the target vector of +-the file to be added. This has an important consequence: the function +-may not assume that the hash table is the type created by the +-corresponding `_bfd_link_hash_table_create' vector. All the +-`_bfd_link_add_symbols' function can assume about the hash table is +-that it is derived from `struct bfd_link_hash_table'. +- +- Sometimes the `_bfd_link_add_symbols' function must store some +-information in the hash table entry to be used by the `_bfd_final_link' +-function. In such a case the `creator' field of the hash table must be +-checked to make sure that the hash table was created by an object file +-of the same format. +- +- The `_bfd_final_link' routine must be prepared to handle a hash +-entry without any extra information added by the +-`_bfd_link_add_symbols' function. A hash entry without extra +-information will also occur when the linker script directs the linker +-to create a symbol. Note that, regardless of how a hash table entry is +-added, all the fields will be initialized to some sort of null value by +-the hash table entry initialization function. +- +- See `ecoff_link_add_externals' for an example of how to check the +-`creator' field before saving information (in this case, the ECOFF +-external symbol debugging information) in a hash table entry. +- +- +-File: bfd.info, Node: Adding symbols from an object file, Next: Adding symbols from an archive, Prev: Differing file formats, Up: Adding Symbols to the Hash Table +- +-Adding symbols from an object file +-.................................. +- +- When the `_bfd_link_add_symbols' routine is passed an object file, +-it must add all externally visible symbols in that object file to the +-hash table. The actual work of adding the symbol to the hash table is +-normally handled by the function `_bfd_generic_link_add_one_symbol'. +-The `_bfd_link_add_symbols' routine is responsible for reading all the +-symbols from the object file and passing the correct information to +-`_bfd_generic_link_add_one_symbol'. +- +- The `_bfd_link_add_symbols' routine should not use +-`bfd_canonicalize_symtab' to read the symbols. The point of providing +-this routine is to avoid the overhead of converting the symbols into +-generic `asymbol' structures. +- +- `_bfd_generic_link_add_one_symbol' handles the details of combining +-common symbols, warning about multiple definitions, and so forth. It +-takes arguments which describe the symbol to add, notably symbol flags, +-a section, and an offset. The symbol flags include such things as +-`BSF_WEAK' or `BSF_INDIRECT'. The section is a section in the object +-file, or something like `bfd_und_section_ptr' for an undefined symbol +-or `bfd_com_section_ptr' for a common symbol. +- +- If the `_bfd_final_link' routine is also going to need to read the +-symbol information, the `_bfd_link_add_symbols' routine should save it +-somewhere attached to the object file BFD. However, the information +-should only be saved if the `keep_memory' field of the `info' argument +-is true, so that the `-no-keep-memory' linker switch is effective. +- +- The a.out function which adds symbols from an object file is +-`aout_link_add_object_symbols', and most of the interesting work is in +-`aout_link_add_symbols'. The latter saves pointers to the hash tables +-entries created by `_bfd_generic_link_add_one_symbol' indexed by symbol +-number, so that the `_bfd_final_link' routine does not have to call the +-hash table lookup routine to locate the entry. +- +diff -rup --new-file binutils-2.9.1/bfd/doc/bfd.info-5 binutils-2.9.1/bfd/doc/bfd.info-5 +--- binutils-2.9.1/bfd/doc/bfd.info-5 Fri May 1 08:48:03 1998 ++++ binutils-2.9.1/bfd/doc/bfd.info-5 Wed Dec 31 17:00:00 1969 +@@ -1,663 +0,0 @@ +-This is Info file bfd.info, produced by Makeinfo version 1.68 from the +-input file bfd.texinfo. +- +-START-INFO-DIR-ENTRY +-* Bfd: (bfd). The Binary File Descriptor library. +-END-INFO-DIR-ENTRY +- +- This file documents the BFD library. +- +- Copyright (C) 1991 Free Software Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, subject to the +-terms of the GNU General Public License, which includes the provision +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: bfd.info, Node: Adding symbols from an archive, Prev: Adding symbols from an object file, Up: Adding Symbols to the Hash Table +- +-Adding symbols from an archive +-.............................. +- +- When the `_bfd_link_add_symbols' routine is passed an archive, it +-must look through the symbols defined by the archive and decide which +-elements of the archive should be included in the link. For each such +-element it must call the `add_archive_element' linker callback, and it +-must add the symbols from the object file to the linker hash table. +- +- In most cases the work of looking through the symbols in the archive +-should be done by the `_bfd_generic_link_add_archive_symbols' function. +-This function builds a hash table from the archive symbol table and +-looks through the list of undefined symbols to see which elements +-should be included. `_bfd_generic_link_add_archive_symbols' is passed +-a function to call to make the final decision about adding an archive +-element to the link and to do the actual work of adding the symbols to +-the linker hash table. +- +- The function passed to `_bfd_generic_link_add_archive_symbols' must +-read the symbols of the archive element and decide whether the archive +-element should be included in the link. If the element is to be +-included, the `add_archive_element' linker callback routine must be +-called with the element as an argument, and the elements symbols must +-be added to the linker hash table just as though the element had itself +-been passed to the `_bfd_link_add_symbols' function. +- +- When the a.out `_bfd_link_add_symbols' function receives an archive, +-it calls `_bfd_generic_link_add_archive_symbols' passing +-`aout_link_check_archive_element' as the function argument. +-`aout_link_check_archive_element' calls `aout_link_check_ar_symbols'. +-If the latter decides to add the element (an element is only added if +-it provides a real, non-common, definition for a previously undefined +-or common symbol) it calls the `add_archive_element' callback and then +-`aout_link_check_archive_element' calls `aout_link_add_symbols' to +-actually add the symbols to the linker hash table. +- +- The ECOFF back end is unusual in that it does not normally call +-`_bfd_generic_link_add_archive_symbols', because ECOFF archives already +-contain a hash table of symbols. The ECOFF back end searches the +-archive itself to avoid the overhead of creating a new hash table. +- +- +-File: bfd.info, Node: Performing the Final Link, Prev: Adding Symbols to the Hash Table, Up: Linker Functions +- +-Performing the final link +-------------------------- +- +- When all the input files have been processed, the linker calls the +-`_bfd_final_link' entry point of the output BFD. This routine is +-responsible for producing the final output file, which has several +-aspects. It must relocate the contents of the input sections and copy +-the data into the output sections. It must build an output symbol +-table including any local symbols from the input files and the global +-symbols from the hash table. When producing relocateable output, it +-must modify the input relocs and write them into the output file. +-There may also be object format dependent work to be done. +- +- The linker will also call the `write_object_contents' entry point +-when the BFD is closed. The two entry points must work together in +-order to produce the correct output file. +- +- The details of how this works are inevitably dependent upon the +-specific object file format. The a.out `_bfd_final_link' routine is +-`NAME(aout,final_link)'. +- +-* Menu: +- +-* Information provided by the linker:: +-* Relocating the section contents:: +-* Writing the symbol table:: +- +- +-File: bfd.info, Node: Information provided by the linker, Next: Relocating the section contents, Prev: Performing the Final Link, Up: Performing the Final Link +- +-Information provided by the linker +-.................................. +- +- Before the linker calls the `_bfd_final_link' entry point, it sets +-up some data structures for the function to use. +- +- The `input_bfds' field of the `bfd_link_info' structure will point +-to a list of all the input files included in the link. These files are +-linked through the `link_next' field of the `bfd' structure. +- +- Each section in the output file will have a list of `link_order' +-structures attached to the `link_order_head' field (the `link_order' +-structure is defined in `bfdlink.h'). These structures describe how to +-create the contents of the output section in terms of the contents of +-various input sections, fill constants, and, eventually, other types of +-information. They also describe relocs that must be created by the BFD +-backend, but do not correspond to any input file; this is used to +-support -Ur, which builds constructors while generating a relocateable +-object file. +- +- +-File: bfd.info, Node: Relocating the section contents, Next: Writing the symbol table, Prev: Information provided by the linker, Up: Performing the Final Link +- +-Relocating the section contents +-............................... +- +- The `_bfd_final_link' function should look through the `link_order' +-structures attached to each section of the output file. Each +-`link_order' structure should either be handled specially, or it should +-be passed to the function `_bfd_default_link_order' which will do the +-right thing (`_bfd_default_link_order' is defined in `linker.c'). +- +- For efficiency, a `link_order' of type `bfd_indirect_link_order' +-whose associated section belongs to a BFD of the same format as the +-output BFD must be handled specially. This type of `link_order' +-describes part of an output section in terms of a section belonging to +-one of the input files. The `_bfd_final_link' function should read the +-contents of the section and any associated relocs, apply the relocs to +-the section contents, and write out the modified section contents. If +-performing a relocateable link, the relocs themselves must also be +-modified and written out. +- +- The functions `_bfd_relocate_contents' and +-`_bfd_final_link_relocate' provide some general support for performing +-the actual relocations, notably overflow checking. Their arguments +-include information about the symbol the relocation is against and a +-`reloc_howto_type' argument which describes the relocation to perform. +-These functions are defined in `reloc.c'. +- +- The a.out function which handles reading, relocating, and writing +-section contents is `aout_link_input_section'. The actual relocation +-is done in `aout_link_input_section_std' and +-`aout_link_input_section_ext'. +- +- +-File: bfd.info, Node: Writing the symbol table, Prev: Relocating the section contents, Up: Performing the Final Link +- +-Writing the symbol table +-........................ +- +- The `_bfd_final_link' function must gather all the symbols in the +-input files and write them out. It must also write out all the symbols +-in the global hash table. This must be controlled by the `strip' and +-`discard' fields of the `bfd_link_info' structure. +- +- The local symbols of the input files will not have been entered into +-the linker hash table. The `_bfd_final_link' routine must consider +-each input file and include the symbols in the output file. It may be +-convenient to do this when looking through the `link_order' structures, +-or it may be done by stepping through the `input_bfds' list. +- +- The `_bfd_final_link' routine must also traverse the global hash +-table to gather all the externally visible symbols. It is possible +-that most of the externally visible symbols may be written out when +-considering the symbols of each input file, but it is still necessary +-to traverse the hash table since the linker script may have defined +-some symbols that are not in any of the input files. +- +- The `strip' field of the `bfd_link_info' structure controls which +-symbols are written out. The possible values are listed in +-`bfdlink.h'. If the value is `strip_some', then the `keep_hash' field +-of the `bfd_link_info' structure is a hash table of symbols to keep; +-each symbol should be looked up in this hash table, and only symbols +-which are present should be included in the output file. +- +- If the `strip' field of the `bfd_link_info' structure permits local +-symbols to be written out, the `discard' field is used to further +-controls which local symbols are included in the output file. If the +-value is `discard_l', then all local symbols which begin with a certain +-prefix are discarded; this is controlled by the +-`bfd_is_local_label_name' entry point. +- +- The a.out backend handles symbols by calling +-`aout_link_write_symbols' on each input BFD and then traversing the +-global hash table with the function `aout_link_write_other_symbol'. It +-builds a string table while writing out the symbols, which is written +-to the output file at the end of `NAME(aout,final_link)'. +- +-`bfd_link_split_section' +-........................ +- +- *Synopsis* +- boolean bfd_link_split_section(bfd *abfd, asection *sec); +- *Description* +-Return nonzero if SEC should be split during a reloceatable or final +-link. +- #define bfd_link_split_section(abfd, sec) \ +- BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) +- +- +-File: bfd.info, Node: Hash Tables, Prev: Linker Functions, Up: BFD front end +- +-Hash Tables +-=========== +- +- BFD provides a simple set of hash table functions. Routines are +-provided to initialize a hash table, to free a hash table, to look up a +-string in a hash table and optionally create an entry for it, and to +-traverse a hash table. There is currently no routine to delete an +-string from a hash table. +- +- The basic hash table does not permit any data to be stored with a +-string. However, a hash table is designed to present a base class from +-which other types of hash tables may be derived. These derived types +-may store additional information with the string. Hash tables were +-implemented in this way, rather than simply providing a data pointer in +-a hash table entry, because they were designed for use by the linker +-back ends. The linker may create thousands of hash table entries, and +-the overhead of allocating private data and storing and following +-pointers becomes noticeable. +- +- The basic hash table code is in `hash.c'. +- +-* Menu: +- +-* Creating and Freeing a Hash Table:: +-* Looking Up or Entering a String:: +-* Traversing a Hash Table:: +-* Deriving a New Hash Table Type:: +- +- +-File: bfd.info, Node: Creating and Freeing a Hash Table, Next: Looking Up or Entering a String, Prev: Hash Tables, Up: Hash Tables +- +-Creating and freeing a hash table +---------------------------------- +- +- To create a hash table, create an instance of a `struct +-bfd_hash_table' (defined in `bfd.h') and call `bfd_hash_table_init' (if +-you know approximately how many entries you will need, the function +-`bfd_hash_table_init_n', which takes a SIZE argument, may be used). +-`bfd_hash_table_init' returns `false' if some sort of error occurs. +- +- The function `bfd_hash_table_init' take as an argument a function to +-use to create new entries. For a basic hash table, use the function +-`bfd_hash_newfunc'. *Note Deriving a New Hash Table Type:: for why you +-would want to use a different value for this argument. +- +- `bfd_hash_table_init' will create an objalloc which will be used to +-allocate new entries. You may allocate memory on this objalloc using +-`bfd_hash_allocate'. +- +- Use `bfd_hash_table_free' to free up all the memory that has been +-allocated for a hash table. This will not free up the `struct +-bfd_hash_table' itself, which you must provide. +- +- +-File: bfd.info, Node: Looking Up or Entering a String, Next: Traversing a Hash Table, Prev: Creating and Freeing a Hash Table, Up: Hash Tables +- +-Looking up or entering a string +-------------------------------- +- +- The function `bfd_hash_lookup' is used both to look up a string in +-the hash table and to create a new entry. +- +- If the CREATE argument is `false', `bfd_hash_lookup' will look up a +-string. If the string is found, it will returns a pointer to a `struct +-bfd_hash_entry'. If the string is not found in the table +-`bfd_hash_lookup' will return `NULL'. You should not modify any of the +-fields in the returns `struct bfd_hash_entry'. +- +- If the CREATE argument is `true', the string will be entered into +-the hash table if it is not already there. Either way a pointer to a +-`struct bfd_hash_entry' will be returned, either to the existing +-structure or to a newly created one. In this case, a `NULL' return +-means that an error occurred. +- +- If the CREATE argument is `true', and a new entry is created, the +-COPY argument is used to decide whether to copy the string onto the +-hash table objalloc or not. If COPY is passed as `false', you must be +-careful not to deallocate or modify the string as long as the hash table +-exists. +- +- +-File: bfd.info, Node: Traversing a Hash Table, Next: Deriving a New Hash Table Type, Prev: Looking Up or Entering a String, Up: Hash Tables +- +-Traversing a hash table +------------------------ +- +- The function `bfd_hash_traverse' may be used to traverse a hash +-table, calling a function on each element. The traversal is done in a +-random order. +- +- `bfd_hash_traverse' takes as arguments a function and a generic +-`void *' pointer. The function is called with a hash table entry (a +-`struct bfd_hash_entry *') and the generic pointer passed to +-`bfd_hash_traverse'. The function must return a `boolean' value, which +-indicates whether to continue traversing the hash table. If the +-function returns `false', `bfd_hash_traverse' will stop the traversal +-and return immediately. +- +- +-File: bfd.info, Node: Deriving a New Hash Table Type, Prev: Traversing a Hash Table, Up: Hash Tables +- +-Deriving a new hash table type +------------------------------- +- +- Many uses of hash tables want to store additional information which +-each entry in the hash table. Some also find it convenient to store +-additional information with the hash table itself. This may be done +-using a derived hash table. +- +- Since C is not an object oriented language, creating a derived hash +-table requires sticking together some boilerplate routines with a few +-differences specific to the type of hash table you want to create. +- +- An example of a derived hash table is the linker hash table. The +-structures for this are defined in `bfdlink.h'. The functions are in +-`linker.c'. +- +- You may also derive a hash table from an already derived hash table. +-For example, the a.out linker backend code uses a hash table derived +-from the linker hash table. +- +-* Menu: +- +-* Define the Derived Structures:: +-* Write the Derived Creation Routine:: +-* Write Other Derived Routines:: +- +- +-File: bfd.info, Node: Define the Derived Structures, Next: Write the Derived Creation Routine, Prev: Deriving a New Hash Table Type, Up: Deriving a New Hash Table Type +- +-Define the derived structures +-............................. +- +- You must define a structure for an entry in the hash table, and a +-structure for the hash table itself. +- +- The first field in the structure for an entry in the hash table must +-be of the type used for an entry in the hash table you are deriving +-from. If you are deriving from a basic hash table this is `struct +-bfd_hash_entry', which is defined in `bfd.h'. The first field in the +-structure for the hash table itself must be of the type of the hash +-table you are deriving from itself. If you are deriving from a basic +-hash table, this is `struct bfd_hash_table'. +- +- For example, the linker hash table defines `struct +-bfd_link_hash_entry' (in `bfdlink.h'). The first field, `root', is of +-type `struct bfd_hash_entry'. Similarly, the first field in `struct +-bfd_link_hash_table', `table', is of type `struct bfd_hash_table'. +- +- +-File: bfd.info, Node: Write the Derived Creation Routine, Next: Write Other Derived Routines, Prev: Define the Derived Structures, Up: Deriving a New Hash Table Type +- +-Write the derived creation routine +-.................................. +- +- You must write a routine which will create and initialize an entry +-in the hash table. This routine is passed as the function argument to +-`bfd_hash_table_init'. +- +- In order to permit other hash tables to be derived from the hash +-table you are creating, this routine must be written in a standard way. +- +- The first argument to the creation routine is a pointer to a hash +-table entry. This may be `NULL', in which case the routine should +-allocate the right amount of space. Otherwise the space has already +-been allocated by a hash table type derived from this one. +- +- After allocating space, the creation routine must call the creation +-routine of the hash table type it is derived from, passing in a pointer +-to the space it just allocated. This will initialize any fields used +-by the base hash table. +- +- Finally the creation routine must initialize any local fields for +-the new hash table type. +- +- Here is a boilerplate example of a creation routine. FUNCTION_NAME +-is the name of the routine. ENTRY_TYPE is the type of an entry in the +-hash table you are creating. BASE_NEWFUNC is the name of the creation +-routine of the hash table type your hash table is derived from. +- +- struct bfd_hash_entry * +- FUNCTION_NAME (entry, table, string) +- struct bfd_hash_entry *entry; +- struct bfd_hash_table *table; +- const char *string; +- { +- struct ENTRY_TYPE *ret = (ENTRY_TYPE *) entry; +- +- /* Allocate the structure if it has not already been allocated by a +- derived class. */ +- if (ret == (ENTRY_TYPE *) NULL) +- { +- ret = ((ENTRY_TYPE *) +- bfd_hash_allocate (table, sizeof (ENTRY_TYPE))); +- if (ret == (ENTRY_TYPE *) NULL) +- return NULL; +- } +- +- /* Call the allocation method of the base class. */ +- ret = ((ENTRY_TYPE *) +- BASE_NEWFUNC ((struct bfd_hash_entry *) ret, table, string)); +- +- /* Initialize the local fields here. */ +- +- return (struct bfd_hash_entry *) ret; +- } +- *Description* +-The creation routine for the linker hash table, which is in `linker.c', +-looks just like this example. FUNCTION_NAME is +-`_bfd_link_hash_newfunc'. ENTRY_TYPE is `struct bfd_link_hash_entry'. +-BASE_NEWFUNC is `bfd_hash_newfunc', the creation routine for a basic +-hash table. +- +- `_bfd_link_hash_newfunc' also initializes the local fields in a +-linker hash table entry: `type', `written' and `next'. +- +- +-File: bfd.info, Node: Write Other Derived Routines, Prev: Write the Derived Creation Routine, Up: Deriving a New Hash Table Type +- +-Write other derived routines +-............................ +- +- You will want to write other routines for your new hash table, as +-well. +- +- You will want an initialization routine which calls the +-initialization routine of the hash table you are deriving from and +-initializes any other local fields. For the linker hash table, this is +-`_bfd_link_hash_table_init' in `linker.c'. +- +- You will want a lookup routine which calls the lookup routine of the +-hash table you are deriving from and casts the result. The linker hash +-table uses `bfd_link_hash_lookup' in `linker.c' (this actually takes an +-additional argument which it uses to decide how to return the looked up +-value). +- +- You may want a traversal routine. This should just call the +-traversal routine of the hash table you are deriving from with +-appropriate casts. The linker hash table uses `bfd_link_hash_traverse' +-in `linker.c'. +- +- These routines may simply be defined as macros. For example, the +-a.out backend linker hash table, which is derived from the linker hash +-table, uses macros for the lookup and traversal routines. These are +-`aout_link_hash_lookup' and `aout_link_hash_traverse' in aoutx.h. +- +- +-File: bfd.info, Node: BFD back ends, Next: Index, Prev: BFD front end, Up: Top +- +-BFD back ends +-************* +- +-* Menu: +- +-* What to Put Where:: +-* aout :: a.out backends +-* coff :: coff backends +-* elf :: elf backends +- +- +-File: bfd.info, Node: What to Put Where, Next: aout, Prev: BFD back ends, Up: BFD back ends +- +- All of BFD lives in one directory. +- +- +-File: bfd.info, Node: aout, Next: coff, Prev: What to Put Where, Up: BFD back ends +- +-a.out backends +-============== +- +- *Description* +-BFD supports a number of different flavours of a.out format, though the +-major differences are only the sizes of the structures on disk, and the +-shape of the relocation information. +- +- The support is split into a basic support file `aoutx.h' and other +-files which derive functions from the base. One derivation file is +-`aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions +-support for sun3, sun4, 386 and 29k a.out files, to create a target +-jump vector for a specific target. +- +- This information is further split out into more specific files for +-each machine, including `sunos.c' for sun3 and sun4, `newsos3.c' for +-the Sony NEWS, and `demo64.c' for a demonstration of a 64 bit a.out +-format. +- +- The base file `aoutx.h' defines general mechanisms for reading and +-writing records to and from disk and various other methods which BFD +-requires. It is included by `aout32.c' and `aout64.c' to form the names +-`aout_32_swap_exec_header_in', `aout_64_swap_exec_header_in', etc. +- +- As an example, this is what goes on to make the back end for a sun4, +-from `aout32.c': +- +- #define ARCH_SIZE 32 +- #include "aoutx.h" +- +- Which exports names: +- +- ... +- aout_32_canonicalize_reloc +- aout_32_find_nearest_line +- aout_32_get_lineno +- aout_32_get_reloc_upper_bound +- ... +- +- from `sunos.c': +- +- #define TARGET_NAME "a.out-sunos-big" +- #define VECNAME sunos_big_vec +- #include "aoutf1.h" +- +- requires all the names from `aout32.c', and produces the jump vector +- +- sunos_big_vec +- +- The file `host-aout.c' is a special case. It is for a large set of +-hosts that use "more or less standard" a.out files, and for which +-cross-debugging is not interesting. It uses the standard 32-bit a.out +-support routines, but determines the file offsets and addresses of the +-text, data, and BSS sections, the machine architecture and machine +-type, and the entry point address, in a host-dependent manner. Once +-these values have been determined, generic code is used to handle the +-object file. +- +- When porting it to run on a new system, you must supply: +- +- HOST_PAGE_SIZE +- HOST_SEGMENT_SIZE +- HOST_MACHINE_ARCH (optional) +- HOST_MACHINE_MACHINE (optional) +- HOST_TEXT_START_ADDR +- HOST_STACK_END_ADDR +- +- in the file `../include/sys/h-XXX.h' (for your host). These values, +-plus the structures and macros defined in `a.out.h' on your host +-system, will produce a BFD target that will access ordinary a.out files +-on your host. To configure a new machine to use `host-aout.c', specify: +- +- TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec +- TDEPFILES= host-aout.o trad-core.o +- +- in the `config/XXX.mt' file, and modify `configure.in' to use the +-`XXX.mt' file (by setting "`bfd_target=XXX'") when your configuration +-is selected. +- +-Relocations +------------ +- +- *Description* +-The file `aoutx.h' provides for both the *standard* and *extended* +-forms of a.out relocation records. +- +- The standard records contain only an address, a symbol index, and a +-type field. The extended records (used on 29ks and sparcs) also have a +-full integer for an addend. +- +-Internal entry points +---------------------- +- +- *Description* +-`aoutx.h' exports several routines for accessing the contents of an +-a.out file, which are gathered and exported in turn by various format +-specific files (eg sunos.c). +- +-`aout_SIZE_swap_exec_header_in' +-............................... +- +- *Synopsis* +- void aout_SIZE_swap_exec_header_in, +- (bfd *abfd, +- struct external_exec *raw_bytes, +- struct internal_exec *execp); +- *Description* +-Swap the information in an executable header RAW_BYTES taken from a raw +-byte stream memory image into the internal exec header structure EXECP. +- +-`aout_SIZE_swap_exec_header_out' +-................................ +- +- *Synopsis* +- void aout_SIZE_swap_exec_header_out +- (bfd *abfd, +- struct internal_exec *execp, +- struct external_exec *raw_bytes); +- *Description* +-Swap the information in an internal exec header structure EXECP into +-the buffer RAW_BYTES ready for writing to disk. +- +-`aout_SIZE_some_aout_object_p' +-.............................. +- +- *Synopsis* +- const bfd_target *aout_SIZE_some_aout_object_p +- (bfd *abfd, +- const bfd_target *(*callback_to_real_object_p)()); +- *Description* +-Some a.out variant thinks that the file open in ABFD checking is an +-a.out file. Do some more checking, and set up for access if it really +-is. Call back to the calling environment's "finish up" function just +-before returning, to handle any last-minute setup. +- +-`aout_SIZE_mkobject' +-.................... +- +- *Synopsis* +- boolean aout_SIZE_mkobject, (bfd *abfd); +- *Description* +-Initialize BFD ABFD for use with a.out files. +- +-`aout_SIZE_machine_type' +-........................ +- +- *Synopsis* +- enum machine_type aout_SIZE_machine_type +- (enum bfd_architecture arch, +- unsigned long machine)); +- *Description* +-Keep track of machine architecture and machine type for a.out's. Return +-the `machine_type' for a particular architecture and machine, or +-`M_UNKNOWN' if that exact architecture and machine can't be represented +-in a.out format. +- +- If the architecture is understood, machine type 0 (default) is +-always understood. +- +-`aout_SIZE_set_arch_mach' +-......................... +- +- *Synopsis* +- boolean aout_SIZE_set_arch_mach, +- (bfd *, +- enum bfd_architecture arch, +- unsigned long machine)); +- *Description* +-Set the architecture and the machine of the BFD ABFD to the values ARCH +-and MACHINE. Verify that ABFD's format can support the architecture +-required. +- +-`aout_SIZE_new_section_hook' +-............................ +- +- *Synopsis* +- boolean aout_SIZE_new_section_hook, +- (bfd *abfd, +- asection *newsect)); +- *Description* +-Called by the BFD in response to a `bfd_make_section' request. +- +diff -rup --new-file binutils-2.9.1/bfd/doc/bfd.texinfo binutils-2.9.1/bfd/doc/bfd.texinfo +--- binutils-2.9.1/bfd/doc/bfd.texinfo Fri May 1 08:48:02 1998 ++++ binutils-2.9.1/bfd/doc/bfd.texinfo Sun Aug 23 00:00:00 1998 +@@ -302,9 +302,10 @@ structures. + @chapter BFD back ends + @menu + * What to Put Where:: +-* aout :: a.out backends +-* coff :: coff backends +-* elf :: elf backends ++* aout :: a.out backends ++* coff :: coff backends ++* elf :: elf backends ++* amiga :: amigaos backend + @ignore + * oasys :: oasys backends + * ieee :: ieee backend +@@ -320,10 +321,14 @@ All of BFD lives in one directory. + @node coff, elf, aout, BFD back ends + @include coffcode.texi + +-@node elf, , coff, BFD back ends ++@node elf, amiga , coff, BFD back ends + @include elf.texi + @c Leave this out until the file has some actual contents... + @c @include elfcode.texi ++ ++@node amiga, , elf, BFD back ends ++@include amiga.texi ++@include amigalink.texi + + @node Index, , BFD back ends , Top + @unnumbered Index +diff -rup --new-file binutils-2.9.1/bfd/elf32-ppc.c binutils-2.9.1/bfd/elf32-ppc.c +--- binutils-2.9.1/bfd/elf32-ppc.c Fri May 1 08:48:09 1998 ++++ binutils-2.9.1/bfd/elf32-ppc.c Sun Aug 23 00:00:00 1998 +@@ -3358,7 +3358,11 @@ ppc_elf_relocate_section (output_bfd, in + #define TARGET_BIG_NAME "elf32-powerpc" + #define ELF_ARCH bfd_arch_powerpc + #define ELF_MACHINE_CODE EM_PPC ++#if 0 /* HACK - fnf */ + #define ELF_MAXPAGESIZE 0x10000 ++#else ++#define ELF_MAXPAGESIZE 0x1000 ++#endif + #define elf_info_to_howto ppc_elf_info_to_howto + + #ifdef EM_CYGNUS_POWERPC +diff -rup --new-file binutils-2.9.1/bfd/hash.c binutils-2.9.1/bfd/hash.c +--- binutils-2.9.1/bfd/hash.c Fri May 1 08:48:10 1998 ++++ binutils-2.9.1/bfd/hash.c Sun Aug 23 00:00:00 1998 +@@ -73,7 +73,7 @@ SUBSECTION + The function <> take as an argument a + function to use to create new entries. For a basic hash + table, use the function <>. @xref{Deriving +- a New Hash Table Type} for why you would want to use a ++ a New Hash Table Type}, for why you would want to use a + different value for this argument. + + @findex bfd_hash_allocate +diff -rup --new-file binutils-2.9.1/bfd/hosts/amigaos.h binutils-2.9.1/bfd/hosts/amigaos.h +--- binutils-2.9.1/bfd/hosts/amigaos.h Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/bfd/hosts/amigaos.h Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,5 @@ ++/* Host configuration for AmigaOS */ ++#ifndef hosts_amigaos_h ++#define hosts_amigaos_h ++#include "hosts/std-host.h" ++#endif /* hosts_amigaos_h */ +diff -rup --new-file binutils-2.9.1/bfd/libamiga.h binutils-2.9.1/bfd/libamiga.h +--- binutils-2.9.1/bfd/libamiga.h Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/bfd/libamiga.h Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,224 @@ ++/* BFD back-end data structures for AmigaOS. ++ Copyright (C) 1992-1994 Free Software Foundation, Inc. ++ Contributed by Leonard Norrgard. ++ Extended by Stephan Thesing Nov 94 ++ ++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., 675 Mass Ave, Cambridge, MA 02139, USA. */ ++ ++#ifdef __STDC__ ++#define CAT3(a,b,c) a##b##c ++#else ++#define CAT3(a,b,c) a/**/b/**/c ++#endif ++ ++#define GET_WORD bfd_h_get_32 ++#define GET_SWORD (int32_type)GET_WORD ++#define PUT_WORD bfd_h_put_32 ++#define NAME(x,y) CAT3(x,_32_,y) ++#define JNAME(x) CAT(x,_32) ++#define BYTES_IN_WORD 4 ++ ++/* Hunk ID numbers.*/ ++#define HUNK_UNIT 999 ++#define HUNK_NAME 1000 ++#define HUNK_CODE 1001 ++#define HUNK_DATA 1002 ++#define HUNK_BSS 1003 ++#define HUNK_RELOC32 1004 ++#define HUNK_ABSRELOC32 HUNK_RELOC32 ++#define HUNK_RELOC16 1005 ++#define HUNK_RELRELOC16 HUNK_RELOC16 ++#define HUNK_RELOC8 1006 ++#define HUNK_RELRELOC8 HUNK_RELOC8 ++#define HUNK_EXT 1007 ++#define HUNK_SYMBOL 1008 ++#define HUNK_DEBUG 1009 ++#define HUNK_END 1010 ++#define HUNK_HEADER 1011 ++#define HUNK_HEADER_POS (0x00001000 | 1011) ++#define HUNK_OVERLAY 1013 ++#define HUNK_BREAK 1014 ++#define HUNK_DREL32 1015 ++#define HUNK_DREL16 1016 ++#define HUNK_DREL8 1017 ++#define HUNK_LIB 1018 ++#define HUNK_INDEX 1019 ++#define HUNK_RELOC32SHORT 1020 ++#define HUNK_RELRELOC32 1021 ++#define HUNK_ABSRELOC16 1022 ++ ++/* The hunk ID part. */ ++ ++#define HUNK_VALUE(hunk_id) ((hunk_id) & 0x3fffffff) ++ ++/* Attributes of a hunk. */ ++ ++#define HUNK_ATTRIBUTE(hunk_id) ((hunk_id) >> 30) ++#define HUNK_ATTR_CHIP 0x01 /* Hunk contents must go into chip ram. */ ++#define HUNK_ATTR_FAST 0x02 /* fast */ ++#define HUNK_ATTR_FOLLOWS 0x03 /* Mem id follows */ ++ ++#define EXT_SYMB 0 ++#define EXT_DEF 1 ++#define EXT_ABS 2 ++#define EXT_RES 3 ++#define EXT_REF32 129 ++#define EXT_ABSREF32 EXT_REF32 ++#define EXT_COMMON 130 ++#define EXT_ABSCOMMON EXT_COMMON ++#define EXT_REF16 131 ++#define EXT_RELREF16 EXT_REF16 ++#define EXT_REF8 132 ++#define EXT_RELREF8 EXT_REF8 ++#define EXT_DEXT32 133 ++#define EXT_DREF32 EXT_DEXT32 ++#define EXT_DEXT16 134 ++#define EXT_DREF16 EXT_DEXT16 ++#define EXT_DEXT8 135 ++#define EXT_DREF8 EXT_DEXT8 ++#define EXT_RELREF32 136 ++#define EXT_RELCOMMON 137 ++#define EXT_ABSREF16 138 ++#define EXT_ABSREF8 139 ++ ++ ++typedef struct amiga_reloc { ++ arelent relent; ++ struct amiga_reloc *next; ++ struct amiga_symbol *symbol; ++ long target_hunk; ++} amiga_reloc_type; ++ ++typedef struct amiga_symbol { ++ asymbol symbol; ++/* struct amiga_symbol *next;*/ ++ unsigned short hunk_number; ++ long index; ++ /* these come from a.out. Not used yet, but needed to compile */ ++ short desc; ++ char other; ++ unsigned char type; ++} amiga_symbol_type; ++ ++struct amiga_raw_symbol { ++ struct amiga_raw_symbol *next; ++ unsigned long data[1]; ++}; ++ ++typedef struct amiga_per_section ++{ ++ amiga_reloc_type *reloc_tail; /* last reloc */ /* first is in section->relocation */ ++ int attribute; /* Memory type required by this section */ ++ unsigned long disk_size; /* Section size on disk. _raw_size may be larger than this */ ++ int max_raw_relocs; /* Size of array */ ++ unsigned long int num_raw_relocs8, num_raw_relocs16, num_raw_relocs32; ++ unsigned long raw_relocs8, raw_relocs16, raw_relocs32; ++ struct amiga_raw_symbol *first; ++ struct amiga_raw_symbol *last; /* tail */ ++ ++ /* the symbols for this section */ ++ amiga_symbol_type *amiga_symbols; ++ ++ unsigned long hunk_ext_pos; /* offset of hunk_ext in the bfd file */ ++ unsigned long hunk_symbol_pos; /* offset of hunk_symbol in the bfd file */ ++} amiga_per_section_type; ++#define amiga_per_section(x) ((amiga_per_section_type *)((x)->used_by_bfd)) ++ ++/* The `tdata' struct for all a.out-like object file formats. ++ Various things depend on this struct being around any time an a.out ++ file is being handled. An example is dbxread.c in GDB. */ ++ ++struct amiga_data { ++ struct internal_exec *hdr; /* exec file header */ ++ amiga_symbol_type *symbols; /* symtab for input bfd */ ++ ++ /* Filler, so we can pretend to be an a.out to GDB. */ ++ asection *textsec; ++ asection *datasec; ++ asection *bsssec; ++ int nb_hunks; /* number of hunks in the file */ ++ /* The positions of the string table and symbol table. */ ++ file_ptr sym_filepos; ++ file_ptr str_filepos; ++ ++ unsigned int n_symbols; /* number of symbols */ ++ ++ /* Size of a relocation entry in external form */ ++ unsigned dummy_reloc_entry_size; ++ ++ /* Size of a symbol table entry in external form */ ++ unsigned symbol_entry_size; ++ ++ unsigned exec_bytes_size; ++ unsigned vma_adjusted : 1; ++}; ++ ++typedef struct amiga_data_struct { ++ struct amiga_data a; ++ ++ unsigned long symtab_size; ++ unsigned long stringtab_size; ++ ++ unsigned long *first_byte; ++ unsigned long *file_end; ++ unsigned long *file_pointer; ++ amiga_symbol_type *symbols; ++ amiga_symbol_type *symbol_tail; ++ boolean IsLoadFile; /* If true, this is a load file (for output bfd only) */ ++ int maxsymbols; /* Used by final_link routine to add symbols to output bfd. ++ This is the # of entries, allocated in abdfd->osymbols */ ++ int nb_hunks; ++ /* The next two fields are set at final_link time ++ for the output bfd only */ ++ boolean baserel; /* true if there is ___init_a4 in the global hash table */ ++ bfd_vma a4init; /* cache the value for efficiency */ ++} amiga_data_type; ++ ++struct arch_syms { ++ unsigned long offset; /* disk offset in the archive */ ++ unsigned long size; /* size of the block of symbols */ ++ unsigned long unit_offset; /* start of unit on disk */ ++ struct arch_syms *next; /* linked list */ ++}; ++ ++#define adata(bfd) ((bfd)->tdata.amiga_data->a) ++ ++/* We take the address of the first element of an asymbol to ensure that the ++ macro is only ever applied to an asymbol */ ++#define amiga_symbol(asymbol) ((amiga_symbol_type *)(&(asymbol)->the_bfd)) ++ ++#define AMIGA_DATA(abfd) ((abfd)->tdata.amiga_data) ++ ++#define HUNKB_ADVISORY 29 ++#define HUNKB_CHIP 30 ++#define HUNKB_FAST 31 ++#define HUNKF_ADVISORY (1L << HUNKB_ADVISORY) ++#define HUNKF_CHIP (1L << HUNKB_CHIP) ++#define HUNKF_FAST (1L << HUNKB_FAST) ++ ++#define MEMF_ANY (0L) ++#define MEMF_PUBLIC (1L << 0) ++#define MEMF_CHIP (1L << 1) ++#define MEMF_FAST (1L << 2) ++#define MEMF_LOCAL (1L << 8) ++#define MEMF_24BITDMA (1L << 9) ++#define MEMF_KICK (1L << 10) ++#define MEMF_CLEAR (1L << 16) ++#define MEMF_LARGEST (1L << 17) ++#define MEMF_REVERSE (1L << 18) ++#define MEMF_TOTAL (1L << 19) ++#define MEMF_NO_EXPUNGE (1L << 31) +diff -rup --new-file binutils-2.9.1/bfd/linker.c binutils-2.9.1/bfd/linker.c +--- binutils-2.9.1/bfd/linker.c Fri May 1 08:48:12 1998 ++++ binutils-2.9.1/bfd/linker.c Sun Aug 23 00:00:00 1998 +@@ -74,7 +74,7 @@ SUBSECTION + @cindex target vector (_bfd_link_hash_table_create) + The linker routines must create a hash table, which must be + derived from <> described in +- <>. @xref{Hash Tables} for information on how to ++ <>. @xref{Hash Tables}, for information on how to + create a derived hash table. This entry point is called using + the target vector of the linker output file. + +@@ -428,7 +428,8 @@ static boolean generic_add_output_symbol + static boolean default_fill_link_order + PARAMS ((bfd *, struct bfd_link_info *, asection *, + struct bfd_link_order *)); +-static boolean default_indirect_link_order ++/*Amiga hack - used in amigaoslink.c so must be global */ ++/*static*/ boolean default_indirect_link_order + PARAMS ((bfd *, struct bfd_link_info *, asection *, + struct bfd_link_order *, boolean)); + +@@ -1196,8 +1197,17 @@ generic_link_check_archive_element (abfd + h->u.c.size = size; + + power = bfd_log2 (size); +- if (power > 4) +- power = 4; ++ /* For the amiga, we don't want an alignment bigger than ++ 2**2. Doing this here is a horribly kludgy, but IMHO the ++ max power alignment really should be target-dependant so ++ that we wouldn't have to do this -- daniel */ ++ if (bfd_get_flavour(abfd) == bfd_target_amiga_flavour) { ++ if (power > 2) ++ power = 2; ++ } ++ else ++ if (power > 4) ++ power = 4; + h->u.c.p->alignment_power = power; + + if (p->section == bfd_com_section_ptr) +@@ -1658,8 +1668,18 @@ _bfd_generic_link_add_one_symbol (info, + unsigned int power; + + power = bfd_log2 (value); +- if (power > 4) +- power = 4; ++ /* For the amiga, we don't want an alignment bigger than ++ 2**2. Doing this here is a horribly kludgy, but IMHO ++ the max power alignment really should be ++ target-dependant so that we wouldn't have to do this -- ++ daniel */ ++ if (bfd_get_flavour(abfd) == bfd_target_amiga_flavour) { ++ if (power > 2) ++ power = 2; ++ } ++ else ++ if (power > 4) ++ power = 4; + h->u.c.p->alignment_power = power; + } + +@@ -2626,7 +2646,7 @@ default_fill_link_order (abfd, info, sec + + /* Default routine to handle a bfd_indirect_link_order. */ + +-static boolean ++/*static*/ boolean + default_indirect_link_order (output_bfd, info, output_section, link_order, + generic_linker) + bfd *output_bfd; +diff -rup --new-file binutils-2.9.1/bfd/pei-i386.c binutils-2.9.1/bfd/pei-i386.c +--- binutils-2.9.1/bfd/pei-i386.c Fri May 1 08:48:14 1998 ++++ binutils-2.9.1/bfd/pei-i386.c Sun Aug 23 00:00:00 1998 +@@ -30,6 +30,56 @@ Foundation, Inc., 59 Temple Place - Suit + #define COFF_LONG_SECTION_NAMES + + #include "coff-i386.c" ++#include + ++/* Routine to get the comdat symbol or associated section ++ for a section, used by the linker to determine if sections are ++ duplicates. needs the asection passed to it */ + ++void pei_get_comdat_info PARAMS ((asection *)); + ++void pei_get_comdat_info(sec) ++asection *sec; ++{ ++const char *nosym = "none"; ++bfd_size_type symesz; ++bfd_byte *esym; ++bfd_byte *esym_end; ++ ++comdat_info *comdat; ++ ++comdat = (comdat_info *) bfd_alloc (sec->owner, sizeof(comdat_info)); ++ ++memcpy (comdat->name_buf, nosym, 5); ++comdat->asoc_sec = (int)NULL; ++symesz = bfd_coff_symesz (sec->owner); ++esym = (bfd_byte *) obj_coff_external_syms (sec->owner); ++esym_end = esym + obj_raw_syment_count (sec->owner) * symesz; ++ ++ ++/* walk the native table looking for the section symbol */ ++ while (esym < esym_end) ++ { ++ struct internal_syment sym; ++ bfd_coff_swap_sym_in (sec->owner, (PTR) esym, (PTR) &sym); ++ /* FIXME add ISSYM() ISWEAK()? to function symbols ISFCN( sym.n_type )) would make things MUCH easier*/ ++ /* every comdat has either another comdat that it is addociated with ++ or a comdat symbol of it's own. if a symbol it isn't associated */ ++ if ((sym.n_scnum == sec->index + 1) && !isalpha(sym.n_name[0]) && !sym.n_numaux ) ++ { ++ comdat->comdat_sym = _bfd_coff_internal_syment_name(sec->owner, &sym, comdat->name_buf); ++ break; ++ } ++ if (!isalpha(sym.n_name[0]) && (sym.n_scnum == sec->index + 1) && sym.n_numaux) ++ { ++ union internal_auxent aux; ++ bfd_coff_swap_aux_in(sec->owner, (PTR) (esym + symesz) ++ ,sym.n_type, sym.n_sclass, 0, sym.n_numaux, (PTR) &aux); ++ comdat->asoc_sec = aux.x_scn.x_associated; ++ if (comdat->asoc_sec) ++ break; ++ } ++ esym += (sym.n_numaux + 1) * symesz; ++ } ++sec->pe_comdat_info = comdat; ++} +diff -rup --new-file binutils-2.9.1/bfd/peicode.h binutils-2.9.1/bfd/peicode.h +--- binutils-2.9.1/bfd/peicode.h Fri May 1 08:48:14 1998 ++++ binutils-2.9.1/bfd/peicode.h Sun Aug 23 00:00:00 1998 +@@ -494,11 +494,17 @@ coff_swap_sym_in (abfd, ext1, in1) + documentation indicates is a section symbol. The problem is that the + value field in the symbol is simply a copy of the .idata section's flags + rather than something useful. When these symbols are encountered, change +- the value to 0 and the section number to 1 so that they will be handled +- somewhat correctly in the bfd code. */ +- if (in->n_sclass == 0x68) { ++ the value to 0 so that they will be handled somewhat correctly in the ++ bfd code. */ ++ if (in->n_sclass == C_SECTION) { + in->n_value = 0x0; +- in->n_scnum = 1; ++ if(strcmp (in->_n._n_name, ".idata$2") == 0) ++ in->n_sclass = 1; /* not used for anything that I know of. */ ++/* can't hash more than 1 sub-section symbol with the same name. */ ++ if(strcmp (in->_n._n_name, ".idata$4") == 0) ++ sprintf(in->_n._n_name, "i4%x",((int)abfd & ~0xff000000)); ++ if(strcmp (in->_n._n_name, ".idata$5") == 0) ++ sprintf(in->_n._n_name, "i5%x",((int)abfd & ~0xff000000)); + /* I have tried setting the class to 3 and using the following to set + the section number. This will put the address of the pointer to the + string kernel32.dll at addresses 0 and 0x10 off start of idata section +@@ -1394,14 +1400,14 @@ pe_print_idata(abfd, vfile) + fprintf (file, "\tvma: Hint/Ord Member-Name\n"); + + idx = hint_addr + adj; +- ++#define IMPORTED_BY_ORDINAL 0x80000000 /* FIXME should be in a REAL header */ + for (j = 0; j < stop; j += 4) + { + unsigned long member = bfd_get_32 (abfd, data + idx + j); + + if (member == 0) + break; +- if (member & 0x80000000) ++ if (member & IMPORTED_BY_ORDINAL) + fprintf (file, "\t%04lx\t %4lu", member, + member & 0x7fffffff); + else +@@ -1464,10 +1470,19 @@ pe_print_idata(abfd, vfile) + } + else + { ++ if (!(iat_member & IMPORTED_BY_ORDINAL)) ++ { + ordinal = bfd_get_16(abfd, + data + iat_member + adj); + member_name = (char *) data + iat_member + adj + 2; +- fprintf(file, "\t%04lx\t %4d %s\n", ++ } ++ else ++ { ++ ordinal = (iat_member & 0x0000ffff); ++ iat_member = first_thunk + j; ++ member_name = (char *)"Imported By Ordinal"; ++ } ++ fprintf(file, "\t%04lx\t %4x %s\n", + iat_member, ordinal, member_name); + } + } +diff -rup --new-file binutils-2.9.1/bfd/section.c binutils-2.9.1/bfd/section.c +--- binutils-2.9.1/bfd/section.c Fri May 1 08:48:15 1998 ++++ binutils-2.9.1/bfd/section.c Sun Aug 23 00:00:00 1998 +@@ -150,6 +150,13 @@ SUBSECTION + + CODE_FRAGMENT + . ++.typedef struct _comdat_info ++.{ ++. int asoc_sec; ++. char name_buf[9]; ++. const char * comdat_sym; ++.} comdat_info; ++. + .typedef struct sec + .{ + . {* The name of the section; the name isn't a copy, the pointer is +@@ -431,6 +438,8 @@ CODE_FRAGMENT + . struct symbol_cache_entry *symbol; + . struct symbol_cache_entry **symbol_ptr_ptr; + . ++. comdat_info *pe_comdat_info; ++. + . struct bfd_link_order *link_order_head; + . struct bfd_link_order *link_order_tail; + .} asection ; +@@ -487,7 +496,7 @@ static const asymbol global_syms[] = + const asection SEC = \ + { NAME, 0, 0, FLAGS, 0, 0, 0, 0, 0, 0, 0, 0, (asection *) &SEC, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ +- (asymbol *) &global_syms[IDX], (asymbol **) &SYM, 0, 0 } ++ (asymbol *) &global_syms[IDX], (asymbol **) &SYM, 0, 0, 0 } + + STD_SECTION (bfd_com_section, SEC_IS_COMMON, bfd_com_symbol, + BFD_COM_SECTION_NAME, 0); +diff -rup --new-file binutils-2.9.1/bfd/syms.c binutils-2.9.1/bfd/syms.c +--- binutils-2.9.1/bfd/syms.c Fri May 1 08:48:15 1998 ++++ binutils-2.9.1/bfd/syms.c Sun Aug 23 00:00:00 1998 +@@ -1062,7 +1062,7 @@ _bfd_stab_section_find_nearest_line (abf + { + stab = info->cached_stab; + indexentry = info->cached_indexentry; +- file_name = info->cached_file_name; ++ file_name = (char *) info->cached_file_name; + } + else + #endif +@@ -1097,10 +1097,10 @@ _bfd_stab_section_find_nearest_line (abf + return true; + + stab = indexentry->stab + STABSIZE; +- file_name = indexentry->file_name; ++ file_name = (char *) indexentry->file_name; + } + +- directory_name = indexentry->directory_name; ++ directory_name = (char *) indexentry->directory_name; + str = indexentry->str; + + for (; stab < (indexentry+1)->stab; stab += STABSIZE) +@@ -1188,11 +1188,11 @@ _bfd_stab_section_find_nearest_line (abf + to clobber the colon. It's OK to change the name, since the + string is in our own local storage anyhow. */ + +- s = strchr (indexentry->function_name, ':'); ++ s = strchr ((const char *) indexentry->function_name, ':'); + if (s != NULL) + *s = '\0'; + +- *pfnname = indexentry->function_name; ++ *pfnname = (const char *) indexentry->function_name; + } + + return true; +diff -rup --new-file binutils-2.9.1/bfd/targets.c binutils-2.9.1/bfd/targets.c +--- binutils-2.9.1/bfd/targets.c Fri May 1 08:48:16 1998 ++++ binutils-2.9.1/bfd/targets.c Sun Aug 23 00:00:00 1998 +@@ -138,6 +138,7 @@ DESCRIPTION + + .enum bfd_flavour { + . bfd_target_unknown_flavour, ++. bfd_target_amiga_flavour, + . bfd_target_aout_flavour, + . bfd_target_coff_flavour, + . bfd_target_ecoff_flavour, +@@ -469,6 +470,8 @@ in this structure. + we can't intermix extern's and initializers. */ + extern const bfd_target a29kcoff_big_vec; + extern const bfd_target a_out_adobe_vec; ++extern const bfd_target amiga_vec; ++extern const bfd_target aout_amiga_vec; + extern const bfd_target aout_arm_big_vec; + extern const bfd_target aout_arm_little_vec; + extern const bfd_target aout_mips_big_vec; +@@ -630,6 +633,8 @@ const bfd_target * const bfd_target_vect + it wasn't omitted by mistake. */ + &a29kcoff_big_vec, + &a_out_adobe_vec, ++ &amiga_vec, ++ &aout_amiga_vec, + #if 0 /* No one seems to use this. */ + &aout_mips_big_vec, + #endif +diff -rup --new-file binutils-2.9.1/bfd/xcofflink.c binutils-2.9.1/bfd/xcofflink.c +--- binutils-2.9.1/bfd/xcofflink.c Fri May 1 08:48:17 1998 ++++ binutils-2.9.1/bfd/xcofflink.c Sun Aug 23 00:00:00 1998 +@@ -721,7 +721,7 @@ _bfd_xcoff_canonicalize_dynamic_symtab ( + if (ldsym._l._l_name[i] == '\0') + break; + if (i < SYMNMLEN) +- symbuf->symbol.name = (char *) elsym->_l._l_name; ++ symbuf->symbol.name = (const char *) elsym->_l._l_name; + else + { + char *c; +@@ -3824,7 +3824,7 @@ xcoff_build_ldsyms (h, p) + + bfd_put_16 (ldinfo->output_bfd, len + 1, + ldinfo->strings + ldinfo->string_size); +- strcpy (ldinfo->strings + ldinfo->string_size + 2, h->root.root.string); ++ strcpy ((char *) ldinfo->strings + ldinfo->string_size + 2, h->root.root.string); + h->ldsym->_l._l_l._l_zeroes = 0; + h->ldsym->_l._l_l._l_offset = ldinfo->string_size + 2; + ldinfo->string_size += len + 3; +@@ -3953,7 +3953,7 @@ _bfd_xcoff_bfd_final_link (abfd, info) + if (file_align != 0) + { + boolean saw_contents; +- int indx; ++ int indx = 0; + asection **op; + file_ptr sofar; + +diff -rup --new-file binutils-2.9.1/binutils/ChangeLog binutils-2.9.1/binutils/ChangeLog +--- binutils-2.9.1/binutils/ChangeLog Fri May 1 08:49:30 1998 ++++ binutils-2.9.1/binutils/ChangeLog Sun Aug 23 00:00:00 1998 +@@ -1,10 +1,38 @@ ++Fri Jun 19 13:30:06 1998 Mumit Khan ++ ++ * dlltool.c (gen_exp_file): Revert Mikey patch and add back ++ exporting of both _imp__ and __imp_ names per binutils 2.9.1. ++ (make_one_lib_file): Likewise. ++ ++Thu Jun 18 09:50:39 1998 Mumit Khan ++ ++ pei-i386 changes from Mikey . ++ ++ * dlltool.c (ppc_jtab): Change __imp_xxx to _imp__xxx. ++ (gen_exp_file): Likewise. ++ (make_one_lib_file): Likewise. ++ ++ * objdump.c (dump_section_header): Add associated section/comdat ++ symbol info to --section-header output. ++ ++Fri Jun 12 16:41:56 1998 Fred Fish ++ ++ * configure.in (BUILD_DLLTOOL, DLLTOOL_DEFS, BUILD_WINDRES): ++ Initialize these for i*86-*-beos*, like for pe and cygwin32. ++ * configure: Regenerated. ++ ++Mon Jun 1 21:01:51 1998 Fred Fish ++ ++ Integrated patch from jeffdb@goodnet.com: ++ * objdump.c (dump_section_header): Add associated section/comdat ++ symbol info to output from "--section-header" command. ++ + Mon Apr 27 13:45:26 1998 Ian Lance Taylor + + * configure.in: Set version number to 2.9.1. + * configure: Rebuild. + + Tue Apr 7 15:41:15 1998 Ian Lance Taylor +- + * Makefile.am (DISTSTUFF): Add defparse.h, defparse.c, rclex.c, + rcparse.h, and rcparse.c + * Makefile.in: Rebuild. +@@ -109,6 +137,12 @@ Tue Feb 24 13:07:50 1998 Doug Evans ++ ++ * bucomm.h: Only use gcc's builtin alloca if C_ALLOCA is ++ not defined. Only include if C_ALLOCA is not ++ defined. ++ + Wed Feb 18 23:39:46 1998 Richard Henderson + + * Makefile.am (install-exec-local): Install properly when ln +@@ -300,10 +334,20 @@ Sun Nov 2 14:49:56 1997 Ian Lance Tayl + declarations. Add prototype declarations for add_specific_symbol + and is_specified_symbol. + ++Tue Oct 28 09:01:02 1997 Fred Fish ++ ++ * configure.in (BFDLIB,OPCODES): For BeOS hosts, directly ++ include libraries rather than using -L search paths. ++ * configure: Regenerated. ++ + Mon Oct 20 15:31:43 1997 Klaus K"ampf + + * configure.com (HAVE_SBRK): Undefine. + ++Mon Oct 20 11:09:00 1997 Fred Fish ++ ++ * Makefile.in (AR, ARFLAGS): Remove, not used. ++ + Tue Oct 14 16:14:35 1997 Nick Clifton + + * objdump.c (objdump_symbol_at_address): New function. Returns +@@ -374,6 +418,12 @@ Wed Sep 24 11:34:05 1997 Ian Lance Tayl + * aclocal.m4: Rebuild with new libtool. + * configure: Rebuild. + ++Mon Sep 22 14:49:19 1997 Fred Fish ++ ++ * wrstabs.c (write_stabs_in_sections_debugging_info): ++ Cast args to strcpy and strlen from unsigned char * to ++ just char *, for picky compilers. ++ + Tue Aug 26 17:48:34 1997 Ian Lance Taylor + + * Makefile.am (EXEEXT_FOR_BUILD): New variable. Use it in all +@@ -1147,6 +1197,10 @@ Mon Jul 22 08:46:15 1996 Stu Grossman + ending with numbers. This fixes a problem with .stab being + confused with .stab.index. + ++Thu Jul 18 16:58:11 1996 Daniel Verite ++ ++ * objdump.c (disassemble_data): Added a sanity check. ++ + Wed Jul 10 13:32:28 1996 Ian Lance Taylor + + * stabs.c (stab_demangle_fund_type): Return a void * for a +@@ -2606,7 +2660,7 @@ Thu Jul 13 10:43:59 1995 Ian Lance Tayl + * nlmconv.c (powerpc_mangle_relocs): Cast memset arg to size_t. + * objcopy.c (copy_object): Likewise. + +- * nm.c (HAVE_SBRK): Define execpt on amigados and WINDOWS_NT. ++ * nm.c (HAVE_SBRK): Define execpt on amigaos and WINDOWS_NT. + (struct size_sym): Define. + (show_stats): New static variable. + (long_options): Add undocumented option "stats". +diff -rup --new-file binutils-2.9.1/binutils/Makefile.in binutils-2.9.1/binutils/Makefile.in +--- binutils-2.9.1/binutils/Makefile.in Fri May 1 08:49:30 1998 ++++ binutils-2.9.1/binutils/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -1,4 +1,4 @@ +-# Makefile.in generated automatically by automake 1.2e from Makefile.am ++# Makefile.in generated automatically by automake 1.3 from Makefile.am + + # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation +@@ -11,7 +11,7 @@ + # PARTICULAR PURPOSE. + + +-SHELL = @SHELL@ ++SHELL = /bin/sh + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -28,10 +28,16 @@ sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ ++guidedir = @guidedir@ ++htmldir = @htmldir@ ++dvidir = @dvidir@ ++psdir = @psdir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + ++DISTDIR = ++ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +@@ -70,17 +76,10 @@ CC = @CC@ + DLLTOOL_DEFS = @DLLTOOL_DEFS@ + EXEEXT = @EXEEXT@ + HDEFINES = @HDEFINES@ +-LD = @LD@ + LIBTOOL = @LIBTOOL@ +-LN_S = @LN_S@ +-MAINT = @MAINT@ +-MAKEINFO = @MAKEINFO@ + NLMCONV_DEFS = @NLMCONV_DEFS@ +-NM = @NM@ +-PACKAGE = @PACKAGE@ + RANLIB = @RANLIB@ + UNDERSCORE = @UNDERSCORE@ +-VERSION = @VERSION@ + + AUTOMAKE_OPTIONS = cygnus dejagnu + +@@ -335,13 +334,20 @@ CFLAGS = @CFLAGS@ + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) + LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) + LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ++MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then echo $(top_builddir)/../texinfo/makeinfo/makeinfo; else echo makeinfo; fi` + TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi` + TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex + INFO_DEPS = binutils.info + DVIS = binutils.dvi + TEXINFOS = binutils.texi +-MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 addr2line.1 nlmconv.1 $(DEMANGLER_PROG).1 +- ++GUIDES = binutils.guide ++GUIDE_DEPS = binutils.guide ++HTMLS = binutils.html ++HTML_DEPS = binutils.html ++PS_S = binutils.ps ++PS_DEPS = binutils.ps ++man1dir = $(mandir)/man1 ++MANS = $(man_MANS) + + NROFF = nroff + DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS acconfig.h \ +@@ -350,21 +356,24 @@ configure.in deflex.c defparse.c nlmhead + stamp-h.in + + +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ++PACKAGE = @PACKAGE@ ++VERSION = @VERSION@ + ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) \ ++ $(INFOS) $(GUIDES) $(HTMLS) $(MANS) + TAR = tar + GZIP = --best + SOURCES = $(nlmconv_SOURCES) $(srconv_SOURCES) $(sysdump_SOURCES) $(coffdump_SOURCES) $(dlltool_SOURCES) $(windres_SOURCES) $(size_SOURCES) $(objdump_SOURCES) $(ar_SOURCES) $(strings_SOURCES) $(ranlib_SOURCES) $(c__filt_SOURCES) $(objcopy_SOURCES) $(addr2line_SOURCES) $(nm_new_SOURCES) $(strip_new_SOURCES) + OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJECTS) $(dlltool_OBJECTS) $(windres_OBJECTS) $(size_OBJECTS) $(objdump_OBJECTS) $(ar_OBJECTS) $(strings_OBJECTS) $(ranlib_OBJECTS) $(c__filt_OBJECTS) $(objcopy_OBJECTS) $(addr2line_OBJECTS) $(nm_new_OBJECTS) $(strip_new_OBJECTS) + +-default: all ++all: Makefile $(PROGRAMS) $(MANS) config.h + + .SUFFIXES: +-.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .y +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile ++.SUFFIXES: .S .c .dvi .guide .html .info .l .lo .o .ps .s .texi .texinfo .txi .y ++$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus --include-deps Makefile + +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +@@ -408,18 +417,18 @@ maintainer-clean-binPROGRAMS: + + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(bindir) ++ $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ +- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \ +- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ ++ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ ++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; \ + done + + uninstall-binPROGRAMS: +- $(NORMAL_UNINSTALL) ++ @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ +- rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ ++ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + done + + mostlyclean-noinstPROGRAMS: +@@ -543,6 +552,9 @@ nlmheader.h: nlmheader.c + $(SHELL) $(YLWRAP) "$(LEX)" $< $(LEX_OUTPUT_ROOT).c $@ -- $(LFLAGS) + + binutils.info: binutils.texi ++binutils.guide: binutils.texi ++binutils.html: binutils.texi ++binutils.ps: binutils.dvi + binutils.dvi: binutils.texi + + +@@ -550,7 +562,7 @@ DVIPS = dvips + + .texi.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I$(srcdir) $< --output=$@ + + .texi.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ +@@ -558,39 +570,51 @@ DVIPS = dvips + + .texi: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi.info: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< ++ ++.txi.dvi: ++ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ ++ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< + .dvi.ps: + $(DVIPS) $< -o $@ + + install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(infodir) ++ $(mkinstalldirs) $(DESTDIR)$(infodir) + @for file in $(INFO_DEPS); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + if test -f $$d/$$ifile; then \ +- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \ +- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ + else : ; fi; \ + done; \ + done + @$(POST_INSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + for file in $(INFO_DEPS); do \ +- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\ +- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\ ++ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ ++ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ + done; \ + else : ; fi + +@@ -601,11 +625,11 @@ uninstall-info: + else ii=; fi; \ + for file in $(INFO_DEPS); do \ + test -z "$ii" \ +- || install-info --info-dir=$(infodir) --remove $$file; \ ++ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ + done +- $(NORMAL_UNINSTALL) ++ @$(NORMAL_UNINSTALL) + for file in $(INFO_DEPS); do \ +- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ ++ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + done + + dist-info: $(INFO_DEPS) +@@ -618,12 +642,155 @@ dist-info: $(INFO_DEPS) + done; \ + done + ++MAKEGUIDE= $(MAKEINFO) --amiga ++ ++MAKEHTML = texi2html -number -split_chapter ++ ++.texi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texinfo.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.txi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texi.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++.texinfo.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++install-guide: $(GUIDE_DEPS) ++ $(mkinstalldirs) $(guidedir) ++ for file in $(GUIDE_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(guidedir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-guide: ++ for file in *.guide*; do \ ++ rm -f $(guidedir)/$$file; \ ++ done ++ ++install-ps: $(PS_S) ++ $(mkinstalldirs) $(psdir) ++ for file in $(PS_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(psdir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-ps: ++ for file in *.ps*; do \ ++ rm -f $(psdir)/$$file; \ ++ done ++ ++install-dvi: $(DVIS) ++ $(mkinstalldirs) $(dvidir) ++ for file in $(DVIS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(dvidir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-dvi: ++ for file in *.dvi*; do \ ++ rm -f $(dvidir)/$$file; \ ++ done ++ ++install-html: $(HTML_DEPS) ++ $(mkinstalldirs) $(htmldir) ++ @touch $(HTML_DEPS) ++ @for file in $(HTML_DEPS); do \ ++ if test -f $$file; then d=.; else d=$(srcdir); fi; \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $$d && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ if test -f $$d/$$ifile; then \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile; \ ++ else : ; fi; \ ++ done; \ ++ done ++ @rm -f $(htmldir)/$(HTML_DEPS) ++ ++uninstall-html: ++ @for file in $(HTML_DEPS); do \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $(htmldir) && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ echo "removing: $(htmldir)/$$ifile"; \ ++ rm -f $(htmldir)/$$ifile; \ ++ done; \ ++ done ++ ++mostlyclean-guide: ++ rm -f binutils.aux binutils.cp binutils.cps binutils.dvi binutils.fn \ ++ binutils.fns binutils.ky binutils.kys binutils.ps \ ++ binutils.log binutils.pg binutils.toc binutils.tp \ ++ binutils.tps binutils.vr binutils.vrs binutils.op binutils.tr \ ++ binutils.cv binutils.cn binutils.guide binutils.html \ ++ binutils.ps ++ ++clean-guide: ++ ++distclean-guide: ++ ++maintainer-clean-guide: ++ rm -f $(GUIDES) ++ ++mostlyclean-html: ++ rm -f binutils.aux binutils.cp binutils.cps binutils.dvi binutils.fn \ ++ binutils.fns binutils.ky binutils.kys binutils.ps \ ++ binutils.log binutils.pg binutils.toc binutils.tp \ ++ binutils.tps binutils.vr binutils.vrs binutils.op binutils.tr \ ++ binutils.cv binutils.cn binutils.guide binutils.html \ ++ binutils.ps ++ ++clean-html: ++ ++distclean-html: ++ ++maintainer-clean-html: ++ rm -f $(HTMLS) ++ ++mostlyclean-ps: ++ rm -f binutils.aux binutils.cp binutils.cps binutils.dvi binutils.fn \ ++ binutils.fns binutils.ky binutils.kys binutils.ps \ ++ binutils.log binutils.pg binutils.toc binutils.tp \ ++ binutils.tps binutils.vr binutils.vrs binutils.op binutils.tr \ ++ binutils.cv binutils.cn binutils.guide binutils.html \ ++ binutils.ps ++ ++clean-ps: ++ ++distclean-ps: ++ ++maintainer-clean-ps: ++ rm -f $(PS_S) ++ ++mostlyclean-dvi: ++ rm -f binutils.aux binutils.cp binutils.cps binutils.dvi binutils.fn \ ++ binutils.fns binutils.ky binutils.kys binutils.ps \ ++ binutils.log binutils.pg binutils.toc binutils.tp \ ++ binutils.tps binutils.vr binutils.vrs binutils.op binutils.tr \ ++ binutils.cv binutils.cn binutils.guide binutils.html \ ++ binutils.ps ++ ++clean-dvi: ++ ++distclean-dvi: ++ ++maintainer-clean-dvi: ++ rm -f $(DVIS) ++ + mostlyclean-aminfo: + -rm -f binutils.aux binutils.cp binutils.cps binutils.dvi binutils.fn \ + binutils.fns binutils.ky binutils.kys binutils.ps \ + binutils.log binutils.pg binutils.toc binutils.tp \ + binutils.tps binutils.vr binutils.vrs binutils.op binutils.tr \ +- binutils.cv binutils.cn ++ binutils.cv binutils.cn binutils.guide binutils.html \ ++ binutils.ps + + clean-aminfo: + +@@ -637,101 +804,45 @@ maintainer-clean-aminfo: + fi; \ + done + clean-info: mostlyclean-aminfo +-install-man: $(MANS) +- $(NORMAL_INSTALL) +- $(mkinstalldirs) $(mandir)/man1 +- @sect=1; \ +- inst=`echo "ar" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/ar.1; then file=$(srcdir)/ar.1; \ +- else file=ar.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "nlmconv" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/nlmconv.1; then file=$(srcdir)/nlmconv.1; \ +- else file=nlmconv.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "$(DEMANGLER_PROG)" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/$(DEMANGLER_PROG).1; then file=$(srcdir)/$(DEMANGLER_PROG).1; \ +- else file=$(DEMANGLER_PROG).1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "nm" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/nm.1; then file=$(srcdir)/nm.1; \ +- else file=nm.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "objdump" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/objdump.1; then file=$(srcdir)/objdump.1; \ +- else file=objdump.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "ranlib" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/ranlib.1; then file=$(srcdir)/ranlib.1; \ +- else file=ranlib.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "size" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/size.1; then file=$(srcdir)/size.1; \ +- else file=size.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "strings" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/strings.1; then file=$(srcdir)/strings.1; \ +- else file=strings.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "strip" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/strip.1; then file=$(srcdir)/strip.1; \ +- else file=strip.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "objcopy" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/objcopy.1; then file=$(srcdir)/objcopy.1; \ +- else file=objcopy.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +- @sect=1; \ +- inst=`echo "addr2line" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/addr2line.1; then file=$(srcdir)/addr2line.1; \ +- else file=addr2line.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst + +-uninstall-man: +- $(NORMAL_UNINSTALL) +- -inst=`echo "ar" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "nlmconv" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "$(DEMANGLER_PROG)" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "nm" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "objdump" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "ranlib" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "size" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "strings" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "strip" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "objcopy" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst +- -inst=`echo "addr2line" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst ++install-man1: ++ $(mkinstalldirs) $(DESTDIR)$(man1dir) ++ @list='$(man1_MANS)'; \ ++ l2='$(man_MANS)'; for i in $$l2; do \ ++ case "$$i" in \ ++ *.1*) list="$$list $$i" ;; \ ++ esac; \ ++ done; \ ++ for i in $$list; do \ ++ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ ++ else file=$$i; fi; \ ++ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ ++ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ ++ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ ++ done + ++uninstall-man1: ++ @list='$(man1_MANS)'; \ ++ l2='$(man_MANS)'; for i in $$l2; do \ ++ case "$$i" in \ ++ *.1*) list="$$list $$i" ;; \ ++ esac; \ ++ done; \ ++ for i in $$list; do \ ++ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ ++ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ ++ rm -f $(DESTDIR)$(man1dir)/$$inst; \ ++ done ++install-man: $(MANS) ++ @$(NORMAL_INSTALL) ++ $(MAKE) install-man1 ++uninstall-man: ++ @$(NORMAL_UNINSTALL) ++ $(MAKE) uninstall-man1 + + tags: TAGS + +@@ -827,6 +938,9 @@ site.exp: Makefile + -@mv site.exp site.bak + @mv $@-t site.exp + info: $(INFO_DEPS) ++guide: $(GUIDE_DEPS) ++html: $(HTML_DEPS) ++ps: $(PS_DEPS) + dvi: $(DVIS) + check: + $(MAKE) check-DEJAGNU +@@ -843,12 +957,10 @@ install: install-exec install-data all + + uninstall: uninstall-binPROGRAMS uninstall-man + +-all: Makefile $(PROGRAMS) $(MANS) config.h +- + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: +- $(mkinstalldirs) $(bindir) $(mandir)/man1 ++ $(mkinstalldirs) $(DATADIR)$(bindir) $(DESTDIR)$(mandir)/man1 + + + mostlyclean-generic: +@@ -867,40 +979,51 @@ maintainer-clean-generic: + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + mostlyclean: mostlyclean-hdr mostlyclean-binPROGRAMS \ + mostlyclean-noinstPROGRAMS mostlyclean-compile \ +- mostlyclean-libtool mostlyclean-aminfo mostlyclean-tags \ +- mostlyclean-generic mostlyclean-local ++ mostlyclean-libtool mostlyclean-aminfo \ ++ mostlyclean-guide mostlyclean-html mostlyclean-dvi \ ++ mostlyclean-ps mostlyclean-tags mostlyclean-generic \ ++ mostlyclean-local + + clean: clean-hdr clean-binPROGRAMS clean-noinstPROGRAMS clean-compile \ +- clean-libtool clean-aminfo clean-tags clean-generic \ +- mostlyclean ++ clean-libtool clean-aminfo clean-guide clean-html \ ++ clean-dvi clean-ps clean-tags clean-generic mostlyclean + + distclean: distclean-hdr distclean-binPROGRAMS distclean-noinstPROGRAMS \ + distclean-compile distclean-libtool distclean-aminfo \ +- distclean-tags distclean-generic clean ++ distclean-guide distclean-html distclean-dvi \ ++ distclean-ps distclean-tags distclean-generic clean + -rm -f config.status + -rm -f libtool + + maintainer-clean: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ + maintainer-clean-noinstPROGRAMS \ + maintainer-clean-compile maintainer-clean-libtool \ +- maintainer-clean-aminfo maintainer-clean-tags \ ++ maintainer-clean-aminfo maintainer-clean-guide \ ++ maintainer-clean-html maintainer-clean-dvi \ ++ maintainer-clean-ps maintainer-clean-tags \ + maintainer-clean-generic distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + -rm -f config.status + +-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ +-maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \ +-clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \ +-install-binPROGRAMS mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ ++.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ ++mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ ++maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ ++mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ + clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ + mostlyclean-compile distclean-compile clean-compile \ + maintainer-clean-compile mostlyclean-libtool distclean-libtool \ + clean-libtool maintainer-clean-libtool install-info-am uninstall-info \ +-mostlyclean-aminfo distclean-aminfo clean-aminfo \ +-maintainer-clean-aminfo install-man uninstall-man tags mostlyclean-tags \ +-distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \ +-info dvi installcheck install-info install-exec install-data install \ ++install-guide uninstall-guide install-ps uninstall-ps install-html \ ++uninstall-html install-dvi uninstall-dvi mostlyclean-guide \ ++distclean-guide clean-guide maintainer-clean-guide mostlyclean-html \ ++distclean-html clean-html maintainer-clean-html mostlyclean-ps \ ++distclean-ps clean-ps maintainer-clean-ps mostlyclean-dvi distclean-dvi \ ++clean-dvi maintainer-clean-dvi mostlyclean-aminfo distclean-aminfo \ ++clean-aminfo maintainer-clean-aminfo install-man1 uninstall-man1 \ ++install-man uninstall-man tags mostlyclean-tags distclean-tags \ ++clean-tags maintainer-clean-tags distdir check-DEJAGNU info guide html \ ++ps dvi installcheck install-info install-exec install-data install \ + uninstall all installdirs mostlyclean-generic distclean-generic \ + clean-generic maintainer-clean-generic clean mostlyclean distclean \ + maintainer-clean +diff -rup --new-file binutils-2.9.1/binutils/arlex.c binutils-2.9.1/binutils/arlex.c +--- binutils-2.9.1/binutils/arlex.c Fri May 1 08:49:30 1998 ++++ binutils-2.9.1/binutils/arlex.c Wed Dec 31 17:00:00 1969 +@@ -1,1803 +0,0 @@ +-/* A lexical scanner generated by flex */ +- +-/* Scanner skeleton version: +- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $ +- */ +- +-#define FLEX_SCANNER +-#define YY_FLEX_MAJOR_VERSION 2 +-#define YY_FLEX_MINOR_VERSION 5 +- +-#include +- +- +-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +-#ifdef c_plusplus +-#ifndef __cplusplus +-#define __cplusplus +-#endif +-#endif +- +- +-#ifdef __cplusplus +- +-#include +-#include +- +-/* Use prototypes in function declarations. */ +-#define YY_USE_PROTOS +- +-/* The "const" storage-class-modifier is valid. */ +-#define YY_USE_CONST +- +-#else /* ! __cplusplus */ +- +-#if __STDC__ +- +-#define YY_USE_PROTOS +-#define YY_USE_CONST +- +-#endif /* __STDC__ */ +-#endif /* ! __cplusplus */ +- +-#ifdef __TURBOC__ +- #pragma warn -rch +- #pragma warn -use +-#include +-#include +-#define YY_USE_CONST +-#define YY_USE_PROTOS +-#endif +- +-#ifdef YY_USE_CONST +-#define yyconst const +-#else +-#define yyconst +-#endif +- +- +-#ifdef YY_USE_PROTOS +-#define YY_PROTO(proto) proto +-#else +-#define YY_PROTO(proto) () +-#endif +- +-/* Returned upon end-of-file. */ +-#define YY_NULL 0 +- +-/* Promotes a possibly negative, possibly signed char to an unsigned +- * integer for use as an array index. If the signed char is negative, +- * we want to instead treat it as an 8-bit unsigned char, hence the +- * double cast. +- */ +-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +- +-/* Enter a start condition. This macro really ought to take a parameter, +- * but we do it the disgusting crufty way forced on us by the ()-less +- * definition of BEGIN. +- */ +-#define BEGIN yy_start = 1 + 2 * +- +-/* Translate the current start state into a value that can be later handed +- * to BEGIN to return to the state. The YYSTATE alias is for lex +- * compatibility. +- */ +-#define YY_START ((yy_start - 1) / 2) +-#define YYSTATE YY_START +- +-/* Action number for EOF rule of a given start state. */ +-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +- +-/* Special action meaning "start processing a new file". */ +-#define YY_NEW_FILE yyrestart( yyin ) +- +-#define YY_END_OF_BUFFER_CHAR 0 +- +-/* Size of default input buffer. */ +-#define YY_BUF_SIZE 16384 +- +-typedef struct yy_buffer_state *YY_BUFFER_STATE; +- +-extern int yyleng; +-extern FILE *yyin, *yyout; +- +-#define EOB_ACT_CONTINUE_SCAN 0 +-#define EOB_ACT_END_OF_FILE 1 +-#define EOB_ACT_LAST_MATCH 2 +- +-/* The funky do-while in the following #define is used to turn the definition +- * int a single C statement (which needs a semi-colon terminator). This +- * avoids problems with code like: +- * +- * if ( condition_holds ) +- * yyless( 5 ); +- * else +- * do_something_else(); +- * +- * Prior to using the do-while the compiler would get upset at the +- * "else" because it interpreted the "if" statement as being all +- * done when it reached the ';' after the yyless() call. +- */ +- +-/* Return all but the first 'n' matched characters back to the input stream. */ +- +-#define yyless(n) \ +- do \ +- { \ +- /* Undo effects of setting up yytext. */ \ +- *yy_cp = yy_hold_char; \ +- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ +- YY_DO_BEFORE_ACTION; /* set up yytext again */ \ +- } \ +- while ( 0 ) +- +-#define unput(c) yyunput( c, yytext_ptr ) +- +-/* The following is because we cannot portably get our hands on size_t +- * (without autoconf's help, which isn't available because we want +- * flex-generated scanners to compile on their own). +- */ +-typedef unsigned int yy_size_t; +- +- +-struct yy_buffer_state +- { +- FILE *yy_input_file; +- +- char *yy_ch_buf; /* input buffer */ +- char *yy_buf_pos; /* current position in input buffer */ +- +- /* Size of input buffer in bytes, not including room for EOB +- * characters. +- */ +- yy_size_t yy_buf_size; +- +- /* Number of characters read into yy_ch_buf, not including EOB +- * characters. +- */ +- int yy_n_chars; +- +- /* Whether we "own" the buffer - i.e., we know we created it, +- * and can realloc() it to grow it, and should free() it to +- * delete it. +- */ +- int yy_is_our_buffer; +- +- /* Whether this is an "interactive" input source; if so, and +- * if we're using stdio for input, then we want to use getc() +- * instead of fread(), to make sure we stop fetching input after +- * each newline. +- */ +- int yy_is_interactive; +- +- /* Whether we're considered to be at the beginning of a line. +- * If so, '^' rules will be active on the next match, otherwise +- * not. +- */ +- int yy_at_bol; +- +- /* Whether to try to fill the input buffer when we reach the +- * end of it. +- */ +- int yy_fill_buffer; +- +- int yy_buffer_status; +-#define YY_BUFFER_NEW 0 +-#define YY_BUFFER_NORMAL 1 +- /* When an EOF's been seen but there's still some text to process +- * then we mark the buffer as YY_EOF_PENDING, to indicate that we +- * shouldn't try reading from the input source any more. We might +- * still have a bunch of tokens to match, though, because of +- * possible backing-up. +- * +- * When we actually see the EOF, we change the status to "new" +- * (via yyrestart()), so that the user can continue scanning by +- * just pointing yyin at a new input file. +- */ +-#define YY_BUFFER_EOF_PENDING 2 +- }; +- +-static YY_BUFFER_STATE yy_current_buffer = 0; +- +-/* We provide macros for accessing buffer states in case in the +- * future we want to put the buffer states in a more general +- * "scanner state". +- */ +-#define YY_CURRENT_BUFFER yy_current_buffer +- +- +-/* yy_hold_char holds the character lost when yytext is formed. */ +-static char yy_hold_char; +- +-static int yy_n_chars; /* number of characters read into yy_ch_buf */ +- +- +-int yyleng; +- +-/* Points to current character in buffer. */ +-static char *yy_c_buf_p = (char *) 0; +-static int yy_init = 1; /* whether we need to initialize */ +-static int yy_start = 0; /* start state number */ +- +-/* Flag which is used to allow yywrap()'s to do buffer switches +- * instead of setting up a fresh yyin. A bit of a hack ... +- */ +-static int yy_did_buffer_switch_on_eof; +- +-void yyrestart YY_PROTO(( FILE *input_file )); +- +-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +-void yy_load_buffer_state YY_PROTO(( void )); +-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) +- +-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str )); +-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); +- +-static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +-static void yy_flex_free YY_PROTO(( void * )); +- +-#define yy_new_buffer yy_create_buffer +- +-#define yy_set_interactive(is_interactive) \ +- { \ +- if ( ! yy_current_buffer ) \ +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ +- yy_current_buffer->yy_is_interactive = is_interactive; \ +- } +- +-#define yy_set_bol(at_bol) \ +- { \ +- if ( ! yy_current_buffer ) \ +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ +- yy_current_buffer->yy_at_bol = at_bol; \ +- } +- +-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +- +-typedef unsigned char YY_CHAR; +-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +-typedef int yy_state_type; +-extern char *yytext; +-#define yytext_ptr yytext +- +-static yy_state_type yy_get_previous_state YY_PROTO(( void )); +-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +-static int yy_get_next_buffer YY_PROTO(( void )); +-static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +- +-/* Done after the current pattern has been matched and before the +- * corresponding action - sets up yytext. +- */ +-#define YY_DO_BEFORE_ACTION \ +- yytext_ptr = yy_bp; \ +- yyleng = (int) (yy_cp - yy_bp); \ +- yy_hold_char = *yy_cp; \ +- *yy_cp = '\0'; \ +- yy_c_buf_p = yy_cp; +- +-#define YY_NUM_RULES 40 +-#define YY_END_OF_BUFFER 41 +-static yyconst short int yy_accept[177] = +- { 0, +- 0, 0, 41, 40, 39, 38, 35, 32, 33, 36, +- 40, 34, 37, 35, 35, 35, 35, 35, 35, 35, +- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, +- 35, 35, 35, 35, 35, 35, 36, 31, 37, 35, +- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, +- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, +- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, +- 35, 35, 7, 35, 35, 35, 35, 35, 35, 35, +- 35, 35, 35, 35, 35, 35, 22, 35, 35, 35, +- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, +- +- 35, 35, 35, 10, 11, 12, 35, 15, 35, 35, +- 35, 35, 35, 35, 35, 35, 35, 25, 26, 27, +- 35, 30, 35, 35, 35, 3, 35, 35, 35, 35, +- 35, 35, 35, 35, 35, 18, 35, 35, 35, 35, +- 35, 35, 35, 1, 2, 4, 5, 35, 35, 35, +- 35, 35, 16, 17, 19, 20, 35, 35, 35, 35, +- 35, 35, 8, 9, 13, 14, 35, 23, 24, 28, +- 29, 35, 35, 6, 21, 0 +- } ; +- +-static yyconst int yy_ec[256] = +- { 0, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 3, 1, 1, 1, 4, 1, 1, 1, 5, +- 6, 7, 8, 9, 4, 4, 4, 4, 4, 4, +- 4, 4, 4, 4, 4, 4, 4, 4, 10, 1, +- 1, 1, 1, 1, 11, 12, 13, 14, 15, 16, +- 4, 17, 18, 4, 4, 19, 20, 21, 22, 23, +- 4, 24, 25, 26, 27, 28, 4, 29, 30, 4, +- 1, 1, 1, 1, 4, 1, 31, 32, 33, 34, +- +- 35, 36, 4, 37, 38, 4, 4, 39, 40, 41, +- 42, 43, 4, 44, 45, 46, 47, 48, 4, 49, +- 50, 4, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1 +- } ; +- +-static yyconst int yy_meta[51] = +- { 0, +- 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 +- } ; +- +-static yyconst short int yy_base[180] = +- { 0, +- 0, 0, 193, 194, 194, 194, 0, 194, 194, 0, +- 190, 194, 0, 177, 32, 37, 32, 163, 174, 170, +- 164, 171, 174, 169, 149, 15, 22, 17, 135, 146, +- 142, 136, 143, 146, 141, 0, 0, 194, 0, 161, +- 159, 158, 153, 147, 156, 143, 149, 148, 141, 150, +- 141, 135, 138, 127, 125, 124, 119, 113, 122, 109, +- 115, 114, 107, 116, 107, 101, 104, 43, 136, 135, +- 130, 129, 0, 119, 123, 118, 114, 118, 119, 122, +- 124, 25, 104, 103, 98, 97, 0, 87, 91, 86, +- 82, 86, 87, 90, 92, 105, 100, 97, 94, 93, +- +- 105, 106, 102, 0, 0, 0, 104, 0, 92, 75, +- 70, 67, 64, 63, 75, 76, 72, 0, 0, 0, +- 74, 0, 62, 91, 88, 0, 86, 85, 73, 85, +- 79, 83, 70, 62, 59, 0, 57, 56, 44, 56, +- 50, 54, 41, 0, 0, 0, 0, 63, 58, 59, +- 67, 66, 0, 0, 0, 0, 38, 33, 34, 42, +- 41, 51, 0, 0, 0, 0, 30, 0, 0, 0, +- 0, 43, 21, 0, 0, 194, 65, 66, 69 +- } ; +- +-static yyconst short int yy_def[180] = +- { 0, +- 176, 1, 176, 176, 176, 176, 177, 176, 176, 178, +- 176, 176, 179, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 178, 176, 179, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, +- 177, 177, 177, 177, 177, 0, 176, 176, 176 +- } ; +- +-static yyconst short int yy_nxt[245] = +- { 0, +- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, +- 14, 7, 15, 16, 17, 18, 19, 7, 20, 7, +- 7, 21, 7, 22, 23, 7, 7, 24, 7, 7, +- 25, 7, 26, 27, 28, 29, 30, 7, 31, 7, +- 7, 32, 7, 33, 34, 7, 7, 35, 7, 7, +- 41, 43, 45, 55, 44, 42, 57, 59, 56, 58, +- 46, 96, 97, 110, 111, 60, 37, 36, 37, 39, +- 175, 39, 174, 173, 172, 171, 170, 169, 168, 167, +- 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, +- 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, +- +- 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, +- 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, +- 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, +- 116, 115, 114, 113, 112, 109, 108, 107, 106, 105, +- 104, 103, 102, 101, 100, 99, 98, 95, 94, 93, +- 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, +- 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, +- 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, +- 62, 61, 54, 53, 52, 51, 50, 49, 48, 47, +- 40, 38, 176, 3, 176, 176, 176, 176, 176, 176, +- +- 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, +- 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, +- 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, +- 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, +- 176, 176, 176, 176 +- } ; +- +-static yyconst short int yy_chk[245] = +- { 0, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 15, 16, 17, 26, 16, 15, 27, 28, 26, 27, +- 17, 68, 68, 82, 82, 28, 178, 177, 178, 179, +- 173, 179, 172, 167, 162, 161, 160, 159, 158, 157, +- 152, 151, 150, 149, 148, 143, 142, 141, 140, 139, +- 138, 137, 135, 134, 133, 132, 131, 130, 129, 128, +- +- 127, 125, 124, 123, 121, 117, 116, 115, 114, 113, +- 112, 111, 110, 109, 107, 103, 102, 101, 100, 99, +- 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, +- 88, 86, 85, 84, 83, 81, 80, 79, 78, 77, +- 76, 75, 74, 72, 71, 70, 69, 67, 66, 65, +- 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, +- 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, +- 44, 43, 42, 41, 40, 35, 34, 33, 32, 31, +- 30, 29, 25, 24, 23, 22, 21, 20, 19, 18, +- 14, 11, 3, 176, 176, 176, 176, 176, 176, 176, +- +- 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, +- 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, +- 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, +- 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, +- 176, 176, 176, 176 +- } ; +- +-static yy_state_type yy_last_accepting_state; +-static char *yy_last_accepting_cpos; +- +-/* The intent behind this definition is that it'll catch +- * any uses of REJECT which flex missed. +- */ +-#define REJECT reject_used_but_not_detected +-#define yymore() yymore_used_but_not_detected +-#define YY_MORE_ADJ 0 +-char *yytext; +-#line 1 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-#define INITIAL 0 +-#line 2 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-/* arlex.l - Strange script language lexer */ +- +-/* Copyright (C) 1992, 95, 1997 Free Software Foundation, Inc. +- +-This file is part of GNU Binutils. +- +-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. */ +- +- +-/* Contributed by Steve Chamberlain +- sac@cygnus.com +- +-*/ +-#define DONTDECLARE_MALLOC +-#include +-#include "libiberty.h" +-#include "arparse.h" +- +-int linenumber; +-#line 503 "lex.yy.c" +- +-/* Macros after this point can all be overridden by user definitions in +- * section 1. +- */ +- +-#ifndef YY_SKIP_YYWRAP +-#ifdef __cplusplus +-extern "C" int yywrap YY_PROTO(( void )); +-#else +-extern int yywrap YY_PROTO(( void )); +-#endif +-#endif +- +-#ifndef YY_NO_UNPUT +-static void yyunput YY_PROTO(( int c, char *buf_ptr )); +-#endif +- +-#ifndef yytext_ptr +-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +-#endif +- +-#ifndef YY_NO_INPUT +-#ifdef __cplusplus +-static int yyinput YY_PROTO(( void )); +-#else +-static int input YY_PROTO(( void )); +-#endif +-#endif +- +-#if YY_STACK_USED +-static int yy_start_stack_ptr = 0; +-static int yy_start_stack_depth = 0; +-static int *yy_start_stack = 0; +-#ifndef YY_NO_PUSH_STATE +-static void yy_push_state YY_PROTO(( int new_state )); +-#endif +-#ifndef YY_NO_POP_STATE +-static void yy_pop_state YY_PROTO(( void )); +-#endif +-#ifndef YY_NO_TOP_STATE +-static int yy_top_state YY_PROTO(( void )); +-#endif +- +-#else +-#define YY_NO_PUSH_STATE 1 +-#define YY_NO_POP_STATE 1 +-#define YY_NO_TOP_STATE 1 +-#endif +- +-#ifdef YY_MALLOC_DECL +-YY_MALLOC_DECL +-#else +-#if __STDC__ +-#ifndef __cplusplus +-#include +-#endif +-#else +-/* Just try to get by without declaring the routines. This will fail +- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) +- * or sizeof(void*) != sizeof(int). +- */ +-#endif +-#endif +- +-/* Amount of stuff to slurp up with each read. */ +-#ifndef YY_READ_BUF_SIZE +-#define YY_READ_BUF_SIZE 8192 +-#endif +- +-/* Copy whatever the last rule matched to the standard output. */ +- +-#ifndef ECHO +-/* This used to be an fputs(), but since the string might contain NUL's, +- * we now use fwrite(). +- */ +-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +-#endif +- +-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, +- * is returned in "result". +- */ +-#ifndef YY_INPUT +-#define YY_INPUT(buf,result,max_size) \ +- if ( yy_current_buffer->yy_is_interactive ) \ +- { \ +- int c = '*', n; \ +- for ( n = 0; n < max_size && \ +- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ +- buf[n] = (char) c; \ +- if ( c == '\n' ) \ +- buf[n++] = (char) c; \ +- if ( c == EOF && ferror( yyin ) ) \ +- YY_FATAL_ERROR( "input in flex scanner failed" ); \ +- result = n; \ +- } \ +- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ +- && ferror( yyin ) ) \ +- YY_FATAL_ERROR( "input in flex scanner failed" ); +-#endif +- +-/* No semi-colon after return; correct usage is to write "yyterminate();" - +- * we don't want an extra ';' after the "return" because that will cause +- * some compilers to complain about unreachable statements. +- */ +-#ifndef yyterminate +-#define yyterminate() return YY_NULL +-#endif +- +-/* Number of entries by which start-condition stack grows. */ +-#ifndef YY_START_STACK_INCR +-#define YY_START_STACK_INCR 25 +-#endif +- +-/* Report a fatal error. */ +-#ifndef YY_FATAL_ERROR +-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +-#endif +- +-/* Default declaration of generated scanner - a define so the user can +- * easily add parameters. +- */ +-#ifndef YY_DECL +-#define YY_DECL int yylex YY_PROTO(( void )) +-#endif +- +-/* Code executed at the beginning of each rule, after yytext and yyleng +- * have been set up. +- */ +-#ifndef YY_USER_ACTION +-#define YY_USER_ACTION +-#endif +- +-/* Code executed at the end of each rule. */ +-#ifndef YY_BREAK +-#define YY_BREAK break; +-#endif +- +-#define YY_RULE_SETUP \ +- YY_USER_ACTION +- +-YY_DECL +- { +- register yy_state_type yy_current_state; +- register char *yy_cp, *yy_bp; +- register int yy_act; +- +-#line 34 "/5g/ian/binutils/release/copy/binutils/arlex.l" +- +- +-#line 653 "lex.yy.c" +- +- if ( yy_init ) +- { +- yy_init = 0; +- +-#ifdef YY_USER_INIT +- YY_USER_INIT; +-#endif +- +- if ( ! yy_start ) +- yy_start = 1; /* first start state */ +- +- if ( ! yyin ) +- yyin = stdin; +- +- if ( ! yyout ) +- yyout = stdout; +- +- if ( ! yy_current_buffer ) +- yy_current_buffer = +- yy_create_buffer( yyin, YY_BUF_SIZE ); +- +- yy_load_buffer_state(); +- } +- +- while ( 1 ) /* loops until end-of-file is reached */ +- { +- yy_cp = yy_c_buf_p; +- +- /* Support of yytext. */ +- *yy_cp = yy_hold_char; +- +- /* yy_bp points to the position in yy_ch_buf of the start of +- * the current run. +- */ +- yy_bp = yy_cp; +- +- yy_current_state = yy_start; +-yy_match: +- do +- { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 177 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- ++yy_cp; +- } +- while ( yy_base[yy_current_state] != 194 ); +- +-yy_find_action: +- yy_act = yy_accept[yy_current_state]; +- if ( yy_act == 0 ) +- { /* have to back up */ +- yy_cp = yy_last_accepting_cpos; +- yy_current_state = yy_last_accepting_state; +- yy_act = yy_accept[yy_current_state]; +- } +- +- YY_DO_BEFORE_ACTION; +- +- +-do_action: /* This label is used only to access EOF actions. */ +- +- +- switch ( yy_act ) +- { /* beginning of action switch */ +- case 0: /* must back up */ +- /* undo the effects of YY_DO_BEFORE_ACTION */ +- *yy_cp = yy_hold_char; +- yy_cp = yy_last_accepting_cpos; +- yy_current_state = yy_last_accepting_state; +- goto yy_find_action; +- +-case 1: +-YY_RULE_SETUP +-#line 36 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return ADDLIB; } +- YY_BREAK +-case 2: +-YY_RULE_SETUP +-#line 37 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return ADDMOD; } +- YY_BREAK +-case 3: +-YY_RULE_SETUP +-#line 38 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return CLEAR; } +- YY_BREAK +-case 4: +-YY_RULE_SETUP +-#line 39 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return CREATE; } +- YY_BREAK +-case 5: +-YY_RULE_SETUP +-#line 40 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return DELETE; } +- YY_BREAK +-case 6: +-YY_RULE_SETUP +-#line 41 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return DIRECTORY; } +- YY_BREAK +-case 7: +-YY_RULE_SETUP +-#line 42 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return END; } +- YY_BREAK +-case 8: +-YY_RULE_SETUP +-#line 43 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return EXTRACT; } +- YY_BREAK +-case 9: +-YY_RULE_SETUP +-#line 44 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return FULLDIR; } +- YY_BREAK +-case 10: +-YY_RULE_SETUP +-#line 45 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return HELP; } +- YY_BREAK +-case 11: +-YY_RULE_SETUP +-#line 46 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return LIST; } +- YY_BREAK +-case 12: +-YY_RULE_SETUP +-#line 47 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return OPEN; } +- YY_BREAK +-case 13: +-YY_RULE_SETUP +-#line 48 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return REPLACE; } +- YY_BREAK +-case 14: +-YY_RULE_SETUP +-#line 49 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return VERBOSE; } +- YY_BREAK +-case 15: +-YY_RULE_SETUP +-#line 50 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return SAVE; } +- YY_BREAK +-case 16: +-YY_RULE_SETUP +-#line 51 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return ADDLIB; } +- YY_BREAK +-case 17: +-YY_RULE_SETUP +-#line 52 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return ADDMOD; } +- YY_BREAK +-case 18: +-YY_RULE_SETUP +-#line 53 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return CLEAR; } +- YY_BREAK +-case 19: +-YY_RULE_SETUP +-#line 54 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return CREATE; } +- YY_BREAK +-case 20: +-YY_RULE_SETUP +-#line 55 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return DELETE; } +- YY_BREAK +-case 21: +-YY_RULE_SETUP +-#line 56 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return DIRECTORY; } +- YY_BREAK +-case 22: +-YY_RULE_SETUP +-#line 57 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return END; } +- YY_BREAK +-case 23: +-YY_RULE_SETUP +-#line 58 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return EXTRACT; } +- YY_BREAK +-case 24: +-YY_RULE_SETUP +-#line 59 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return FULLDIR; } +- YY_BREAK +-case 25: +-YY_RULE_SETUP +-#line 60 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return HELP; } +- YY_BREAK +-case 26: +-YY_RULE_SETUP +-#line 61 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return LIST; } +- YY_BREAK +-case 27: +-YY_RULE_SETUP +-#line 62 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return OPEN; } +- YY_BREAK +-case 28: +-YY_RULE_SETUP +-#line 63 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return REPLACE; } +- YY_BREAK +-case 29: +-YY_RULE_SETUP +-#line 64 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return VERBOSE; } +- YY_BREAK +-case 30: +-YY_RULE_SETUP +-#line 65 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return SAVE; } +- YY_BREAK +-case 31: +-YY_RULE_SETUP +-#line 66 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ linenumber ++; } +- YY_BREAK +-case 32: +-YY_RULE_SETUP +-#line 67 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return '('; } +- YY_BREAK +-case 33: +-YY_RULE_SETUP +-#line 68 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return ')'; } +- YY_BREAK +-case 34: +-YY_RULE_SETUP +-#line 69 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ return ','; } +- YY_BREAK +-case 35: +-YY_RULE_SETUP +-#line 70 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ +- yylval.name = xstrdup (yytext); +- return FILENAME; +- } +- YY_BREAK +-case 36: +-YY_RULE_SETUP +-#line 74 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ } +- YY_BREAK +-case 37: +-YY_RULE_SETUP +-#line 75 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ } +- YY_BREAK +-case 38: +-YY_RULE_SETUP +-#line 76 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ } +- YY_BREAK +-case 39: +-YY_RULE_SETUP +-#line 77 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-{ linenumber ++; return NEWLINE; } +- YY_BREAK +-case 40: +-YY_RULE_SETUP +-#line 79 "/5g/ian/binutils/release/copy/binutils/arlex.l" +-ECHO; +- YY_BREAK +-#line 939 "lex.yy.c" +-case YY_STATE_EOF(INITIAL): +- yyterminate(); +- +- case YY_END_OF_BUFFER: +- { +- /* Amount of text matched not including the EOB char. */ +- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; +- +- /* Undo the effects of YY_DO_BEFORE_ACTION. */ +- *yy_cp = yy_hold_char; +- +- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) +- { +- /* We're scanning a new file or input source. It's +- * possible that this happened because the user +- * just pointed yyin at a new source and called +- * yylex(). If so, then we have to assure +- * consistency between yy_current_buffer and our +- * globals. Here is the right place to do so, because +- * this is the first action (other than possibly a +- * back-up) that will match for the new input source. +- */ +- yy_n_chars = yy_current_buffer->yy_n_chars; +- yy_current_buffer->yy_input_file = yyin; +- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; +- } +- +- /* Note that here we test for yy_c_buf_p "<=" to the position +- * of the first EOB in the buffer, since yy_c_buf_p will +- * already have been incremented past the NUL character +- * (since all states make transitions on EOB to the +- * end-of-buffer state). Contrast this with the test +- * in input(). +- */ +- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) +- { /* This was really a NUL. */ +- yy_state_type yy_next_state; +- +- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; +- +- yy_current_state = yy_get_previous_state(); +- +- /* Okay, we're now positioned to make the NUL +- * transition. We couldn't have +- * yy_get_previous_state() go ahead and do it +- * for us because it doesn't know how to deal +- * with the possibility of jamming (and we don't +- * want to build jamming into it because then it +- * will run more slowly). +- */ +- +- yy_next_state = yy_try_NUL_trans( yy_current_state ); +- +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- +- if ( yy_next_state ) +- { +- /* Consume the NUL. */ +- yy_cp = ++yy_c_buf_p; +- yy_current_state = yy_next_state; +- goto yy_match; +- } +- +- else +- { +- yy_cp = yy_c_buf_p; +- goto yy_find_action; +- } +- } +- +- else switch ( yy_get_next_buffer() ) +- { +- case EOB_ACT_END_OF_FILE: +- { +- yy_did_buffer_switch_on_eof = 0; +- +- if ( yywrap() ) +- { +- /* Note: because we've taken care in +- * yy_get_next_buffer() to have set up +- * yytext, we can now set up +- * yy_c_buf_p so that if some total +- * hoser (like flex itself) wants to +- * call the scanner after we return the +- * YY_NULL, it'll still work - another +- * YY_NULL will get returned. +- */ +- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; +- +- yy_act = YY_STATE_EOF(YY_START); +- goto do_action; +- } +- +- else +- { +- if ( ! yy_did_buffer_switch_on_eof ) +- YY_NEW_FILE; +- } +- break; +- } +- +- case EOB_ACT_CONTINUE_SCAN: +- yy_c_buf_p = +- yytext_ptr + yy_amount_of_matched_text; +- +- yy_current_state = yy_get_previous_state(); +- +- yy_cp = yy_c_buf_p; +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- goto yy_match; +- +- case EOB_ACT_LAST_MATCH: +- yy_c_buf_p = +- &yy_current_buffer->yy_ch_buf[yy_n_chars]; +- +- yy_current_state = yy_get_previous_state(); +- +- yy_cp = yy_c_buf_p; +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- goto yy_find_action; +- } +- break; +- } +- +- default: +- YY_FATAL_ERROR( +- "fatal flex scanner internal error--no action found" ); +- } /* end of action switch */ +- } /* end of scanning one token */ +- } /* end of yylex */ +- +- +-/* yy_get_next_buffer - try to read in a new buffer +- * +- * Returns a code representing an action: +- * EOB_ACT_LAST_MATCH - +- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position +- * EOB_ACT_END_OF_FILE - end of file +- */ +- +-static int yy_get_next_buffer() +- { +- register char *dest = yy_current_buffer->yy_ch_buf; +- register char *source = yytext_ptr; +- register int number_to_move, i; +- int ret_val; +- +- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) +- YY_FATAL_ERROR( +- "fatal flex scanner internal error--end of buffer missed" ); +- +- if ( yy_current_buffer->yy_fill_buffer == 0 ) +- { /* Don't try to fill the buffer, so this is an EOF. */ +- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) +- { +- /* We matched a singled characater, the EOB, so +- * treat this as a final EOF. +- */ +- return EOB_ACT_END_OF_FILE; +- } +- +- else +- { +- /* We matched some text prior to the EOB, first +- * process it. +- */ +- return EOB_ACT_LAST_MATCH; +- } +- } +- +- /* Try to read more data. */ +- +- /* First move last chars to start of buffer. */ +- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; +- +- for ( i = 0; i < number_to_move; ++i ) +- *(dest++) = *(source++); +- +- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) +- /* don't do the read, it's not guaranteed to return an EOF, +- * just force an EOF +- */ +- yy_n_chars = 0; +- +- else +- { +- int num_to_read = +- yy_current_buffer->yy_buf_size - number_to_move - 1; +- +- while ( num_to_read <= 0 ) +- { /* Not enough room in the buffer - grow it. */ +-#ifdef YY_USES_REJECT +- YY_FATAL_ERROR( +-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +-#else +- +- /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = yy_current_buffer; +- +- int yy_c_buf_p_offset = +- (int) (yy_c_buf_p - b->yy_ch_buf); +- +- if ( b->yy_is_our_buffer ) +- { +- int new_size = b->yy_buf_size * 2; +- +- if ( new_size <= 0 ) +- b->yy_buf_size += b->yy_buf_size / 8; +- else +- b->yy_buf_size *= 2; +- +- b->yy_ch_buf = (char *) +- /* Include room in for 2 EOB chars. */ +- yy_flex_realloc( (void *) b->yy_ch_buf, +- b->yy_buf_size + 2 ); +- } +- else +- /* Can't grow it, we don't own it. */ +- b->yy_ch_buf = 0; +- +- if ( ! b->yy_ch_buf ) +- YY_FATAL_ERROR( +- "fatal error - scanner input buffer overflow" ); +- +- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; +- +- num_to_read = yy_current_buffer->yy_buf_size - +- number_to_move - 1; +-#endif +- } +- +- if ( num_to_read > YY_READ_BUF_SIZE ) +- num_to_read = YY_READ_BUF_SIZE; +- +- /* Read in more data. */ +- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), +- yy_n_chars, num_to_read ); +- } +- +- if ( yy_n_chars == 0 ) +- { +- if ( number_to_move == YY_MORE_ADJ ) +- { +- ret_val = EOB_ACT_END_OF_FILE; +- yyrestart( yyin ); +- } +- +- else +- { +- ret_val = EOB_ACT_LAST_MATCH; +- yy_current_buffer->yy_buffer_status = +- YY_BUFFER_EOF_PENDING; +- } +- } +- +- else +- ret_val = EOB_ACT_CONTINUE_SCAN; +- +- yy_n_chars += number_to_move; +- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; +- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; +- +- yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; +- +- return ret_val; +- } +- +- +-/* yy_get_previous_state - get the state just before the EOB char was reached */ +- +-static yy_state_type yy_get_previous_state() +- { +- register yy_state_type yy_current_state; +- register char *yy_cp; +- +- yy_current_state = yy_start; +- +- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) +- { +- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 177 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- } +- +- return yy_current_state; +- } +- +- +-/* yy_try_NUL_trans - try to make a transition on the NUL character +- * +- * synopsis +- * next_state = yy_try_NUL_trans( current_state ); +- */ +- +-#ifdef YY_USE_PROTOS +-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +-#else +-static yy_state_type yy_try_NUL_trans( yy_current_state ) +-yy_state_type yy_current_state; +-#endif +- { +- register int yy_is_jam; +- register char *yy_cp = yy_c_buf_p; +- +- register YY_CHAR yy_c = 1; +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 177 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 176); +- +- return yy_is_jam ? 0 : yy_current_state; +- } +- +- +-#ifndef YY_NO_UNPUT +-#ifdef YY_USE_PROTOS +-static void yyunput( int c, register char *yy_bp ) +-#else +-static void yyunput( c, yy_bp ) +-int c; +-register char *yy_bp; +-#endif +- { +- register char *yy_cp = yy_c_buf_p; +- +- /* undo effects of setting up yytext */ +- *yy_cp = yy_hold_char; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- { /* need to shift things up to make room */ +- /* +2 for EOB chars. */ +- register int number_to_move = yy_n_chars + 2; +- register char *dest = &yy_current_buffer->yy_ch_buf[ +- yy_current_buffer->yy_buf_size + 2]; +- register char *source = +- &yy_current_buffer->yy_ch_buf[number_to_move]; +- +- while ( source > yy_current_buffer->yy_ch_buf ) +- *--dest = *--source; +- +- yy_cp += (int) (dest - source); +- yy_bp += (int) (dest - source); +- yy_n_chars = yy_current_buffer->yy_buf_size; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- YY_FATAL_ERROR( "flex scanner push-back overflow" ); +- } +- +- *--yy_cp = (char) c; +- +- +- yytext_ptr = yy_bp; +- yy_hold_char = *yy_cp; +- yy_c_buf_p = yy_cp; +- } +-#endif /* ifndef YY_NO_UNPUT */ +- +- +-#ifdef __cplusplus +-static int yyinput() +-#else +-static int input() +-#endif +- { +- int c; +- +- *yy_c_buf_p = yy_hold_char; +- +- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) +- { +- /* yy_c_buf_p now points to the character we want to return. +- * If this occurs *before* the EOB characters, then it's a +- * valid NUL; if not, then we've hit the end of the buffer. +- */ +- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) +- /* This was really a NUL. */ +- *yy_c_buf_p = '\0'; +- +- else +- { /* need more input */ +- yytext_ptr = yy_c_buf_p; +- ++yy_c_buf_p; +- +- switch ( yy_get_next_buffer() ) +- { +- case EOB_ACT_END_OF_FILE: +- { +- if ( yywrap() ) +- { +- yy_c_buf_p = +- yytext_ptr + YY_MORE_ADJ; +- return EOF; +- } +- +- if ( ! yy_did_buffer_switch_on_eof ) +- YY_NEW_FILE; +-#ifdef __cplusplus +- return yyinput(); +-#else +- return input(); +-#endif +- } +- +- case EOB_ACT_CONTINUE_SCAN: +- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; +- break; +- +- case EOB_ACT_LAST_MATCH: +-#ifdef __cplusplus +- YY_FATAL_ERROR( +- "unexpected last match in yyinput()" ); +-#else +- YY_FATAL_ERROR( +- "unexpected last match in input()" ); +-#endif +- } +- } +- } +- +- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ +- *yy_c_buf_p = '\0'; /* preserve yytext */ +- yy_hold_char = *++yy_c_buf_p; +- +- +- return c; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yyrestart( FILE *input_file ) +-#else +-void yyrestart( input_file ) +-FILE *input_file; +-#endif +- { +- if ( ! yy_current_buffer ) +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); +- +- yy_init_buffer( yy_current_buffer, input_file ); +- yy_load_buffer_state(); +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +-#else +-void yy_switch_to_buffer( new_buffer ) +-YY_BUFFER_STATE new_buffer; +-#endif +- { +- if ( yy_current_buffer == new_buffer ) +- return; +- +- if ( yy_current_buffer ) +- { +- /* Flush out information for old buffer. */ +- *yy_c_buf_p = yy_hold_char; +- yy_current_buffer->yy_buf_pos = yy_c_buf_p; +- yy_current_buffer->yy_n_chars = yy_n_chars; +- } +- +- yy_current_buffer = new_buffer; +- yy_load_buffer_state(); +- +- /* We don't actually know whether we did this switch during +- * EOF (yywrap()) processing, but the only time this flag +- * is looked at is after yywrap() is called, so it's safe +- * to go ahead and always set it. +- */ +- yy_did_buffer_switch_on_eof = 1; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_load_buffer_state( void ) +-#else +-void yy_load_buffer_state() +-#endif +- { +- yy_n_chars = yy_current_buffer->yy_n_chars; +- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; +- yyin = yy_current_buffer->yy_input_file; +- yy_hold_char = *yy_c_buf_p; +- } +- +- +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +-#else +-YY_BUFFER_STATE yy_create_buffer( file, size ) +-FILE *file; +-int size; +-#endif +- { +- YY_BUFFER_STATE b; +- +- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); +- if ( ! b ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +- +- b->yy_buf_size = size; +- +- /* yy_ch_buf has to be 2 characters longer than the size given because +- * we need to put in 2 end-of-buffer characters. +- */ +- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); +- if ( ! b->yy_ch_buf ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +- +- b->yy_is_our_buffer = 1; +- +- yy_init_buffer( b, file ); +- +- return b; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_delete_buffer( YY_BUFFER_STATE b ) +-#else +-void yy_delete_buffer( b ) +-YY_BUFFER_STATE b; +-#endif +- { +- if ( ! b ) +- return; +- +- if ( b == yy_current_buffer ) +- yy_current_buffer = (YY_BUFFER_STATE) 0; +- +- if ( b->yy_is_our_buffer ) +- yy_flex_free( (void *) b->yy_ch_buf ); +- +- yy_flex_free( (void *) b ); +- } +- +- +-#ifndef YY_ALWAYS_INTERACTIVE +-#ifndef YY_NEVER_INTERACTIVE +-extern int isatty YY_PROTO(( int )); +-#endif +-#endif +- +-#ifdef YY_USE_PROTOS +-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +-#else +-void yy_init_buffer( b, file ) +-YY_BUFFER_STATE b; +-FILE *file; +-#endif +- +- +- { +- yy_flush_buffer( b ); +- +- b->yy_input_file = file; +- b->yy_fill_buffer = 1; +- +-#if YY_ALWAYS_INTERACTIVE +- b->yy_is_interactive = 1; +-#else +-#if YY_NEVER_INTERACTIVE +- b->yy_is_interactive = 0; +-#else +- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +-#endif +-#endif +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_flush_buffer( YY_BUFFER_STATE b ) +-#else +-void yy_flush_buffer( b ) +-YY_BUFFER_STATE b; +-#endif +- +- { +- b->yy_n_chars = 0; +- +- /* We always need two end-of-buffer characters. The first causes +- * a transition to the end-of-buffer state. The second causes +- * a jam in that state. +- */ +- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; +- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; +- +- b->yy_buf_pos = &b->yy_ch_buf[0]; +- +- b->yy_at_bol = 1; +- b->yy_buffer_status = YY_BUFFER_NEW; +- +- if ( b == yy_current_buffer ) +- yy_load_buffer_state(); +- } +- +- +-#ifndef YY_NO_SCAN_BUFFER +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +-#else +-YY_BUFFER_STATE yy_scan_buffer( base, size ) +-char *base; +-yy_size_t size; +-#endif +- { +- YY_BUFFER_STATE b; +- +- if ( size < 2 || +- base[size-2] != YY_END_OF_BUFFER_CHAR || +- base[size-1] != YY_END_OF_BUFFER_CHAR ) +- /* They forgot to leave room for the EOB's. */ +- return 0; +- +- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); +- if ( ! b ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); +- +- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ +- b->yy_buf_pos = b->yy_ch_buf = base; +- b->yy_is_our_buffer = 0; +- b->yy_input_file = 0; +- b->yy_n_chars = b->yy_buf_size; +- b->yy_is_interactive = 0; +- b->yy_at_bol = 1; +- b->yy_fill_buffer = 0; +- b->yy_buffer_status = YY_BUFFER_NEW; +- +- yy_switch_to_buffer( b ); +- +- return b; +- } +-#endif +- +- +-#ifndef YY_NO_SCAN_STRING +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_string( yyconst char *str ) +-#else +-YY_BUFFER_STATE yy_scan_string( str ) +-yyconst char *str; +-#endif +- { +- int len; +- for ( len = 0; str[len]; ++len ) +- ; +- +- return yy_scan_bytes( str, len ); +- } +-#endif +- +- +-#ifndef YY_NO_SCAN_BYTES +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +-#else +-YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +-yyconst char *bytes; +-int len; +-#endif +- { +- YY_BUFFER_STATE b; +- char *buf; +- yy_size_t n; +- int i; +- +- /* Get memory for full buffer, including space for trailing EOB's. */ +- n = len + 2; +- buf = (char *) yy_flex_alloc( n ); +- if ( ! buf ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); +- +- for ( i = 0; i < len; ++i ) +- buf[i] = bytes[i]; +- +- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; +- +- b = yy_scan_buffer( buf, n ); +- if ( ! b ) +- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); +- +- /* It's okay to grow etc. this buffer, and we should throw it +- * away when we're done. +- */ +- b->yy_is_our_buffer = 1; +- +- return b; +- } +-#endif +- +- +-#ifndef YY_NO_PUSH_STATE +-#ifdef YY_USE_PROTOS +-static void yy_push_state( int new_state ) +-#else +-static void yy_push_state( new_state ) +-int new_state; +-#endif +- { +- if ( yy_start_stack_ptr >= yy_start_stack_depth ) +- { +- yy_size_t new_size; +- +- yy_start_stack_depth += YY_START_STACK_INCR; +- new_size = yy_start_stack_depth * sizeof( int ); +- +- if ( ! yy_start_stack ) +- yy_start_stack = (int *) yy_flex_alloc( new_size ); +- +- else +- yy_start_stack = (int *) yy_flex_realloc( +- (void *) yy_start_stack, new_size ); +- +- if ( ! yy_start_stack ) +- YY_FATAL_ERROR( +- "out of memory expanding start-condition stack" ); +- } +- +- yy_start_stack[yy_start_stack_ptr++] = YY_START; +- +- BEGIN(new_state); +- } +-#endif +- +- +-#ifndef YY_NO_POP_STATE +-static void yy_pop_state() +- { +- if ( --yy_start_stack_ptr < 0 ) +- YY_FATAL_ERROR( "start-condition stack underflow" ); +- +- BEGIN(yy_start_stack[yy_start_stack_ptr]); +- } +-#endif +- +- +-#ifndef YY_NO_TOP_STATE +-static int yy_top_state() +- { +- return yy_start_stack[yy_start_stack_ptr - 1]; +- } +-#endif +- +-#ifndef YY_EXIT_FAILURE +-#define YY_EXIT_FAILURE 2 +-#endif +- +-#ifdef YY_USE_PROTOS +-static void yy_fatal_error( yyconst char msg[] ) +-#else +-static void yy_fatal_error( msg ) +-char msg[]; +-#endif +- { +- (void) fprintf( stderr, "%s\n", msg ); +- exit( YY_EXIT_FAILURE ); +- } +- +- +- +-/* Redefine yyless() so it works in section 3 code. */ +- +-#undef yyless +-#define yyless(n) \ +- do \ +- { \ +- /* Undo effects of setting up yytext. */ \ +- yytext[yyleng] = yy_hold_char; \ +- yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ +- yy_hold_char = *yy_c_buf_p; \ +- *yy_c_buf_p = '\0'; \ +- yyleng = n; \ +- } \ +- while ( 0 ) +- +- +-/* Internal utility routines. */ +- +-#ifndef yytext_ptr +-#ifdef YY_USE_PROTOS +-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +-#else +-static void yy_flex_strncpy( s1, s2, n ) +-char *s1; +-yyconst char *s2; +-int n; +-#endif +- { +- register int i; +- for ( i = 0; i < n; ++i ) +- s1[i] = s2[i]; +- } +-#endif +- +- +-#ifdef YY_USE_PROTOS +-static void *yy_flex_alloc( yy_size_t size ) +-#else +-static void *yy_flex_alloc( size ) +-yy_size_t size; +-#endif +- { +- return (void *) malloc( size ); +- } +- +-#ifdef YY_USE_PROTOS +-static void *yy_flex_realloc( void *ptr, yy_size_t size ) +-#else +-static void *yy_flex_realloc( ptr, size ) +-void *ptr; +-yy_size_t size; +-#endif +- { +- /* The cast to (char *) in the following accommodates both +- * implementations that use char* generic pointers, and those +- * that use void* generic pointers. It works with the latter +- * because both ANSI C and C++ allow castless assignment from +- * any pointer type to void*, and deal with argument conversions +- * as though doing an assignment. +- */ +- return (void *) realloc( (char *) ptr, size ); +- } +- +-#ifdef YY_USE_PROTOS +-static void yy_flex_free( void *ptr ) +-#else +-static void yy_flex_free( ptr ) +-void *ptr; +-#endif +- { +- free( ptr ); +- } +- +-#if YY_MAIN +-int main() +- { +- yylex(); +- return 0; +- } +-#endif +-#line 79 "/5g/ian/binutils/release/copy/binutils/arlex.l" +- +-#ifndef yywrap +-/* Needed for lex, though not flex. */ +-int yywrap() { return 1; } +-#endif +diff -rup --new-file binutils-2.9.1/binutils/arparse.c binutils-2.9.1/binutils/arparse.c +--- binutils-2.9.1/binutils/arparse.c Fri May 1 08:49:39 1998 ++++ binutils-2.9.1/binutils/arparse.c Wed Dec 31 17:00:00 1969 +@@ -1,1021 +0,0 @@ +- +-/* A Bison parser, made from /5g/ian/binutils/release/copy/binutils/arparse.y +- by GNU Bison version 1.25 +- */ +- +-#define YYBISON 1 /* Identify Bison output. */ +- +-#define NEWLINE 258 +-#define VERBOSE 259 +-#define FILENAME 260 +-#define ADDLIB 261 +-#define LIST 262 +-#define ADDMOD 263 +-#define CLEAR 264 +-#define CREATE 265 +-#define DELETE 266 +-#define DIRECTORY 267 +-#define END 268 +-#define EXTRACT 269 +-#define FULLDIR 270 +-#define HELP 271 +-#define QUIT 272 +-#define REPLACE 273 +-#define SAVE 274 +-#define OPEN 275 +- +-#line 1 "/5g/ian/binutils/release/copy/binutils/arparse.y" +- +-/* arparse.y - Stange script language parser */ +- +-/* Copyright (C) 1992, 93, 95, 1997 Free Software Foundation, Inc. +- +-This file is part of GNU Binutils. +- +-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. */ +- +- +-/* Contributed by Steve Chamberlain +- sac@cygnus.com +- +-*/ +-#define DONTDECLARE_MALLOC +-#include "bfd.h" +-#include "bucomm.h" +-#include "arsup.h" +-extern int verbose; +-static int yyerror PARAMS ((const char *)); +- +-#line 35 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-typedef union { +- char *name; +-struct list *list ; +- +-} YYSTYPE; +-#include +- +-#ifndef __cplusplus +-#ifndef __STDC__ +-#define const +-#endif +-#endif +- +- +- +-#define YYFINAL 53 +-#define YYFLAG -32768 +-#define YYNTBASE 24 +- +-#define YYTRANSLATE(x) ((unsigned)(x) <= 275 ? yytranslate[x] : 45) +- +-static const char yytranslate[] = { 0, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 21, +- 22, 2, 2, 23, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, +- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +- 16, 17, 18, 19, 20 +-}; +- +-#if YYDEBUG != 0 +-static const short yyprhs[] = { 0, +- 0, 1, 4, 7, 8, 11, 13, 15, 17, 19, +- 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, +- 41, 42, 45, 48, 50, 53, 56, 58, 60, 63, +- 66, 70, 75, 77, 78, 82, 83, 87, 88, 90, +- 91 +-}; +- +-static const short yyrhs[] = { -1, +- 25, 26, 0, 26, 27, 0, 0, 28, 3, 0, +- 36, 0, 37, 0, 44, 0, 39, 0, 38, 0, +- 31, 0, 33, 0, 35, 0, 29, 0, 30, 0, +- 32, 0, 34, 0, 13, 0, 1, 0, 5, 0, +- 0, 14, 42, 0, 18, 42, 0, 9, 0, 11, +- 42, 0, 8, 42, 0, 7, 0, 19, 0, 20, +- 5, 0, 10, 5, 0, 6, 5, 41, 0, 12, +- 5, 41, 40, 0, 5, 0, 0, 21, 42, 22, +- 0, 0, 42, 43, 5, 0, 0, 23, 0, 0, +- 4, 0 +-}; +- +-#endif +- +-#if YYDEBUG != 0 +-static const short yyrline[] = { 0, +- 65, 67, 69, 71, 74, 77, 79, 80, 81, 82, +- 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, +- 93, 97, 102, 107, 112, 116, 121, 126, 133, 138, +- 144, 148, 155, 158, 161, 164, 168, 175, 179, 181, +- 185 +-}; +-#endif +- +- +-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) +- +-static const char * const yytname[] = { "$","error","$undefined.","NEWLINE", +-"VERBOSE","FILENAME","ADDLIB","LIST","ADDMOD","CLEAR","CREATE","DELETE","DIRECTORY", +-"END","EXTRACT","FULLDIR","HELP","QUIT","REPLACE","SAVE","OPEN","'('","')'", +-"','","start","@1","session","command_line","command","extract_command","replace_command", +-"clear_command","delete_command","addmod_command","list_command","save_command", +-"open_command","create_command","addlib_command","directory_command","optional_filename", +-"modulelist","modulename","optcomma","verbose_command", NULL +-}; +-#endif +- +-static const short yyr1[] = { 0, +- 25, 24, 26, 26, 27, 28, 28, 28, 28, 28, +- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, +- 38, 39, 40, 40, 41, 41, 42, 42, 43, 43, +- 44 +-}; +- +-static const short yyr2[] = { 0, +- 0, 2, 2, 0, 2, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 0, 2, 2, 1, 2, 2, 1, 1, 2, 2, +- 3, 4, 1, 0, 3, 0, 3, 0, 1, 0, +- 1 +-}; +- +-static const short yydefact[] = { 1, +- 4, 0, 19, 41, 20, 0, 27, 38, 24, 0, +- 38, 0, 18, 38, 38, 28, 0, 3, 0, 14, +- 15, 11, 16, 12, 17, 13, 6, 7, 10, 9, +- 8, 36, 26, 30, 25, 36, 22, 23, 29, 5, +- 38, 31, 39, 0, 34, 40, 37, 33, 32, 35, +- 0, 0, 0 +-}; +- +-static const short yydefgoto[] = { 51, +- 1, 2, 18, 19, 20, 21, 22, 23, 24, 25, +- 26, 27, 28, 29, 30, 49, 42, 33, 44, 31 +-}; +- +-static const short yypact[] = {-32768, +--32768, 5,-32768,-32768,-32768, -4,-32768,-32768,-32768, 2, +--32768, 21,-32768,-32768,-32768,-32768, 22,-32768, 25,-32768, +--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +--32768, 8, -3,-32768, -3, 8, -3, -3,-32768,-32768, +--32768,-32768,-32768, 26, 27, -1,-32768,-32768,-32768,-32768, +- 33, 34,-32768 +-}; +- +-static const short yypgoto[] = {-32768, +--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +--32768,-32768,-32768,-32768,-32768,-32768, 0, -11,-32768,-32768 +-}; +- +- +-#define YYLAST 36 +- +- +-static const short yytable[] = { 35, +- 32, -40, 37, 38, -2, 3, 34, -21, 4, 5, +- 6, 7, 8, 9, 10, 11, 12, 13, 14, 43, +- 50, 43, 15, 16, 17, 36, 39, 40, 41, 46, +- 47, 48, 52, 53, 0, 45 +-}; +- +-static const short yycheck[] = { 11, +- 5, 5, 14, 15, 0, 1, 5, 3, 4, 5, +- 6, 7, 8, 9, 10, 11, 12, 13, 14, 23, +- 22, 23, 18, 19, 20, 5, 5, 3, 21, 41, +- 5, 5, 0, 0, -1, 36 +-}; +-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +-#line 3 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* Skeleton output parser for bison, +- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. +- +- 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +- +-/* As a special exception, when this file is copied by Bison into a +- Bison output file, you may use that output file without restriction. +- This special exception was added by the Free Software Foundation +- in version 1.24 of Bison. */ +- +-#ifndef alloca +-#ifdef __GNUC__ +-#define alloca __builtin_alloca +-#else /* not GNU C. */ +-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +-#include +-#else /* not sparc */ +-#if defined (MSDOS) && !defined (__TURBOC__) +-#include +-#else /* not MSDOS, or __TURBOC__ */ +-#if defined(_AIX) +-#include +- #pragma alloca +-#else /* not MSDOS, __TURBOC__, or _AIX */ +-#ifdef __hpux +-#ifdef __cplusplus +-extern "C" { +-void *alloca (unsigned int); +-}; +-#else /* not __cplusplus */ +-void *alloca (); +-#endif /* not __cplusplus */ +-#endif /* __hpux */ +-#endif /* not _AIX */ +-#endif /* not MSDOS, or __TURBOC__ */ +-#endif /* not sparc. */ +-#endif /* not GNU C. */ +-#endif /* alloca not defined. */ +- +-/* This is the parser code that is written into each bison parser +- when the %semantic_parser declaration is not specified in the grammar. +- It was written by Richard Stallman by simplifying the hairy parser +- used when %semantic_parser is specified. */ +- +-/* Note: there must be only one dollar sign in this file. +- It is replaced by the list of actions, each action +- as one case of the switch. */ +- +-#define yyerrok (yyerrstatus = 0) +-#define yyclearin (yychar = YYEMPTY) +-#define YYEMPTY -2 +-#define YYEOF 0 +-#define YYACCEPT return(0) +-#define YYABORT return(1) +-#define YYERROR goto yyerrlab1 +-/* Like YYERROR except do call yyerror. +- This remains here temporarily to ease the +- transition to the new meaning of YYERROR, for GCC. +- Once GCC version 2 has supplanted version 1, this can go. */ +-#define YYFAIL goto yyerrlab +-#define YYRECOVERING() (!!yyerrstatus) +-#define YYBACKUP(token, value) \ +-do \ +- if (yychar == YYEMPTY && yylen == 1) \ +- { yychar = (token), yylval = (value); \ +- yychar1 = YYTRANSLATE (yychar); \ +- YYPOPSTACK; \ +- goto yybackup; \ +- } \ +- else \ +- { yyerror ("syntax error: cannot back up"); YYERROR; } \ +-while (0) +- +-#define YYTERROR 1 +-#define YYERRCODE 256 +- +-#ifndef YYPURE +-#define YYLEX yylex() +-#endif +- +-#ifdef YYPURE +-#ifdef YYLSP_NEEDED +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval, &yylloc) +-#endif +-#else /* not YYLSP_NEEDED */ +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval) +-#endif +-#endif /* not YYLSP_NEEDED */ +-#endif +- +-/* If nonreentrant, generate the variables here */ +- +-#ifndef YYPURE +- +-int yychar; /* the lookahead symbol */ +-YYSTYPE yylval; /* the semantic value of the */ +- /* lookahead symbol */ +- +-#ifdef YYLSP_NEEDED +-YYLTYPE yylloc; /* location data for the lookahead */ +- /* symbol */ +-#endif +- +-int yynerrs; /* number of parse errors so far */ +-#endif /* not YYPURE */ +- +-#if YYDEBUG != 0 +-int yydebug; /* nonzero means print parse trace */ +-/* Since this is uninitialized, it does not stop multiple parsers +- from coexisting. */ +-#endif +- +-/* YYINITDEPTH indicates the initial size of the parser's stacks */ +- +-#ifndef YYINITDEPTH +-#define YYINITDEPTH 200 +-#endif +- +-/* YYMAXDEPTH is the maximum size the stacks can grow to +- (effective only if the built-in stack extension method is used). */ +- +-#if YYMAXDEPTH == 0 +-#undef YYMAXDEPTH +-#endif +- +-#ifndef YYMAXDEPTH +-#define YYMAXDEPTH 10000 +-#endif +- +-/* Prevent warning if -Wstrict-prototypes. */ +-#ifdef __GNUC__ +-int yyparse (void); +-#endif +- +-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +-#else /* not GNU C or C++ */ +-#ifndef __cplusplus +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (to, from, count) +- char *to; +- char *from; +- int count; +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#else /* __cplusplus */ +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (char *to, char *from, int count) +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#endif +-#endif +- +-#line 196 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* The user can define YYPARSE_PARAM as the name of an argument to be passed +- into yyparse. The argument should have type void *. +- It should actually point to an object. +- Grammar actions can access the variable by casting it +- to the proper pointer type. */ +- +-#ifdef YYPARSE_PARAM +-#ifdef __cplusplus +-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL +-#else /* not __cplusplus */ +-#define YYPARSE_PARAM_ARG YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +-#endif /* not __cplusplus */ +-#else /* not YYPARSE_PARAM */ +-#define YYPARSE_PARAM_ARG +-#define YYPARSE_PARAM_DECL +-#endif /* not YYPARSE_PARAM */ +- +-int +-yyparse(YYPARSE_PARAM_ARG) +- YYPARSE_PARAM_DECL +-{ +- register int yystate; +- register int yyn; +- register short *yyssp; +- register YYSTYPE *yyvsp; +- int yyerrstatus; /* number of tokens to shift before error messages enabled */ +- int yychar1 = 0; /* lookahead token as an internal (translated) token number */ +- +- short yyssa[YYINITDEPTH]; /* the state stack */ +- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ +- +- short *yyss = yyssa; /* refer to the stacks thru separate pointers */ +- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ +- +-#ifdef YYLSP_NEEDED +- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ +- YYLTYPE *yyls = yylsa; +- YYLTYPE *yylsp; +- +-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +-#else +-#define YYPOPSTACK (yyvsp--, yyssp--) +-#endif +- +- int yystacksize = YYINITDEPTH; +- +-#ifdef YYPURE +- int yychar; +- YYSTYPE yylval; +- int yynerrs; +-#ifdef YYLSP_NEEDED +- YYLTYPE yylloc; +-#endif +-#endif +- +- YYSTYPE yyval; /* the variable used to return */ +- /* semantic values from the action */ +- /* routines */ +- +- int yylen; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Starting parse\n"); +-#endif +- +- yystate = 0; +- yyerrstatus = 0; +- yynerrs = 0; +- yychar = YYEMPTY; /* Cause a token to be read. */ +- +- /* Initialize stack pointers. +- Waste one element of value and location stack +- so that they stay on the same level as the state stack. +- The wasted elements are never initialized. */ +- +- yyssp = yyss - 1; +- yyvsp = yyvs; +-#ifdef YYLSP_NEEDED +- yylsp = yyls; +-#endif +- +-/* Push a new state, which is found in yystate . */ +-/* In all cases, when you get here, the value and location stacks +- have just been pushed. so pushing a state here evens the stacks. */ +-yynewstate: +- +- *++yyssp = yystate; +- +- if (yyssp >= yyss + yystacksize - 1) +- { +- /* Give user a chance to reallocate the stack */ +- /* Use copies of these so that the &'s don't force the real ones into memory. */ +- YYSTYPE *yyvs1 = yyvs; +- short *yyss1 = yyss; +-#ifdef YYLSP_NEEDED +- YYLTYPE *yyls1 = yyls; +-#endif +- +- /* Get the current used size of the three stacks, in elements. */ +- int size = yyssp - yyss + 1; +- +-#ifdef yyoverflow +- /* Each stack pointer address is followed by the size of +- the data in use in that stack, in bytes. */ +-#ifdef YYLSP_NEEDED +- /* This used to be a conditional around just the two extra args, +- but that might be undefined if yyoverflow is a macro. */ +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yyls1, size * sizeof (*yylsp), +- &yystacksize); +-#else +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yystacksize); +-#endif +- +- yyss = yyss1; yyvs = yyvs1; +-#ifdef YYLSP_NEEDED +- yyls = yyls1; +-#endif +-#else /* no yyoverflow */ +- /* Extend the stack our own way. */ +- if (yystacksize >= YYMAXDEPTH) +- { +- yyerror("parser stack overflow"); +- return 2; +- } +- yystacksize *= 2; +- if (yystacksize > YYMAXDEPTH) +- yystacksize = YYMAXDEPTH; +- yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); +- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); +- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); +- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); +-#ifdef YYLSP_NEEDED +- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); +- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); +-#endif +-#endif /* no yyoverflow */ +- +- yyssp = yyss + size - 1; +- yyvsp = yyvs + size - 1; +-#ifdef YYLSP_NEEDED +- yylsp = yyls + size - 1; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Stack size increased to %d\n", yystacksize); +-#endif +- +- if (yyssp >= yyss + yystacksize - 1) +- YYABORT; +- } +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Entering state %d\n", yystate); +-#endif +- +- goto yybackup; +- yybackup: +- +-/* Do appropriate processing given the current state. */ +-/* Read a lookahead token if we need one and don't already have one. */ +-/* yyresume: */ +- +- /* First try to decide what to do without reference to lookahead token. */ +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yydefault; +- +- /* Not known => get a lookahead token if don't already have one. */ +- +- /* yychar is either YYEMPTY or YYEOF +- or a valid token in external form. */ +- +- if (yychar == YYEMPTY) +- { +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Reading a token: "); +-#endif +- yychar = YYLEX; +- } +- +- /* Convert token to internal form (in yychar1) for indexing tables with */ +- +- if (yychar <= 0) /* This means end of input. */ +- { +- yychar1 = 0; +- yychar = YYEOF; /* Don't call YYLEX any more */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Now at end of input.\n"); +-#endif +- } +- else +- { +- yychar1 = YYTRANSLATE(yychar); +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); +- /* Give the individual parser a way to print the precise meaning +- of a token, for further debugging info. */ +-#ifdef YYPRINT +- YYPRINT (stderr, yychar, yylval); +-#endif +- fprintf (stderr, ")\n"); +- } +-#endif +- } +- +- yyn += yychar1; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) +- goto yydefault; +- +- yyn = yytable[yyn]; +- +- /* yyn is what to do for this token type in this state. +- Negative => reduce, -yyn is rule number. +- Positive => shift, yyn is new state. +- New state is final state => don't bother to shift, +- just return success. +- 0, or most negative number => error. */ +- +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrlab; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrlab; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +- /* Shift the lookahead token. */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +-#endif +- +- /* Discard the token being shifted unless it is eof. */ +- if (yychar != YYEOF) +- yychar = YYEMPTY; +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- /* count tokens shifted since error; after three, turn off error status. */ +- if (yyerrstatus) yyerrstatus--; +- +- yystate = yyn; +- goto yynewstate; +- +-/* Do the default action for the current state. */ +-yydefault: +- +- yyn = yydefact[yystate]; +- if (yyn == 0) +- goto yyerrlab; +- +-/* Do a reduction. yyn is the number of a rule to reduce with. */ +-yyreduce: +- yylen = yyr2[yyn]; +- if (yylen > 0) +- yyval = yyvsp[1-yylen]; /* implement default value of the action */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- int i; +- +- fprintf (stderr, "Reducing via rule %d (line %d), ", +- yyn, yyrline[yyn]); +- +- /* Print the symbols being reduced, and their result. */ +- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) +- fprintf (stderr, "%s ", yytname[yyrhs[i]]); +- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); +- } +-#endif +- +- +- switch (yyn) { +- +-case 1: +-#line 66 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ prompt(); ; +- break;} +-case 5: +-#line 75 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ prompt(); ; +- break;} +-case 18: +-#line 90 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_end(); return 0; ; +- break;} +-case 20: +-#line 92 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ yyerror("foo"); ; +- break;} +-case 22: +-#line 99 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_extract(yyvsp[0].list); ; +- break;} +-case 23: +-#line 104 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_replace(yyvsp[0].list); ; +- break;} +-case 24: +-#line 109 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_clear(); ; +- break;} +-case 25: +-#line 114 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_delete(yyvsp[0].list); ; +- break;} +-case 26: +-#line 118 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_addmod(yyvsp[0].list); ; +- break;} +-case 27: +-#line 123 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_list(); ; +- break;} +-case 28: +-#line 128 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_save(); ; +- break;} +-case 29: +-#line 135 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_open(yyvsp[0].name,0); ; +- break;} +-case 30: +-#line 140 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_open(yyvsp[0].name,1); ; +- break;} +-case 31: +-#line 146 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_addlib(yyvsp[-1].name,yyvsp[0].list); ; +- break;} +-case 32: +-#line 150 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ ar_directory(yyvsp[-2].name, yyvsp[-1].list, yyvsp[0].name); ; +- break;} +-case 33: +-#line 157 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ yyval.name = yyvsp[0].name; ; +- break;} +-case 34: +-#line 158 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ yyval.name = 0; ; +- break;} +-case 35: +-#line 163 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ yyval.list = yyvsp[-1].list; ; +- break;} +-case 36: +-#line 165 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ yyval.list = 0; ; +- break;} +-case 37: +-#line 170 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ struct list *n = (struct list *) malloc(sizeof(struct list)); +- n->next = yyvsp[-2].list; +- n->name = yyvsp[0].name; +- yyval.list = n; +- ; +- break;} +-case 38: +-#line 175 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ yyval.list = 0; ; +- break;} +-case 41: +-#line 187 "/5g/ian/binutils/release/copy/binutils/arparse.y" +-{ verbose = !verbose; ; +- break;} +-} +- /* the action file gets copied in in place of this dollarsign */ +-#line 498 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +- yyvsp -= yylen; +- yyssp -= yylen; +-#ifdef YYLSP_NEEDED +- yylsp -= yylen; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +- *++yyvsp = yyval; +- +-#ifdef YYLSP_NEEDED +- yylsp++; +- if (yylen == 0) +- { +- yylsp->first_line = yylloc.first_line; +- yylsp->first_column = yylloc.first_column; +- yylsp->last_line = (yylsp-1)->last_line; +- yylsp->last_column = (yylsp-1)->last_column; +- yylsp->text = 0; +- } +- else +- { +- yylsp->last_line = (yylsp+yylen-1)->last_line; +- yylsp->last_column = (yylsp+yylen-1)->last_column; +- } +-#endif +- +- /* Now "shift" the result of the reduction. +- Determine what state that goes to, +- based on the state we popped back to +- and the rule number reduced by. */ +- +- yyn = yyr1[yyn]; +- +- yystate = yypgoto[yyn - YYNTBASE] + *yyssp; +- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) +- yystate = yytable[yystate]; +- else +- yystate = yydefgoto[yyn - YYNTBASE]; +- +- goto yynewstate; +- +-yyerrlab: /* here on detecting error */ +- +- if (! yyerrstatus) +- /* If not already recovering from an error, report this error. */ +- { +- ++yynerrs; +- +-#ifdef YYERROR_VERBOSE +- yyn = yypact[yystate]; +- +- if (yyn > YYFLAG && yyn < YYLAST) +- { +- int size = 0; +- char *msg; +- int x, count; +- +- count = 0; +- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- size += strlen(yytname[x]) + 15, count++; +- msg = (char *) malloc(size + 15); +- if (msg != 0) +- { +- strcpy(msg, "parse error"); +- +- if (count < 5) +- { +- count = 0; +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- { +- strcat(msg, count == 0 ? ", expecting `" : " or `"); +- strcat(msg, yytname[x]); +- strcat(msg, "'"); +- count++; +- } +- } +- yyerror(msg); +- free(msg); +- } +- else +- yyerror ("parse error; also virtual memory exceeded"); +- } +- else +-#endif /* YYERROR_VERBOSE */ +- yyerror("parse error"); +- } +- +- goto yyerrlab1; +-yyerrlab1: /* here on error raised explicitly by an action */ +- +- if (yyerrstatus == 3) +- { +- /* if just tried and failed to reuse lookahead token after an error, discard it. */ +- +- /* return failure if at end of input */ +- if (yychar == YYEOF) +- YYABORT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +-#endif +- +- yychar = YYEMPTY; +- } +- +- /* Else will try to reuse lookahead token +- after shifting the error token. */ +- +- yyerrstatus = 3; /* Each real token shifted decrements this */ +- +- goto yyerrhandle; +- +-yyerrdefault: /* current state does not do anything special for the error token. */ +- +-#if 0 +- /* This is wrong; only states that explicitly want error tokens +- should shift them. */ +- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ +- if (yyn) goto yydefault; +-#endif +- +-yyerrpop: /* pop the current state because it cannot handle the error token */ +- +- if (yyssp == yyss) YYABORT; +- yyvsp--; +- yystate = *--yyssp; +-#ifdef YYLSP_NEEDED +- yylsp--; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "Error: state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +-yyerrhandle: +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yyerrdefault; +- +- yyn += YYTERROR; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) +- goto yyerrdefault; +- +- yyn = yytable[yyn]; +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrpop; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrpop; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting error token, "); +-#endif +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- yystate = yyn; +- goto yynewstate; +-} +-#line 191 "/5g/ian/binutils/release/copy/binutils/arparse.y" +- +- +-static int +-yyerror (x) +- const char *x; +-{ +- extern int linenumber; +- +- printf ("Syntax error in archive script, line %d\n", linenumber + 1); +- return 0; +-} +diff -rup --new-file binutils-2.9.1/binutils/arparse.h binutils-2.9.1/binutils/arparse.h +--- binutils-2.9.1/binutils/arparse.h Fri May 1 08:49:39 1998 ++++ binutils-2.9.1/binutils/arparse.h Wed Dec 31 17:00:00 1969 +@@ -1,26 +0,0 @@ +-typedef union { +- char *name; +-struct list *list ; +- +-} YYSTYPE; +-#define NEWLINE 258 +-#define VERBOSE 259 +-#define FILENAME 260 +-#define ADDLIB 261 +-#define LIST 262 +-#define ADDMOD 263 +-#define CLEAR 264 +-#define CREATE 265 +-#define DELETE 266 +-#define DIRECTORY 267 +-#define END 268 +-#define EXTRACT 269 +-#define FULLDIR 270 +-#define HELP 271 +-#define QUIT 272 +-#define REPLACE 273 +-#define SAVE 274 +-#define OPEN 275 +- +- +-extern YYSTYPE yylval; +diff -rup --new-file binutils-2.9.1/binutils/binutils.info binutils-2.9.1/binutils/binutils.info +--- binutils-2.9.1/binutils/binutils.info Fri May 1 08:59:45 1998 ++++ binutils-2.9.1/binutils/binutils.info Wed Dec 31 17:00:00 1969 +@@ -1,57 +0,0 @@ +-This is Info file binutils.info, produced by Makeinfo version 1.68 from +-the input file binutils.texi. +- +-START-INFO-DIR-ENTRY +-* Binutils: (binutils). The GNU binary utilities "ar", "objcopy", +- "objdump", "nm", "nlmconv", "size", +- "strings", "strip", and "ranlib". +-END-INFO-DIR-ENTRY +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided also +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-Indirect: +-binutils.info-1: 979 +-binutils.info-2: 50570 +- +-Tag Table: +-(Indirect) +-Node: Top979 +-Node: ar2061 +-Node: ar cmdline4227 +-Node: ar scripts11462 +-Node: nm17143 +-Node: objcopy23691 +-Node: objdump34033 +-Node: ranlib42320 +-Node: size43054 +-Node: strings45780 +-Node: strip47605 +-Node: c++filt50570 +-Node: addr2line53131 +-Node: nlmconv55528 +-Node: windres58133 +-Node: Selecting The Target System62605 +-Node: Target Selection63622 +-Node: Architecture Selection66322 +-Node: Linker Emulation Selection67554 +-Node: Reporting Bugs68432 +-Node: Bug Criteria69183 +-Node: Bug Reporting69729 +-Node: Index76710 +- +-End Tag Table +diff -rup --new-file binutils-2.9.1/binutils/binutils.info-1 binutils-2.9.1/binutils/binutils.info-1 +--- binutils-2.9.1/binutils/binutils.info-1 Fri May 1 08:59:45 1998 ++++ binutils-2.9.1/binutils/binutils.info-1 Wed Dec 31 17:00:00 1969 +@@ -1,1374 +0,0 @@ +-This is Info file binutils.info, produced by Makeinfo version 1.68 from +-the input file binutils.texi. +- +-START-INFO-DIR-ENTRY +-* Binutils: (binutils). The GNU binary utilities "ar", "objcopy", +- "objdump", "nm", "nlmconv", "size", +- "strings", "strip", and "ranlib". +-END-INFO-DIR-ENTRY +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided also +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: binutils.info, Node: Top, Next: ar, Up: (dir) +- +-Introduction +-************ +- +- This brief manual contains preliminary documentation for the GNU +-binary utilities (collectively version 2.9.1): +- +-* Menu: +- +-* ar:: Create, modify, and extract from archives +-* nm:: List symbols from object files +-* objcopy:: Copy and translate object files +-* objdump:: Display information from object files +-* ranlib:: Generate index to archive contents +-* size:: List section sizes and total size +-* strings:: List printable strings from files +-* strip:: Discard symbols +-* c++filt:: Filter to demangle encoded C++ symbols +-* addr2line:: Convert addresses to file and line +-* nlmconv:: Converts object code into an NLM +-* windres:: Manipulate Windows resources +-* Selecting The Target System:: How these utilities determine the target. +-* Reporting Bugs:: Reporting Bugs +-* Index:: Index +- +- +-File: binutils.info, Node: ar, Next: nm, Prev: Top, Up: Top +- +-ar +-** +- +- ar [-]P[MOD [RELPOS]] ARCHIVE [MEMBER...] +- ar -M [ '), and continues executing even after errors. If you +-redirect standard input to a script file, no prompts are issued, and +-`ar' abandons execution (with a nonzero exit code) on any error. +- +- The `ar' command language is *not* designed to be equivalent to the +-command-line options; in fact, it provides somewhat less control over +-archives. The only purpose of the command language is to ease the +-transition to GNU `ar' for developers who already have scripts written +-for the MRI "librarian" program. +- +- The syntax for the `ar' command language is straightforward: +- * commands are recognized in upper or lower case; for example, `LIST' +- is the same as `list'. In the following descriptions, commands are +- shown in upper case for clarity. +- +- * a single command may appear on each line; it is the first word on +- the line. +- +- * empty lines are allowed, and have no effect. +- +- * comments are allowed; text after either of the characters `*' or +- `;' is ignored. +- +- * Whenever you use a list of names as part of the argument to an `ar' +- command, you can separate the individual names with either commas +- or blanks. Commas are shown in the explanations below, for +- clarity. +- +- * `+' is used as a line continuation character; if `+' appears at +- the end of a line, the text on the following line is considered +- part of the current command. +- +- Here are the commands you can use in `ar' scripts, or when using +-`ar' interactively. Three of them have special significance: +- +- `OPEN' or `CREATE' specify a "current archive", which is a temporary +-file required for most of the other commands. +- +- `SAVE' commits the changes so far specified by the script. Prior to +-`SAVE', commands affect only the temporary copy of the current archive. +- +-`ADDLIB ARCHIVE' +-`ADDLIB ARCHIVE (MODULE, MODULE, ... MODULE)' +- Add all the contents of ARCHIVE (or, if specified, each named +- MODULE from ARCHIVE) to the current archive. +- +- Requires prior use of `OPEN' or `CREATE'. +- +-`ADDMOD MEMBER, MEMBER, ... MEMBER' +- Add each named MEMBER as a module in the current archive. +- +- Requires prior use of `OPEN' or `CREATE'. +- +-`CLEAR' +- Discard the contents of the current archive, cancelling the effect +- of any operations since the last `SAVE'. May be executed (with no +- effect) even if no current archive is specified. +- +-`CREATE ARCHIVE' +- Creates an archive, and makes it the current archive (required for +- many other commands). The new archive is created with a temporary +- name; it is not actually saved as ARCHIVE until you use `SAVE'. +- You can overwrite existing archives; similarly, the contents of any +- existing file named ARCHIVE will not be destroyed until `SAVE'. +- +-`DELETE MODULE, MODULE, ... MODULE' +- Delete each listed MODULE from the current archive; equivalent to +- `ar -d ARCHIVE MODULE ... MODULE'. +- +- Requires prior use of `OPEN' or `CREATE'. +- +-`DIRECTORY ARCHIVE (MODULE, ... MODULE)' +-`DIRECTORY ARCHIVE (MODULE, ... MODULE) OUTPUTFILE' +- List each named MODULE present in ARCHIVE. The separate command +- `VERBOSE' specifies the form of the output: when verbose output is +- off, output is like that of `ar -t ARCHIVE MODULE...'. When +- verbose output is on, the listing is like `ar -tv ARCHIVE +- MODULE...'. +- +- Output normally goes to the standard output stream; however, if you +- specify OUTPUTFILE as a final argument, `ar' directs the output to +- that file. +- +-`END' +- Exit from `ar', with a `0' exit code to indicate successful +- completion. This command does not save the output file; if you +- have changed the current archive since the last `SAVE' command, +- those changes are lost. +- +-`EXTRACT MODULE, MODULE, ... MODULE' +- Extract each named MODULE from the current archive, writing them +- into the current directory as separate files. Equivalent to `ar -x +- ARCHIVE MODULE...'. +- +- Requires prior use of `OPEN' or `CREATE'. +- +-`LIST' +- Display full contents of the current archive, in "verbose" style +- regardless of the state of `VERBOSE'. The effect is like `ar tv +- ARCHIVE'). (This single command is a GNU `ld' enhancement, rather +- than present for MRI compatibility.) +- +- Requires prior use of `OPEN' or `CREATE'. +- +-`OPEN ARCHIVE' +- Opens an existing archive for use as the current archive (required +- for many other commands). Any changes as the result of subsequent +- commands will not actually affect ARCHIVE until you next use +- `SAVE'. +- +-`REPLACE MODULE, MODULE, ... MODULE' +- In the current archive, replace each existing MODULE (named in the +- `REPLACE' arguments) from files in the current working directory. +- To execute this command without errors, both the file, and the +- module in the current archive, must exist. +- +- Requires prior use of `OPEN' or `CREATE'. +- +-`VERBOSE' +- Toggle an internal flag governing the output from `DIRECTORY'. +- When the flag is on, `DIRECTORY' output matches output from `ar +- -tv '.... +- +-`SAVE' +- Commit your changes to the current archive, and actually save it +- as a file with the name specified in the last `CREATE' or `OPEN' +- command. +- +- Requires prior use of `OPEN' or `CREATE'. +- +- +-File: binutils.info, Node: nm, Next: objcopy, Prev: ar, Up: Top +- +-nm +-** +- +- nm [ -a | --debug-syms ] [ -g | --extern-only ] +- [ -B ] [ -C | --demangle ] [ -D | --dynamic ] +- [ -s | --print-armap ] [ -A | -o | --print-file-name ] +- [ -n | -v | --numeric-sort ] [ -p | --no-sort ] +- [ -r | --reverse-sort ] [ --size-sort ] [ -u | --undefined-only ] +- [ -t RADIX | --radix=RADIX ] [ -P | --portability ] +- [ --target=BFDNAME ] [ -f FORMAT | --format=FORMAT ] +- [ --defined-only ] [-l | --line-numbers ] +- [ --no-demangle ] [ -V | --version ] [ --help ] [ OBJFILE... ] +- +- GNU `nm' lists the symbols from object files OBJFILE.... If no +-object files are listed as arguments, `nm' assumes `a.out'. +- +- For each symbol, `nm' shows: +- +- * The symbol value, in the radix selected by options (see below), or +- hexadecimal by default. +- +- * The symbol type. At least the following types are used; others +- are, as well, depending on the object file format. If lowercase, +- the symbol is local; if uppercase, the symbol is global (external). +- +- `A' +- The symbol's value is absolute, and will not be changed by +- further linking. +- +- `B' +- The symbol is in the uninitialized data section (known as +- BSS). +- +- `C' +- The symbol is common. Common symbols are uninitialized data. +- When linking, multiple common symbols may appear with the +- same name. If the symbol is defined anywhere, the common +- symbols are treated as undefined references. For more +- details on common symbols, see the discussion of -warn-common +- in *Note Linker options: (ld.info)Options. +- +- `D' +- The symbol is in the initialized data section. +- +- `G' +- The symbol is in an initialized data section for small +- objects. Some object file formats permit more efficient +- access to small data objects, such as a global int variable +- as opposed to a large global array. +- +- `I' +- The symbol is an indirect reference to another symbol. This +- is a GNU extension to the a.out object file format which is +- rarely used. +- +- `N' +- The symbol is a debugging symbol. +- +- `R' +- The symbol is in a read only data section. +- +- `S' +- The symbol is in an uninitialized data section for small +- objects. +- +- `T' +- The symbol is in the text (code) section. +- +- `U' +- The symbol is undefined. +- +- `W' +- The symbol is weak. When a weak defined symbol is linked +- with a normal defined symbol, the normal defined symbol is +- used with no error. When a weak undefined symbol is linked +- and the symbol is not defined, the value of the weak symbol +- becomes zero with no error. +- +- `-' +- The symbol is a stabs symbol in an a.out object file. In +- this case, the next values printed are the stabs other field, +- the stabs desc field, and the stab type. Stabs symbols are +- used to hold debugging information; for more information, see +- *Note Stabs: (stabs.info)Top. +- +- `?' +- The symbol type is unknown, or object file format specific. +- +- * The symbol name. +- +- The long and short forms of options, shown here as alternatives, are +-equivalent. +- +-`-A' +-`-o' +-`--print-file-name' +- Precede each symbol by the name of the input file (or archive +- element) in which it was found, rather than identifying the input +- file once only, before all of its symbols. +- +-`-a' +-`--debug-syms' +- Display all symbols, even debugger-only symbols; normally these +- are not listed. +- +-`-B' +- The same as `--format=bsd' (for compatibility with the MIPS `nm'). +- +-`-C' +-`--demangle' +- Decode ("demangle") low-level symbol names into user-level names. +- Besides removing any initial underscore prepended by the system, +- this makes C++ function names readable. *Note c++filt::, for more +- information on demangling. +- +-`--no-demangle' +- Do not demangle low-level symbol names. This is the default. +- +-`-D' +-`--dynamic' +- Display the dynamic symbols rather than the normal symbols. This +- is only meaningful for dynamic objects, such as certain types of +- shared libraries. +- +-`-f FORMAT' +-`--format=FORMAT' +- Use the output format FORMAT, which can be `bsd', `sysv', or +- `posix'. The default is `bsd'. Only the first character of +- FORMAT is significant; it can be either upper or lower case. +- +-`-g' +-`--extern-only' +- Display only external symbols. +- +-`-l' +-`--line-numbers' +- For each symbol, use debugging information to try to find a +- filename and line number. For a defined symbol, look for the line +- number of the address of the symbol. For an undefined symbol, +- look for the line number of a relocation entry which refers to the +- symbol. If line number information can be found, print it after +- the other symbol information. +- +-`-n' +-`-v' +-`--numeric-sort' +- Sort symbols numerically by their addresses, rather than +- alphabetically by their names. +- +-`-p' +-`--no-sort' +- Do not bother to sort the symbols in any order; print them in the +- order encountered. +- +-`-P' +-`--portability' +- Use the POSIX.2 standard output format instead of the default +- format. Equivalent to `-f posix'. +- +-`-s' +-`--print-armap' +- When listing symbols from archive members, include the index: a +- mapping (stored in the archive by `ar' or `ranlib') of which +- modules contain definitions for which names. +- +-`-r' +-`--reverse-sort' +- Reverse the order of the sort (whether numeric or alphabetic); let +- the last come first. +- +-`--size-sort' +- Sort symbols by size. The size is computed as the difference +- between the value of the symbol and the value of the symbol with +- the next higher value. The size of the symbol is printed, rather +- than the value. +- +-`-t RADIX' +-`--radix=RADIX' +- Use RADIX as the radix for printing the symbol values. It must be +- `d' for decimal, `o' for octal, or `x' for hexadecimal. +- +-`--target=BFDNAME' +- Specify an object code format other than your system's default +- format. *Note Target Selection::, for more information. +- +-`-u' +-`--undefined-only' +- Display only undefined symbols (those external to each object +- file). +- +-`--defined-only' +- Display only defined symbols for each object file. +- +-`-V' +-`--version' +- Show the version number of `nm' and exit. +- +-`--help' +- Show a summary of the options to `nm' and exit. +- +- +-File: binutils.info, Node: objcopy, Next: objdump, Prev: nm, Up: Top +- +-objcopy +-******* +- +- objcopy [ -F BFDNAME | --target=BFDNAME ] +- [ -I BFDNAME | --input-target=BFDNAME ] +- [ -O BFDNAME | --output-target=BFDNAME ] +- [ -S | --strip-all ] [ -g | --strip-debug ] +- [ -K SYMBOLNAME | --keep-symbol=SYMBOLNAME ] +- [ -N SYMBOLNAME | --strip-symbol=SYMBOLNAME ] +- [ -L SYMBOLNAME | --localize-symbol=SYMBOLNAME ] +- [ -W SYMBOLNAME | --weaken-symbol=SYMBOLNAME ] +- [ -x | --discard-all ] [ -X | --discard-locals ] +- [ -b BYTE | --byte=BYTE ] +- [ -i INTERLEAVE | --interleave=INTERLEAVE ] +- [ -R SECTIONNAME | --remove-section=SECTIONNAME ] +- [ -p | --preserve-dates ] [ --debugging ] +- [ --gap-fill=VAL ] [ --pad-to=ADDRESS ] +- [ --set-start=VAL ] [ --adjust-start=INCR ] +- [ --adjust-vma=INCR ] +- [ --adjust-section-vma=SECTION{=,+,-}VAL ] +- [ --adjust-warnings ] [ --no-adjust-warnings ] +- [ --set-section-flags=SECTION=FLAGS ] +- [ --add-section=SECTIONNAME=FILENAME ] +- [ --change-leading-char ] [ --remove-leading-char ] +- [ --weaken ] +- [ -v | --verbose ] [ -V | --version ] [ --help ] +- INFILE [OUTFILE] +- +- The GNU `objcopy' utility copies the contents of an object file to +-another. `objcopy' uses the GNU BFD Library to read and write the +-object files. It can write the destination object file in a format +-different from that of the source object file. The exact behavior of +-`objcopy' is controlled by command-line options. +- +- `objcopy' creates temporary files to do its translations and deletes +-them afterward. `objcopy' uses BFD to do all its translation work; it +-has access to all the formats described in BFD and thus is able to +-recognize most formats without being told explicitly. *Note BFD: +-(ld.info)BFD. +- +- `objcopy' can be used to generate S-records by using an output +-target of `srec' (e.g., use `-O srec'). +- +- `objcopy' can be used to generate a raw binary file by using an +-output target of `binary' (e.g., use `-O binary'). When `objcopy' +-generates a raw binary file, it will essentially produce a memory dump +-of the contents of the input object file. All symbols and relocation +-information will be discarded. The memory dump will start at the load +-address of the lowest section copied into the output file. +- +- When generating an S-record or a raw binary file, it may be helpful +-to use `-S' to remove sections containing debugging information. In +-some cases `-R' will be useful to remove sections which contain +-information which is not needed by the binary file. +- +-`INFILE' +-`OUTFILE' +- The source and output files, respectively. If you do not specify +- OUTFILE, `objcopy' creates a temporary file and destructively +- renames the result with the name of INFILE. +- +-`-I BFDNAME' +-`--input-target=BFDNAME' +- Consider the source file's object format to be BFDNAME, rather than +- attempting to deduce it. *Note Target Selection::, for more +- information. +- +-`-O BFDNAME' +-`--output-target=BFDNAME' +- Write the output file using the object format BFDNAME. *Note +- Target Selection::, for more information. +- +-`-F BFDNAME' +-`--target=BFDNAME' +- Use BFDNAME as the object format for both the input and the output +- file; i.e., simply transfer data from source to destination with no +- translation. *Note Target Selection::, for more information. +- +-`-R SECTIONNAME' +-`--remove-section=SECTIONNAME' +- Remove any section named SECTIONNAME from the output file. This +- option may be given more than once. Note that using this option +- inappropriately may make the output file unusable. +- +-`-S' +-`--strip-all' +- Do not copy relocation and symbol information from the source file. +- +-`-g' +-`--strip-debug' +- Do not copy debugging symbols from the source file. +- +-`--strip-unneeded' +- Strip all symbols that are not needed for relocation processing. +- +-`-K SYMBOLNAME' +-`--keep-symbol=SYMBOLNAME' +- Copy only symbol SYMBOLNAME from the source file. This option may +- be given more than once. +- +-`-N SYMBOLNAME' +-`--strip-symbol=SYMBOLNAME' +- Do not copy symbol SYMBOLNAME from the source file. This option +- may be given more than once. +- +-`-L SYMBOLNAME' +-`--localize-symbol=SYMBOLNAME' +- Make symbol SYMBOLNAME local to the file, so that it is not +- visible externally. This option may be given more than once. +- +-`-W SYMBOLNAME' +-`--weaken-symbol=SYMBOLNAME' +- Make symbol SYMBOLNAME weak. This option may be given more than +- once. +- +-`-x' +-`--discard-all' +- Do not copy non-global symbols from the source file. +- +-`-X' +-`--discard-locals' +- Do not copy compiler-generated local symbols. (These usually +- start with `L' or `.'.) +- +-`-b BYTE' +-`--byte=BYTE' +- Keep only every BYTEth byte of the input file (header data is not +- affected). BYTE can be in the range from 0 to INTERLEAVE-1, where +- INTERLEAVE is given by the `-i' or `--interleave' option, or the +- default of 4. This option is useful for creating files to program +- ROM. It is typically used with an `srec' output target. +- +-`-i INTERLEAVE' +-`--interleave=INTERLEAVE' +- Only copy one out of every INTERLEAVE bytes. Select which byte to +- copy with the -B or `--byte' option. The default is 4. `objcopy' +- ignores this option if you do not specify either `-b' or `--byte'. +- +-`-p' +-`--preserve-dates' +- Set the access and modification dates of the output file to be the +- same as those of the input file. +- +-`--debugging' +- Convert debugging information, if possible. This is not the +- default because only certain debugging formats are supported, and +- the conversion process can be time consuming. +- +-`--gap-fill VAL' +- Fill gaps between sections with VAL. This operation applies to +- the *load address* (LMA) of the sections. It is done by increasing +- the size of the section with the lower address, and filling in the +- extra space created with VAL. +- +-`--pad-to ADDRESS' +- Pad the output file up to the load address ADDRESS. This is done +- by increasing the size of the last section. The extra space is +- filled in with the value specified by `--gap-fill' (default zero). +- +-`--set-start VAL' +- Set the address of the new file to VAL. Not all object file +- formats support setting the start address. +- +-`--adjust-start INCR' +- Adjust the start address by adding INCR. Not all object file +- formats support setting the start address. +- +-`--adjust-vma INCR' +- Adjust the address of all sections, as well as the start address, +- by adding INCR. Some object file formats do not permit section +- addresses to be changed arbitrarily. Note that this does not +- relocate the sections; if the program expects sections to be +- loaded at a certain address, and this option is used to change the +- sections such that they are loaded at a different address, the +- program may fail. +- +-`--adjust-section-vma SECTION{=,+,-}VAL' +- Set or adjust the address of the named SECTION. If `=' is used, +- the section address is set to VAL. Otherwise, VAL is added to or +- subtracted from the section address. See the comments under +- `--adjust-vma', above. If SECTION does not exist in the input +- file, a warning will be issued, unless `--no-adjust-warnings' is +- used. +- +-`--adjust-warnings' +- If `--adjust-section-vma' is used, and the named section does not +- exist, issue a warning. This is the default. +- +-`--no-adjust-warnings' +- Do not issue a warning if `--adjust-section-vma' is used, even if +- the named section does not exist. +- +-`--set-section-flags SECTION=FLAGS' +- Set the flags for the named section. The FLAGS argument is a +- comma separated string of flag names. The recognized names are +- `alloc', `contents', `load', `readonly', `code', `data', and +- `rom'. You can set the `contents' flag for a section which does +- not have contents, but it is not meaningful to clear the +- `contents' flag of a section which does have contents-just remove +- the section instead. Not all flags are meaningful for all object +- file formats. +- +-`--add-section SECTIONNAME=FILENAME' +- Add a new section named SECTIONNAME while copying the file. The +- contents of the new section are taken from the file FILENAME. The +- size of the section will be the size of the file. This option only +- works on file formats which can support sections with arbitrary +- names. +- +-`--change-leading-char' +- Some object file formats use special characters at the start of +- symbols. The most common such character is underscore, which +- compilers often add before every symbol. This option tells +- `objcopy' to change the leading character of every symbol when it +- converts between object file formats. If the object file formats +- use the same leading character, this option has no effect. +- Otherwise, it will add a character, or remove a character, or +- change a character, as appropriate. +- +-`--remove-leading-char' +- If the first character of a global symbol is a special symbol +- leading character used by the object file format, remove the +- character. The most common symbol leading character is +- underscore. This option will remove a leading underscore from all +- global symbols. This can be useful if you want to link together +- objects of different file formats with different conventions for +- symbol names. This is different from `--change-leading-char' +- because it always changes the symbol name when appropriate, +- regardless of the object file format of the output file. +- +-`--weaken' +- Change all global symbols in the file to be weak. This can be +- useful when building an object which will be linked against other +- objects using the `-R' option to the linker. This option is only +- effective when using an object file format which supports weak +- symbols. +- +-`-V' +-`--version' +- Show the version number of `objcopy'. +- +-`-v' +-`--verbose' +- Verbose output: list all object files modified. In the case of +- archives, `objcopy -V' lists all members of the archive. +- +-`--help' +- Show a summary of the options to `objcopy'. +- +- +-File: binutils.info, Node: objdump, Next: ranlib, Prev: objcopy, Up: Top +- +-objdump +-******* +- +- objdump [ -a | --archive-headers ] +- [ -b BFDNAME | --target=BFDNAME ] [ --debugging ] +- [ -C | --demangle ] [ -d | --disassemble ] +- [ -D | --disassemble-all ] [ --disassemble-zeroes ] +- [ -EB | -EL | --endian={big | little } ] +- [ -f | --file-headers ] +- [ -h | --section-headers | --headers ] [ -i | --info ] +- [ -j SECTION | --section=SECTION ] +- [ -l | --line-numbers ] [ -S | --source ] +- [ -m MACHINE | --architecture=MACHINE ] +- [ -r | --reloc ] [ -R | --dynamic-reloc ] +- [ -s | --full-contents ] [ --stabs ] +- [ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ] +- [ -w | --wide ] [ --start-address=ADDRESS ] +- [ --stop-address=ADDRESS ] +- [ --prefix-addresses] [ --[no-]show-raw-insn ] +- [ --adjust-vma=OFFSET ] +- [ --version ] [ --help ] +- OBJFILE... +- +- `objdump' displays information about one or more object files. The +-options control what particular information to display. This +-information is mostly useful to programmers who are working on the +-compilation tools, as opposed to programmers who just want their +-program to compile and work. +- +- OBJFILE... are the object files to be examined. When you specify +-archives, `objdump' shows information on each of the member object +-files. +- +- The long and short forms of options, shown here as alternatives, are +-equivalent. At least one option besides `-l' must be given. +- +-`-a' +-`--archive-header' +- If any of the OBJFILE files are archives, display the archive +- header information (in a format similar to `ls -l'). Besides the +- information you could list with `ar tv', `objdump -a' shows the +- object file format of each archive member. +- +-`--adjust-vma=OFFSET' +- When dumping information, first add OFFSET to all the section +- addresses. This is useful if the section addresses do not +- correspond to the symbol table, which can happen when putting +- sections at particular addresses when using a format which can not +- represent section addresses, such as a.out. +- +-`-b BFDNAME' +-`--target=BFDNAME' +- Specify that the object-code format for the object files is +- BFDNAME. This option may not be necessary; OBJDUMP can +- automatically recognize many formats. +- +- For example, +- objdump -b oasys -m vax -h fu.o +- +- displays summary information from the section headers (`-h') of +- `fu.o', which is explicitly identified (`-m') as a VAX object file +- in the format produced by Oasys compilers. You can list the +- formats available with the `-i' option. *Note Target Selection::, +- for more information. +- +-`-C' +-`--demangle' +- Decode ("demangle") low-level symbol names into user-level names. +- Besides removing any initial underscore prepended by the system, +- this makes C++ function names readable. *Note c++filt::, for more +- information on demangling. +- +-`--debugging' +- Display debugging information. This attempts to parse debugging +- information stored in the file and print it out using a C like +- syntax. Only certain types of debugging information have been +- implemented. +- +-`-d' +-`--disassemble' +- Display the assembler mnemonics for the machine instructions from +- OBJFILE. This option only disassembles those sections which are +- expected to contain instructions. +- +-`-D' +-`--disassemble-all' +- Like `-d', but disassemble the contents of all sections, not just +- those expected to contain instructions. +- +-`--prefix-addresses' +- When disassembling, print the complete address on each line. This +- is the older disassembly format. +- +-`--disassemble-zeroes' +- Normally the disassembly output will skip blocks of zeroes. This +- option directs the disassembler to disassemble those blocks, just +- like any other data. +- +-`-EB' +-`-EL' +-`--endian={big|little}' +- Specify the endianness of the object files. This only affects +- disassembly. This can be useful when disassembling a file format +- which does not describe endianness information, such as S-records. +- +-`-f' +-`--file-header' +- Display summary information from the overall header of each of the +- OBJFILE files. +- +-`-h' +-`--section-header' +-`--header' +- Display summary information from the section headers of the object +- file. +- +- File segments may be relocated to nonstandard addresses, for +- example by using the `-Ttext', `-Tdata', or `-Tbss' options to +- `ld'. However, some object file formats, such as a.out, do not +- store the starting address of the file segments. In those +- situations, although `ld' relocates the sections correctly, using +- `objdump -h' to list the file section headers cannot show the +- correct addresses. Instead, it shows the usual addresses, which +- are implicit for the target. +- +-`--help' +- Print a summary of the options to `objdump' and exit. +- +-`-i' +-`--info' +- Display a list showing all architectures and object formats +- available for specification with `-b' or `-m'. +- +-`-j NAME' +-`--section=NAME' +- Display information only for section NAME. +- +-`-l' +-`--line-numbers' +- Label the display (using debugging information) with the filename +- and source line numbers corresponding to the object code or relocs +- shown. Only useful with `-d', `-D', or `-r'. +- +-`-m MACHINE' +-`--architecture=MACHINE' +- Specify the architecture to use when disassembling object files. +- This can be useful when disasembling object files which do not +- describe architecture information, such as S-records. You can +- list the available architectures with the `-i' option. +- +-`-r' +-`--reloc' +- Print the relocation entries of the file. If used with `-d' or +- `-D', the relocations are printed interspersed with the +- disassembly. +- +-`-R' +-`--dynamic-reloc' +- Print the dynamic relocation entries of the file. This is only +- meaningful for dynamic objects, such as certain types of shared +- libraries. +- +-`-s' +-`--full-contents' +- Display the full contents of any sections requested. +- +-`-S' +-`--source' +- Display source code intermixed with disassembly, if possible. +- Implies `-d'. +- +-`--show-raw-insn' +- When disassembling instructions, print the instruction in hex as +- well as in symbolic form. This is the default except when +- `--prefix-addresses' is used. +- +-`--no-show-raw-insn' +- When disassembling instructions, do not print the instruction +- bytes. This is the default when `--prefix-addresses' is used. +- +-`--stabs' +- Display the full contents of any sections requested. Display the +- contents of the .stab and .stab.index and .stab.excl sections from +- an ELF file. This is only useful on systems (such as Solaris 2.0) +- in which `.stab' debugging symbol-table entries are carried in an +- ELF section. In most other file formats, debugging symbol-table +- entries are interleaved with linkage symbols, and are visible in +- the `--syms' output. For more information on stabs symbols, see +- *Note Stabs: (stabs.info)Top. +- +-`--start-address=ADDRESS' +- Start displaying data at the specified address. This affects the +- output of the `-d', `-r' and `-s' options. +- +-`--stop-address=ADDRESS' +- Stop displaying data at the specified address. This affects the +- output of the `-d', `-r' and `-s' options. +- +-`-t' +-`--syms' +- Print the symbol table entries of the file. This is similar to +- the information provided by the `nm' program. +- +-`-T' +-`--dynamic-syms' +- Print the dynamic symbol table entries of the file. This is only +- meaningful for dynamic objects, such as certain types of shared +- libraries. This is similar to the information provided by the `nm' +- program when given the `-D' (`--dynamic') option. +- +-`--version' +- Print the version number of `objdump' and exit. +- +-`-x' +-`--all-header' +- Display all available header information, including the symbol +- table and relocation entries. Using `-x' is equivalent to +- specifying all of `-a -f -h -r -t'. +- +-`-w' +-`--wide' +- Format some lines for output devices that have more than 80 +- columns. +- +- +-File: binutils.info, Node: ranlib, Next: size, Prev: objdump, Up: Top +- +-ranlib +-****** +- +- ranlib [-vV] ARCHIVE +- +- `ranlib' generates an index to the contents of an archive and stores +-it in the archive. The index lists each symbol defined by a member of +-an archive that is a relocatable object file. +- +- You may use `nm -s' or `nm --print-armap' to list this index. +- +- An archive with such an index speeds up linking to the library and +-allows routines in the library to call each other without regard to +-their placement in the archive. +- +- The GNU `ranlib' program is another form of GNU `ar'; running +-`ranlib' is completely equivalent to executing `ar -s'. *Note ar::. +- +-`-v' +-`-V' +- Show the version number of `ranlib'. +- +- +-File: binutils.info, Node: size, Next: strings, Prev: ranlib, Up: Top +- +-size +-**** +- +- size [ -A | -B | --format=COMPATIBILITY ] +- [ --help ] [ -d | -o | -x | --radix=NUMBER ] +- [ --target=BFDNAME ] [ -V | --version ] +- [ OBJFILE... ] +- +- The GNU `size' utility lists the section sizes--and the total +-size--for each of the object or archive files OBJFILE in its argument +-list. By default, one line of output is generated for each object file +-or each module in an archive. +- +- OBJFILE... are the object files to be examined. If none are +-specified, the file `a.out' will be used. +- +- The command line options have the following meanings: +- +-`-A' +-`-B' +-`--format=COMPATIBILITY' +- Using one of these options, you can choose whether the output from +- GNU `size' resembles output from System V `size' (using `-A', or +- `--format=sysv'), or Berkeley `size' (using `-B', or +- `--format=berkeley'). The default is the one-line format similar +- to Berkeley's. +- +- Here is an example of the Berkeley (default) format of output from +- `size': +- size --format=Berkeley ranlib size +- text data bss dec hex filename +- 294880 81920 11592 388392 5ed28 ranlib +- 294880 81920 11888 388688 5ee50 size +- +- This is the same data, but displayed closer to System V +- conventions: +- +- size --format=SysV ranlib size +- ranlib : +- section size addr +- .text 294880 8192 +- .data 81920 303104 +- .bss 11592 385024 +- Total 388392 +- +- +- size : +- section size addr +- .text 294880 8192 +- .data 81920 303104 +- .bss 11888 385024 +- Total 388688 +- +-`--help' +- Show a summary of acceptable arguments and options. +- +-`-d' +-`-o' +-`-x' +-`--radix=NUMBER' +- Using one of these options, you can control whether the size of +- each section is given in decimal (`-d', or `--radix=10'); octal +- (`-o', or `--radix=8'); or hexadecimal (`-x', or `--radix=16'). +- In `--radix=NUMBER', only the three values (8, 10, 16) are +- supported. The total size is always given in two radices; decimal +- and hexadecimal for `-d' or `-x' output, or octal and hexadecimal +- if you're using `-o'. +- +-`--target=BFDNAME' +- Specify that the object-code format for OBJFILE is BFDNAME. This +- option may not be necessary; `size' can automatically recognize +- many formats. *Note Target Selection::, for more information. +- +-`-V' +-`--version' +- Display the version number of `size'. +- +- +-File: binutils.info, Node: strings, Next: strip, Prev: size, Up: Top +- +-strings +-******* +- +- strings [-afov] [-MIN-LEN] [-n MIN-LEN] [-t RADIX] [-] +- [--all] [--print-file-name] [--bytes=MIN-LEN] +- [--radix=RADIX] [--target=BFDNAME] +- [--help] [--version] FILE... +- +- For each FILE given, GNU `strings' prints the printable character +-sequences that are at least 4 characters long (or the number given with +-the options below) and are followed by an unprintable character. By +-default, it only prints the strings from the initialized and loaded +-sections of object files; for other types of files, it prints the +-strings from the whole file. +- +- `strings' is mainly useful for determining the contents of non-text +-files. +- +-`-a' +-`--all' +-`-' +- Do not scan only the initialized and loaded sections of object +- files; scan the whole files. +- +-`-f' +-`--print-file-name' +- Print the name of the file before each string. +- +-`--help' +- Print a summary of the program usage on the standard output and +- exit. +- +-`-MIN-LEN' +-`-n MIN-LEN' +-`--bytes=MIN-LEN' +- Print sequences of characters that are at least MIN-LEN characters +- long, instead of the default 4. +- +-`-o' +- Like `-t o'. Some other versions of `strings' have `-o' act like +- `-t d' instead. Since we can not be compatible with both ways, we +- simply chose one. +- +-`-t RADIX' +-`--radix=RADIX' +- Print the offset within the file before each string. The single +- character argument specifies the radix of the offset--`o' for +- octal, `x' for hexadecimal, or `d' for decimal. +- +-`--target=BFDNAME' +- Specify an object code format other than your system's default +- format. *Note Target Selection::, for more information. +- +-`-v' +-`--version' +- Print the program version number on the standard output and exit. +- +- +-File: binutils.info, Node: strip, Next: c++filt, Prev: strings, Up: Top +- +-strip +-***** +- +- strip [ -F BFDNAME | --target=BFDNAME ] +- [ -I BFDNAME | --input-target=BFDNAME ] +- [ -O BFDNAME | --output-target=BFDNAME ] +- [ -s | --strip-all ] [ -S | -g | --strip-debug ] +- [ -K SYMBOLNAME | --keep-symbol=SYMBOLNAME ] +- [ -N SYMBOLNAME | --strip-symbol=SYMBOLNAME ] +- [ -x | --discard-all ] [ -X | --discard-locals ] +- [ -R SECTIONNAME | --remove-section=SECTIONNAME ] +- [ -o FILE ] [ -p | --preserve-dates ] +- [ -v | --verbose ] [ -V | --version ] [ --help ] +- OBJFILE... +- +- GNU `strip' discards all symbols from object files OBJFILE. The +-list of object files may include archives. At least one object file +-must be given. +- +- `strip' modifies the files named in its argument, rather than +-writing modified copies under different names. +- +-`-F BFDNAME' +-`--target=BFDNAME' +- Treat the original OBJFILE as a file with the object code format +- BFDNAME, and rewrite it in the same format. *Note Target +- Selection::, for more information. +- +-`--help' +- Show a summary of the options to `strip' and exit. +- +-`-I BFDNAME' +-`--input-target=BFDNAME' +- Treat the original OBJFILE as a file with the object code format +- BFDNAME. *Note Target Selection::, for more information. +- +-`-O BFDNAME' +-`--output-target=BFDNAME' +- Replace OBJFILE with a file in the output format BFDNAME. *Note +- Target Selection::, for more information. +- +-`-R SECTIONNAME' +-`--remove-section=SECTIONNAME' +- Remove any section named SECTIONNAME from the output file. This +- option may be given more than once. Note that using this option +- inappropriately may make the output file unusable. +- +-`-s' +-`--strip-all' +- Remove all symbols. +- +-`-g' +-`-S' +-`--strip-debug' +- Remove debugging symbols only. +- +-`--strip-unneeded' +- Remove all symbols that are not needed for relocation processing. +- +-`-K SYMBOLNAME' +-`--keep-symbol=SYMBOLNAME' +- Keep only symbol SYMBOLNAME from the source file. This option may +- be given more than once. +- +-`-N SYMBOLNAME' +-`--strip-symbol=SYMBOLNAME' +- Remove symbol SYMBOLNAME from the source file. This option may be +- given more than once, and may be combined with strip options other +- than `-K'. +- +-`-o FILE' +- Put the stripped output in FILE, rather than replacing the +- existing file. When this argument is used, only one OBJFILE +- argument may be specified. +- +-`-p' +-`--preserve-dates' +- Preserve the access and modification dates of the file. +- +-`-x' +-`--discard-all' +- Remove non-global symbols. +- +-`-X' +-`--discard-locals' +- Remove compiler-generated local symbols. (These usually start +- with `L' or `.'.) +- +-`-V' +-`--version' +- Show the version number for `strip'. +- +-`-v' +-`--verbose' +- Verbose output: list all object files modified. In the case of +- archives, `strip -v' lists all members of the archive. +- +diff -rup --new-file binutils-2.9.1/binutils/binutils.info-2 binutils-2.9.1/binutils/binutils.info-2 +--- binutils-2.9.1/binutils/binutils.info-2 Fri May 1 08:59:45 1998 ++++ binutils-2.9.1/binutils/binutils.info-2 Wed Dec 31 17:00:00 1969 +@@ -1,891 +0,0 @@ +-This is Info file binutils.info, produced by Makeinfo version 1.68 from +-the input file binutils.texi. +- +-START-INFO-DIR-ENTRY +-* Binutils: (binutils). The GNU binary utilities "ar", "objcopy", +- "objdump", "nm", "nlmconv", "size", +- "strings", "strip", and "ranlib". +-END-INFO-DIR-ENTRY +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided also +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: binutils.info, Node: c++filt, Next: addr2line, Prev: strip, Up: Top +- +-c++filt +-******* +- +- c++filt [ -_ | --strip-underscores ] +- [ -n | --no-strip-underscores ] +- [ -s FORMAT | --format=FORMAT ] +- [ --help ] [ --version ] [ SYMBOL... ] +- +- The C++ language provides function overloading, which means that you +-can write many functions with the same name (providing each takes +-parameters of different types). All C++ function names are encoded +-into a low-level assembly label (this process is known as "mangling"). +-The `c++filt' program does the inverse mapping: it decodes +-("demangles") low-level names into user-level names so that the linker +-can keep these overloaded functions from clashing. +- +- Every alphanumeric word (consisting of letters, digits, underscores, +-dollars, or periods) seen in the input is a potential label. If the +-label decodes into a C++ name, the C++ name replaces the low-level name +-in the output. +- +- You can use `c++filt' to decipher individual symbols: +- +- c++filt SYMBOL +- +- If no SYMBOL arguments are given, `c++filt' reads symbol names from +-the standard input and writes the demangled names to the standard +-output. All results are printed on the standard output. +- +-`-_' +-`--strip-underscores' +- On some systems, both the C and C++ compilers put an underscore in +- front of every name. For example, the C name `foo' gets the +- low-level name `_foo'. This option removes the initial +- underscore. Whether `c++filt' removes the underscore by default +- is target dependent. +- +-`-n' +-`--no-strip-underscores' +- Do not remove the initial underscore. +- +-`-s FORMAT' +-`--format=FORMAT' +- GNU `nm' can decode three different methods of mangling, used by +- different C++ compilers. The argument to this option selects which +- method it uses: +- +- `gnu' +- the one used by the GNU compiler (the default method) +- +- `lucid' +- the one used by the Lucid compiler +- +- `arm' +- the one specified by the C++ Annotated Reference Manual +- +-`--help' +- Print a summary of the options to `c++filt' and exit. +- +-`--version' +- Print the version number of `c++filt' and exit. +- +- *Warning:* `c++filt' is a new utility, and the details of its user +- interface are subject to change in future releases. In particular, +- a command-line option may be required in the the future to decode +- a name passed as an argument on the command line; in other words, +- +- c++filt SYMBOL +- +- may in a future release become +- +- c++filt OPTION SYMBOL +- +- +-File: binutils.info, Node: addr2line, Next: nlmconv, Prev: c++filt, Up: Top +- +-addr2line +-********* +- +- addr2line [ -b BFDNAME | --target=BFDNAME ] +- [ -C | --demangle ] +- [ -e FILENAME | --exe=FILENAME ] +- [ -f | --functions ] [ -s | --basename ] +- [ -H | --help ] [ -V | --version ] +- [ addr addr ... ] +- +- `addr2line' translates program addresses into file names and line +-numbers. Given an address and an executable, it uses the debugging +-information in the executable to figure out which file name and line +-number are associated with a given address. +- +- The executable to use is specified with the `-e' option. The +-default is `a.out'. +- +- `addr2line' has two modes of operation. +- +- In the first, hexadecimal addresses are specified on the command +-line, and `addr2line' displays the file name and line number for each +-address. +- +- In the second, `addr2line' reads hexadecimal addresses from standard +-input, and prints the file name and line number for each address on +-standard output. In this mode, `addr2line' may be used in a pipe to +-convert dynamically chosen addresses. +- +- The format of the output is `FILENAME:LINENO'. The file name and +-line number for each address is printed on a separate line. If the +-`-f' option is used, then each `FILENAME:LINENO' line is preceded by a +-`FUNCTIONNAME' line which is the name of the function containing the +-address. +- +- If the file name or function name can not be determined, `addr2line' +-will print two question marks in their place. If the line number can +-not be determined, `addr2line' will print 0. +- +- The long and short forms of options, shown here as alternatives, are +-equivalent. +- +-`-b BFDNAME' +-`--target=BFDNAME' +- Specify that the object-code format for the object files is +- BFDNAME. +- +-`-C' +-`--demangle' +- Decode ("demangle") low-level symbol names into user-level names. +- Besides removing any initial underscore prepended by the system, +- this makes C++ function names readable. *Note c++filt::, for more +- information on demangling. +- +-`-e FILENAME' +-`--exe=FILENAME' +- Specify the name of the executable for which addresses should be +- translated. The default file is `a.out'. +- +-`-f' +-`--functions' +- Display function names as well as file and line number information. +- +-`-s' +-`--basenames' +- Display only the base of each file name. +- +- +-File: binutils.info, Node: nlmconv, Next: windres, Prev: addr2line, Up: Top +- +-nlmconv +-******* +- +- `nlmconv' converts a relocatable object file into a NetWare Loadable +-Module. +- +- *Warning:* `nlmconv' is not always built as part of the binary +- utilities, since it is only useful for NLM targets. +- +- nlmconv [ -I BFDNAME | --input-target=BFDNAME ] +- [ -O BFDNAME | --output-target=BFDNAME ] +- [ -T HEADERFILE | --header-file=HEADERFILE ] +- [ -d | --debug] [ -l LINKER | --linker=LINKER ] +- [ -h | --help ] [ -V | --version ] +- INFILE OUTFILE +- +- `nlmconv' converts the relocatable `i386' object file INFILE into +-the NetWare Loadable Module OUTFILE, optionally reading HEADERFILE for +-NLM header information. For instructions on writing the NLM command +-file language used in header files, see the `linkers' section, +-`NLMLINK' in particular, of the `NLM Development and Tools Overview', +-which is part of the NLM Software Developer's Kit ("NLM SDK"), +-available from Novell, Inc. `nlmconv' uses the GNU Binary File +-Descriptor library to read INFILE; see *Note BFD: (ld.info)BFD, for +-more information. +- +- `nlmconv' can perform a link step. In other words, you can list +-more than one object file for input if you list them in the definitions +-file (rather than simply specifying one input file on the command line). +-In this case, `nlmconv' calls the linker for you. +- +-`-I BFDNAME' +-`--input-target=BFDNAME' +- Object format of the input file. `nlmconv' can usually determine +- the format of a given file (so no default is necessary). *Note +- Target Selection::, for more information. +- +-`-O BFDNAME' +-`--output-target=BFDNAME' +- Object format of the output file. `nlmconv' infers the output +- format based on the input format, e.g. for a `i386' input file the +- output format is `nlm32-i386'. *Note Target Selection::, for more +- information. +- +-`-T HEADERFILE' +-`--header-file=HEADERFILE' +- Reads HEADERFILE for NLM header information. For instructions on +- writing the NLM command file language used in header files, see +- see the `linkers' section, of the `NLM Development and Tools +- Overview', which is part of the NLM Software Developer's Kit, +- available from Novell, Inc. +- +-`-d' +-`--debug' +- Displays (on standard error) the linker command line used by +- `nlmconv'. +- +-`-l LINKER' +-`--linker=LINKER' +- Use LINKER for any linking. LINKER can be an abosolute or a +- relative pathname. +- +-`-h' +-`--help' +- Prints a usage summary. +- +-`-V' +-`--version' +- Prints the version number for `nlmconv'. +- +- +-File: binutils.info, Node: windres, Next: Selecting The Target System, Prev: nlmconv, Up: Top +- +-windres +-******* +- +- `windres' may be used to manipulate Windows resources. +- +- *Warning:* `windres' is not always built as part of the binary +- utilities, since it is only useful for Windows targets. +- +- windres [options] [input-file] [output-file] +- +- `windres' reads resources from an input file and copies them into an +-output file. Either file may be in one of three formats: +- +-`rc' +- A text format read by the Resource Compiler. +- +-`res' +- A binary format generated by the Resource Compiler. +- +-`coff' +- A COFF object or executable. +- +- The exact description of these different formats is available in +-documentation from Microsoft. +- +- When `windres' converts from the `rc' format to the `res' format, it +-is acting like the Windows Resource Compiler. When `windres' converts +-from the `res' format to the `coff' format, it is acting like the +-Windows `CVTRES' program. +- +- When `windres' generates an `rc' file, the output is similar but not +-identical to the format expected for the input. When an input `rc' +-file refers to an external filename, an output `rc' file will instead +-include the file contents. +- +- If the input or output format is not specified, `windres' will guess +-based on the file name, or, for the input file, the file contents. A +-file with an extension of `.rc' will be treated as an `rc' file, a file +-with an extension of `.res' will be treated as a `res' file, and a file +-with an extension of `.o' or `.exe' will be treated as a `coff' file. +- +- If no output file is specified, `windres' will print the resources +-in `rc' format to standard output. +- +- The normal use is for you to write an `rc' file, use `windres' to +-convert it to a COFF object file, and then link the COFF file into your +-application. This will make the resources described in the `rc' file +-available to Windows. +- +-`-i FILENAME' +-`--input FILENAME' +- The name of the input file. If this option is not used, then +- `windres' will use the first non-option argument as the input file +- name. If there are no non-option arguments, then `windres' will +- read from standard input. `windres' can not read a COFF file from +- standard input. +- +-`-o FILENAME' +-`--output FILENAME' +- The name of the output file. If this option is not used, then +- `windres' will use the first non-option argument, after any used +- for the input file name, as the output file name. If there is no +- non-option argument, then `windres' will write to standard output. +- `windres' can not write a COFF file to standard output. +- +-`-I FORMAT' +-`--input-format FORMAT' +- The input format to read. FORMAT may be `res', `rc', or `coff'. +- If no input format is specified, `windres' will guess, as +- described above. +- +-`-O FORMAT' +-`--output-format FORMAT' +- The output format to generate. FORMAT may be `res', `rc', or +- `coff'. If no output format is specified, `windres' will guess, +- as described above. +- +-`-F TARGET' +-`--target TARGET' +- Specify the BFD format to use for a COFF file as input or output. +- This is a BFD target name; you can use the `--help' option to see +- a list of supported targets. Normally `windres' will use the +- default format, which is the first one listed by the `--help' +- option. *Note Target Selection::. +- +-`--preprocessor PROGRAM' +- When `windres' reads an `rc' file, it runs it through the C +- preprocessor first. This option may be used to specify the +- preprocessor to use, including any leading arguments. The default +- preprocessor argument is `gcc -E -xc-header -DRC_INVOKED'. +- +-`--include-dir DIRECTORY' +- Specify an include directory to use when reading an `rc' file. +- `windres' will pass this to the preprocessor as an `-I' option. +- `windres' will also search this directory when looking for files +- named in the `rc' file. +- +-`--define SYM[=VAL]' +- Specify a `-D' option to pass to the preprocessor when reading an +- `rc' file. +- +-`--language VAL' +- Specify the default language to use when reading an `rc' file. +- VAL should be a hexadecimal language code. The low eight bits are +- the language, and the high eight bits are the sublanguage. +- +-`--help' +- Prints a usage summary. +- +-`--version' +- Prints the version number for `windres'. +- +-`--yydebug' +- If `windres' is compiled with `YYDEBUG' defined as `1', this will +- turn on parser debugging. +- +- +-File: binutils.info, Node: Selecting The Target System, Next: Reporting Bugs, Prev: windres, Up: Top +- +-Selecting the target system +-*************************** +- +- You can specify three aspects of the target system to the GNU binary +-file utilities, each in several ways: +- +- * the target +- +- * the architecture +- +- * the linker emulation (which applies to the linker only) +- +- In the following summaries, the lists of ways to specify values are +-in order of decreasing precedence. The ways listed first override those +-listed later. +- +- The commands to list valid values only list the values for which the +-programs you are running were configured. If they were configured with +-`--enable-targets=all', the commands list most of the available values, +-but a few are left out; not all targets can be configured in at once +-because some of them can only be configured "native" (on hosts with the +-same type as the target system). +- +-* Menu: +- +-* Target Selection:: +-* Architecture Selection:: +-* Linker Emulation Selection:: +- +- +-File: binutils.info, Node: Target Selection, Next: Architecture Selection, Up: Selecting The Target System +- +-Target Selection +-================ +- +- A "target" is an object file format. A given target may be +-supported for multiple architectures (*note Architecture Selection::.). +-A target selection may also have variations for different operating +-systems or architectures. +- +- The command to list valid target values is `objdump -i' (the first +-column of output contains the relevant information). +- +- Some sample values are: `a.out-hp300bsd', `ecoff-littlemips', +-`a.out-sunos-big'. +- +- You can also specify a target using a configuration triplet. This is +-the same sort of name that is passed to configure to specify a target. +-When you use a configuration triplet as an argument, it must be fully +-canonicalized. You can see the canonical version of a triplet by +-running the shell script `config.sub' which is included with the +-sources. +- +- Some sample configuration triplets are: `m68k-hp-bsd', +-`mips-dec-ultrix', `sparc-sun-sunos'. +- +-`objdump' Target +----------------- +- +- Ways to specify: +- +- 1. command line option: `-b' or `--target' +- +- 2. environment variable `GNUTARGET' +- +- 3. deduced from the input file +- +-`objcopy' and `strip' Input Target +----------------------------------- +- +- Ways to specify: +- +- 1. command line options: `-I' or `--input-target', or `-F' or +- `--target' +- +- 2. environment variable `GNUTARGET' +- +- 3. deduced from the input file +- +-`objcopy' and `strip' Output Target +------------------------------------ +- +- Ways to specify: +- +- 1. command line options: `-O' or `--output-target', or `-F' or +- `--target' +- +- 2. the input target (see "`objcopy' and `strip' Input Target" above) +- +- 3. environment variable `GNUTARGET' +- +- 4. deduced from the input file +- +-`nm', `size', and `strings' Target +----------------------------------- +- +- Ways to specify: +- +- 1. command line option: `--target' +- +- 2. environment variable `GNUTARGET' +- +- 3. deduced from the input file +- +-Linker Input Target +-------------------- +- +- Ways to specify: +- +- 1. command line option: `-b' or `--format' (*note Options: +- (ld.info)Options.) +- +- 2. script command `TARGET' (*note Option Commands: (ld.info)Option +- Commands.) +- +- 3. environment variable `GNUTARGET' (*note Environment: +- (ld.info)Environment.) +- +- 4. the default target of the selected linker emulation (*note Linker +- Emulation Selection::.) +- +-Linker Output Target +--------------------- +- +- Ways to specify: +- +- 1. command line option: `-oformat' (*note Options: (ld.info)Options.) +- +- 2. script command `OUTPUT_FORMAT' (*note Option Commands: +- (ld.info)Option Commands.) +- +- 3. the linker input target (see "Linker Input Target" above) +- +- +-File: binutils.info, Node: Architecture Selection, Next: Linker Emulation Selection, Prev: Target Selection, Up: Selecting The Target System +- +-Architecture selection +-====================== +- +- An "architecture" is a type of CPU on which an object file is to +-run. Its name may contain a colon, separating the name of the +-processor family from the name of the particular CPU. +- +- The command to list valid architecture values is `objdump -i' (the +-second column contains the relevant information). +- +- Sample values: `m68k:68020', `mips:3000', `sparc'. +- +-`objdump' Architecture +----------------------- +- +- Ways to specify: +- +- 1. command line option: `-m' or `--architecture' +- +- 2. deduced from the input file +- +-`objcopy', `nm', `size', `strings' Architecture +------------------------------------------------ +- +- Ways to specify: +- +- 1. deduced from the input file +- +-Linker Input Architecture +-------------------------- +- +- Ways to specify: +- +- 1. deduced from the input file +- +-Linker Output Architecture +--------------------------- +- +- Ways to specify: +- +- 1. script command `OUTPUT_ARCH' (*note Option Commands: +- (ld.info)Option Commands.) +- +- 2. the default architecture from the linker output target (*note +- Target Selection::.) +- +- +-File: binutils.info, Node: Linker Emulation Selection, Prev: Architecture Selection, Up: Selecting The Target System +- +-Linker emulation selection +-========================== +- +- A linker "emulation" is a "personality" of the linker, which gives +-the linker default values for the other aspects of the target system. +-In particular, it consists of +- +- * the linker script +- +- * the target +- +- * several "hook" functions that are run at certain stages of the +- linking process to do special things that some targets require +- +- The command to list valid linker emulation values is `ld -V'. +- +- Sample values: `hp300bsd', `mipslit', `sun4'. +- +- Ways to specify: +- +- 1. command line option: `-m' (*note Options: (ld.info)Options.) +- +- 2. environment variable `LDEMULATION' +- +- 3. compiled-in `DEFAULT_EMULATION' from `Makefile', which comes from +- `EMUL' in `config/TARGET.mt' +- +- +-File: binutils.info, Node: Reporting Bugs, Next: Index, Prev: Selecting The Target System, Up: Top +- +-Reporting Bugs +-************** +- +- Your bug reports play an essential role in making the binary +-utilities reliable. +- +- Reporting a bug may help you by bringing a solution to your problem, +-or it may not. But in any case the principal function of a bug report +-is to help the entire community by making the next version of the binary +-utilities work better. Bug reports are your contribution to their +-maintenance. +- +- In order for a bug report to serve its purpose, you must include the +-information that enables us to fix the bug. +- +-* Menu: +- +-* Bug Criteria:: Have you found a bug? +-* Bug Reporting:: How to report bugs +- +- +-File: binutils.info, Node: Bug Criteria, Next: Bug Reporting, Up: Reporting Bugs +- +-Have you found a bug? +-===================== +- +- If you are not sure whether you have found a bug, here are some +-guidelines: +- +- * If a binary utility gets a fatal signal, for any input whatever, +- that is a bug. Reliable utilities never crash. +- +- * If a binary utility produces an error message for valid input, +- that is a bug. +- +- * If you are an experienced user of binary utilities, your +- suggestions for improvement are welcome in any case. +- +- +-File: binutils.info, Node: Bug Reporting, Prev: Bug Criteria, Up: Reporting Bugs +- +-How to report bugs +-================== +- +- A number of companies and individuals offer support for GNU +-products. If you obtained the binary utilities from a support +-organization, we recommend you contact that organization first. +- +- You can find contact information for many support companies and +-individuals in the file `etc/SERVICE' in the GNU Emacs distribution. +- +- In any event, we also recommend that you send bug reports for the +-binary utilities to `bug-gnu-utils@gnu.org'. +- +- The fundamental principle of reporting bugs usefully is this: +-*report all the facts*. If you are not sure whether to state a fact or +-leave it out, state it! +- +- Often people omit facts because they think they know what causes the +-problem and assume that some details do not matter. Thus, you might +-assume that the name of a file you use in an example does not matter. +-Well, probably it does not, but one cannot be sure. Perhaps the bug is +-a stray memory reference which happens to fetch from the location where +-that pathname is stored in memory; perhaps, if the pathname were +-different, the contents of that location would fool the utility into +-doing the right thing despite the bug. Play it safe and give a +-specific, complete example. That is the easiest thing for you to do, +-and the most helpful. +- +- Keep in mind that the purpose of a bug report is to enable us to fix +-the bug if it is new to us. Therefore, always write your bug reports +-on the assumption that the bug has not been reported previously. +- +- Sometimes people give a few sketchy facts and ask, "Does this ring a +-bell?" Those bug reports are useless, and we urge everyone to *refuse +-to respond to them* except to chide the sender to report bugs properly. +- +- To enable us to fix the bug, you should include all these things: +- +- * The version of the utility. Each utility announces it if you +- start it with the `--version' argument. +- +- Without this, we will not know whether there is any point in +- looking for the bug in the current version of the binary utilities. +- +- * Any patches you may have applied to the source, including any +- patches made to the `BFD' library. +- +- * The type of machine you are using, and the operating system name +- and version number. +- +- * What compiler (and its version) was used to compile the +- utilities--e.g. "`gcc-2.7'". +- +- * The command arguments you gave the utility to observe the bug. To +- guarantee you will not omit something important, list them all. A +- copy of the Makefile (or the output from make) is sufficient. +- +- If we were to try to guess the arguments, we would probably guess +- wrong and then we might not encounter the bug. +- +- * A complete input file, or set of input files, that will reproduce +- the bug. If the utility is reading an object file or files, then +- it is generally most helpful to send the actual object files, +- uuencoded if necessary to get them through the mail system. +- Making them available for anonymous FTP is not as good, but may be +- the only reasonable choice for large object files. +- +- If the source files were produced exclusively using GNU programs +- (e.g., `gcc', `gas', and/or the GNU `ld'), then it may be OK to +- send the source files rather than the object files. In this case, +- be sure to say exactly what version of `gcc', or whatever, was +- used to produce the object files. Also say how `gcc', or +- whatever, was configured. +- +- * A description of what behavior you observe that you believe is +- incorrect. For example, "It gets a fatal signal." +- +- Of course, if the bug is that the utility gets a fatal signal, +- then we will certainly notice it. But if the bug is incorrect +- output, we might not notice unless it is glaringly wrong. You +- might as well not give us a chance to make a mistake. +- +- Even if the problem you experience is a fatal signal, you should +- still say so explicitly. Suppose something strange is going on, +- such as, your copy of the utility is out of synch, or you have +- encountered a bug in the C library on your system. (This has +- happened!) Your copy might crash and ours would not. If you told +- us to expect a crash, then when ours fails to crash, we would know +- that the bug was not happening for us. If you had not told us to +- expect a crash, then we would not be able to draw any conclusion +- from our observations. +- +- * If you wish to suggest changes to the source, send us context +- diffs, as generated by `diff' with the `-u', `-c', or `-p' option. +- Always send diffs from the old file to the new file. If you even +- discuss something in the `ld' source, refer to it by context, not +- by line number. +- +- The line numbers in our development sources will not match those +- in your sources. Your line numbers would convey no useful +- information to us. +- +- Here are some things that are not necessary: +- +- * A description of the envelope of the bug. +- +- Often people who encounter a bug spend a lot of time investigating +- which changes to the input file will make the bug go away and which +- changes will not affect it. +- +- This is often time consuming and not very useful, because the way +- we will find the bug is by running a single example under the +- debugger with breakpoints, not by pure deduction from a series of +- examples. We recommend that you save your time for something else. +- +- Of course, if you can find a simpler example to report *instead* +- of the original one, that is a convenience for us. Errors in the +- output will be easier to spot, running under the debugger will take +- less time, and so on. +- +- However, simplification is not vital; if you do not want to do +- this, report the bug anyway and send us the entire test case you +- used. +- +- * A patch for the bug. +- +- A patch for the bug does help us if it is a good one. But do not +- omit the necessary information, such as the test case, on the +- assumption that a patch is all we need. We might see problems +- with your patch and decide to fix the problem another way, or we +- might not understand it at all. +- +- Sometimes with programs as complicated as the binary utilities it +- is very hard to construct an example that will make the program +- follow a certain path through the code. If you do not send us the +- example, we will not be able to construct one, so we will not be +- able to verify that the bug is fixed. +- +- And if we cannot understand what bug you are trying to fix, or why +- your patch should be an improvement, we will not install it. A +- test case will help us to understand. +- +- * A guess about what the bug is or what it depends on. +- +- Such guesses are usually wrong. Even we cannot guess right about +- such things without first using the debugger to find the facts. +- +- +-File: binutils.info, Node: Index, Prev: Reporting Bugs, Up: Top +- +-Index +-***** +- +-* Menu: +- +-* .stab: objdump. +-* addr2line: addr2line. +-* address to file name and line number: addr2line. +-* all header information, object file: objdump. +-* ar: ar. +-* ar compatibility: ar. +-* architecture: objdump. +-* architectures available: objdump. +-* archive contents: ranlib. +-* archive headers: objdump. +-* archives: ar. +-* bug criteria: Bug Criteria. +-* bug reports: Bug Reporting. +-* bugs: Reporting Bugs. +-* bugs, reporting: Bug Reporting. +-* c++filt: c++filt. +-* collections of files: ar. +-* compatibility, ar: ar. +-* contents of archive: ar cmdline. +-* crash: Bug Criteria. +-* creating archives: ar cmdline. +-* dates in archive: ar cmdline. +-* debug symbols: objdump. +-* debugging symbols: nm. +-* deleting from archive: ar cmdline. +-* demangling C++ symbols: c++filt. +-* demangling in nm: nm. +-* demangling in objdump <1>: objdump. +-* demangling in objdump: addr2line. +-* disassembling object code: objdump. +-* disassembly architecture: objdump. +-* disassembly endianness: objdump. +-* disassembly, with source: objdump. +-* discarding symbols: strip. +-* dynamic relocation entries, in object file: objdump. +-* dynamic symbol table entries, printing: objdump. +-* dynamic symbols: nm. +-* ELF object file format: objdump. +-* endianness: objdump. +-* error on valid input: Bug Criteria. +-* external symbols: nm. +-* extract from archive: ar cmdline. +-* fatal signal: Bug Criteria. +-* file name: nm. +-* header information, all: objdump. +-* input file name: nm. +-* libraries: ar. +-* listings strings: strings. +-* machine instructions: objdump. +-* moving in archive: ar cmdline. +-* MRI compatibility, ar: ar scripts. +-* name duplication in archive: ar cmdline. +-* name length: ar. +-* nm: nm. +-* nm compatibility: nm. +-* nm format: nm. +-* not writing archive index: ar cmdline. +-* objdump: objdump. +-* object code format <1>: objdump. +-* object code format <2>: addr2line. +-* object code format <3>: nm. +-* object code format <4>: size. +-* object code format: strings. +-* object file header: objdump. +-* object file information: objdump. +-* object file sections: objdump. +-* object formats available: objdump. +-* operations on archive: ar cmdline. +-* printing from archive: ar cmdline. +-* printing strings: strings. +-* quick append to archive: ar cmdline. +-* radix for section sizes: size. +-* ranlib: ranlib. +-* relative placement in archive: ar cmdline. +-* relocation entries, in object file: objdump. +-* removing symbols: strip. +-* repeated names in archive: ar cmdline. +-* replacement in archive: ar cmdline. +-* reporting bugs: Reporting Bugs. +-* scripts, ar: ar scripts. +-* section addresses in objdump: objdump. +-* section headers: objdump. +-* section information: objdump. +-* section sizes: size. +-* sections, full contents: objdump. +-* size: size. +-* size display format: size. +-* size number format: size. +-* sorting symbols: nm. +-* source disassembly: objdump. +-* source file name: nm. +-* source filenames for object files: objdump. +-* stab: objdump. +-* start-address: objdump. +-* stop-address: objdump. +-* strings: strings. +-* strings, printing: strings. +-* strip: strip. +-* symbol index <1>: ar. +-* symbol index: ranlib. +-* symbol index, listing: nm. +-* symbol line numbers: nm. +-* symbol table entries, printing: objdump. +-* symbols: nm. +-* symbols, discarding: strip. +-* undefined symbols: nm. +-* Unix compatibility, ar: ar cmdline. +-* updating an archive: ar cmdline. +-* version: Top. +-* VMA in objdump: objdump. +-* wide output, printing: objdump. +-* writing archive index: ar cmdline. +- +- +diff -rup --new-file binutils-2.9.1/binutils/bucomm.h binutils-2.9.1/binutils/bucomm.h +--- binutils-2.9.1/binutils/bucomm.h Fri May 1 08:49:31 1998 ++++ binutils-2.9.1/binutils/bucomm.h Sun Aug 23 00:00:00 1998 +@@ -96,11 +96,11 @@ extern char *getenv (); + #define SEEK_END 2 + #endif + +-#ifdef __GNUC__ ++#if defined (__GNUC__) && !defined (C_ALLOCA) + # undef alloca + # define alloca __builtin_alloca + #else +-# if HAVE_ALLOCA_H ++# if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA) + # include + # else + # ifndef alloca /* predefined by HP cc +Olibcalls */ +diff -rup --new-file binutils-2.9.1/binutils/configure binutils-2.9.1/binutils/configure +--- binutils-2.9.1/binutils/configure Fri May 1 08:49:31 1998 ++++ binutils-2.9.1/binutils/configure Thu Jan 21 19:39:41 1999 +@@ -1,7 +1,7 @@ + #! /bin/sh + + # Guess values for system-dependent variables and create Makefiles. +-# Generated automatically using autoconf version 2.12.1 ++# Generated automatically using autoconf version 2.13 + # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation +@@ -61,6 +61,10 @@ libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' ++guidedir='${prefix}/guide' ++htmldir='${prefix}/html' ++psdir='${prefix}/ps' ++dvidir='${prefix}/dvi' + mandir='${prefix}/man' + + # Initialize some other variables. +@@ -178,6 +182,10 @@ Directory and file names: + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] ++ --guidedir=DIR Amigaguide documentation in DIR [PREFIX/guide] ++ --htmldir=DIR HTML documentation in DIR [PREFIX/html] ++ --psdir=DIR postscript documentation in DIR [PREFIX/ps] ++ --dvidir=DIR TeX dvi documentation in DIR [PREFIX/dvi] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names +@@ -220,6 +228,22 @@ EOF + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + ++ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui) ++ ac_prev=guidedir ;; ++ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+ guidedir="$ac_optarg" ;; ++ ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+ htmldir="$ac_optarg" ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+ psdir="$ac_optarg" ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+ dvidir="$ac_optarg" ;; ++ + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) +@@ -350,7 +374,7 @@ EOF + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) +- echo "configure generated by autoconf version 2.12.1" ++ echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) +@@ -520,9 +544,11 @@ ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + ++ac_exeext= ++ac_objext=o + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then +@@ -584,7 +610,7 @@ else { echo "configure: error: can not r + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 +-echo "configure:588: checking host system type" >&5 ++echo "configure:614: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in +@@ -605,7 +631,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- + echo "$ac_t""$host" 1>&6 + + echo $ac_n "checking target system type""... $ac_c" 1>&6 +-echo "configure:609: checking target system type" >&5 ++echo "configure:635: checking target system type" >&5 + + target_alias=$target + case "$target_alias" in +@@ -623,7 +649,7 @@ target_os=`echo $target | sed 's/^\([^-] + echo "$ac_t""$target" 1>&6 + + echo $ac_n "checking build system type""... $ac_c" 1>&6 +-echo "configure:627: checking build system type" >&5 ++echo "configure:653: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in +@@ -653,21 +679,22 @@ test "$host_alias" != "$target_alias" && + # SunOS /usr/etc/install + # IRIX /sbin/install + # AIX /bin/install ++# AmigaOS /c/install + # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:662: checking for a BSD compatible install" >&5 ++echo "configure:689: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in +- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root +@@ -706,13 +733,15 @@ echo "$ac_t""$INSTALL" 1>&6 + # It thinks the first close brace ends the variable substitution. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + + echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +-echo "configure:716: checking whether build environment is sane" >&5 ++echo "configure:745: checking whether build environment is sane" >&5 + # Just in case + sleep 1 + echo timestamp > conftestfile +@@ -769,7 +798,7 @@ test "$program_suffix" != NONE && + test "$program_transform_name" = "" && program_transform_name="s,x,x," + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5 ++echo "configure:802: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -815,7 +844,7 @@ EOF + + missing_dir=`cd $ac_aux_dir && pwd` + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +-echo "configure:819: checking for working aclocal" >&5 ++echo "configure:848: checking for working aclocal" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -828,7 +857,7 @@ else + fi + + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +-echo "configure:832: checking for working autoconf" >&5 ++echo "configure:861: checking for working autoconf" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -841,7 +870,7 @@ else + fi + + echo $ac_n "checking for working automake""... $ac_c" 1>&6 +-echo "configure:845: checking for working automake" >&5 ++echo "configure:874: checking for working automake" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -854,7 +883,7 @@ else + fi + + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +-echo "configure:858: checking for working autoheader" >&5 ++echo "configure:887: checking for working autoheader" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -867,7 +896,7 @@ else + fi + + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +-echo "configure:871: checking for working makeinfo" >&5 ++echo "configure:900: checking for working makeinfo" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -930,15 +959,16 @@ fi + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:934: checking for $ac_word" >&5 ++echo "configure:963: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" +@@ -959,15 +989,16 @@ fi + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:963: checking for $ac_word" >&5 ++echo "configure:993: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -985,19 +1016,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1023: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1056: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1085: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:992: checking for $ac_word" >&5 ++echo "configure:1118: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1032,25 +1159,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:1170: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:1201: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 1212 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:1217: \"$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 +@@ -1064,18 +1227,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1074: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:1243: 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:1079: checking whether we are using GNU C" >&5 ++echo "configure:1248: 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 +@@ -1084,7 +1253,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1088: \"$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:1257: \"$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 +@@ -1095,11 +1264,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1103: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:1276: 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 +@@ -1114,18 +1287,45 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + # Check whether --with-gnu-ld or --without-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" +@@ -1139,7 +1339,7 @@ ac_prog=ld + if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +-echo "configure:1143: checking for ld used by GCC" >&5 ++echo "configure:1343: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. +@@ -1157,10 +1357,10 @@ echo "configure:1143: checking for ld us + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +-echo "configure:1161: checking for GNU ld" >&5 ++echo "configure:1361: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +-echo "configure:1164: checking for non-GNU ld" >&5 ++echo "configure:1364: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1196,7 +1396,7 @@ fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +-echo "configure:1200: checking if the linker ($LD) is GNU ld" >&5 ++echo "configure:1400: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1212,7 +1412,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +-echo "configure:1216: checking for BSD-compatible nm" >&5 ++echo "configure:1416: checking for BSD-compatible nm" >&5 + if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1249,7 +1449,7 @@ echo "$ac_t""$NM" 1>&6 + + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:1253: checking whether ln -s works" >&5 ++echo "configure:1453: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1259,14 +1459,24 @@ then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" + else +- ac_cv_prog_LN_S=ln ++ if ln X conftestdata 2>/dev/null ++ then ++ rm -f conftestdata ++ ac_cv_prog_LN_S=ln ++ else ++ ac_cv_prog_LN_S=cp ++ fi + fi + fi + LN_S="$ac_cv_prog_LN_S" + if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 + else +- echo "$ac_t""no" 1>&6 ++ if test "$ac_cv_prog_LN_S" = "ln"; then ++ echo "$ac_t""no, using ln" 1>&6 ++ else ++ echo "$ac_t""no, and neither does ln, so using cp" 1>&6 ++ fi + fi + + # Always use our own libtool. +@@ -1285,8 +1495,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libto + case "$host" in + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 1289 "configure"' > conftest.$ac_ext +- if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ echo '#line 1499 "configure"' > conftest.$ac_ext ++ if { (eval echo configure:1500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" +@@ -1350,15 +1560,16 @@ fi + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1354: checking for $ac_word" >&5 ++echo "configure:1564: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -1376,19 +1587,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1594: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1627: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1656: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:1383: checking for $ac_word" >&5 ++echo "configure:1689: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1423,25 +1730,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:1741: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1431: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:1772: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 1783 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:1788: \"$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 +@@ -1455,18 +1798,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1465: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:1814: 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:1470: checking whether we are using GNU C" >&5 ++echo "configure:1819: 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 +@@ -1475,7 +1824,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1479: \"$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:1828: \"$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 +@@ -1486,11 +1835,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1494: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:1847: 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 +@@ -1505,33 +1858,61 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + + for ac_prog in 'bison -y' byacc + 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:1527: checking for $ac_word" >&5 ++echo "configure:1907: 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 + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_YACC="$ac_prog" +@@ -1555,15 +1936,16 @@ test -n "$YACC" || YACC="yacc" + # 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:1559: checking for $ac_word" >&5 ++echo "configure:1940: 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 + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LEX="flex" +@@ -1588,7 +1970,7 @@ then + *) ac_lib=l ;; + esac + echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 +-echo "configure:1592: checking for yywrap in -l$ac_lib" >&5 ++echo "configure:1974: 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 +@@ -1596,7 +1978,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-l$ac_lib $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:1993: \"$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 +@@ -1630,7 +2012,7 @@ fi + fi + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1634: checking how to run the C preprocessor" >&5 ++echo "configure:2016: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -1645,14 +2027,14 @@ 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:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2037: \"$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 + : + else +@@ -1662,14 +2044,31 @@ 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:1672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2054: \"$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 ++ : ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ 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:2071: \"$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 + : + else +@@ -1682,6 +2081,8 @@ fi + rm -f conftest* + fi + rm -f conftest* ++fi ++rm -f conftest* + ac_cv_prog_CPP="$CPP" + fi + CPP="$ac_cv_prog_CPP" +@@ -1691,7 +2092,7 @@ fi + echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking lex output file root""... $ac_c" 1>&6 +-echo "configure:1695: checking lex output file root" >&5 ++echo "configure:2096: 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 +@@ -1712,7 +2113,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:1716: checking whether yytext is a pointer" >&5 ++echo "configure:2117: 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 +@@ -1724,14 +2125,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; then ++if { (eval echo configure:2136: \"$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 +@@ -1754,7 +2155,7 @@ fi + + + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +-echo "configure:1758: checking whether to enable maintainer-specific portions of Makefiles" >&5 ++echo "configure:2159: 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" +@@ -1772,19 +2173,19 @@ fi + + + echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 +-echo "configure:1776: checking for Cygwin32 environment" >&5 ++echo "configure:2177: checking for Cygwin32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_cygwin32'+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:2189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_cygwin32=yes + else +@@ -1801,19 +2202,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 + CYGWIN32= + test "$am_cv_cygwin32" = yes && CYGWIN32=yes + echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 +-echo "configure:1805: checking for Mingw32 environment" >&5 ++echo "configure:2206: checking for Mingw32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_mingw32=yes + else +@@ -1832,7 +2233,7 @@ test "$am_cv_mingw32" = yes && MINGW32=y + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +-echo "configure:1836: checking for executable suffix" >&5 ++echo "configure:2237: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1868,15 +2269,16 @@ AR=${AR-ar} + # 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:1872: checking for $ac_word" >&5 ++echo "configure:2273: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" +@@ -1912,7 +2314,7 @@ if test "x$cross_compiling" = "xno"; the + EXEEXT_FOR_BUILD='$(EXEEXT)' + else + echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 +-echo "configure:1916: checking for build system executable suffix" >&5 ++echo "configure:2318: checking for build system executable suffix" >&5 + if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1937,18 +2339,18 @@ for ac_hdr in string.h strings.h stdlib. + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1941: checking for $ac_hdr" >&5 ++echo "configure:2343: 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:1951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2353: \"$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* + eval "ac_cv_header_$ac_safe=yes" +@@ -1974,12 +2376,12 @@ fi + done + + echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +-echo "configure:1978: checking for sys/wait.h that is POSIX.1 compatible" >&5 ++echo "configure:2380: checking for sys/wait.h that is POSIX.1 compatible" >&5 + if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -1995,7 +2397,7 @@ wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; return 0; } + EOF +-if { (eval echo configure:1999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes + else +@@ -2018,19 +2420,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:2022: checking for working alloca.h" >&5 ++echo "configure:2424: 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:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2436: \"$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 +@@ -2050,26 +2452,44 @@ EOF + + fi + ++# Temporary ugly hack for BeOS. Don't try to run the test for alloca ++# since it will succeed due to finding the version of alloca in the ++# runtime library. We don't want to use that version, so let's pretend ++# we loaded it from the cache (default to 'no') and thus the package will configure ++# itself to use it's private copy of the C alloca replacement. When the ++# horribly small default stack size problem is fixed (exists up through ++# at least DR8.2) then we can build gcc to start using it's builtin ++# alloca, we can allow mwcc to use it's builtin alloca, and this hack ++# can go away. ++if test "`uname`" = "BeOS"; then ++ test -z "$ac_cv_func_alloca_works" && ac_cv_func_alloca_works=no ++fi ++ + echo $ac_n "checking for alloca""... $ac_c" 1>&6 +-echo "configure:2055: checking for alloca" >&5 ++echo "configure:2470: 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 < ++# ifdef _MSC_VER ++# include ++# define alloca _alloca + # else +-# ifdef _AIX +- #pragma alloca ++# if HAVE_ALLOCA_H ++# include + # else +-# ifndef alloca /* predefined by HP cc +Olibcalls */ ++# ifdef _AIX ++ #pragma alloca ++# else ++# ifndef alloca /* predefined by HP cc +Olibcalls */ + char *alloca (); ++# endif + # endif + # endif + # endif +@@ -2079,7 +2499,7 @@ int main() { + char *p = (char *) alloca(1); + ; return 0; } + EOF +-if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2503: \"$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 +@@ -2104,19 +2524,19 @@ if test $ac_cv_func_alloca_works = no; t + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. +- ALLOCA=alloca.o ++ ALLOCA=alloca.${ac_objext} + cat >> confdefs.h <<\EOF + #define C_ALLOCA 1 + EOF + + + echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +-echo "configure:2115: checking whether alloca needs Cray hooks" >&5 ++echo "configure:2535: 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:2145: checking for $ac_func" >&5 ++echo "configure:2565: 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; then ++if { (eval echo configure:2593: \"$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 +@@ -2196,7 +2616,7 @@ done + fi + + echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +-echo "configure:2200: checking stack direction for C alloca" >&5 ++echo "configure:2620: 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 +@@ -2204,7 +2624,7 @@ else + ac_cv_c_stack_direction=0 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:2647: \"$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 +@@ -2247,12 +2667,12 @@ fi + for ac_func in sbrk utimes + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2251: checking for $ac_func" >&5 ++echo "configure:2671: 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; then ++if { (eval echo configure:2699: \"$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 +@@ -2301,19 +2721,19 @@ done + + + echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6 +-echo "configure:2305: checking for time_t in time.h" >&5 ++echo "configure:2725: checking for time_t in time.h" >&5 + if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + time_t i; + ; return 0; } + EOF +-if { (eval echo configure:2317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bu_cv_decl_time_t_time_h=yes + else +@@ -2334,19 +2754,19 @@ EOF + fi + + echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6 +-echo "configure:2338: checking for time_t in sys/types.h" >&5 ++echo "configure:2758: checking for time_t in sys/types.h" >&5 + if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + time_t i; + ; return 0; } + EOF +-if { (eval echo configure:2350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bu_cv_decl_time_t_types_h=yes + else +@@ -2369,12 +2789,12 @@ fi + # Under Next 3.2 apparently does not define struct utimbuf + # by default. + echo $ac_n "checking for utime.h""... $ac_c" 1>&6 +-echo "configure:2373: checking for utime.h" >&5 ++echo "configure:2793: checking for utime.h" >&5 + if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #ifdef HAVE_TIME_H +@@ -2385,7 +2805,7 @@ int main() { + struct utimbuf s; + ; return 0; } + EOF +-if { (eval echo configure:2389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bu_cv_header_utime_h=yes + else +@@ -2406,12 +2826,12 @@ EOF + fi + + echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6 +-echo "configure:2410: checking whether fprintf must be declared" >&5 ++echo "configure:2830: checking whether fprintf must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2432,7 +2852,7 @@ int main() { + char *(*pfn) = (char *(*)) fprintf + ; return 0; } + EOF +-if { (eval echo configure:2436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_fprintf=no + else +@@ -2454,12 +2874,12 @@ EOF + fi + + echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 +-echo "configure:2458: checking whether strstr must be declared" >&5 ++echo "configure:2878: checking whether strstr must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2480,7 +2900,7 @@ int main() { + char *(*pfn) = (char *(*)) strstr + ; return 0; } + EOF +-if { (eval echo configure:2484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_strstr=no + else +@@ -2502,12 +2922,12 @@ EOF + fi + + echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 +-echo "configure:2506: checking whether sbrk must be declared" >&5 ++echo "configure:2926: checking whether sbrk must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2528,7 +2948,7 @@ int main() { + char *(*pfn) = (char *(*)) sbrk + ; return 0; } + EOF +-if { (eval echo configure:2532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_sbrk=no + else +@@ -2550,12 +2970,12 @@ EOF + fi + + echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 +-echo "configure:2554: checking whether getenv must be declared" >&5 ++echo "configure:2974: checking whether getenv must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2576,7 +2996,7 @@ int main() { + char *(*pfn) = (char *(*)) getenv + ; return 0; } + EOF +-if { (eval echo configure:2580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_getenv=no + else +@@ -2666,7 +3086,7 @@ do + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; +- i[3-6]86-*pe* | i[3-6]86-*-cygwin32* | i[3-6]86-*-mingw32*) ++ i[3-6]86-*pe* | i[3-6]86-*-cygwin32* | i[3-6]86-*-mingw32* | i[3-6]86-*-beos* ) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' +@@ -2724,7 +3144,7 @@ EOF + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. + (set) 2>&1 | +- case `(ac_space=' '; set) 2>&1 | grep ac_space` in ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). +@@ -2770,7 +3190,9 @@ DEFS=-DHAVE_CONFIG_H + : ${CONFIG_STATUS=./config.status} + + echo creating $CONFIG_STATUS +-rm -f $CONFIG_STATUS ++# Some systems, like AmigaOS, won't allow you to remove a script that is ++# being executed, so just move it out of the way instead. ++if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi + cat > $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h +@@ -3102,6 +3531,7 @@ test -z "$CONFIG_HEADERS" || echo timest + exit 0 + EOF + chmod +x $CONFIG_STATUS ++rm -f CONFIG.STATUS.old + rm -fr confdefs* $ac_clean_files + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +diff -rup --new-file binutils-2.9.1/binutils/configure.in binutils-2.9.1/binutils/configure.in +--- binutils-2.9.1/binutils/configure.in Fri May 1 08:49:32 1998 ++++ binutils-2.9.1/binutils/configure.in Sun Aug 23 00:00:00 1998 +@@ -166,7 +166,7 @@ changequote([,])dnl + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; + changequote(,)dnl +- i[3-6]86-*pe* | i[3-6]86-*-cygwin32* | i[3-6]86-*-mingw32*) ++ i[3-6]86-*pe* | i[3-6]86-*-cygwin32* | i[3-6]86-*-mingw32* | i[3-6]86-*-beos* ) + changequote([,])dnl + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" +diff -rup --new-file binutils-2.9.1/binutils/deflex.c binutils-2.9.1/binutils/deflex.c +--- binutils-2.9.1/binutils/deflex.c Fri May 1 08:49:40 1998 ++++ binutils-2.9.1/binutils/deflex.c Wed Dec 31 17:00:00 1969 +@@ -1,1748 +0,0 @@ +-/* A lexical scanner generated by flex */ +- +-/* Scanner skeleton version: +- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $ +- */ +- +-#define FLEX_SCANNER +-#define YY_FLEX_MAJOR_VERSION 2 +-#define YY_FLEX_MINOR_VERSION 5 +- +-#include +- +- +-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +-#ifdef c_plusplus +-#ifndef __cplusplus +-#define __cplusplus +-#endif +-#endif +- +- +-#ifdef __cplusplus +- +-#include +-#include +- +-/* Use prototypes in function declarations. */ +-#define YY_USE_PROTOS +- +-/* The "const" storage-class-modifier is valid. */ +-#define YY_USE_CONST +- +-#else /* ! __cplusplus */ +- +-#if __STDC__ +- +-#define YY_USE_PROTOS +-#define YY_USE_CONST +- +-#endif /* __STDC__ */ +-#endif /* ! __cplusplus */ +- +-#ifdef __TURBOC__ +- #pragma warn -rch +- #pragma warn -use +-#include +-#include +-#define YY_USE_CONST +-#define YY_USE_PROTOS +-#endif +- +-#ifdef YY_USE_CONST +-#define yyconst const +-#else +-#define yyconst +-#endif +- +- +-#ifdef YY_USE_PROTOS +-#define YY_PROTO(proto) proto +-#else +-#define YY_PROTO(proto) () +-#endif +- +-/* Returned upon end-of-file. */ +-#define YY_NULL 0 +- +-/* Promotes a possibly negative, possibly signed char to an unsigned +- * integer for use as an array index. If the signed char is negative, +- * we want to instead treat it as an 8-bit unsigned char, hence the +- * double cast. +- */ +-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +- +-/* Enter a start condition. This macro really ought to take a parameter, +- * but we do it the disgusting crufty way forced on us by the ()-less +- * definition of BEGIN. +- */ +-#define BEGIN yy_start = 1 + 2 * +- +-/* Translate the current start state into a value that can be later handed +- * to BEGIN to return to the state. The YYSTATE alias is for lex +- * compatibility. +- */ +-#define YY_START ((yy_start - 1) / 2) +-#define YYSTATE YY_START +- +-/* Action number for EOF rule of a given start state. */ +-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +- +-/* Special action meaning "start processing a new file". */ +-#define YY_NEW_FILE yyrestart( yyin ) +- +-#define YY_END_OF_BUFFER_CHAR 0 +- +-/* Size of default input buffer. */ +-#define YY_BUF_SIZE 16384 +- +-typedef struct yy_buffer_state *YY_BUFFER_STATE; +- +-extern int yyleng; +-extern FILE *yyin, *yyout; +- +-#define EOB_ACT_CONTINUE_SCAN 0 +-#define EOB_ACT_END_OF_FILE 1 +-#define EOB_ACT_LAST_MATCH 2 +- +-/* The funky do-while in the following #define is used to turn the definition +- * int a single C statement (which needs a semi-colon terminator). This +- * avoids problems with code like: +- * +- * if ( condition_holds ) +- * yyless( 5 ); +- * else +- * do_something_else(); +- * +- * Prior to using the do-while the compiler would get upset at the +- * "else" because it interpreted the "if" statement as being all +- * done when it reached the ';' after the yyless() call. +- */ +- +-/* Return all but the first 'n' matched characters back to the input stream. */ +- +-#define yyless(n) \ +- do \ +- { \ +- /* Undo effects of setting up yytext. */ \ +- *yy_cp = yy_hold_char; \ +- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ +- YY_DO_BEFORE_ACTION; /* set up yytext again */ \ +- } \ +- while ( 0 ) +- +-#define unput(c) yyunput( c, yytext_ptr ) +- +-/* The following is because we cannot portably get our hands on size_t +- * (without autoconf's help, which isn't available because we want +- * flex-generated scanners to compile on their own). +- */ +-typedef unsigned int yy_size_t; +- +- +-struct yy_buffer_state +- { +- FILE *yy_input_file; +- +- char *yy_ch_buf; /* input buffer */ +- char *yy_buf_pos; /* current position in input buffer */ +- +- /* Size of input buffer in bytes, not including room for EOB +- * characters. +- */ +- yy_size_t yy_buf_size; +- +- /* Number of characters read into yy_ch_buf, not including EOB +- * characters. +- */ +- int yy_n_chars; +- +- /* Whether we "own" the buffer - i.e., we know we created it, +- * and can realloc() it to grow it, and should free() it to +- * delete it. +- */ +- int yy_is_our_buffer; +- +- /* Whether this is an "interactive" input source; if so, and +- * if we're using stdio for input, then we want to use getc() +- * instead of fread(), to make sure we stop fetching input after +- * each newline. +- */ +- int yy_is_interactive; +- +- /* Whether we're considered to be at the beginning of a line. +- * If so, '^' rules will be active on the next match, otherwise +- * not. +- */ +- int yy_at_bol; +- +- /* Whether to try to fill the input buffer when we reach the +- * end of it. +- */ +- int yy_fill_buffer; +- +- int yy_buffer_status; +-#define YY_BUFFER_NEW 0 +-#define YY_BUFFER_NORMAL 1 +- /* When an EOF's been seen but there's still some text to process +- * then we mark the buffer as YY_EOF_PENDING, to indicate that we +- * shouldn't try reading from the input source any more. We might +- * still have a bunch of tokens to match, though, because of +- * possible backing-up. +- * +- * When we actually see the EOF, we change the status to "new" +- * (via yyrestart()), so that the user can continue scanning by +- * just pointing yyin at a new input file. +- */ +-#define YY_BUFFER_EOF_PENDING 2 +- }; +- +-static YY_BUFFER_STATE yy_current_buffer = 0; +- +-/* We provide macros for accessing buffer states in case in the +- * future we want to put the buffer states in a more general +- * "scanner state". +- */ +-#define YY_CURRENT_BUFFER yy_current_buffer +- +- +-/* yy_hold_char holds the character lost when yytext is formed. */ +-static char yy_hold_char; +- +-static int yy_n_chars; /* number of characters read into yy_ch_buf */ +- +- +-int yyleng; +- +-/* Points to current character in buffer. */ +-static char *yy_c_buf_p = (char *) 0; +-static int yy_init = 1; /* whether we need to initialize */ +-static int yy_start = 0; /* start state number */ +- +-/* Flag which is used to allow yywrap()'s to do buffer switches +- * instead of setting up a fresh yyin. A bit of a hack ... +- */ +-static int yy_did_buffer_switch_on_eof; +- +-void yyrestart YY_PROTO(( FILE *input_file )); +- +-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +-void yy_load_buffer_state YY_PROTO(( void )); +-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) +- +-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str )); +-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); +- +-static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +-static void yy_flex_free YY_PROTO(( void * )); +- +-#define yy_new_buffer yy_create_buffer +- +-#define yy_set_interactive(is_interactive) \ +- { \ +- if ( ! yy_current_buffer ) \ +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ +- yy_current_buffer->yy_is_interactive = is_interactive; \ +- } +- +-#define yy_set_bol(at_bol) \ +- { \ +- if ( ! yy_current_buffer ) \ +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ +- yy_current_buffer->yy_at_bol = at_bol; \ +- } +- +-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +- +-typedef unsigned char YY_CHAR; +-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +-typedef int yy_state_type; +-extern char *yytext; +-#define yytext_ptr yytext +- +-static yy_state_type yy_get_previous_state YY_PROTO(( void )); +-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +-static int yy_get_next_buffer YY_PROTO(( void )); +-static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +- +-/* Done after the current pattern has been matched and before the +- * corresponding action - sets up yytext. +- */ +-#define YY_DO_BEFORE_ACTION \ +- yytext_ptr = yy_bp; \ +- yyleng = (int) (yy_cp - yy_bp); \ +- yy_hold_char = *yy_cp; \ +- *yy_cp = '\0'; \ +- yy_c_buf_p = yy_cp; +- +-#define YY_NUM_RULES 32 +-#define YY_END_OF_BUFFER 33 +-static yyconst short int yy_accept[135] = +- { 0, +- 0, 0, 33, 32, 26, 27, 25, 32, 32, 32, +- 23, 31, 29, 19, 24, 28, 30, 32, 32, 32, +- 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, +- 21, 20, 0, 22, 23, 19, 24, 20, 20, 20, +- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +- 20, 12, 6, 20, 7, 20, 20, 20, 20, 20, +- 20, 1, 20, 15, 20, 20, 20, 20, 20, 20, +- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +- +- 20, 16, 20, 20, 20, 20, 20, 20, 20, 14, +- 20, 18, 20, 20, 20, 20, 17, 9, 20, 10, +- 2, 20, 20, 11, 13, 20, 5, 8, 20, 20, +- 4, 20, 3, 0 +- } ; +- +-static yyconst int yy_ec[256] = +- { 0, +- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 4, 1, 5, 1, 6, 1, 1, 7, 1, +- 1, 8, 1, 9, 6, 10, 11, 12, 12, 12, +- 12, 12, 12, 12, 12, 12, 12, 6, 13, 1, +- 14, 1, 6, 15, 16, 17, 18, 19, 20, 21, +- 6, 22, 23, 6, 24, 25, 26, 27, 28, 29, +- 6, 30, 31, 32, 33, 34, 35, 36, 37, 38, +- 1, 1, 1, 1, 6, 1, 21, 21, 21, 21, +- +- 21, 21, 6, 6, 6, 6, 6, 6, 6, 6, +- 6, 6, 6, 6, 6, 6, 6, 6, 6, 21, +- 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1 +- } ; +- +-static yyconst int yy_meta[39] = +- { 0, +- 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, +- 3, 4, 1, 1, 3, 4, 4, 4, 4, 4, +- 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3 +- } ; +- +-static yyconst short int yy_base[141] = +- { 0, +- 0, 0, 156, 157, 157, 157, 157, 150, 0, 147, +- 0, 157, 157, 0, 0, 157, 157, 137, 124, 23, +- 115, 130, 123, 125, 24, 127, 22, 126, 115, 139, +- 157, 0, 136, 157, 0, 0, 0, 111, 22, 109, +- 109, 26, 123, 109, 120, 110, 108, 118, 115, 116, +- 115, 100, 106, 108, 107, 95, 109, 106, 105, 94, +- 92, 92, 89, 98, 101, 97, 83, 84, 95, 81, +- 79, 0, 0, 78, 0, 79, 75, 77, 75, 75, +- 88, 0, 77, 0, 79, 81, 76, 76, 78, 81, +- 73, 63, 62, 70, 60, 61, 70, 61, 69, 56, +- +- 58, 0, 58, 55, 63, 51, 43, 49, 42, 0, +- 51, 0, 54, 49, 43, 42, 0, 0, 51, 0, +- 0, 36, 15, 0, 0, 28, 0, 0, 30, 20, +- 0, 20, 0, 157, 55, 57, 61, 65, 41, 69 +- } ; +- +-static yyconst short int yy_def[141] = +- { 0, +- 134, 1, 134, 134, 134, 134, 134, 135, 136, 137, +- 138, 134, 134, 139, 140, 134, 134, 136, 136, 136, +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 135, +- 134, 136, 137, 134, 138, 139, 140, 136, 136, 136, +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, +- +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, +- 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, +- 136, 136, 136, 0, 134, 134, 134, 134, 134, 134 +- } ; +- +-static yyconst short int yy_nxt[196] = +- { 0, +- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, +- 4, 14, 15, 16, 17, 9, 18, 19, 20, 21, +- 9, 22, 23, 9, 24, 9, 25, 9, 9, 26, +- 27, 9, 9, 28, 29, 9, 9, 9, 40, 46, +- 55, 49, 41, 50, 36, 59, 133, 132, 56, 131, +- 130, 47, 129, 51, 60, 30, 30, 30, 30, 32, +- 32, 33, 33, 33, 33, 35, 128, 35, 35, 37, +- 127, 37, 37, 126, 125, 124, 123, 122, 121, 120, +- 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, +- 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, +- +- 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, +- 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, +- 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, +- 69, 68, 67, 66, 65, 64, 63, 62, 61, 58, +- 57, 54, 34, 31, 53, 52, 48, 45, 44, 43, +- 42, 39, 38, 34, 31, 134, 3, 134, 134, 134, +- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, +- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, +- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, +- 134, 134, 134, 134, 134 +- +- } ; +- +-static yyconst short int yy_chk[196] = +- { 0, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 20, 25, +- 39, 27, 20, 27, 139, 42, 132, 130, 39, 129, +- 126, 25, 123, 27, 42, 135, 135, 135, 135, 136, +- 136, 137, 137, 137, 137, 138, 122, 138, 138, 140, +- 119, 140, 140, 116, 115, 114, 113, 111, 109, 108, +- 107, 106, 105, 104, 103, 101, 100, 99, 98, 97, +- 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, +- +- 86, 85, 83, 81, 80, 79, 78, 77, 76, 74, +- 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, +- 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, +- 51, 50, 49, 48, 47, 46, 45, 44, 43, 41, +- 40, 38, 33, 30, 29, 28, 26, 24, 23, 22, +- 21, 19, 18, 10, 8, 3, 134, 134, 134, 134, +- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, +- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, +- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, +- 134, 134, 134, 134, 134 +- +- } ; +- +-static yy_state_type yy_last_accepting_state; +-static char *yy_last_accepting_cpos; +- +-/* The intent behind this definition is that it'll catch +- * any uses of REJECT which flex missed. +- */ +-#define REJECT reject_used_but_not_detected +-#define yymore() yymore_used_but_not_detected +-#define YY_MORE_ADJ 0 +-char *yytext; +-#line 1 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-#define INITIAL 0 +-#line 2 "/5g/ian/binutils/release/copy/binutils/deflex.l" +- +-/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc. +- +-This file is part of GNU Binutils. +- +-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. */ +- +- +-/* Contributed by Steve Chamberlain +- sac@cygnus.com +- +-*/ +-#define DONTDECLARE_MALLOC +-#include "libiberty.h" +-#include "defparse.h" +-#include "dlltool.h" +- +-int linenumber; +- +-#line 480 "lex.yy.c" +- +-/* Macros after this point can all be overridden by user definitions in +- * section 1. +- */ +- +-#ifndef YY_SKIP_YYWRAP +-#ifdef __cplusplus +-extern "C" int yywrap YY_PROTO(( void )); +-#else +-extern int yywrap YY_PROTO(( void )); +-#endif +-#endif +- +-#ifndef YY_NO_UNPUT +-static void yyunput YY_PROTO(( int c, char *buf_ptr )); +-#endif +- +-#ifndef yytext_ptr +-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +-#endif +- +-#ifndef YY_NO_INPUT +-#ifdef __cplusplus +-static int yyinput YY_PROTO(( void )); +-#else +-static int input YY_PROTO(( void )); +-#endif +-#endif +- +-#if YY_STACK_USED +-static int yy_start_stack_ptr = 0; +-static int yy_start_stack_depth = 0; +-static int *yy_start_stack = 0; +-#ifndef YY_NO_PUSH_STATE +-static void yy_push_state YY_PROTO(( int new_state )); +-#endif +-#ifndef YY_NO_POP_STATE +-static void yy_pop_state YY_PROTO(( void )); +-#endif +-#ifndef YY_NO_TOP_STATE +-static int yy_top_state YY_PROTO(( void )); +-#endif +- +-#else +-#define YY_NO_PUSH_STATE 1 +-#define YY_NO_POP_STATE 1 +-#define YY_NO_TOP_STATE 1 +-#endif +- +-#ifdef YY_MALLOC_DECL +-YY_MALLOC_DECL +-#else +-#if __STDC__ +-#ifndef __cplusplus +-#include +-#endif +-#else +-/* Just try to get by without declaring the routines. This will fail +- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) +- * or sizeof(void*) != sizeof(int). +- */ +-#endif +-#endif +- +-/* Amount of stuff to slurp up with each read. */ +-#ifndef YY_READ_BUF_SIZE +-#define YY_READ_BUF_SIZE 8192 +-#endif +- +-/* Copy whatever the last rule matched to the standard output. */ +- +-#ifndef ECHO +-/* This used to be an fputs(), but since the string might contain NUL's, +- * we now use fwrite(). +- */ +-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +-#endif +- +-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, +- * is returned in "result". +- */ +-#ifndef YY_INPUT +-#define YY_INPUT(buf,result,max_size) \ +- if ( yy_current_buffer->yy_is_interactive ) \ +- { \ +- int c = '*', n; \ +- for ( n = 0; n < max_size && \ +- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ +- buf[n] = (char) c; \ +- if ( c == '\n' ) \ +- buf[n++] = (char) c; \ +- if ( c == EOF && ferror( yyin ) ) \ +- YY_FATAL_ERROR( "input in flex scanner failed" ); \ +- result = n; \ +- } \ +- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ +- && ferror( yyin ) ) \ +- YY_FATAL_ERROR( "input in flex scanner failed" ); +-#endif +- +-/* No semi-colon after return; correct usage is to write "yyterminate();" - +- * we don't want an extra ';' after the "return" because that will cause +- * some compilers to complain about unreachable statements. +- */ +-#ifndef yyterminate +-#define yyterminate() return YY_NULL +-#endif +- +-/* Number of entries by which start-condition stack grows. */ +-#ifndef YY_START_STACK_INCR +-#define YY_START_STACK_INCR 25 +-#endif +- +-/* Report a fatal error. */ +-#ifndef YY_FATAL_ERROR +-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +-#endif +- +-/* Default declaration of generated scanner - a define so the user can +- * easily add parameters. +- */ +-#ifndef YY_DECL +-#define YY_DECL int yylex YY_PROTO(( void )) +-#endif +- +-/* Code executed at the beginning of each rule, after yytext and yyleng +- * have been set up. +- */ +-#ifndef YY_USER_ACTION +-#define YY_USER_ACTION +-#endif +- +-/* Code executed at the end of each rule. */ +-#ifndef YY_BREAK +-#define YY_BREAK break; +-#endif +- +-#define YY_RULE_SETUP \ +- YY_USER_ACTION +- +-YY_DECL +- { +- register yy_state_type yy_current_state; +- register char *yy_cp, *yy_bp; +- register int yy_act; +- +-#line 34 "/5g/ian/binutils/release/copy/binutils/deflex.l" +- +-#line 629 "lex.yy.c" +- +- if ( yy_init ) +- { +- yy_init = 0; +- +-#ifdef YY_USER_INIT +- YY_USER_INIT; +-#endif +- +- if ( ! yy_start ) +- yy_start = 1; /* first start state */ +- +- if ( ! yyin ) +- yyin = stdin; +- +- if ( ! yyout ) +- yyout = stdout; +- +- if ( ! yy_current_buffer ) +- yy_current_buffer = +- yy_create_buffer( yyin, YY_BUF_SIZE ); +- +- yy_load_buffer_state(); +- } +- +- while ( 1 ) /* loops until end-of-file is reached */ +- { +- yy_cp = yy_c_buf_p; +- +- /* Support of yytext. */ +- *yy_cp = yy_hold_char; +- +- /* yy_bp points to the position in yy_ch_buf of the start of +- * the current run. +- */ +- yy_bp = yy_cp; +- +- yy_current_state = yy_start; +-yy_match: +- do +- { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 135 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- ++yy_cp; +- } +- while ( yy_base[yy_current_state] != 157 ); +- +-yy_find_action: +- yy_act = yy_accept[yy_current_state]; +- if ( yy_act == 0 ) +- { /* have to back up */ +- yy_cp = yy_last_accepting_cpos; +- yy_current_state = yy_last_accepting_state; +- yy_act = yy_accept[yy_current_state]; +- } +- +- YY_DO_BEFORE_ACTION; +- +- +-do_action: /* This label is used only to access EOF actions. */ +- +- +- switch ( yy_act ) +- { /* beginning of action switch */ +- case 0: /* must back up */ +- /* undo the effects of YY_DO_BEFORE_ACTION */ +- *yy_cp = yy_hold_char; +- yy_cp = yy_last_accepting_cpos; +- yy_current_state = yy_last_accepting_state; +- goto yy_find_action; +- +-case 1: +-YY_RULE_SETUP +-#line 35 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return NAME;} +- YY_BREAK +-case 2: +-YY_RULE_SETUP +-#line 36 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return LIBRARY;} +- YY_BREAK +-case 3: +-YY_RULE_SETUP +-#line 37 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return DESCRIPTION;} +- YY_BREAK +-case 4: +-YY_RULE_SETUP +-#line 38 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return STACKSIZE;} +- YY_BREAK +-case 5: +-YY_RULE_SETUP +-#line 39 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return HEAPSIZE;} +- YY_BREAK +-case 6: +-YY_RULE_SETUP +-#line 40 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return CODE;} +- YY_BREAK +-case 7: +-YY_RULE_SETUP +-#line 41 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return DATA;} +- YY_BREAK +-case 8: +-YY_RULE_SETUP +-#line 42 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return SECTIONS;} +- YY_BREAK +-case 9: +-YY_RULE_SETUP +-#line 43 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return EXPORTS;} +- YY_BREAK +-case 10: +-YY_RULE_SETUP +-#line 44 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return IMPORTS;} +- YY_BREAK +-case 11: +-YY_RULE_SETUP +-#line 45 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return VERSIONK;} +- YY_BREAK +-case 12: +-YY_RULE_SETUP +-#line 46 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return BASE;} +- YY_BREAK +-case 13: +-YY_RULE_SETUP +-#line 47 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return CONSTANT; } +- YY_BREAK +-case 14: +-YY_RULE_SETUP +-#line 48 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return NONAME; } +- YY_BREAK +-case 15: +-YY_RULE_SETUP +-#line 49 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return READ;} +- YY_BREAK +-case 16: +-YY_RULE_SETUP +-#line 50 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return WRITE;} +- YY_BREAK +-case 17: +-YY_RULE_SETUP +-#line 51 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return EXECUTE;} +- YY_BREAK +-case 18: +-YY_RULE_SETUP +-#line 52 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return SHARED;} +- YY_BREAK +-case 19: +-YY_RULE_SETUP +-#line 54 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ yylval.number = strtol (yytext,0,0); +- return NUMBER; } +- YY_BREAK +-case 20: +-YY_RULE_SETUP +-#line 57 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ +- yylval.id = xstrdup (yytext); +- return ID; +- } +- YY_BREAK +-case 21: +-YY_RULE_SETUP +-#line 62 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ +- yylval.id = xstrdup (yytext+1); +- yylval.id[yyleng-2] = 0; +- return ID; +- } +- YY_BREAK +-case 22: +-YY_RULE_SETUP +-#line 68 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ +- yylval.id = xstrdup (yytext+1); +- yylval.id[yyleng-2] = 0; +- return ID; +- } +- YY_BREAK +-case 23: +-YY_RULE_SETUP +-#line 73 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ } +- YY_BREAK +-case 24: +-YY_RULE_SETUP +-#line 74 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ } +- YY_BREAK +-case 25: +-YY_RULE_SETUP +-#line 75 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ } +- YY_BREAK +-case 26: +-YY_RULE_SETUP +-#line 76 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ } +- YY_BREAK +-case 27: +-YY_RULE_SETUP +-#line 77 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ linenumber ++ ;} +- YY_BREAK +-case 28: +-YY_RULE_SETUP +-#line 78 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return '=';} +- YY_BREAK +-case 29: +-YY_RULE_SETUP +-#line 79 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return '.';} +- YY_BREAK +-case 30: +-YY_RULE_SETUP +-#line 80 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return '@';} +- YY_BREAK +-case 31: +-YY_RULE_SETUP +-#line 81 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-{ return ',';} +- YY_BREAK +-case 32: +-YY_RULE_SETUP +-#line 82 "/5g/ian/binutils/release/copy/binutils/deflex.l" +-ECHO; +- YY_BREAK +-#line 884 "lex.yy.c" +-case YY_STATE_EOF(INITIAL): +- yyterminate(); +- +- case YY_END_OF_BUFFER: +- { +- /* Amount of text matched not including the EOB char. */ +- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; +- +- /* Undo the effects of YY_DO_BEFORE_ACTION. */ +- *yy_cp = yy_hold_char; +- +- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) +- { +- /* We're scanning a new file or input source. It's +- * possible that this happened because the user +- * just pointed yyin at a new source and called +- * yylex(). If so, then we have to assure +- * consistency between yy_current_buffer and our +- * globals. Here is the right place to do so, because +- * this is the first action (other than possibly a +- * back-up) that will match for the new input source. +- */ +- yy_n_chars = yy_current_buffer->yy_n_chars; +- yy_current_buffer->yy_input_file = yyin; +- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; +- } +- +- /* Note that here we test for yy_c_buf_p "<=" to the position +- * of the first EOB in the buffer, since yy_c_buf_p will +- * already have been incremented past the NUL character +- * (since all states make transitions on EOB to the +- * end-of-buffer state). Contrast this with the test +- * in input(). +- */ +- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) +- { /* This was really a NUL. */ +- yy_state_type yy_next_state; +- +- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; +- +- yy_current_state = yy_get_previous_state(); +- +- /* Okay, we're now positioned to make the NUL +- * transition. We couldn't have +- * yy_get_previous_state() go ahead and do it +- * for us because it doesn't know how to deal +- * with the possibility of jamming (and we don't +- * want to build jamming into it because then it +- * will run more slowly). +- */ +- +- yy_next_state = yy_try_NUL_trans( yy_current_state ); +- +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- +- if ( yy_next_state ) +- { +- /* Consume the NUL. */ +- yy_cp = ++yy_c_buf_p; +- yy_current_state = yy_next_state; +- goto yy_match; +- } +- +- else +- { +- yy_cp = yy_c_buf_p; +- goto yy_find_action; +- } +- } +- +- else switch ( yy_get_next_buffer() ) +- { +- case EOB_ACT_END_OF_FILE: +- { +- yy_did_buffer_switch_on_eof = 0; +- +- if ( yywrap() ) +- { +- /* Note: because we've taken care in +- * yy_get_next_buffer() to have set up +- * yytext, we can now set up +- * yy_c_buf_p so that if some total +- * hoser (like flex itself) wants to +- * call the scanner after we return the +- * YY_NULL, it'll still work - another +- * YY_NULL will get returned. +- */ +- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; +- +- yy_act = YY_STATE_EOF(YY_START); +- goto do_action; +- } +- +- else +- { +- if ( ! yy_did_buffer_switch_on_eof ) +- YY_NEW_FILE; +- } +- break; +- } +- +- case EOB_ACT_CONTINUE_SCAN: +- yy_c_buf_p = +- yytext_ptr + yy_amount_of_matched_text; +- +- yy_current_state = yy_get_previous_state(); +- +- yy_cp = yy_c_buf_p; +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- goto yy_match; +- +- case EOB_ACT_LAST_MATCH: +- yy_c_buf_p = +- &yy_current_buffer->yy_ch_buf[yy_n_chars]; +- +- yy_current_state = yy_get_previous_state(); +- +- yy_cp = yy_c_buf_p; +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- goto yy_find_action; +- } +- break; +- } +- +- default: +- YY_FATAL_ERROR( +- "fatal flex scanner internal error--no action found" ); +- } /* end of action switch */ +- } /* end of scanning one token */ +- } /* end of yylex */ +- +- +-/* yy_get_next_buffer - try to read in a new buffer +- * +- * Returns a code representing an action: +- * EOB_ACT_LAST_MATCH - +- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position +- * EOB_ACT_END_OF_FILE - end of file +- */ +- +-static int yy_get_next_buffer() +- { +- register char *dest = yy_current_buffer->yy_ch_buf; +- register char *source = yytext_ptr; +- register int number_to_move, i; +- int ret_val; +- +- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) +- YY_FATAL_ERROR( +- "fatal flex scanner internal error--end of buffer missed" ); +- +- if ( yy_current_buffer->yy_fill_buffer == 0 ) +- { /* Don't try to fill the buffer, so this is an EOF. */ +- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) +- { +- /* We matched a singled characater, the EOB, so +- * treat this as a final EOF. +- */ +- return EOB_ACT_END_OF_FILE; +- } +- +- else +- { +- /* We matched some text prior to the EOB, first +- * process it. +- */ +- return EOB_ACT_LAST_MATCH; +- } +- } +- +- /* Try to read more data. */ +- +- /* First move last chars to start of buffer. */ +- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; +- +- for ( i = 0; i < number_to_move; ++i ) +- *(dest++) = *(source++); +- +- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) +- /* don't do the read, it's not guaranteed to return an EOF, +- * just force an EOF +- */ +- yy_n_chars = 0; +- +- else +- { +- int num_to_read = +- yy_current_buffer->yy_buf_size - number_to_move - 1; +- +- while ( num_to_read <= 0 ) +- { /* Not enough room in the buffer - grow it. */ +-#ifdef YY_USES_REJECT +- YY_FATAL_ERROR( +-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +-#else +- +- /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = yy_current_buffer; +- +- int yy_c_buf_p_offset = +- (int) (yy_c_buf_p - b->yy_ch_buf); +- +- if ( b->yy_is_our_buffer ) +- { +- int new_size = b->yy_buf_size * 2; +- +- if ( new_size <= 0 ) +- b->yy_buf_size += b->yy_buf_size / 8; +- else +- b->yy_buf_size *= 2; +- +- b->yy_ch_buf = (char *) +- /* Include room in for 2 EOB chars. */ +- yy_flex_realloc( (void *) b->yy_ch_buf, +- b->yy_buf_size + 2 ); +- } +- else +- /* Can't grow it, we don't own it. */ +- b->yy_ch_buf = 0; +- +- if ( ! b->yy_ch_buf ) +- YY_FATAL_ERROR( +- "fatal error - scanner input buffer overflow" ); +- +- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; +- +- num_to_read = yy_current_buffer->yy_buf_size - +- number_to_move - 1; +-#endif +- } +- +- if ( num_to_read > YY_READ_BUF_SIZE ) +- num_to_read = YY_READ_BUF_SIZE; +- +- /* Read in more data. */ +- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), +- yy_n_chars, num_to_read ); +- } +- +- if ( yy_n_chars == 0 ) +- { +- if ( number_to_move == YY_MORE_ADJ ) +- { +- ret_val = EOB_ACT_END_OF_FILE; +- yyrestart( yyin ); +- } +- +- else +- { +- ret_val = EOB_ACT_LAST_MATCH; +- yy_current_buffer->yy_buffer_status = +- YY_BUFFER_EOF_PENDING; +- } +- } +- +- else +- ret_val = EOB_ACT_CONTINUE_SCAN; +- +- yy_n_chars += number_to_move; +- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; +- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; +- +- yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; +- +- return ret_val; +- } +- +- +-/* yy_get_previous_state - get the state just before the EOB char was reached */ +- +-static yy_state_type yy_get_previous_state() +- { +- register yy_state_type yy_current_state; +- register char *yy_cp; +- +- yy_current_state = yy_start; +- +- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) +- { +- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 135 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- } +- +- return yy_current_state; +- } +- +- +-/* yy_try_NUL_trans - try to make a transition on the NUL character +- * +- * synopsis +- * next_state = yy_try_NUL_trans( current_state ); +- */ +- +-#ifdef YY_USE_PROTOS +-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +-#else +-static yy_state_type yy_try_NUL_trans( yy_current_state ) +-yy_state_type yy_current_state; +-#endif +- { +- register int yy_is_jam; +- register char *yy_cp = yy_c_buf_p; +- +- register YY_CHAR yy_c = 1; +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 135 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 134); +- +- return yy_is_jam ? 0 : yy_current_state; +- } +- +- +-#ifndef YY_NO_UNPUT +-#ifdef YY_USE_PROTOS +-static void yyunput( int c, register char *yy_bp ) +-#else +-static void yyunput( c, yy_bp ) +-int c; +-register char *yy_bp; +-#endif +- { +- register char *yy_cp = yy_c_buf_p; +- +- /* undo effects of setting up yytext */ +- *yy_cp = yy_hold_char; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- { /* need to shift things up to make room */ +- /* +2 for EOB chars. */ +- register int number_to_move = yy_n_chars + 2; +- register char *dest = &yy_current_buffer->yy_ch_buf[ +- yy_current_buffer->yy_buf_size + 2]; +- register char *source = +- &yy_current_buffer->yy_ch_buf[number_to_move]; +- +- while ( source > yy_current_buffer->yy_ch_buf ) +- *--dest = *--source; +- +- yy_cp += (int) (dest - source); +- yy_bp += (int) (dest - source); +- yy_n_chars = yy_current_buffer->yy_buf_size; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- YY_FATAL_ERROR( "flex scanner push-back overflow" ); +- } +- +- *--yy_cp = (char) c; +- +- +- yytext_ptr = yy_bp; +- yy_hold_char = *yy_cp; +- yy_c_buf_p = yy_cp; +- } +-#endif /* ifndef YY_NO_UNPUT */ +- +- +-#ifdef __cplusplus +-static int yyinput() +-#else +-static int input() +-#endif +- { +- int c; +- +- *yy_c_buf_p = yy_hold_char; +- +- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) +- { +- /* yy_c_buf_p now points to the character we want to return. +- * If this occurs *before* the EOB characters, then it's a +- * valid NUL; if not, then we've hit the end of the buffer. +- */ +- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) +- /* This was really a NUL. */ +- *yy_c_buf_p = '\0'; +- +- else +- { /* need more input */ +- yytext_ptr = yy_c_buf_p; +- ++yy_c_buf_p; +- +- switch ( yy_get_next_buffer() ) +- { +- case EOB_ACT_END_OF_FILE: +- { +- if ( yywrap() ) +- { +- yy_c_buf_p = +- yytext_ptr + YY_MORE_ADJ; +- return EOF; +- } +- +- if ( ! yy_did_buffer_switch_on_eof ) +- YY_NEW_FILE; +-#ifdef __cplusplus +- return yyinput(); +-#else +- return input(); +-#endif +- } +- +- case EOB_ACT_CONTINUE_SCAN: +- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; +- break; +- +- case EOB_ACT_LAST_MATCH: +-#ifdef __cplusplus +- YY_FATAL_ERROR( +- "unexpected last match in yyinput()" ); +-#else +- YY_FATAL_ERROR( +- "unexpected last match in input()" ); +-#endif +- } +- } +- } +- +- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ +- *yy_c_buf_p = '\0'; /* preserve yytext */ +- yy_hold_char = *++yy_c_buf_p; +- +- +- return c; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yyrestart( FILE *input_file ) +-#else +-void yyrestart( input_file ) +-FILE *input_file; +-#endif +- { +- if ( ! yy_current_buffer ) +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); +- +- yy_init_buffer( yy_current_buffer, input_file ); +- yy_load_buffer_state(); +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +-#else +-void yy_switch_to_buffer( new_buffer ) +-YY_BUFFER_STATE new_buffer; +-#endif +- { +- if ( yy_current_buffer == new_buffer ) +- return; +- +- if ( yy_current_buffer ) +- { +- /* Flush out information for old buffer. */ +- *yy_c_buf_p = yy_hold_char; +- yy_current_buffer->yy_buf_pos = yy_c_buf_p; +- yy_current_buffer->yy_n_chars = yy_n_chars; +- } +- +- yy_current_buffer = new_buffer; +- yy_load_buffer_state(); +- +- /* We don't actually know whether we did this switch during +- * EOF (yywrap()) processing, but the only time this flag +- * is looked at is after yywrap() is called, so it's safe +- * to go ahead and always set it. +- */ +- yy_did_buffer_switch_on_eof = 1; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_load_buffer_state( void ) +-#else +-void yy_load_buffer_state() +-#endif +- { +- yy_n_chars = yy_current_buffer->yy_n_chars; +- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; +- yyin = yy_current_buffer->yy_input_file; +- yy_hold_char = *yy_c_buf_p; +- } +- +- +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +-#else +-YY_BUFFER_STATE yy_create_buffer( file, size ) +-FILE *file; +-int size; +-#endif +- { +- YY_BUFFER_STATE b; +- +- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); +- if ( ! b ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +- +- b->yy_buf_size = size; +- +- /* yy_ch_buf has to be 2 characters longer than the size given because +- * we need to put in 2 end-of-buffer characters. +- */ +- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); +- if ( ! b->yy_ch_buf ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +- +- b->yy_is_our_buffer = 1; +- +- yy_init_buffer( b, file ); +- +- return b; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_delete_buffer( YY_BUFFER_STATE b ) +-#else +-void yy_delete_buffer( b ) +-YY_BUFFER_STATE b; +-#endif +- { +- if ( ! b ) +- return; +- +- if ( b == yy_current_buffer ) +- yy_current_buffer = (YY_BUFFER_STATE) 0; +- +- if ( b->yy_is_our_buffer ) +- yy_flex_free( (void *) b->yy_ch_buf ); +- +- yy_flex_free( (void *) b ); +- } +- +- +-#ifndef YY_ALWAYS_INTERACTIVE +-#ifndef YY_NEVER_INTERACTIVE +-extern int isatty YY_PROTO(( int )); +-#endif +-#endif +- +-#ifdef YY_USE_PROTOS +-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +-#else +-void yy_init_buffer( b, file ) +-YY_BUFFER_STATE b; +-FILE *file; +-#endif +- +- +- { +- yy_flush_buffer( b ); +- +- b->yy_input_file = file; +- b->yy_fill_buffer = 1; +- +-#if YY_ALWAYS_INTERACTIVE +- b->yy_is_interactive = 1; +-#else +-#if YY_NEVER_INTERACTIVE +- b->yy_is_interactive = 0; +-#else +- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +-#endif +-#endif +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_flush_buffer( YY_BUFFER_STATE b ) +-#else +-void yy_flush_buffer( b ) +-YY_BUFFER_STATE b; +-#endif +- +- { +- b->yy_n_chars = 0; +- +- /* We always need two end-of-buffer characters. The first causes +- * a transition to the end-of-buffer state. The second causes +- * a jam in that state. +- */ +- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; +- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; +- +- b->yy_buf_pos = &b->yy_ch_buf[0]; +- +- b->yy_at_bol = 1; +- b->yy_buffer_status = YY_BUFFER_NEW; +- +- if ( b == yy_current_buffer ) +- yy_load_buffer_state(); +- } +- +- +-#ifndef YY_NO_SCAN_BUFFER +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +-#else +-YY_BUFFER_STATE yy_scan_buffer( base, size ) +-char *base; +-yy_size_t size; +-#endif +- { +- YY_BUFFER_STATE b; +- +- if ( size < 2 || +- base[size-2] != YY_END_OF_BUFFER_CHAR || +- base[size-1] != YY_END_OF_BUFFER_CHAR ) +- /* They forgot to leave room for the EOB's. */ +- return 0; +- +- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); +- if ( ! b ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); +- +- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ +- b->yy_buf_pos = b->yy_ch_buf = base; +- b->yy_is_our_buffer = 0; +- b->yy_input_file = 0; +- b->yy_n_chars = b->yy_buf_size; +- b->yy_is_interactive = 0; +- b->yy_at_bol = 1; +- b->yy_fill_buffer = 0; +- b->yy_buffer_status = YY_BUFFER_NEW; +- +- yy_switch_to_buffer( b ); +- +- return b; +- } +-#endif +- +- +-#ifndef YY_NO_SCAN_STRING +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_string( yyconst char *str ) +-#else +-YY_BUFFER_STATE yy_scan_string( str ) +-yyconst char *str; +-#endif +- { +- int len; +- for ( len = 0; str[len]; ++len ) +- ; +- +- return yy_scan_bytes( str, len ); +- } +-#endif +- +- +-#ifndef YY_NO_SCAN_BYTES +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +-#else +-YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +-yyconst char *bytes; +-int len; +-#endif +- { +- YY_BUFFER_STATE b; +- char *buf; +- yy_size_t n; +- int i; +- +- /* Get memory for full buffer, including space for trailing EOB's. */ +- n = len + 2; +- buf = (char *) yy_flex_alloc( n ); +- if ( ! buf ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); +- +- for ( i = 0; i < len; ++i ) +- buf[i] = bytes[i]; +- +- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; +- +- b = yy_scan_buffer( buf, n ); +- if ( ! b ) +- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); +- +- /* It's okay to grow etc. this buffer, and we should throw it +- * away when we're done. +- */ +- b->yy_is_our_buffer = 1; +- +- return b; +- } +-#endif +- +- +-#ifndef YY_NO_PUSH_STATE +-#ifdef YY_USE_PROTOS +-static void yy_push_state( int new_state ) +-#else +-static void yy_push_state( new_state ) +-int new_state; +-#endif +- { +- if ( yy_start_stack_ptr >= yy_start_stack_depth ) +- { +- yy_size_t new_size; +- +- yy_start_stack_depth += YY_START_STACK_INCR; +- new_size = yy_start_stack_depth * sizeof( int ); +- +- if ( ! yy_start_stack ) +- yy_start_stack = (int *) yy_flex_alloc( new_size ); +- +- else +- yy_start_stack = (int *) yy_flex_realloc( +- (void *) yy_start_stack, new_size ); +- +- if ( ! yy_start_stack ) +- YY_FATAL_ERROR( +- "out of memory expanding start-condition stack" ); +- } +- +- yy_start_stack[yy_start_stack_ptr++] = YY_START; +- +- BEGIN(new_state); +- } +-#endif +- +- +-#ifndef YY_NO_POP_STATE +-static void yy_pop_state() +- { +- if ( --yy_start_stack_ptr < 0 ) +- YY_FATAL_ERROR( "start-condition stack underflow" ); +- +- BEGIN(yy_start_stack[yy_start_stack_ptr]); +- } +-#endif +- +- +-#ifndef YY_NO_TOP_STATE +-static int yy_top_state() +- { +- return yy_start_stack[yy_start_stack_ptr - 1]; +- } +-#endif +- +-#ifndef YY_EXIT_FAILURE +-#define YY_EXIT_FAILURE 2 +-#endif +- +-#ifdef YY_USE_PROTOS +-static void yy_fatal_error( yyconst char msg[] ) +-#else +-static void yy_fatal_error( msg ) +-char msg[]; +-#endif +- { +- (void) fprintf( stderr, "%s\n", msg ); +- exit( YY_EXIT_FAILURE ); +- } +- +- +- +-/* Redefine yyless() so it works in section 3 code. */ +- +-#undef yyless +-#define yyless(n) \ +- do \ +- { \ +- /* Undo effects of setting up yytext. */ \ +- yytext[yyleng] = yy_hold_char; \ +- yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ +- yy_hold_char = *yy_c_buf_p; \ +- *yy_c_buf_p = '\0'; \ +- yyleng = n; \ +- } \ +- while ( 0 ) +- +- +-/* Internal utility routines. */ +- +-#ifndef yytext_ptr +-#ifdef YY_USE_PROTOS +-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +-#else +-static void yy_flex_strncpy( s1, s2, n ) +-char *s1; +-yyconst char *s2; +-int n; +-#endif +- { +- register int i; +- for ( i = 0; i < n; ++i ) +- s1[i] = s2[i]; +- } +-#endif +- +- +-#ifdef YY_USE_PROTOS +-static void *yy_flex_alloc( yy_size_t size ) +-#else +-static void *yy_flex_alloc( size ) +-yy_size_t size; +-#endif +- { +- return (void *) malloc( size ); +- } +- +-#ifdef YY_USE_PROTOS +-static void *yy_flex_realloc( void *ptr, yy_size_t size ) +-#else +-static void *yy_flex_realloc( ptr, size ) +-void *ptr; +-yy_size_t size; +-#endif +- { +- /* The cast to (char *) in the following accommodates both +- * implementations that use char* generic pointers, and those +- * that use void* generic pointers. It works with the latter +- * because both ANSI C and C++ allow castless assignment from +- * any pointer type to void*, and deal with argument conversions +- * as though doing an assignment. +- */ +- return (void *) realloc( (char *) ptr, size ); +- } +- +-#ifdef YY_USE_PROTOS +-static void yy_flex_free( void *ptr ) +-#else +-static void yy_flex_free( ptr ) +-void *ptr; +-#endif +- { +- free( ptr ); +- } +- +-#if YY_MAIN +-int main() +- { +- yylex(); +- return 0; +- } +-#endif +-#line 82 "/5g/ian/binutils/release/copy/binutils/deflex.l" +- +-#ifndef yywrap +-/* Needed for lex, though not flex. */ +-int yywrap() { return 1; } +-#endif +diff -rup --new-file binutils-2.9.1/binutils/dlltool.c binutils-2.9.1/binutils/dlltool.c +--- binutils-2.9.1/binutils/dlltool.c Fri May 1 08:49:32 1998 ++++ binutils-2.9.1/binutils/dlltool.c Sun Aug 23 00:00:00 1998 +@@ -314,7 +314,7 @@ static const unsigned char arm_jtab[] = + static const unsigned char ppc_jtab[] = + { + 0x00, 0x00, 0x62, 0x81, /* lwz r11,0(r2) */ +- /* Reloc TOCREL16 __imp_xxx */ ++ /* Reloc TOCREL16 _imp__xxx */ + 0x00, 0x00, 0x8B, 0x81, /* lwz r12,0(r11) */ + 0x04, 0x00, 0x41, 0x90, /* stw r2,4(r1) */ + 0xA6, 0x03, 0x89, 0x7D, /* mtctr r12 */ +@@ -1292,14 +1292,14 @@ both single and double underscores, for + + .text + .global _GetFileVersionInfoSizeW@8 +- .global __imp_GetFileVersionInfoSizeW@8 ++ .global _imp__GetFileVersionInfoSizeW@8 + _GetFileVersionInfoSizeW@8: +- jmp * __imp_GetFileVersionInfoSizeW@8 ++ jmp * _imp__GetFileVersionInfoSizeW@8 + .section .idata$7 # To force loading of head + .long __version_a_head + # Import Address Table + .section .idata$5 +-__imp_GetFileVersionInfoSizeW@8: ++_imp__GetFileVersionInfoSizeW@8: + .rva ID2 + + # Import Lookup Table +@@ -1316,8 +1316,8 @@ For the PowerPC, here's the variation on + # Rather than a simple "jmp *", the code to get to the dll function + # looks like: + .text +- lwz r11,[tocv]__imp_function_name(r2) +-# RELOC: 00000000 TOCREL16,TOCDEFN __imp_function_name ++ lwz r11,[tocv]_imp__function_name(r2) ++# RELOC: 00000000 TOCREL16,TOCDEFN _imp__function_name + lwz r12,0(r11) + stw r2,4(r1) + mtctr r12 +@@ -1353,7 +1353,7 @@ make_one_lib_file (exp, i) + fprintf (f, "\t%s\t%s%s\n", ASM_GLOBAL, ASM_PREFIX, exp->name); + fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name); + fprintf (f, "\t%s\t_imp__%s\n", ASM_GLOBAL, exp->name); +- fprintf (f, "%s%s:\n\t%s\t__imp_%s\n", ASM_PREFIX, ++ fprintf (f, "%s%s:\n\t%s\t_imp__%s\n", ASM_PREFIX, + exp->name, ASM_JUMP, exp->name); + + fprintf (f, "\t.section\t.idata$7\t%s To force loading of head\n", ASM_C); +diff -rup --new-file binutils-2.9.1/binutils/nlmheader.c binutils-2.9.1/binutils/nlmheader.c +--- binutils-2.9.1/binutils/nlmheader.c Fri May 1 08:49:40 1998 ++++ binutils-2.9.1/binutils/nlmheader.c Wed Dec 31 17:00:00 1969 +@@ -1,1923 +0,0 @@ +- +-/* A Bison parser, made from /5g/ian/binutils/release/copy/binutils/nlmheader.y +- by GNU Bison version 1.25 +- */ +- +-#define YYBISON 1 /* Identify Bison output. */ +- +-#define CHECK 258 +-#define CODESTART 259 +-#define COPYRIGHT 260 +-#define CUSTOM 261 +-#define DATE 262 +-#define DEBUG 263 +-#define DESCRIPTION 264 +-#define EXIT 265 +-#define EXPORT 266 +-#define FLAG_ON 267 +-#define FLAG_OFF 268 +-#define FULLMAP 269 +-#define HELP 270 +-#define IMPORT 271 +-#define INPUT 272 +-#define MAP 273 +-#define MESSAGES 274 +-#define MODULE 275 +-#define MULTIPLE 276 +-#define OS_DOMAIN 277 +-#define OUTPUT 278 +-#define PSEUDOPREEMPTION 279 +-#define REENTRANT 280 +-#define SCREENNAME 281 +-#define SHARELIB 282 +-#define STACK 283 +-#define START 284 +-#define SYNCHRONIZE 285 +-#define THREADNAME 286 +-#define TYPE 287 +-#define VERBOSE 288 +-#define VERSIONK 289 +-#define XDCDATA 290 +-#define STRING 291 +-#define QUOTED_STRING 292 +- +-#line 1 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-/* nlmheader.y - parse NLM header specification keywords. +- Copyright (C) 1993, 94, 95, 97, 1998 Free Software Foundation, Inc. +- +-This file is part of GNU Binutils. +- +-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. */ +- +-/* Written by Ian Lance Taylor . +- +- This bison file parses the commands recognized by the NetWare NLM +- linker, except for lists of object files. It stores the +- information in global variables. +- +- This implementation is based on the description in the NetWare Tool +- Maker Specification manual, edition 1.0. */ +- +-#include +-#include +-#include +-#include "bfd.h" +-#include "bucomm.h" +-#include "nlm/common.h" +-#include "nlm/internal.h" +-#include "nlmconv.h" +- +-/* Information is stored in the structures pointed to by these +- variables. */ +- +-Nlm_Internal_Fixed_Header *fixed_hdr; +-Nlm_Internal_Variable_Header *var_hdr; +-Nlm_Internal_Version_Header *version_hdr; +-Nlm_Internal_Copyright_Header *copyright_hdr; +-Nlm_Internal_Extended_Header *extended_hdr; +- +-/* Procedure named by CHECK. */ +-char *check_procedure; +-/* File named by CUSTOM. */ +-char *custom_file; +-/* Whether to generate debugging information (DEBUG). */ +-boolean debug_info; +-/* Procedure named by EXIT. */ +-char *exit_procedure; +-/* Exported symbols (EXPORT). */ +-struct string_list *export_symbols; +-/* List of files from INPUT. */ +-struct string_list *input_files; +-/* Map file name (MAP, FULLMAP). */ +-char *map_file; +-/* Whether a full map has been requested (FULLMAP). */ +-boolean full_map; +-/* File named by HELP. */ +-char *help_file; +-/* Imported symbols (IMPORT). */ +-struct string_list *import_symbols; +-/* File named by MESSAGES. */ +-char *message_file; +-/* Autoload module list (MODULE). */ +-struct string_list *modules; +-/* File named by OUTPUT. */ +-char *output_file; +-/* File named by SHARELIB. */ +-char *sharelib_file; +-/* Start procedure name (START). */ +-char *start_procedure; +-/* VERBOSE. */ +-boolean verbose; +-/* RPC description file (XDCDATA). */ +-char *rpc_file; +- +-/* The number of serious errors that have occurred. */ +-int parse_errors; +- +-/* The current symbol prefix when reading a list of import or export +- symbols. */ +-static char *symbol_prefix; +- +-/* Parser error message handler. */ +-#define yyerror(msg) nlmheader_error (msg); +- +-/* Local functions. */ +-static int yylex PARAMS ((void)); +-static void nlmlex_file_push PARAMS ((const char *)); +-static boolean nlmlex_file_open PARAMS ((const char *)); +-static int nlmlex_buf_init PARAMS ((void)); +-static char nlmlex_buf_add PARAMS ((int)); +-static long nlmlex_get_number PARAMS ((const char *)); +-static void nlmheader_identify PARAMS ((void)); +-static void nlmheader_warn PARAMS ((const char *, int)); +-static void nlmheader_error PARAMS ((const char *)); +-static struct string_list * string_list_cons PARAMS ((char *, +- struct string_list *)); +-static struct string_list * string_list_append PARAMS ((struct string_list *, +- struct string_list *)); +-static struct string_list * string_list_append1 PARAMS ((struct string_list *, +- char *)); +-static char *xstrdup PARAMS ((const char *)); +- +- +-#line 112 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-typedef union +-{ +- char *string; +- struct string_list *list; +-} YYSTYPE; +-#include +- +-#ifndef __cplusplus +-#ifndef __STDC__ +-#define const +-#endif +-#endif +- +- +- +-#define YYFINAL 82 +-#define YYFLAG -32768 +-#define YYNTBASE 40 +- +-#define YYTRANSLATE(x) ((unsigned)(x) <= 292 ? yytranslate[x] : 50) +- +-static const char yytranslate[] = { 0, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 38, +- 39, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, +- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, +- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, +- 36, 37 +-}; +- +-#if YYDEBUG != 0 +-static const short yyprhs[] = { 0, +- 0, 2, 3, 6, 9, 12, 15, 18, 23, 25, +- 28, 31, 32, 36, 39, 42, 44, 47, 50, 51, +- 55, 58, 60, 63, 66, 69, 71, 73, 76, 78, +- 80, 83, 86, 89, 92, 94, 97, 100, 102, 107, +- 111, 114, 115, 117, 119, 121, 124, 127, 131, 133, +- 134 +-}; +- +-static const short yyrhs[] = { 41, +- 0, 0, 42, 41, 0, 3, 36, 0, 4, 36, +- 0, 5, 37, 0, 6, 36, 0, 7, 36, 36, +- 36, 0, 8, 0, 9, 37, 0, 10, 36, 0, +- 0, 11, 43, 45, 0, 12, 36, 0, 13, 36, +- 0, 14, 0, 14, 36, 0, 15, 36, 0, 0, +- 16, 44, 45, 0, 17, 49, 0, 18, 0, 18, +- 36, 0, 19, 36, 0, 20, 49, 0, 21, 0, +- 22, 0, 23, 36, 0, 24, 0, 25, 0, 26, +- 37, 0, 27, 36, 0, 28, 36, 0, 29, 36, +- 0, 30, 0, 31, 37, 0, 32, 36, 0, 33, +- 0, 34, 36, 36, 36, 0, 34, 36, 36, 0, +- 35, 36, 0, 0, 46, 0, 48, 0, 47, 0, +- 46, 48, 0, 46, 47, 0, 38, 36, 39, 0, +- 36, 0, 0, 36, 49, 0 +-}; +- +-#endif +- +-#if YYDEBUG != 0 +-static const short yyrline[] = { 0, +- 143, 149, 151, 156, 161, 166, 183, 187, 205, 209, +- 225, 229, 234, 237, 242, 247, 252, 257, 261, 266, +- 269, 273, 277, 281, 285, 289, 293, 297, 304, 308, +- 312, 328, 332, 337, 341, 345, 361, 366, 370, 394, +- 410, 418, 423, 433, 438, 442, 446, 454, 465, 481, +- 486 +-}; +-#endif +- +- +-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) +- +-static const char * const yytname[] = { "$","error","$undefined.","CHECK", +-"CODESTART","COPYRIGHT","CUSTOM","DATE","DEBUG","DESCRIPTION","EXIT","EXPORT", +-"FLAG_ON","FLAG_OFF","FULLMAP","HELP","IMPORT","INPUT","MAP","MESSAGES","MODULE", +-"MULTIPLE","OS_DOMAIN","OUTPUT","PSEUDOPREEMPTION","REENTRANT","SCREENNAME", +-"SHARELIB","STACK","START","SYNCHRONIZE","THREADNAME","TYPE","VERBOSE","VERSIONK", +-"XDCDATA","STRING","QUOTED_STRING","'('","')'","file","commands","command","@1", +-"@2","symbol_list_opt","symbol_list","symbol_prefix","symbol","string_list", NULL +-}; +-#endif +- +-static const short yyr1[] = { 0, +- 40, 41, 41, 42, 42, 42, 42, 42, 42, 42, +- 42, 43, 42, 42, 42, 42, 42, 42, 44, 42, +- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, +- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, +- 42, 45, 45, 46, 46, 46, 46, 47, 48, 49, +- 49 +-}; +- +-static const short yyr2[] = { 0, +- 1, 0, 2, 2, 2, 2, 2, 4, 1, 2, +- 2, 0, 3, 2, 2, 1, 2, 2, 0, 3, +- 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, +- 2, 2, 2, 2, 1, 2, 2, 1, 4, 3, +- 2, 0, 1, 1, 1, 2, 2, 3, 1, 0, +- 2 +-}; +- +-static const short yydefact[] = { 2, +- 0, 0, 0, 0, 0, 9, 0, 0, 12, 0, +- 0, 16, 0, 19, 50, 22, 0, 50, 26, 27, +- 0, 29, 30, 0, 0, 0, 0, 35, 0, 0, +- 38, 0, 0, 1, 2, 4, 5, 6, 7, 0, +- 10, 11, 42, 14, 15, 17, 18, 42, 50, 21, +- 23, 24, 25, 28, 31, 32, 33, 34, 36, 37, +- 0, 41, 3, 0, 49, 0, 13, 43, 45, 44, +- 20, 51, 40, 8, 0, 47, 46, 39, 48, 0, +- 0, 0 +-}; +- +-static const short yydefgoto[] = { 80, +- 34, 35, 43, 48, 67, 68, 69, 70, 50 +-}; +- +-static const short yypact[] = { -3, +- -1, 1, 2, 4, 5,-32768, 6, 8,-32768, 9, +- 10, 11, 12,-32768, 13, 14, 16, 13,-32768,-32768, +- 17,-32768,-32768, 18, 20, 21, 22,-32768, 23, 25, +--32768, 26, 27,-32768, -3,-32768,-32768,-32768,-32768, 29, +--32768,-32768, -2,-32768,-32768,-32768,-32768, -2, 13,-32768, +--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +- 30,-32768,-32768, 31,-32768, 32,-32768, -2,-32768,-32768, +--32768,-32768, 33,-32768, 3,-32768,-32768,-32768,-32768, 38, +- 51,-32768 +-}; +- +-static const short yypgoto[] = {-32768, +- 19,-32768,-32768,-32768, 24,-32768, -9, 7, 15 +-}; +- +- +-#define YYLAST 75 +- +- +-static const short yytable[] = { 1, +- 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, +- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, +- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +- 32, 33, 53, 65, 36, 66, 37, 81, 38, 39, +- 40, 79, 41, 42, 44, 45, 46, 47, 49, 51, +- 82, 52, 54, 63, 55, 56, 57, 58, 76, 59, +- 60, 61, 62, 72, 64, 73, 74, 75, 78, 0, +- 0, 71, 0, 0, 77 +-}; +- +-static const short yycheck[] = { 3, +- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, +- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, +- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, +- 34, 35, 18, 36, 36, 38, 36, 0, 37, 36, +- 36, 39, 37, 36, 36, 36, 36, 36, 36, 36, +- 0, 36, 36, 35, 37, 36, 36, 36, 68, 37, +- 36, 36, 36, 49, 36, 36, 36, 36, 36, -1, +- -1, 48, -1, -1, 68 +-}; +-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +-#line 3 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* Skeleton output parser for bison, +- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. +- +- 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +- +-/* As a special exception, when this file is copied by Bison into a +- Bison output file, you may use that output file without restriction. +- This special exception was added by the Free Software Foundation +- in version 1.24 of Bison. */ +- +-#ifndef alloca +-#ifdef __GNUC__ +-#define alloca __builtin_alloca +-#else /* not GNU C. */ +-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +-#include +-#else /* not sparc */ +-#if defined (MSDOS) && !defined (__TURBOC__) +-#include +-#else /* not MSDOS, or __TURBOC__ */ +-#if defined(_AIX) +-#include +- #pragma alloca +-#else /* not MSDOS, __TURBOC__, or _AIX */ +-#ifdef __hpux +-#ifdef __cplusplus +-extern "C" { +-void *alloca (unsigned int); +-}; +-#else /* not __cplusplus */ +-void *alloca (); +-#endif /* not __cplusplus */ +-#endif /* __hpux */ +-#endif /* not _AIX */ +-#endif /* not MSDOS, or __TURBOC__ */ +-#endif /* not sparc. */ +-#endif /* not GNU C. */ +-#endif /* alloca not defined. */ +- +-/* This is the parser code that is written into each bison parser +- when the %semantic_parser declaration is not specified in the grammar. +- It was written by Richard Stallman by simplifying the hairy parser +- used when %semantic_parser is specified. */ +- +-/* Note: there must be only one dollar sign in this file. +- It is replaced by the list of actions, each action +- as one case of the switch. */ +- +-#define yyerrok (yyerrstatus = 0) +-#define yyclearin (yychar = YYEMPTY) +-#define YYEMPTY -2 +-#define YYEOF 0 +-#define YYACCEPT return(0) +-#define YYABORT return(1) +-#define YYERROR goto yyerrlab1 +-/* Like YYERROR except do call yyerror. +- This remains here temporarily to ease the +- transition to the new meaning of YYERROR, for GCC. +- Once GCC version 2 has supplanted version 1, this can go. */ +-#define YYFAIL goto yyerrlab +-#define YYRECOVERING() (!!yyerrstatus) +-#define YYBACKUP(token, value) \ +-do \ +- if (yychar == YYEMPTY && yylen == 1) \ +- { yychar = (token), yylval = (value); \ +- yychar1 = YYTRANSLATE (yychar); \ +- YYPOPSTACK; \ +- goto yybackup; \ +- } \ +- else \ +- { yyerror ("syntax error: cannot back up"); YYERROR; } \ +-while (0) +- +-#define YYTERROR 1 +-#define YYERRCODE 256 +- +-#ifndef YYPURE +-#define YYLEX yylex() +-#endif +- +-#ifdef YYPURE +-#ifdef YYLSP_NEEDED +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval, &yylloc) +-#endif +-#else /* not YYLSP_NEEDED */ +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval) +-#endif +-#endif /* not YYLSP_NEEDED */ +-#endif +- +-/* If nonreentrant, generate the variables here */ +- +-#ifndef YYPURE +- +-int yychar; /* the lookahead symbol */ +-YYSTYPE yylval; /* the semantic value of the */ +- /* lookahead symbol */ +- +-#ifdef YYLSP_NEEDED +-YYLTYPE yylloc; /* location data for the lookahead */ +- /* symbol */ +-#endif +- +-int yynerrs; /* number of parse errors so far */ +-#endif /* not YYPURE */ +- +-#if YYDEBUG != 0 +-int yydebug; /* nonzero means print parse trace */ +-/* Since this is uninitialized, it does not stop multiple parsers +- from coexisting. */ +-#endif +- +-/* YYINITDEPTH indicates the initial size of the parser's stacks */ +- +-#ifndef YYINITDEPTH +-#define YYINITDEPTH 200 +-#endif +- +-/* YYMAXDEPTH is the maximum size the stacks can grow to +- (effective only if the built-in stack extension method is used). */ +- +-#if YYMAXDEPTH == 0 +-#undef YYMAXDEPTH +-#endif +- +-#ifndef YYMAXDEPTH +-#define YYMAXDEPTH 10000 +-#endif +- +-/* Prevent warning if -Wstrict-prototypes. */ +-#ifdef __GNUC__ +-int yyparse (void); +-#endif +- +-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +-#else /* not GNU C or C++ */ +-#ifndef __cplusplus +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (to, from, count) +- char *to; +- char *from; +- int count; +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#else /* __cplusplus */ +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (char *to, char *from, int count) +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#endif +-#endif +- +-#line 196 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* The user can define YYPARSE_PARAM as the name of an argument to be passed +- into yyparse. The argument should have type void *. +- It should actually point to an object. +- Grammar actions can access the variable by casting it +- to the proper pointer type. */ +- +-#ifdef YYPARSE_PARAM +-#ifdef __cplusplus +-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL +-#else /* not __cplusplus */ +-#define YYPARSE_PARAM_ARG YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +-#endif /* not __cplusplus */ +-#else /* not YYPARSE_PARAM */ +-#define YYPARSE_PARAM_ARG +-#define YYPARSE_PARAM_DECL +-#endif /* not YYPARSE_PARAM */ +- +-int +-yyparse(YYPARSE_PARAM_ARG) +- YYPARSE_PARAM_DECL +-{ +- register int yystate; +- register int yyn; +- register short *yyssp; +- register YYSTYPE *yyvsp; +- int yyerrstatus; /* number of tokens to shift before error messages enabled */ +- int yychar1 = 0; /* lookahead token as an internal (translated) token number */ +- +- short yyssa[YYINITDEPTH]; /* the state stack */ +- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ +- +- short *yyss = yyssa; /* refer to the stacks thru separate pointers */ +- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ +- +-#ifdef YYLSP_NEEDED +- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ +- YYLTYPE *yyls = yylsa; +- YYLTYPE *yylsp; +- +-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +-#else +-#define YYPOPSTACK (yyvsp--, yyssp--) +-#endif +- +- int yystacksize = YYINITDEPTH; +- +-#ifdef YYPURE +- int yychar; +- YYSTYPE yylval; +- int yynerrs; +-#ifdef YYLSP_NEEDED +- YYLTYPE yylloc; +-#endif +-#endif +- +- YYSTYPE yyval; /* the variable used to return */ +- /* semantic values from the action */ +- /* routines */ +- +- int yylen; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Starting parse\n"); +-#endif +- +- yystate = 0; +- yyerrstatus = 0; +- yynerrs = 0; +- yychar = YYEMPTY; /* Cause a token to be read. */ +- +- /* Initialize stack pointers. +- Waste one element of value and location stack +- so that they stay on the same level as the state stack. +- The wasted elements are never initialized. */ +- +- yyssp = yyss - 1; +- yyvsp = yyvs; +-#ifdef YYLSP_NEEDED +- yylsp = yyls; +-#endif +- +-/* Push a new state, which is found in yystate . */ +-/* In all cases, when you get here, the value and location stacks +- have just been pushed. so pushing a state here evens the stacks. */ +-yynewstate: +- +- *++yyssp = yystate; +- +- if (yyssp >= yyss + yystacksize - 1) +- { +- /* Give user a chance to reallocate the stack */ +- /* Use copies of these so that the &'s don't force the real ones into memory. */ +- YYSTYPE *yyvs1 = yyvs; +- short *yyss1 = yyss; +-#ifdef YYLSP_NEEDED +- YYLTYPE *yyls1 = yyls; +-#endif +- +- /* Get the current used size of the three stacks, in elements. */ +- int size = yyssp - yyss + 1; +- +-#ifdef yyoverflow +- /* Each stack pointer address is followed by the size of +- the data in use in that stack, in bytes. */ +-#ifdef YYLSP_NEEDED +- /* This used to be a conditional around just the two extra args, +- but that might be undefined if yyoverflow is a macro. */ +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yyls1, size * sizeof (*yylsp), +- &yystacksize); +-#else +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yystacksize); +-#endif +- +- yyss = yyss1; yyvs = yyvs1; +-#ifdef YYLSP_NEEDED +- yyls = yyls1; +-#endif +-#else /* no yyoverflow */ +- /* Extend the stack our own way. */ +- if (yystacksize >= YYMAXDEPTH) +- { +- yyerror("parser stack overflow"); +- return 2; +- } +- yystacksize *= 2; +- if (yystacksize > YYMAXDEPTH) +- yystacksize = YYMAXDEPTH; +- yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); +- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); +- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); +- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); +-#ifdef YYLSP_NEEDED +- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); +- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); +-#endif +-#endif /* no yyoverflow */ +- +- yyssp = yyss + size - 1; +- yyvsp = yyvs + size - 1; +-#ifdef YYLSP_NEEDED +- yylsp = yyls + size - 1; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Stack size increased to %d\n", yystacksize); +-#endif +- +- if (yyssp >= yyss + yystacksize - 1) +- YYABORT; +- } +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Entering state %d\n", yystate); +-#endif +- +- goto yybackup; +- yybackup: +- +-/* Do appropriate processing given the current state. */ +-/* Read a lookahead token if we need one and don't already have one. */ +-/* yyresume: */ +- +- /* First try to decide what to do without reference to lookahead token. */ +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yydefault; +- +- /* Not known => get a lookahead token if don't already have one. */ +- +- /* yychar is either YYEMPTY or YYEOF +- or a valid token in external form. */ +- +- if (yychar == YYEMPTY) +- { +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Reading a token: "); +-#endif +- yychar = YYLEX; +- } +- +- /* Convert token to internal form (in yychar1) for indexing tables with */ +- +- if (yychar <= 0) /* This means end of input. */ +- { +- yychar1 = 0; +- yychar = YYEOF; /* Don't call YYLEX any more */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Now at end of input.\n"); +-#endif +- } +- else +- { +- yychar1 = YYTRANSLATE(yychar); +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); +- /* Give the individual parser a way to print the precise meaning +- of a token, for further debugging info. */ +-#ifdef YYPRINT +- YYPRINT (stderr, yychar, yylval); +-#endif +- fprintf (stderr, ")\n"); +- } +-#endif +- } +- +- yyn += yychar1; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) +- goto yydefault; +- +- yyn = yytable[yyn]; +- +- /* yyn is what to do for this token type in this state. +- Negative => reduce, -yyn is rule number. +- Positive => shift, yyn is new state. +- New state is final state => don't bother to shift, +- just return success. +- 0, or most negative number => error. */ +- +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrlab; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrlab; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +- /* Shift the lookahead token. */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +-#endif +- +- /* Discard the token being shifted unless it is eof. */ +- if (yychar != YYEOF) +- yychar = YYEMPTY; +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- /* count tokens shifted since error; after three, turn off error status. */ +- if (yyerrstatus) yyerrstatus--; +- +- yystate = yyn; +- goto yynewstate; +- +-/* Do the default action for the current state. */ +-yydefault: +- +- yyn = yydefact[yystate]; +- if (yyn == 0) +- goto yyerrlab; +- +-/* Do a reduction. yyn is the number of a rule to reduce with. */ +-yyreduce: +- yylen = yyr2[yyn]; +- if (yylen > 0) +- yyval = yyvsp[1-yylen]; /* implement default value of the action */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- int i; +- +- fprintf (stderr, "Reducing via rule %d (line %d), ", +- yyn, yyrline[yyn]); +- +- /* Print the symbols being reduced, and their result. */ +- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) +- fprintf (stderr, "%s ", yytname[yyrhs[i]]); +- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); +- } +-#endif +- +- +- switch (yyn) { +- +-case 4: +-#line 158 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- check_procedure = yyvsp[0].string; +- ; +- break;} +-case 5: +-#line 162 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- nlmheader_warn ("CODESTART is not implemented; sorry", -1); +- free (yyvsp[0].string); +- ; +- break;} +-case 6: +-#line 167 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- int len; +- +- strncpy (copyright_hdr->stamp, "CoPyRiGhT=", 10); +- len = strlen (yyvsp[0].string); +- if (len >= NLM_MAX_COPYRIGHT_MESSAGE_LENGTH) +- { +- nlmheader_warn ("copyright string is too long", +- NLM_MAX_COPYRIGHT_MESSAGE_LENGTH - 1); +- len = NLM_MAX_COPYRIGHT_MESSAGE_LENGTH - 1; +- } +- copyright_hdr->copyrightMessageLength = len; +- strncpy (copyright_hdr->copyrightMessage, yyvsp[0].string, len); +- copyright_hdr->copyrightMessage[len] = '\0'; +- free (yyvsp[0].string); +- ; +- break;} +-case 7: +-#line 184 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- custom_file = yyvsp[0].string; +- ; +- break;} +-case 8: +-#line 188 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- /* We don't set the version stamp here, because we use the +- version stamp to detect whether the required VERSION +- keyword was given. */ +- version_hdr->month = nlmlex_get_number (yyvsp[-2].string); +- version_hdr->day = nlmlex_get_number (yyvsp[-1].string); +- version_hdr->year = nlmlex_get_number (yyvsp[0].string); +- free (yyvsp[-2].string); +- free (yyvsp[-1].string); +- free (yyvsp[0].string); +- if (version_hdr->month < 1 || version_hdr->month > 12) +- nlmheader_warn ("illegal month", -1); +- if (version_hdr->day < 1 || version_hdr->day > 31) +- nlmheader_warn ("illegal day", -1); +- if (version_hdr->year < 1900 || version_hdr->year > 3000) +- nlmheader_warn ("illegal year", -1); +- ; +- break;} +-case 9: +-#line 206 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- debug_info = true; +- ; +- break;} +-case 10: +-#line 210 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- int len; +- +- len = strlen (yyvsp[0].string); +- if (len > NLM_MAX_DESCRIPTION_LENGTH) +- { +- nlmheader_warn ("description string is too long", +- NLM_MAX_DESCRIPTION_LENGTH); +- len = NLM_MAX_DESCRIPTION_LENGTH; +- } +- var_hdr->descriptionLength = len; +- strncpy (var_hdr->descriptionText, yyvsp[0].string, len); +- var_hdr->descriptionText[len] = '\0'; +- free (yyvsp[0].string); +- ; +- break;} +-case 11: +-#line 226 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- exit_procedure = yyvsp[0].string; +- ; +- break;} +-case 12: +-#line 230 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- symbol_prefix = NULL; +- ; +- break;} +-case 13: +-#line 234 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- export_symbols = string_list_append (export_symbols, yyvsp[0].list); +- ; +- break;} +-case 14: +-#line 238 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- fixed_hdr->flags |= nlmlex_get_number (yyvsp[0].string); +- free (yyvsp[0].string); +- ; +- break;} +-case 15: +-#line 243 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- fixed_hdr->flags &=~ nlmlex_get_number (yyvsp[0].string); +- free (yyvsp[0].string); +- ; +- break;} +-case 16: +-#line 248 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- map_file = ""; +- full_map = true; +- ; +- break;} +-case 17: +-#line 253 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- map_file = yyvsp[0].string; +- full_map = true; +- ; +- break;} +-case 18: +-#line 258 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- help_file = yyvsp[0].string; +- ; +- break;} +-case 19: +-#line 262 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- symbol_prefix = NULL; +- ; +- break;} +-case 20: +-#line 266 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- import_symbols = string_list_append (import_symbols, yyvsp[0].list); +- ; +- break;} +-case 21: +-#line 270 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- input_files = string_list_append (input_files, yyvsp[0].list); +- ; +- break;} +-case 22: +-#line 274 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- map_file = ""; +- ; +- break;} +-case 23: +-#line 278 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- map_file = yyvsp[0].string; +- ; +- break;} +-case 24: +-#line 282 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- message_file = yyvsp[0].string; +- ; +- break;} +-case 25: +-#line 286 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- modules = string_list_append (modules, yyvsp[0].list); +- ; +- break;} +-case 26: +-#line 290 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- fixed_hdr->flags |= 0x2; +- ; +- break;} +-case 27: +-#line 294 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- fixed_hdr->flags |= 0x10; +- ; +- break;} +-case 28: +-#line 298 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- if (output_file == NULL) +- output_file = yyvsp[0].string; +- else +- nlmheader_warn ("ignoring duplicate OUTPUT statement", -1); +- ; +- break;} +-case 29: +-#line 305 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- fixed_hdr->flags |= 0x8; +- ; +- break;} +-case 30: +-#line 309 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- fixed_hdr->flags |= 0x1; +- ; +- break;} +-case 31: +-#line 313 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- int len; +- +- len = strlen (yyvsp[0].string); +- if (len >= NLM_MAX_SCREEN_NAME_LENGTH) +- { +- nlmheader_warn ("screen name is too long", +- NLM_MAX_SCREEN_NAME_LENGTH); +- len = NLM_MAX_SCREEN_NAME_LENGTH; +- } +- var_hdr->screenNameLength = len; +- strncpy (var_hdr->screenName, yyvsp[0].string, len); +- var_hdr->screenName[NLM_MAX_SCREEN_NAME_LENGTH] = '\0'; +- free (yyvsp[0].string); +- ; +- break;} +-case 32: +-#line 329 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- sharelib_file = yyvsp[0].string; +- ; +- break;} +-case 33: +-#line 333 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- var_hdr->stackSize = nlmlex_get_number (yyvsp[0].string); +- free (yyvsp[0].string); +- ; +- break;} +-case 34: +-#line 338 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- start_procedure = yyvsp[0].string; +- ; +- break;} +-case 35: +-#line 342 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- fixed_hdr->flags |= 0x4; +- ; +- break;} +-case 36: +-#line 346 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- int len; +- +- len = strlen (yyvsp[0].string); +- if (len >= NLM_MAX_THREAD_NAME_LENGTH) +- { +- nlmheader_warn ("thread name is too long", +- NLM_MAX_THREAD_NAME_LENGTH); +- len = NLM_MAX_THREAD_NAME_LENGTH; +- } +- var_hdr->threadNameLength = len; +- strncpy (var_hdr->threadName, yyvsp[0].string, len); +- var_hdr->threadName[len] = '\0'; +- free (yyvsp[0].string); +- ; +- break;} +-case 37: +-#line 362 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- fixed_hdr->moduleType = nlmlex_get_number (yyvsp[0].string); +- free (yyvsp[0].string); +- ; +- break;} +-case 38: +-#line 367 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- verbose = true; +- ; +- break;} +-case 39: +-#line 371 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- long val; +- +- strncpy (version_hdr->stamp, "VeRsIoN#", 8); +- version_hdr->majorVersion = nlmlex_get_number (yyvsp[-2].string); +- val = nlmlex_get_number (yyvsp[-1].string); +- if (val < 0 || val > 99) +- nlmheader_warn ("illegal minor version number (must be between 0 and 99)", +- -1); +- else +- version_hdr->minorVersion = val; +- val = nlmlex_get_number (yyvsp[0].string); +- if (val < 0) +- nlmheader_warn ("illegal revision number (must be between 0 and 26)", +- -1); +- else if (val > 26) +- version_hdr->revision = 0; +- else +- version_hdr->revision = val; +- free (yyvsp[-2].string); +- free (yyvsp[-1].string); +- free (yyvsp[0].string); +- ; +- break;} +-case 40: +-#line 395 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- long val; +- +- strncpy (version_hdr->stamp, "VeRsIoN#", 8); +- version_hdr->majorVersion = nlmlex_get_number (yyvsp[-1].string); +- val = nlmlex_get_number (yyvsp[0].string); +- if (val < 0 || val > 99) +- nlmheader_warn ("illegal minor version number (must be between 0 and 99)", +- -1); +- else +- version_hdr->minorVersion = val; +- version_hdr->revision = 0; +- free (yyvsp[-1].string); +- free (yyvsp[0].string); +- ; +- break;} +-case 41: +-#line 411 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- rpc_file = yyvsp[0].string; +- ; +- break;} +-case 42: +-#line 420 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- yyval.list = NULL; +- ; +- break;} +-case 43: +-#line 424 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- yyval.list = yyvsp[0].list; +- ; +- break;} +-case 44: +-#line 435 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- yyval.list = string_list_cons (yyvsp[0].string, NULL); +- ; +- break;} +-case 45: +-#line 439 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- yyval.list = NULL; +- ; +- break;} +-case 46: +-#line 443 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- yyval.list = string_list_append1 (yyvsp[-1].list, yyvsp[0].string); +- ; +- break;} +-case 47: +-#line 447 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- yyval.list = yyvsp[-1].list; +- ; +- break;} +-case 48: +-#line 456 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- if (symbol_prefix != NULL) +- free (symbol_prefix); +- symbol_prefix = yyvsp[-1].string; +- ; +- break;} +-case 49: +-#line 467 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- if (symbol_prefix == NULL) +- yyval.string = yyvsp[0].string; +- else +- { +- yyval.string = xmalloc (strlen (symbol_prefix) + strlen (yyvsp[0].string) + 2); +- sprintf (yyval.string, "%s@%s", symbol_prefix, yyvsp[0].string); +- free (yyvsp[0].string); +- } +- ; +- break;} +-case 50: +-#line 483 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- yyval.list = NULL; +- ; +- break;} +-case 51: +-#line 487 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +-{ +- yyval.list = string_list_cons (yyvsp[-1].string, yyvsp[0].list); +- ; +- break;} +-} +- /* the action file gets copied in in place of this dollarsign */ +-#line 498 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +- yyvsp -= yylen; +- yyssp -= yylen; +-#ifdef YYLSP_NEEDED +- yylsp -= yylen; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +- *++yyvsp = yyval; +- +-#ifdef YYLSP_NEEDED +- yylsp++; +- if (yylen == 0) +- { +- yylsp->first_line = yylloc.first_line; +- yylsp->first_column = yylloc.first_column; +- yylsp->last_line = (yylsp-1)->last_line; +- yylsp->last_column = (yylsp-1)->last_column; +- yylsp->text = 0; +- } +- else +- { +- yylsp->last_line = (yylsp+yylen-1)->last_line; +- yylsp->last_column = (yylsp+yylen-1)->last_column; +- } +-#endif +- +- /* Now "shift" the result of the reduction. +- Determine what state that goes to, +- based on the state we popped back to +- and the rule number reduced by. */ +- +- yyn = yyr1[yyn]; +- +- yystate = yypgoto[yyn - YYNTBASE] + *yyssp; +- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) +- yystate = yytable[yystate]; +- else +- yystate = yydefgoto[yyn - YYNTBASE]; +- +- goto yynewstate; +- +-yyerrlab: /* here on detecting error */ +- +- if (! yyerrstatus) +- /* If not already recovering from an error, report this error. */ +- { +- ++yynerrs; +- +-#ifdef YYERROR_VERBOSE +- yyn = yypact[yystate]; +- +- if (yyn > YYFLAG && yyn < YYLAST) +- { +- int size = 0; +- char *msg; +- int x, count; +- +- count = 0; +- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- size += strlen(yytname[x]) + 15, count++; +- msg = (char *) malloc(size + 15); +- if (msg != 0) +- { +- strcpy(msg, "parse error"); +- +- if (count < 5) +- { +- count = 0; +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- { +- strcat(msg, count == 0 ? ", expecting `" : " or `"); +- strcat(msg, yytname[x]); +- strcat(msg, "'"); +- count++; +- } +- } +- yyerror(msg); +- free(msg); +- } +- else +- yyerror ("parse error; also virtual memory exceeded"); +- } +- else +-#endif /* YYERROR_VERBOSE */ +- yyerror("parse error"); +- } +- +- goto yyerrlab1; +-yyerrlab1: /* here on error raised explicitly by an action */ +- +- if (yyerrstatus == 3) +- { +- /* if just tried and failed to reuse lookahead token after an error, discard it. */ +- +- /* return failure if at end of input */ +- if (yychar == YYEOF) +- YYABORT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +-#endif +- +- yychar = YYEMPTY; +- } +- +- /* Else will try to reuse lookahead token +- after shifting the error token. */ +- +- yyerrstatus = 3; /* Each real token shifted decrements this */ +- +- goto yyerrhandle; +- +-yyerrdefault: /* current state does not do anything special for the error token. */ +- +-#if 0 +- /* This is wrong; only states that explicitly want error tokens +- should shift them. */ +- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ +- if (yyn) goto yydefault; +-#endif +- +-yyerrpop: /* pop the current state because it cannot handle the error token */ +- +- if (yyssp == yyss) YYABORT; +- yyvsp--; +- yystate = *--yyssp; +-#ifdef YYLSP_NEEDED +- yylsp--; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "Error: state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +-yyerrhandle: +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yyerrdefault; +- +- yyn += YYTERROR; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) +- goto yyerrdefault; +- +- yyn = yytable[yyn]; +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrpop; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrpop; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting error token, "); +-#endif +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- yystate = yyn; +- goto yynewstate; +-} +-#line 492 "/5g/ian/binutils/release/copy/binutils/nlmheader.y" +- +- +-/* If strerror is just a macro, we want to use the one from libiberty +- since it will handle undefined values. */ +-#undef strerror +-extern char *strerror (); +- +-/* The lexer is simple, too simple for flex. Keywords are only +- recognized at the start of lines. Everything else must be an +- argument. A comma is treated as whitespace. */ +- +-/* The states the lexer can be in. */ +- +-enum lex_state +-{ +- /* At the beginning of a line. */ +- BEGINNING_OF_LINE, +- /* In the middle of a line. */ +- IN_LINE +-}; +- +-/* We need to keep a stack of files to handle file inclusion. */ +- +-struct input +-{ +- /* The file to read from. */ +- FILE *file; +- /* The name of the file. */ +- char *name; +- /* The current line number. */ +- int lineno; +- /* The current state. */ +- enum lex_state state; +- /* The next file on the stack. */ +- struct input *next; +-}; +- +-/* The current input file. */ +- +-static struct input current; +- +-/* The character which introduces comments. */ +-#define COMMENT_CHAR '#' +- +-/* Start the lexer going on the main input file. */ +- +-boolean +-nlmlex_file (name) +- const char *name; +-{ +- current.next = NULL; +- return nlmlex_file_open (name); +-} +- +-/* Start the lexer going on a subsidiary input file. */ +- +-static void +-nlmlex_file_push (name) +- const char *name; +-{ +- struct input *push; +- +- push = (struct input *) xmalloc (sizeof (struct input)); +- *push = current; +- if (nlmlex_file_open (name)) +- current.next = push; +- else +- { +- current = *push; +- free (push); +- } +-} +- +-/* Start lexing from a file. */ +- +-static boolean +-nlmlex_file_open (name) +- const char *name; +-{ +- current.file = fopen (name, "r"); +- if (current.file == NULL) +- { +- fprintf (stderr, "%s:%s: %s\n", program_name, name, strerror (errno)); +- ++parse_errors; +- return false; +- } +- current.name = xstrdup (name); +- current.lineno = 1; +- current.state = BEGINNING_OF_LINE; +- return true; +-} +- +-/* Table used to turn keywords into tokens. */ +- +-struct keyword_tokens_struct +-{ +- const char *keyword; +- int token; +-}; +- +-struct keyword_tokens_struct keyword_tokens[] = +-{ +- { "CHECK", CHECK }, +- { "CODESTART", CODESTART }, +- { "COPYRIGHT", COPYRIGHT }, +- { "CUSTOM", CUSTOM }, +- { "DATE", DATE }, +- { "DEBUG", DEBUG }, +- { "DESCRIPTION", DESCRIPTION }, +- { "EXIT", EXIT }, +- { "EXPORT", EXPORT }, +- { "FLAG_ON", FLAG_ON }, +- { "FLAG_OFF", FLAG_OFF }, +- { "FULLMAP", FULLMAP }, +- { "HELP", HELP }, +- { "IMPORT", IMPORT }, +- { "INPUT", INPUT }, +- { "MAP", MAP }, +- { "MESSAGES", MESSAGES }, +- { "MODULE", MODULE }, +- { "MULTIPLE", MULTIPLE }, +- { "OS_DOMAIN", OS_DOMAIN }, +- { "OUTPUT", OUTPUT }, +- { "PSEUDOPREEMPTION", PSEUDOPREEMPTION }, +- { "REENTRANT", REENTRANT }, +- { "SCREENNAME", SCREENNAME }, +- { "SHARELIB", SHARELIB }, +- { "STACK", STACK }, +- { "STACKSIZE", STACK }, +- { "START", START }, +- { "SYNCHRONIZE", SYNCHRONIZE }, +- { "THREADNAME", THREADNAME }, +- { "TYPE", TYPE }, +- { "VERBOSE", VERBOSE }, +- { "VERSION", VERSIONK }, +- { "XDCDATA", XDCDATA } +-}; +- +-#define KEYWORD_COUNT (sizeof (keyword_tokens) / sizeof (keyword_tokens[0])) +- +-/* The lexer accumulates strings in these variables. */ +-static char *lex_buf; +-static int lex_size; +-static int lex_pos; +- +-/* Start accumulating strings into the buffer. */ +-#define BUF_INIT() \ +- ((void) (lex_buf != NULL ? lex_pos = 0 : nlmlex_buf_init ())) +- +-static int +-nlmlex_buf_init () +-{ +- lex_size = 10; +- lex_buf = xmalloc (lex_size + 1); +- lex_pos = 0; +- return 0; +-} +- +-/* Finish a string in the buffer. */ +-#define BUF_FINISH() ((void) (lex_buf[lex_pos] = '\0')) +- +-/* Accumulate a character into the buffer. */ +-#define BUF_ADD(c) \ +- ((void) (lex_pos < lex_size \ +- ? lex_buf[lex_pos++] = (c) \ +- : nlmlex_buf_add (c))) +- +-static char +-nlmlex_buf_add (c) +- int c; +-{ +- if (lex_pos >= lex_size) +- { +- lex_size *= 2; +- lex_buf = xrealloc (lex_buf, lex_size + 1); +- } +- +- return lex_buf[lex_pos++] = c; +-} +- +-/* The lexer proper. This is called by the bison generated parsing +- code. */ +- +-static int +-yylex () +-{ +- int c; +- +-tail_recurse: +- +- c = getc (current.file); +- +- /* Commas are treated as whitespace characters. */ +- while (isspace ((unsigned char) c) || c == ',') +- { +- current.state = IN_LINE; +- if (c == '\n') +- { +- ++current.lineno; +- current.state = BEGINNING_OF_LINE; +- } +- c = getc (current.file); +- } +- +- /* At the end of the file we either pop to the previous file or +- finish up. */ +- if (c == EOF) +- { +- fclose (current.file); +- free (current.name); +- if (current.next == NULL) +- return 0; +- else +- { +- struct input *next; +- +- next = current.next; +- current = *next; +- free (next); +- goto tail_recurse; +- } +- } +- +- /* A comment character always means to drop everything until the +- next newline. */ +- if (c == COMMENT_CHAR) +- { +- do +- { +- c = getc (current.file); +- } +- while (c != '\n'); +- ++current.lineno; +- current.state = BEGINNING_OF_LINE; +- goto tail_recurse; +- } +- +- /* An '@' introduces an include file. */ +- if (c == '@') +- { +- do +- { +- c = getc (current.file); +- if (c == '\n') +- ++current.lineno; +- } +- while (isspace ((unsigned char) c)); +- BUF_INIT (); +- while (! isspace ((unsigned char) c) && c != EOF) +- { +- BUF_ADD (c); +- c = getc (current.file); +- } +- BUF_FINISH (); +- +- ungetc (c, current.file); +- +- nlmlex_file_push (lex_buf); +- goto tail_recurse; +- } +- +- /* A non-space character at the start of a line must be the start of +- a keyword. */ +- if (current.state == BEGINNING_OF_LINE) +- { +- BUF_INIT (); +- while (isalnum ((unsigned char) c) || c == '_') +- { +- if (islower ((unsigned char) c)) +- BUF_ADD (toupper ((unsigned char) c)); +- else +- BUF_ADD (c); +- c = getc (current.file); +- } +- BUF_FINISH (); +- +- if (c != EOF && ! isspace ((unsigned char) c) && c != ',') +- { +- nlmheader_identify (); +- fprintf (stderr, "%s:%d: illegal character in keyword: %c\n", +- current.name, current.lineno, c); +- } +- else +- { +- unsigned int i; +- +- for (i = 0; i < KEYWORD_COUNT; i++) +- { +- if (lex_buf[0] == keyword_tokens[i].keyword[0] +- && strcmp (lex_buf, keyword_tokens[i].keyword) == 0) +- { +- /* Pushing back the final whitespace avoids worrying +- about \n here. */ +- ungetc (c, current.file); +- current.state = IN_LINE; +- return keyword_tokens[i].token; +- } +- } +- +- nlmheader_identify (); +- fprintf (stderr, "%s:%d: unrecognized keyword: %s\n", +- current.name, current.lineno, lex_buf); +- } +- +- ++parse_errors; +- /* Treat the rest of this line as a comment. */ +- ungetc (COMMENT_CHAR, current.file); +- goto tail_recurse; +- } +- +- /* Parentheses just represent themselves. */ +- if (c == '(' || c == ')') +- return c; +- +- /* Handle quoted strings. */ +- if (c == '"' || c == '\'') +- { +- int quote; +- int start_lineno; +- +- quote = c; +- start_lineno = current.lineno; +- +- c = getc (current.file); +- BUF_INIT (); +- while (c != quote && c != EOF) +- { +- BUF_ADD (c); +- if (c == '\n') +- ++current.lineno; +- c = getc (current.file); +- } +- BUF_FINISH (); +- +- if (c == EOF) +- { +- nlmheader_identify (); +- fprintf (stderr, "%s:%d: end of file in quoted string\n", +- current.name, start_lineno); +- ++parse_errors; +- } +- +- /* FIXME: Possible memory leak. */ +- yylval.string = xstrdup (lex_buf); +- return QUOTED_STRING; +- } +- +- /* Gather a generic argument. */ +- BUF_INIT (); +- while (! isspace (c) +- && c != ',' +- && c != COMMENT_CHAR +- && c != '(' +- && c != ')') +- { +- BUF_ADD (c); +- c = getc (current.file); +- } +- BUF_FINISH (); +- +- ungetc (c, current.file); +- +- /* FIXME: Possible memory leak. */ +- yylval.string = xstrdup (lex_buf); +- return STRING; +-} +- +-/* Get a number from a string. */ +- +-static long +-nlmlex_get_number (s) +- const char *s; +-{ +- long ret; +- char *send; +- +- ret = strtol (s, &send, 10); +- if (*send != '\0') +- nlmheader_warn ("bad number", -1); +- return ret; +-} +- +-/* Prefix the nlmconv warnings with a note as to where they come from. +- We don't use program_name on every warning, because then some +- versions of the emacs next-error function can't recognize the line +- number. */ +- +-static void +-nlmheader_identify () +-{ +- static int done; +- +- if (! done) +- { +- fprintf (stderr, "%s: problems in NLM command language input:\n", +- program_name); +- done = 1; +- } +-} +- +-/* Issue a warning. */ +- +-static void +-nlmheader_warn (s, imax) +- const char *s; +- int imax; +-{ +- nlmheader_identify (); +- fprintf (stderr, "%s:%d: %s", current.name, current.lineno, s); +- if (imax != -1) +- fprintf (stderr, " (max %d)", imax); +- fprintf (stderr, "\n"); +-} +- +-/* Report an error. */ +- +-static void +-nlmheader_error (s) +- const char *s; +-{ +- nlmheader_warn (s, -1); +- ++parse_errors; +-} +- +-/* Add a string to a string list. */ +- +-static struct string_list * +-string_list_cons (s, l) +- char *s; +- struct string_list *l; +-{ +- struct string_list *ret; +- +- ret = (struct string_list *) xmalloc (sizeof (struct string_list)); +- ret->next = l; +- ret->string = s; +- return ret; +-} +- +-/* Append a string list to another string list. */ +- +-static struct string_list * +-string_list_append (l1, l2) +- struct string_list *l1; +- struct string_list *l2; +-{ +- register struct string_list **pp; +- +- for (pp = &l1; *pp != NULL; pp = &(*pp)->next) +- ; +- *pp = l2; +- return l1; +-} +- +-/* Append a string to a string list. */ +- +-static struct string_list * +-string_list_append1 (l, s) +- struct string_list *l; +- char *s; +-{ +- struct string_list *n; +- register struct string_list **pp; +- +- n = (struct string_list *) xmalloc (sizeof (struct string_list)); +- n->next = NULL; +- n->string = s; +- for (pp = &l; *pp != NULL; pp = &(*pp)->next) +- ; +- *pp = n; +- return l; +-} +- +-/* Duplicate a string in memory. */ +- +-static char * +-xstrdup (s) +- const char *s; +-{ +- unsigned long len; +- char *ret; +- +- len = strlen (s); +- ret = xmalloc (len + 1); +- strcpy (ret, s); +- return ret; +-} +diff -rup --new-file binutils-2.9.1/binutils/objcopy.c binutils-2.9.1/binutils/objcopy.c +--- binutils-2.9.1/binutils/objcopy.c Fri May 1 08:49:34 1998 ++++ binutils-2.9.1/binutils/objcopy.c Sun Aug 23 00:00:00 1998 +@@ -1242,7 +1242,8 @@ copy_section (ibfd, isection, obfdarg) + if (size == 0 || osection == 0) + return; + +- if (strip_symbols == strip_all) ++ /* Never, ever, strip reloc data on the Amiga! */ ++ if (strip_symbols == strip_all && bfd_get_flavour(obfd) != bfd_target_amiga_flavour) + bfd_set_reloc (obfd, osection, (arelent **) NULL, 0); + else + { +diff -rup --new-file binutils-2.9.1/binutils/objdump.c binutils-2.9.1/binutils/objdump.c +--- binutils-2.9.1/binutils/objdump.c Fri May 1 08:49:34 1998 ++++ binutils-2.9.1/binutils/objdump.c Sun Aug 23 00:00:00 1998 +@@ -328,6 +328,7 @@ dump_section_header (abfd, section, igno + if ((section->flags & SEC_LINK_ONCE) != 0) + { + const char *ls; ++ pei_get_comdat_info(section); + + switch (section->flags & SEC_LINK_DUPLICATES) + { +@@ -348,6 +349,10 @@ dump_section_header (abfd, section, igno + } + printf ("%s%s", comma, ls); + comma = ", "; ++ if (section->pe_comdat_info->asoc_sec != (int)NULL) ++ printf ("\n Associated with section %d", section->pe_comdat_info->asoc_sec -1); ++ else ++ printf ("\n Communal; sym=%s", section->pe_comdat_info->comdat_sym); + } + + printf ("\n"); +diff -rup --new-file binutils-2.9.1/binutils/sysinfo.c binutils-2.9.1/binutils/sysinfo.c +--- binutils-2.9.1/binutils/sysinfo.c Fri May 1 08:49:40 1998 ++++ binutils-2.9.1/binutils/sysinfo.c Wed Dec 31 17:00:00 1969 +@@ -1,1241 +0,0 @@ +- +-/* A Bison parser, made from /5g/ian/binutils/release/copy/binutils/sysinfo.y +- by GNU Bison version 1.25 +- */ +- +-#define YYBISON 1 /* Identify Bison output. */ +- +-#define COND 258 +-#define REPEAT 259 +-#define TYPE 260 +-#define NAME 261 +-#define NUMBER 262 +-#define UNIT 263 +- +-#line 1 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +- +-#include +-#include +- +-extern char *word; +-extern char writecode; +-extern int number; +-extern int unit; +-char nice_name[1000]; +-char *it; +-int sofar; +-int width; +-int code; +-char * repeat; +-char *oldrepeat; +-char *name; +-int rdepth; +-char *loop [] = {"","n","m","/*BAD*/"}; +-char *names[] = {" ","[n]","[n][m]"}; +-char *pnames[]= {"","*","**"}; +- +-#line 24 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-typedef union { +- int i; +- char *s; +-} YYSTYPE; +-#include +- +-#ifndef __cplusplus +-#ifndef __STDC__ +-#define const +-#endif +-#endif +- +- +- +-#define YYFINAL 55 +-#define YYFLAG -32768 +-#define YYNTBASE 11 +- +-#define YYTRANSLATE(x) ((unsigned)(x) <= 263 ? yytranslate[x] : 29) +- +-static const char yytranslate[] = { 0, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, +- 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 1, 2, 3, 4, 7, +- 8, 9, 10 +-}; +- +-#if YYDEBUG != 0 +-static const short yyprhs[] = { 0, +- 0, 1, 4, 7, 8, 9, 16, 19, 22, 25, +- 26, 27, 34, 35, 42, 43, 54, 56, 57, 61, +- 64, 68, 69, 70, 74, 75 +-}; +- +-static const short yyrhs[] = { -1, +- 12, 13, 0, 14, 13, 0, 0, 0, 5, 8, +- 9, 15, 16, 6, 0, 21, 16, 0, 19, 16, +- 0, 17, 16, 0, 0, 0, 5, 4, 8, 18, +- 16, 6, 0, 0, 5, 3, 8, 20, 16, 6, +- 0, 0, 5, 24, 5, 23, 25, 6, 26, 22, +- 27, 6, 0, 7, 0, 0, 5, 8, 6, 0, +- 9, 10, 0, 5, 8, 6, 0, 0, 0, 5, +- 28, 6, 0, 0, 28, 5, 8, 8, 6, 0 +-}; +- +-#endif +- +-#if YYDEBUG != 0 +-static const short yyrline[] = { 0, +- 38, 59, 75, 76, 79, 130, 150, 152, 153, 154, +- 157, 186, 204, 217, 230, 233, 338, 340, 343, 348, +- 354, 356, 359, 360, 362, 363 +-}; +-#endif +- +- +-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) +- +-static const char * const yytname[] = { "$","error","$undefined.","COND","REPEAT", +-"'('","')'","TYPE","NAME","NUMBER","UNIT","top","@1","it_list","it","@2","it_field_list", +-"repeat_it_field","@3","cond_it_field","@4","it_field","@5","attr_type","attr_desc", +-"attr_size","attr_id","enums","enum_list", NULL +-}; +-#endif +- +-static const short yyr1[] = { 0, +- 12, 11, 13, 13, 15, 14, 16, 16, 16, 16, +- 18, 17, 20, 19, 22, 21, 23, 23, 24, 25, +- 26, 26, 27, 27, 28, 28 +-}; +- +-static const short yyr2[] = { 0, +- 0, 2, 2, 0, 0, 6, 2, 2, 2, 0, +- 0, 6, 0, 6, 0, 10, 1, 0, 3, 2, +- 3, 0, 0, 3, 0, 5 +-}; +- +-static const short yydefact[] = { 1, +- 4, 0, 2, 4, 0, 3, 5, 10, 0, 0, +- 10, 10, 10, 0, 0, 0, 0, 6, 9, 8, +- 7, 13, 11, 0, 18, 10, 10, 19, 17, 0, +- 0, 0, 0, 0, 14, 12, 20, 22, 0, 15, +- 0, 23, 21, 25, 0, 0, 16, 0, 24, 0, +- 0, 26, 0, 0, 0 +-}; +- +-static const short yydefgoto[] = { 53, +- 1, 3, 4, 8, 10, 11, 27, 12, 26, 13, +- 42, 30, 17, 34, 40, 45, 46 +-}; +- +-static const short yypact[] = {-32768, +- 3, 2,-32768, 3, 4,-32768,-32768, 6, 0, 8, +- 6, 6, 6, 9, 10, 11, 7,-32768,-32768,-32768, +--32768,-32768,-32768, 14, 15, 6, 6,-32768,-32768, 12, +- 17, 18, -1, 19,-32768,-32768,-32768, 21, 20,-32768, +- 23, 22,-32768,-32768, 24, 1,-32768, 25,-32768, 26, +- 29,-32768, 31, 32,-32768 +-}; +- +-static const short yypgoto[] = {-32768, +--32768, 33,-32768,-32768, -11,-32768,-32768,-32768,-32768,-32768, +--32768,-32768,-32768,-32768,-32768,-32768,-32768 +-}; +- +- +-#define YYLAST 37 +- +- +-static const short yytable[] = { 19, +- 20, 21, 14, 15, 16, 48, 49, 2, 37, 5, +- 9, 25, 7, 18, 31, 32, 22, 23, 24, 28, +- 33, 29, 35, 36, 38, 39, 44, 41, 43, 47, +- 54, 55, 50, 51, 52, 0, 6 +-}; +- +-static const short yycheck[] = { 11, +- 12, 13, 3, 4, 5, 5, 6, 5, 10, 8, +- 5, 5, 9, 6, 26, 27, 8, 8, 8, 6, +- 9, 7, 6, 6, 6, 5, 5, 8, 6, 6, +- 0, 0, 8, 8, 6, -1, 4 +-}; +-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +-#line 3 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* Skeleton output parser for bison, +- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. +- +- 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +- +-/* As a special exception, when this file is copied by Bison into a +- Bison output file, you may use that output file without restriction. +- This special exception was added by the Free Software Foundation +- in version 1.24 of Bison. */ +- +-#ifndef alloca +-#ifdef __GNUC__ +-#define alloca __builtin_alloca +-#else /* not GNU C. */ +-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +-#include +-#else /* not sparc */ +-#if defined (MSDOS) && !defined (__TURBOC__) +-#include +-#else /* not MSDOS, or __TURBOC__ */ +-#if defined(_AIX) +-#include +- #pragma alloca +-#else /* not MSDOS, __TURBOC__, or _AIX */ +-#ifdef __hpux +-#ifdef __cplusplus +-extern "C" { +-void *alloca (unsigned int); +-}; +-#else /* not __cplusplus */ +-void *alloca (); +-#endif /* not __cplusplus */ +-#endif /* __hpux */ +-#endif /* not _AIX */ +-#endif /* not MSDOS, or __TURBOC__ */ +-#endif /* not sparc. */ +-#endif /* not GNU C. */ +-#endif /* alloca not defined. */ +- +-/* This is the parser code that is written into each bison parser +- when the %semantic_parser declaration is not specified in the grammar. +- It was written by Richard Stallman by simplifying the hairy parser +- used when %semantic_parser is specified. */ +- +-/* Note: there must be only one dollar sign in this file. +- It is replaced by the list of actions, each action +- as one case of the switch. */ +- +-#define yyerrok (yyerrstatus = 0) +-#define yyclearin (yychar = YYEMPTY) +-#define YYEMPTY -2 +-#define YYEOF 0 +-#define YYACCEPT return(0) +-#define YYABORT return(1) +-#define YYERROR goto yyerrlab1 +-/* Like YYERROR except do call yyerror. +- This remains here temporarily to ease the +- transition to the new meaning of YYERROR, for GCC. +- Once GCC version 2 has supplanted version 1, this can go. */ +-#define YYFAIL goto yyerrlab +-#define YYRECOVERING() (!!yyerrstatus) +-#define YYBACKUP(token, value) \ +-do \ +- if (yychar == YYEMPTY && yylen == 1) \ +- { yychar = (token), yylval = (value); \ +- yychar1 = YYTRANSLATE (yychar); \ +- YYPOPSTACK; \ +- goto yybackup; \ +- } \ +- else \ +- { yyerror ("syntax error: cannot back up"); YYERROR; } \ +-while (0) +- +-#define YYTERROR 1 +-#define YYERRCODE 256 +- +-#ifndef YYPURE +-#define YYLEX yylex() +-#endif +- +-#ifdef YYPURE +-#ifdef YYLSP_NEEDED +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval, &yylloc) +-#endif +-#else /* not YYLSP_NEEDED */ +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval) +-#endif +-#endif /* not YYLSP_NEEDED */ +-#endif +- +-/* If nonreentrant, generate the variables here */ +- +-#ifndef YYPURE +- +-int yychar; /* the lookahead symbol */ +-YYSTYPE yylval; /* the semantic value of the */ +- /* lookahead symbol */ +- +-#ifdef YYLSP_NEEDED +-YYLTYPE yylloc; /* location data for the lookahead */ +- /* symbol */ +-#endif +- +-int yynerrs; /* number of parse errors so far */ +-#endif /* not YYPURE */ +- +-#if YYDEBUG != 0 +-int yydebug; /* nonzero means print parse trace */ +-/* Since this is uninitialized, it does not stop multiple parsers +- from coexisting. */ +-#endif +- +-/* YYINITDEPTH indicates the initial size of the parser's stacks */ +- +-#ifndef YYINITDEPTH +-#define YYINITDEPTH 200 +-#endif +- +-/* YYMAXDEPTH is the maximum size the stacks can grow to +- (effective only if the built-in stack extension method is used). */ +- +-#if YYMAXDEPTH == 0 +-#undef YYMAXDEPTH +-#endif +- +-#ifndef YYMAXDEPTH +-#define YYMAXDEPTH 10000 +-#endif +- +-/* Prevent warning if -Wstrict-prototypes. */ +-#ifdef __GNUC__ +-int yyparse (void); +-#endif +- +-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +-#else /* not GNU C or C++ */ +-#ifndef __cplusplus +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (to, from, count) +- char *to; +- char *from; +- int count; +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#else /* __cplusplus */ +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (char *to, char *from, int count) +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#endif +-#endif +- +-#line 196 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* The user can define YYPARSE_PARAM as the name of an argument to be passed +- into yyparse. The argument should have type void *. +- It should actually point to an object. +- Grammar actions can access the variable by casting it +- to the proper pointer type. */ +- +-#ifdef YYPARSE_PARAM +-#ifdef __cplusplus +-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL +-#else /* not __cplusplus */ +-#define YYPARSE_PARAM_ARG YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +-#endif /* not __cplusplus */ +-#else /* not YYPARSE_PARAM */ +-#define YYPARSE_PARAM_ARG +-#define YYPARSE_PARAM_DECL +-#endif /* not YYPARSE_PARAM */ +- +-int +-yyparse(YYPARSE_PARAM_ARG) +- YYPARSE_PARAM_DECL +-{ +- register int yystate; +- register int yyn; +- register short *yyssp; +- register YYSTYPE *yyvsp; +- int yyerrstatus; /* number of tokens to shift before error messages enabled */ +- int yychar1 = 0; /* lookahead token as an internal (translated) token number */ +- +- short yyssa[YYINITDEPTH]; /* the state stack */ +- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ +- +- short *yyss = yyssa; /* refer to the stacks thru separate pointers */ +- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ +- +-#ifdef YYLSP_NEEDED +- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ +- YYLTYPE *yyls = yylsa; +- YYLTYPE *yylsp; +- +-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +-#else +-#define YYPOPSTACK (yyvsp--, yyssp--) +-#endif +- +- int yystacksize = YYINITDEPTH; +- +-#ifdef YYPURE +- int yychar; +- YYSTYPE yylval; +- int yynerrs; +-#ifdef YYLSP_NEEDED +- YYLTYPE yylloc; +-#endif +-#endif +- +- YYSTYPE yyval; /* the variable used to return */ +- /* semantic values from the action */ +- /* routines */ +- +- int yylen; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Starting parse\n"); +-#endif +- +- yystate = 0; +- yyerrstatus = 0; +- yynerrs = 0; +- yychar = YYEMPTY; /* Cause a token to be read. */ +- +- /* Initialize stack pointers. +- Waste one element of value and location stack +- so that they stay on the same level as the state stack. +- The wasted elements are never initialized. */ +- +- yyssp = yyss - 1; +- yyvsp = yyvs; +-#ifdef YYLSP_NEEDED +- yylsp = yyls; +-#endif +- +-/* Push a new state, which is found in yystate . */ +-/* In all cases, when you get here, the value and location stacks +- have just been pushed. so pushing a state here evens the stacks. */ +-yynewstate: +- +- *++yyssp = yystate; +- +- if (yyssp >= yyss + yystacksize - 1) +- { +- /* Give user a chance to reallocate the stack */ +- /* Use copies of these so that the &'s don't force the real ones into memory. */ +- YYSTYPE *yyvs1 = yyvs; +- short *yyss1 = yyss; +-#ifdef YYLSP_NEEDED +- YYLTYPE *yyls1 = yyls; +-#endif +- +- /* Get the current used size of the three stacks, in elements. */ +- int size = yyssp - yyss + 1; +- +-#ifdef yyoverflow +- /* Each stack pointer address is followed by the size of +- the data in use in that stack, in bytes. */ +-#ifdef YYLSP_NEEDED +- /* This used to be a conditional around just the two extra args, +- but that might be undefined if yyoverflow is a macro. */ +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yyls1, size * sizeof (*yylsp), +- &yystacksize); +-#else +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yystacksize); +-#endif +- +- yyss = yyss1; yyvs = yyvs1; +-#ifdef YYLSP_NEEDED +- yyls = yyls1; +-#endif +-#else /* no yyoverflow */ +- /* Extend the stack our own way. */ +- if (yystacksize >= YYMAXDEPTH) +- { +- yyerror("parser stack overflow"); +- return 2; +- } +- yystacksize *= 2; +- if (yystacksize > YYMAXDEPTH) +- yystacksize = YYMAXDEPTH; +- yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); +- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); +- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); +- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); +-#ifdef YYLSP_NEEDED +- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); +- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); +-#endif +-#endif /* no yyoverflow */ +- +- yyssp = yyss + size - 1; +- yyvsp = yyvs + size - 1; +-#ifdef YYLSP_NEEDED +- yylsp = yyls + size - 1; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Stack size increased to %d\n", yystacksize); +-#endif +- +- if (yyssp >= yyss + yystacksize - 1) +- YYABORT; +- } +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Entering state %d\n", yystate); +-#endif +- +- goto yybackup; +- yybackup: +- +-/* Do appropriate processing given the current state. */ +-/* Read a lookahead token if we need one and don't already have one. */ +-/* yyresume: */ +- +- /* First try to decide what to do without reference to lookahead token. */ +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yydefault; +- +- /* Not known => get a lookahead token if don't already have one. */ +- +- /* yychar is either YYEMPTY or YYEOF +- or a valid token in external form. */ +- +- if (yychar == YYEMPTY) +- { +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Reading a token: "); +-#endif +- yychar = YYLEX; +- } +- +- /* Convert token to internal form (in yychar1) for indexing tables with */ +- +- if (yychar <= 0) /* This means end of input. */ +- { +- yychar1 = 0; +- yychar = YYEOF; /* Don't call YYLEX any more */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Now at end of input.\n"); +-#endif +- } +- else +- { +- yychar1 = YYTRANSLATE(yychar); +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); +- /* Give the individual parser a way to print the precise meaning +- of a token, for further debugging info. */ +-#ifdef YYPRINT +- YYPRINT (stderr, yychar, yylval); +-#endif +- fprintf (stderr, ")\n"); +- } +-#endif +- } +- +- yyn += yychar1; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) +- goto yydefault; +- +- yyn = yytable[yyn]; +- +- /* yyn is what to do for this token type in this state. +- Negative => reduce, -yyn is rule number. +- Positive => shift, yyn is new state. +- New state is final state => don't bother to shift, +- just return success. +- 0, or most negative number => error. */ +- +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrlab; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrlab; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +- /* Shift the lookahead token. */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +-#endif +- +- /* Discard the token being shifted unless it is eof. */ +- if (yychar != YYEOF) +- yychar = YYEMPTY; +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- /* count tokens shifted since error; after three, turn off error status. */ +- if (yyerrstatus) yyerrstatus--; +- +- yystate = yyn; +- goto yynewstate; +- +-/* Do the default action for the current state. */ +-yydefault: +- +- yyn = yydefact[yystate]; +- if (yyn == 0) +- goto yyerrlab; +- +-/* Do a reduction. yyn is the number of a rule to reduce with. */ +-yyreduce: +- yylen = yyr2[yyn]; +- if (yylen > 0) +- yyval = yyvsp[1-yylen]; /* implement default value of the action */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- int i; +- +- fprintf (stderr, "Reducing via rule %d (line %d), ", +- yyn, yyrline[yyn]); +- +- /* Print the symbols being reduced, and their result. */ +- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) +- fprintf (stderr, "%s ", yytname[yyrhs[i]]); +- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); +- } +-#endif +- +- +- switch (yyn) { +- +-case 1: +-#line 38 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- switch (writecode) +- { +- case 'i': +- printf("#ifdef SYSROFF_SWAP_IN\n"); +- break; +- case 'p': +- printf("#ifdef SYSROFF_p\n"); +- break; +- case 'd': +- break; +- case 'g': +- printf("#ifdef SYSROFF_SWAP_OUT\n"); +- break; +- case 'c': +- printf("#ifdef SYSROFF_PRINT\n"); +- printf("#include \n"); +- printf("#include \n"); +- break; +- } +- ; +- break;} +-case 2: +-#line 59 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- switch (writecode) { +- case 'i': +- case 'p': +- case 'g': +- case 'c': +- printf("#endif\n"); +- break; +- case 'd': +- break; +- } +-; +- break;} +-case 5: +-#line 81 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- it = yyvsp[-1].s; code = yyvsp[0].i; +- switch (writecode) +- { +- case 'd': +- printf("\n\n\n#define IT_%s_CODE 0x%x\n", it,code); +- printf("struct IT_%s { \n", it); +- break; +- case 'i': +- printf("void sysroff_swap_%s_in(ptr)\n",yyvsp[-1].s); +- printf("struct IT_%s *ptr;\n", it); +- printf("{\n"); +- printf("char raw[255];\n"); +- printf("\tint idx = 0 ;\n"); +- printf("\tint size;\n"); +- printf("memset(raw,0,255);\n"); +- printf("memset(ptr,0,sizeof(*ptr));\n"); +- printf("size = fillup(raw);\n"); +- break; +- case 'g': +- printf("void sysroff_swap_%s_out(file,ptr)\n",yyvsp[-1].s); +- printf("FILE * file;\n"); +- printf("struct IT_%s *ptr;\n", it); +- printf("{\n"); +- printf("\tchar raw[255];\n"); +- printf("\tint idx = 16 ;\n"); +- printf("\tmemset (raw, 0, 255);\n"); +- printf("\tcode = IT_%s_CODE;\n", it); +- break; +- case 'o': +- printf("void sysroff_swap_%s_out(abfd,ptr)\n",yyvsp[-1].s); +- printf("bfd * abfd;\n"); +- printf("struct IT_%s *ptr;\n",it); +- printf("{\n"); +- printf("int idx = 0 ;\n"); +- break; +- case 'c': +- printf("void sysroff_print_%s_out(ptr)\n",yyvsp[-1].s); +- printf("struct IT_%s *ptr;\n", it); +- printf("{\n"); +- printf("itheader(\"%s\", IT_%s_CODE);\n",yyvsp[-1].s,yyvsp[-1].s); +- break; +- +- case 't': +- break; +- } +- +- ; +- break;} +-case 6: +-#line 131 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- switch (writecode) { +- case 'd': +- printf("};\n"); +- break; +- case 'g': +- printf("\tchecksum(file,raw, idx, IT_%s_CODE);\n", it); +- +- case 'i': +- +- case 'o': +- case 'c': +- printf("}\n"); +- } +-; +- break;} +-case 11: +-#line 158 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- rdepth++; +- switch (writecode) +- { +- case 'c': +- if (rdepth==1) +- printf("\tprintf(\"repeat %%d\\n\", %s);\n",yyvsp[0].s); +- if (rdepth==2) +- printf("\tprintf(\"repeat %%d\\n\", %s[n]);\n",yyvsp[0].s); +- case 'i': +- case 'g': +- case 'o': +- +- if (rdepth==1) +- { +- printf("\t{ int n; for (n = 0; n < %s; n++) {\n", yyvsp[0].s); +- } +- if (rdepth == 2) { +- printf("\t{ int m; for (m = 0; m < %s[n]; m++) {\n", yyvsp[0].s); +- } +- +- break; +- } +- +- oldrepeat = repeat; +- repeat = yyvsp[0].s; +- ; +- break;} +-case 12: +-#line 188 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- repeat = oldrepeat; +- oldrepeat =0; +- rdepth--; +- switch (writecode) +- { +- case 'i': +- case 'g': +- case 'o': +- case 'c': +- printf("\t}}\n"); +- } +- ; +- break;} +-case 13: +-#line 205 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- switch (writecode) +- { +- case 'i': +- case 'g': +- case 'o': +- case 'c': +- printf("\tif (%s) {\n", yyvsp[0].s); +- break; +- } +- ; +- break;} +-case 14: +-#line 218 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- switch (writecode) +- { +- case 'i': +- case 'g': +- case 'o': +- case 'c': +- printf("\t}\n"); +- } +- ; +- break;} +-case 15: +-#line 232 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{name = yyvsp[0].s; ; +- break;} +-case 16: +-#line 234 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- char *desc = yyvsp[-8].s; +- char *type = yyvsp[-6].s; +- int size = yyvsp[-5].i; +- char *id = yyvsp[-3].s; +-char *p = names[rdepth]; +-char *ptr = pnames[rdepth]; +- switch (writecode) +- { +- case 'g': +- if (size % 8) +- { +- +- printf("\twriteBITS(ptr->%s%s,raw,&idx,%d);\n", +- id, +- names[rdepth], size); +- +- } +- else { +- printf("\twrite%s(ptr->%s%s,raw,&idx,%d,file);\n", +- type, +- id, +- names[rdepth],size/8); +- } +- break; +- case 'i': +- { +- +- if (rdepth >= 1) +- +- { +- printf("if (!ptr->%s) ptr->%s = (%s*)xcalloc(%s, sizeof(ptr->%s[0]));\n", +- id, +- id, +- type, +- repeat, +- id); +- } +- +- if (rdepth == 2) +- { +- printf("if (!ptr->%s[n]) ptr->%s[n] = (%s**)xcalloc(%s[n], sizeof(ptr->%s[n][0]));\n", +- id, +- id, +- type, +- repeat, +- id); +- } +- +- } +- +- if (size % 8) +- { +- printf("\tptr->%s%s = getBITS(raw,&idx, %d,size);\n", +- id, +- names[rdepth], +- size); +- } +- else { +- printf("\tptr->%s%s = get%s(raw,&idx, %d,size);\n", +- id, +- names[rdepth], +- type, +- size/8); +- } +- break; +- case 'o': +- printf("\tput%s(raw,%d,%d,&idx,ptr->%s%s);\n", type,size/8,size%8,id,names[rdepth]); +- break; +- case 'd': +- if (repeat) +- printf("\t/* repeat %s */\n", repeat); +- +- if (type[0] == 'I') { +- printf("\tint %s%s; \t/* %s */\n",ptr,id, desc); +- } +- else if (type[0] =='C') { +- printf("\tchar %s*%s;\t /* %s */\n",ptr,id, desc); +- } +- else { +- printf("\tbarray %s%s;\t /* %s */\n",ptr,id, desc); +- } +- break; +- case 'c': +- printf("tabout();\n"); +- printf("\tprintf(\"/*%-30s*/ ptr->%s = \");\n", desc, id); +- +- if (type[0] == 'I') +- printf("\tprintf(\"%%d\\n\",ptr->%s%s);\n", id,p); +- else if (type[0] == 'C') +- printf("\tprintf(\"%%s\\n\",ptr->%s%s);\n", id,p); +- +- else if (type[0] == 'B') +- { +- printf("\tpbarray(&ptr->%s%s);\n", id,p); +- } +- else abort(); +- break; +- } +- ; +- break;} +-case 17: +-#line 339 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ yyval.s = yyvsp[0].s; ; +- break;} +-case 18: +-#line 340 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ yyval.s = "INT";; +- break;} +-case 19: +-#line 345 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ yyval.s = yyvsp[-1].s; ; +- break;} +-case 20: +-#line 350 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ yyval.i = yyvsp[-1].i * yyvsp[0].i; ; +- break;} +-case 21: +-#line 355 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ yyval.s = yyvsp[-1].s; ; +- break;} +-case 22: +-#line 356 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ yyval.s = "dummy";; +- break;} +-case 26: +-#line 364 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +-{ +- switch (writecode) +- { +- case 'd': +- printf("#define %s %s\n", yyvsp[-2].s,yyvsp[-1].s); +- break; +- case 'c': +- printf("if (ptr->%s%s == %s) { tabout(); printf(\"%s\\n\");}\n", name, names[rdepth],yyvsp[-1].s,yyvsp[-2].s); +- } +- ; +- break;} +-} +- /* the action file gets copied in in place of this dollarsign */ +-#line 498 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +- yyvsp -= yylen; +- yyssp -= yylen; +-#ifdef YYLSP_NEEDED +- yylsp -= yylen; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +- *++yyvsp = yyval; +- +-#ifdef YYLSP_NEEDED +- yylsp++; +- if (yylen == 0) +- { +- yylsp->first_line = yylloc.first_line; +- yylsp->first_column = yylloc.first_column; +- yylsp->last_line = (yylsp-1)->last_line; +- yylsp->last_column = (yylsp-1)->last_column; +- yylsp->text = 0; +- } +- else +- { +- yylsp->last_line = (yylsp+yylen-1)->last_line; +- yylsp->last_column = (yylsp+yylen-1)->last_column; +- } +-#endif +- +- /* Now "shift" the result of the reduction. +- Determine what state that goes to, +- based on the state we popped back to +- and the rule number reduced by. */ +- +- yyn = yyr1[yyn]; +- +- yystate = yypgoto[yyn - YYNTBASE] + *yyssp; +- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) +- yystate = yytable[yystate]; +- else +- yystate = yydefgoto[yyn - YYNTBASE]; +- +- goto yynewstate; +- +-yyerrlab: /* here on detecting error */ +- +- if (! yyerrstatus) +- /* If not already recovering from an error, report this error. */ +- { +- ++yynerrs; +- +-#ifdef YYERROR_VERBOSE +- yyn = yypact[yystate]; +- +- if (yyn > YYFLAG && yyn < YYLAST) +- { +- int size = 0; +- char *msg; +- int x, count; +- +- count = 0; +- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- size += strlen(yytname[x]) + 15, count++; +- msg = (char *) malloc(size + 15); +- if (msg != 0) +- { +- strcpy(msg, "parse error"); +- +- if (count < 5) +- { +- count = 0; +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- { +- strcat(msg, count == 0 ? ", expecting `" : " or `"); +- strcat(msg, yytname[x]); +- strcat(msg, "'"); +- count++; +- } +- } +- yyerror(msg); +- free(msg); +- } +- else +- yyerror ("parse error; also virtual memory exceeded"); +- } +- else +-#endif /* YYERROR_VERBOSE */ +- yyerror("parse error"); +- } +- +- goto yyerrlab1; +-yyerrlab1: /* here on error raised explicitly by an action */ +- +- if (yyerrstatus == 3) +- { +- /* if just tried and failed to reuse lookahead token after an error, discard it. */ +- +- /* return failure if at end of input */ +- if (yychar == YYEOF) +- YYABORT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +-#endif +- +- yychar = YYEMPTY; +- } +- +- /* Else will try to reuse lookahead token +- after shifting the error token. */ +- +- yyerrstatus = 3; /* Each real token shifted decrements this */ +- +- goto yyerrhandle; +- +-yyerrdefault: /* current state does not do anything special for the error token. */ +- +-#if 0 +- /* This is wrong; only states that explicitly want error tokens +- should shift them. */ +- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ +- if (yyn) goto yydefault; +-#endif +- +-yyerrpop: /* pop the current state because it cannot handle the error token */ +- +- if (yyssp == yyss) YYABORT; +- yyvsp--; +- yystate = *--yyssp; +-#ifdef YYLSP_NEEDED +- yylsp--; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "Error: state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +-yyerrhandle: +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yyerrdefault; +- +- yyn += YYTERROR; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) +- goto yyerrdefault; +- +- yyn = yytable[yyn]; +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrpop; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrpop; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting error token, "); +-#endif +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- yystate = yyn; +- goto yynewstate; +-} +-#line 379 "/5g/ian/binutils/release/copy/binutils/sysinfo.y" +- +-/* four modes +- +- -d write structure defintions for sysroff in host format +- -i write functions to swap into sysroff format in +- -o write functions to swap into sysroff format out +- -c write code to print info in human form */ +- +-int yydebug; +-char writecode; +- +-int +-main(ac,av) +-int ac; +-char **av; +-{ +- yydebug=0; +- if (ac > 1) +- writecode = av[1][1]; +-if (writecode == 'd') +- { +- printf("typedef struct { unsigned char *data; int len; } barray; \n"); +- printf("typedef int INT;\n"); +- printf("typedef char * CHARS;\n"); +- +- } +- yyparse(); +-return 0; +-} +- +-int +-yyerror(s) +- char *s; +-{ +- fprintf(stderr, "%s\n" , s); +- return 0; +-} +diff -rup --new-file binutils-2.9.1/binutils/sysinfo.h binutils-2.9.1/binutils/sysinfo.h +--- binutils-2.9.1/binutils/sysinfo.h Fri May 1 08:49:40 1998 ++++ binutils-2.9.1/binutils/sysinfo.h Wed Dec 31 17:00:00 1969 +@@ -1,13 +0,0 @@ +-typedef union { +- int i; +- char *s; +-} YYSTYPE; +-#define COND 258 +-#define REPEAT 259 +-#define TYPE 260 +-#define NAME 261 +-#define NUMBER 262 +-#define UNIT 263 +- +- +-extern YYSTYPE yylval; +diff -rup --new-file binutils-2.9.1/binutils/syslex.c binutils-2.9.1/binutils/syslex.c +--- binutils-2.9.1/binutils/syslex.c Fri May 1 08:49:40 1998 ++++ binutils-2.9.1/binutils/syslex.c Wed Dec 31 17:00:00 1969 +@@ -1,1651 +0,0 @@ +-/* A lexical scanner generated by flex */ +- +-/* Scanner skeleton version: +- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $ +- */ +- +-#define FLEX_SCANNER +-#define YY_FLEX_MAJOR_VERSION 2 +-#define YY_FLEX_MINOR_VERSION 5 +- +-#include +- +- +-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +-#ifdef c_plusplus +-#ifndef __cplusplus +-#define __cplusplus +-#endif +-#endif +- +- +-#ifdef __cplusplus +- +-#include +-#include +- +-/* Use prototypes in function declarations. */ +-#define YY_USE_PROTOS +- +-/* The "const" storage-class-modifier is valid. */ +-#define YY_USE_CONST +- +-#else /* ! __cplusplus */ +- +-#if __STDC__ +- +-#define YY_USE_PROTOS +-#define YY_USE_CONST +- +-#endif /* __STDC__ */ +-#endif /* ! __cplusplus */ +- +-#ifdef __TURBOC__ +- #pragma warn -rch +- #pragma warn -use +-#include +-#include +-#define YY_USE_CONST +-#define YY_USE_PROTOS +-#endif +- +-#ifdef YY_USE_CONST +-#define yyconst const +-#else +-#define yyconst +-#endif +- +- +-#ifdef YY_USE_PROTOS +-#define YY_PROTO(proto) proto +-#else +-#define YY_PROTO(proto) () +-#endif +- +-/* Returned upon end-of-file. */ +-#define YY_NULL 0 +- +-/* Promotes a possibly negative, possibly signed char to an unsigned +- * integer for use as an array index. If the signed char is negative, +- * we want to instead treat it as an 8-bit unsigned char, hence the +- * double cast. +- */ +-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +- +-/* Enter a start condition. This macro really ought to take a parameter, +- * but we do it the disgusting crufty way forced on us by the ()-less +- * definition of BEGIN. +- */ +-#define BEGIN yy_start = 1 + 2 * +- +-/* Translate the current start state into a value that can be later handed +- * to BEGIN to return to the state. The YYSTATE alias is for lex +- * compatibility. +- */ +-#define YY_START ((yy_start - 1) / 2) +-#define YYSTATE YY_START +- +-/* Action number for EOF rule of a given start state. */ +-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +- +-/* Special action meaning "start processing a new file". */ +-#define YY_NEW_FILE yyrestart( yyin ) +- +-#define YY_END_OF_BUFFER_CHAR 0 +- +-/* Size of default input buffer. */ +-#define YY_BUF_SIZE 16384 +- +-typedef struct yy_buffer_state *YY_BUFFER_STATE; +- +-extern int yyleng; +-extern FILE *yyin, *yyout; +- +-#define EOB_ACT_CONTINUE_SCAN 0 +-#define EOB_ACT_END_OF_FILE 1 +-#define EOB_ACT_LAST_MATCH 2 +- +-/* The funky do-while in the following #define is used to turn the definition +- * int a single C statement (which needs a semi-colon terminator). This +- * avoids problems with code like: +- * +- * if ( condition_holds ) +- * yyless( 5 ); +- * else +- * do_something_else(); +- * +- * Prior to using the do-while the compiler would get upset at the +- * "else" because it interpreted the "if" statement as being all +- * done when it reached the ';' after the yyless() call. +- */ +- +-/* Return all but the first 'n' matched characters back to the input stream. */ +- +-#define yyless(n) \ +- do \ +- { \ +- /* Undo effects of setting up yytext. */ \ +- *yy_cp = yy_hold_char; \ +- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ +- YY_DO_BEFORE_ACTION; /* set up yytext again */ \ +- } \ +- while ( 0 ) +- +-#define unput(c) yyunput( c, yytext_ptr ) +- +-/* The following is because we cannot portably get our hands on size_t +- * (without autoconf's help, which isn't available because we want +- * flex-generated scanners to compile on their own). +- */ +-typedef unsigned int yy_size_t; +- +- +-struct yy_buffer_state +- { +- FILE *yy_input_file; +- +- char *yy_ch_buf; /* input buffer */ +- char *yy_buf_pos; /* current position in input buffer */ +- +- /* Size of input buffer in bytes, not including room for EOB +- * characters. +- */ +- yy_size_t yy_buf_size; +- +- /* Number of characters read into yy_ch_buf, not including EOB +- * characters. +- */ +- int yy_n_chars; +- +- /* Whether we "own" the buffer - i.e., we know we created it, +- * and can realloc() it to grow it, and should free() it to +- * delete it. +- */ +- int yy_is_our_buffer; +- +- /* Whether this is an "interactive" input source; if so, and +- * if we're using stdio for input, then we want to use getc() +- * instead of fread(), to make sure we stop fetching input after +- * each newline. +- */ +- int yy_is_interactive; +- +- /* Whether we're considered to be at the beginning of a line. +- * If so, '^' rules will be active on the next match, otherwise +- * not. +- */ +- int yy_at_bol; +- +- /* Whether to try to fill the input buffer when we reach the +- * end of it. +- */ +- int yy_fill_buffer; +- +- int yy_buffer_status; +-#define YY_BUFFER_NEW 0 +-#define YY_BUFFER_NORMAL 1 +- /* When an EOF's been seen but there's still some text to process +- * then we mark the buffer as YY_EOF_PENDING, to indicate that we +- * shouldn't try reading from the input source any more. We might +- * still have a bunch of tokens to match, though, because of +- * possible backing-up. +- * +- * When we actually see the EOF, we change the status to "new" +- * (via yyrestart()), so that the user can continue scanning by +- * just pointing yyin at a new input file. +- */ +-#define YY_BUFFER_EOF_PENDING 2 +- }; +- +-static YY_BUFFER_STATE yy_current_buffer = 0; +- +-/* We provide macros for accessing buffer states in case in the +- * future we want to put the buffer states in a more general +- * "scanner state". +- */ +-#define YY_CURRENT_BUFFER yy_current_buffer +- +- +-/* yy_hold_char holds the character lost when yytext is formed. */ +-static char yy_hold_char; +- +-static int yy_n_chars; /* number of characters read into yy_ch_buf */ +- +- +-int yyleng; +- +-/* Points to current character in buffer. */ +-static char *yy_c_buf_p = (char *) 0; +-static int yy_init = 1; /* whether we need to initialize */ +-static int yy_start = 0; /* start state number */ +- +-/* Flag which is used to allow yywrap()'s to do buffer switches +- * instead of setting up a fresh yyin. A bit of a hack ... +- */ +-static int yy_did_buffer_switch_on_eof; +- +-void yyrestart YY_PROTO(( FILE *input_file )); +- +-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +-void yy_load_buffer_state YY_PROTO(( void )); +-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) +- +-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str )); +-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); +- +-static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +-static void yy_flex_free YY_PROTO(( void * )); +- +-#define yy_new_buffer yy_create_buffer +- +-#define yy_set_interactive(is_interactive) \ +- { \ +- if ( ! yy_current_buffer ) \ +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ +- yy_current_buffer->yy_is_interactive = is_interactive; \ +- } +- +-#define yy_set_bol(at_bol) \ +- { \ +- if ( ! yy_current_buffer ) \ +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ +- yy_current_buffer->yy_at_bol = at_bol; \ +- } +- +-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +- +-typedef unsigned char YY_CHAR; +-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +-typedef int yy_state_type; +-extern char *yytext; +-#define yytext_ptr yytext +- +-static yy_state_type yy_get_previous_state YY_PROTO(( void )); +-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +-static int yy_get_next_buffer YY_PROTO(( void )); +-static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +- +-/* Done after the current pattern has been matched and before the +- * corresponding action - sets up yytext. +- */ +-#define YY_DO_BEFORE_ACTION \ +- yytext_ptr = yy_bp; \ +- yyleng = (int) (yy_cp - yy_bp); \ +- yy_hold_char = *yy_cp; \ +- *yy_cp = '\0'; \ +- yy_c_buf_p = yy_cp; +- +-#define YY_NUM_RULES 25 +-#define YY_END_OF_BUFFER 26 +-static yyconst short int yy_accept[81] = +- { 0, +- 0, 0, 26, 25, 7, 8, 5, 25, 1, 2, +- 11, 11, 6, 3, 4, 25, 25, 25, 25, 25, +- 25, 25, 0, 9, 11, 0, 6, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, +- 13, 0, 0, 0, 0, 16, 0, 0, 0, 0, +- 0, 12, 15, 0, 23, 0, 0, 0, 0, 0, +- 0, 14, 18, 0, 0, 0, 0, 0, 17, 0, +- 24, 0, 0, 0, 20, 22, 0, 21, 19, 0 +- } ; +- +-static yyconst int yy_ec[256] = +- { 0, +- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 4, 1, 5, 1, 1, 1, 1, 1, 6, +- 7, 1, 1, 1, 1, 1, 1, 8, 9, 9, +- 9, 9, 9, 9, 9, 9, 9, 1, 10, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 11, 1, 12, 1, 1, 1, 13, 14, 15, 16, +- +- 17, 18, 19, 20, 21, 1, 1, 22, 1, 23, +- 24, 25, 1, 26, 27, 28, 29, 30, 1, 31, +- 32, 33, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1 +- } ; +- +-static yyconst int yy_meta[34] = +- { 0, +- 1, 1, 2, 1, 1, 1, 1, 3, 3, 1, +- 1, 1, 3, 3, 3, 3, 3, 3, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1 +- } ; +- +-static yyconst short int yy_base[84] = +- { 0, +- 0, 0, 100, 101, 101, 101, 101, 94, 101, 101, +- 26, 28, 0, 101, 101, 82, 26, 18, 74, 79, +- 78, 81, 88, 101, 32, 0, 0, 76, 65, 62, +- 61, 75, 20, 59, 61, 66, 58, 0, 57, 56, +- 54, 63, 53, 62, 54, 101, 59, 48, 53, 46, +- 59, 101, 44, 43, 101, 41, 55, 46, 53, 44, +- 31, 101, 101, 39, 27, 21, 39, 19, 101, 35, +- 101, 33, 26, 29, 101, 101, 28, 101, 101, 101, +- 58, 61, 41 +- } ; +- +-static yyconst short int yy_def[84] = +- { 0, +- 80, 1, 80, 80, 80, 80, 80, 81, 80, 80, +- 80, 80, 82, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 81, 80, 80, 83, 82, 80, 80, 80, +- 80, 80, 80, 80, 80, 80, 80, 83, 80, 80, +- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80, 80, 80, 80, 80, 80, 0, +- 80, 80, 80 +- } ; +- +-static yyconst short int yy_nxt[135] = +- { 0, +- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, +- 14, 15, 16, 17, 18, 4, 4, 4, 4, 4, +- 19, 4, 4, 4, 4, 20, 21, 4, 4, 22, +- 4, 4, 4, 25, 25, 25, 25, 32, 29, 25, +- 25, 33, 44, 38, 79, 78, 30, 77, 45, 76, +- 75, 74, 73, 72, 71, 70, 26, 31, 23, 23, +- 23, 27, 69, 27, 68, 67, 66, 65, 64, 63, +- 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, +- 52, 51, 50, 49, 48, 47, 46, 43, 42, 41, +- 40, 39, 24, 37, 36, 35, 34, 28, 24, 80, +- +- 3, 80, 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80 +- } ; +- +-static yyconst short int yy_chk[135] = +- { 0, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 11, 11, 12, 12, 18, 17, 25, +- 25, 18, 33, 83, 77, 74, 17, 73, 33, 72, +- 70, 68, 67, 66, 65, 64, 11, 17, 81, 81, +- 81, 82, 61, 82, 60, 59, 58, 57, 56, 54, +- 53, 51, 50, 49, 48, 47, 45, 44, 43, 42, +- 41, 40, 39, 37, 36, 35, 34, 32, 31, 30, +- 29, 28, 23, 22, 21, 20, 19, 16, 8, 3, +- +- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80 +- } ; +- +-static yy_state_type yy_last_accepting_state; +-static char *yy_last_accepting_cpos; +- +-/* The intent behind this definition is that it'll catch +- * any uses of REJECT which flex missed. +- */ +-#define REJECT reject_used_but_not_detected +-#define yymore() yymore_used_but_not_detected +-#define YY_MORE_ADJ 0 +-char *yytext; +-#line 1 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-#define INITIAL 0 +-#line 2 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-#include "sysinfo.h" +-char *word; +-int number; +-int unit; +- +-#ifndef yywrap +-static int yywrap () { return 1; } +-#endif +-#line 424 "lex.yy.c" +- +-/* Macros after this point can all be overridden by user definitions in +- * section 1. +- */ +- +-#ifndef YY_SKIP_YYWRAP +-#ifdef __cplusplus +-extern "C" int yywrap YY_PROTO(( void )); +-#else +-extern int yywrap YY_PROTO(( void )); +-#endif +-#endif +- +-#ifndef YY_NO_UNPUT +-static void yyunput YY_PROTO(( int c, char *buf_ptr )); +-#endif +- +-#ifndef yytext_ptr +-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +-#endif +- +-#ifndef YY_NO_INPUT +-#ifdef __cplusplus +-static int yyinput YY_PROTO(( void )); +-#else +-static int input YY_PROTO(( void )); +-#endif +-#endif +- +-#if YY_STACK_USED +-static int yy_start_stack_ptr = 0; +-static int yy_start_stack_depth = 0; +-static int *yy_start_stack = 0; +-#ifndef YY_NO_PUSH_STATE +-static void yy_push_state YY_PROTO(( int new_state )); +-#endif +-#ifndef YY_NO_POP_STATE +-static void yy_pop_state YY_PROTO(( void )); +-#endif +-#ifndef YY_NO_TOP_STATE +-static int yy_top_state YY_PROTO(( void )); +-#endif +- +-#else +-#define YY_NO_PUSH_STATE 1 +-#define YY_NO_POP_STATE 1 +-#define YY_NO_TOP_STATE 1 +-#endif +- +-#ifdef YY_MALLOC_DECL +-YY_MALLOC_DECL +-#else +-#if __STDC__ +-#ifndef __cplusplus +-#include +-#endif +-#else +-/* Just try to get by without declaring the routines. This will fail +- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) +- * or sizeof(void*) != sizeof(int). +- */ +-#endif +-#endif +- +-/* Amount of stuff to slurp up with each read. */ +-#ifndef YY_READ_BUF_SIZE +-#define YY_READ_BUF_SIZE 8192 +-#endif +- +-/* Copy whatever the last rule matched to the standard output. */ +- +-#ifndef ECHO +-/* This used to be an fputs(), but since the string might contain NUL's, +- * we now use fwrite(). +- */ +-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +-#endif +- +-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, +- * is returned in "result". +- */ +-#ifndef YY_INPUT +-#define YY_INPUT(buf,result,max_size) \ +- if ( yy_current_buffer->yy_is_interactive ) \ +- { \ +- int c = '*', n; \ +- for ( n = 0; n < max_size && \ +- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ +- buf[n] = (char) c; \ +- if ( c == '\n' ) \ +- buf[n++] = (char) c; \ +- if ( c == EOF && ferror( yyin ) ) \ +- YY_FATAL_ERROR( "input in flex scanner failed" ); \ +- result = n; \ +- } \ +- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ +- && ferror( yyin ) ) \ +- YY_FATAL_ERROR( "input in flex scanner failed" ); +-#endif +- +-/* No semi-colon after return; correct usage is to write "yyterminate();" - +- * we don't want an extra ';' after the "return" because that will cause +- * some compilers to complain about unreachable statements. +- */ +-#ifndef yyterminate +-#define yyterminate() return YY_NULL +-#endif +- +-/* Number of entries by which start-condition stack grows. */ +-#ifndef YY_START_STACK_INCR +-#define YY_START_STACK_INCR 25 +-#endif +- +-/* Report a fatal error. */ +-#ifndef YY_FATAL_ERROR +-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +-#endif +- +-/* Default declaration of generated scanner - a define so the user can +- * easily add parameters. +- */ +-#ifndef YY_DECL +-#define YY_DECL int yylex YY_PROTO(( void )) +-#endif +- +-/* Code executed at the beginning of each rule, after yytext and yyleng +- * have been set up. +- */ +-#ifndef YY_USER_ACTION +-#define YY_USER_ACTION +-#endif +- +-/* Code executed at the end of each rule. */ +-#ifndef YY_BREAK +-#define YY_BREAK break; +-#endif +- +-#define YY_RULE_SETUP \ +- YY_USER_ACTION +- +-YY_DECL +- { +- register yy_state_type yy_current_state; +- register char *yy_cp, *yy_bp; +- register int yy_act; +- +-#line 11 "/5g/ian/binutils/release/copy/binutils/syslex.l" +- +-#line 573 "lex.yy.c" +- +- if ( yy_init ) +- { +- yy_init = 0; +- +-#ifdef YY_USER_INIT +- YY_USER_INIT; +-#endif +- +- if ( ! yy_start ) +- yy_start = 1; /* first start state */ +- +- if ( ! yyin ) +- yyin = stdin; +- +- if ( ! yyout ) +- yyout = stdout; +- +- if ( ! yy_current_buffer ) +- yy_current_buffer = +- yy_create_buffer( yyin, YY_BUF_SIZE ); +- +- yy_load_buffer_state(); +- } +- +- while ( 1 ) /* loops until end-of-file is reached */ +- { +- yy_cp = yy_c_buf_p; +- +- /* Support of yytext. */ +- *yy_cp = yy_hold_char; +- +- /* yy_bp points to the position in yy_ch_buf of the start of +- * the current run. +- */ +- yy_bp = yy_cp; +- +- yy_current_state = yy_start; +-yy_match: +- do +- { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 81 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- ++yy_cp; +- } +- while ( yy_base[yy_current_state] != 101 ); +- +-yy_find_action: +- yy_act = yy_accept[yy_current_state]; +- if ( yy_act == 0 ) +- { /* have to back up */ +- yy_cp = yy_last_accepting_cpos; +- yy_current_state = yy_last_accepting_state; +- yy_act = yy_accept[yy_current_state]; +- } +- +- YY_DO_BEFORE_ACTION; +- +- +-do_action: /* This label is used only to access EOF actions. */ +- +- +- switch ( yy_act ) +- { /* beginning of action switch */ +- case 0: /* must back up */ +- /* undo the effects of YY_DO_BEFORE_ACTION */ +- *yy_cp = yy_hold_char; +- yy_cp = yy_last_accepting_cpos; +- yy_current_state = yy_last_accepting_state; +- goto yy_find_action; +- +-case 1: +-YY_RULE_SETUP +-#line 12 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ return '(';} +- YY_BREAK +-case 2: +-YY_RULE_SETUP +-#line 13 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ return ')';} +- YY_BREAK +-case 3: +-YY_RULE_SETUP +-#line 14 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ return '[';} +- YY_BREAK +-case 4: +-YY_RULE_SETUP +-#line 15 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ return ']';} +- YY_BREAK +-case 5: +-YY_RULE_SETUP +-#line 16 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ ; } +- YY_BREAK +-case 6: +-YY_RULE_SETUP +-#line 17 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ ; } +- YY_BREAK +-case 7: +-YY_RULE_SETUP +-#line 18 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ ; } +- YY_BREAK +-case 8: +-YY_RULE_SETUP +-#line 19 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ ; } +- YY_BREAK +-case 9: +-YY_RULE_SETUP +-#line 20 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ +-yylval.s = malloc(strlen (yytext)); +-strcpy(yylval.s, yytext+1); +-yylval.s[strlen(yylval.s)-1] = 0; +- return NAME; +- } +- YY_BREAK +-case 10: +-YY_RULE_SETUP +-#line 27 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ +- yylval.i = strtol(yytext,0,16); +- return NUMBER; +- } +- YY_BREAK +-case 11: +-YY_RULE_SETUP +-#line 32 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ +- yylval.i = atoi(yytext); +- return NUMBER; +- } +- YY_BREAK +-case 12: +-YY_RULE_SETUP +-#line 38 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.i =1 ;return UNIT;} +- YY_BREAK +-case 13: +-YY_RULE_SETUP +-#line 39 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.i = 1; return UNIT;} +- YY_BREAK +-case 14: +-YY_RULE_SETUP +-#line 40 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.i= 8; return UNIT;} +- YY_BREAK +-case 15: +-YY_RULE_SETUP +-#line 41 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.i = 8; return UNIT;} +- YY_BREAK +-case 16: +-YY_RULE_SETUP +-#line 43 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.s = "INT"; return TYPE;} +- YY_BREAK +-case 17: +-YY_RULE_SETUP +-#line 44 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.s = "BARRAY"; return TYPE;} +- YY_BREAK +-case 18: +-YY_RULE_SETUP +-#line 45 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.s = "CHARS"; return TYPE;} +- YY_BREAK +-case 19: +-YY_RULE_SETUP +-#line 46 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.i = 0; return NUMBER;} +- YY_BREAK +-case 20: +-YY_RULE_SETUP +-#line 47 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.i = -4; return NUMBER;} +- YY_BREAK +-case 21: +-YY_RULE_SETUP +-#line 48 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.i = -2; return NUMBER; } +- YY_BREAK +-case 22: +-YY_RULE_SETUP +-#line 49 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ yylval.i = -1; return NUMBER; } +- YY_BREAK +-case 23: +-YY_RULE_SETUP +-#line 50 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ return COND;} +- YY_BREAK +-case 24: +-YY_RULE_SETUP +-#line 51 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-{ return REPEAT;} +- YY_BREAK +-case 25: +-YY_RULE_SETUP +-#line 52 "/5g/ian/binutils/release/copy/binutils/syslex.l" +-ECHO; +- YY_BREAK +-#line 792 "lex.yy.c" +-case YY_STATE_EOF(INITIAL): +- yyterminate(); +- +- case YY_END_OF_BUFFER: +- { +- /* Amount of text matched not including the EOB char. */ +- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; +- +- /* Undo the effects of YY_DO_BEFORE_ACTION. */ +- *yy_cp = yy_hold_char; +- +- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) +- { +- /* We're scanning a new file or input source. It's +- * possible that this happened because the user +- * just pointed yyin at a new source and called +- * yylex(). If so, then we have to assure +- * consistency between yy_current_buffer and our +- * globals. Here is the right place to do so, because +- * this is the first action (other than possibly a +- * back-up) that will match for the new input source. +- */ +- yy_n_chars = yy_current_buffer->yy_n_chars; +- yy_current_buffer->yy_input_file = yyin; +- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; +- } +- +- /* Note that here we test for yy_c_buf_p "<=" to the position +- * of the first EOB in the buffer, since yy_c_buf_p will +- * already have been incremented past the NUL character +- * (since all states make transitions on EOB to the +- * end-of-buffer state). Contrast this with the test +- * in input(). +- */ +- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) +- { /* This was really a NUL. */ +- yy_state_type yy_next_state; +- +- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; +- +- yy_current_state = yy_get_previous_state(); +- +- /* Okay, we're now positioned to make the NUL +- * transition. We couldn't have +- * yy_get_previous_state() go ahead and do it +- * for us because it doesn't know how to deal +- * with the possibility of jamming (and we don't +- * want to build jamming into it because then it +- * will run more slowly). +- */ +- +- yy_next_state = yy_try_NUL_trans( yy_current_state ); +- +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- +- if ( yy_next_state ) +- { +- /* Consume the NUL. */ +- yy_cp = ++yy_c_buf_p; +- yy_current_state = yy_next_state; +- goto yy_match; +- } +- +- else +- { +- yy_cp = yy_c_buf_p; +- goto yy_find_action; +- } +- } +- +- else switch ( yy_get_next_buffer() ) +- { +- case EOB_ACT_END_OF_FILE: +- { +- yy_did_buffer_switch_on_eof = 0; +- +- if ( yywrap() ) +- { +- /* Note: because we've taken care in +- * yy_get_next_buffer() to have set up +- * yytext, we can now set up +- * yy_c_buf_p so that if some total +- * hoser (like flex itself) wants to +- * call the scanner after we return the +- * YY_NULL, it'll still work - another +- * YY_NULL will get returned. +- */ +- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; +- +- yy_act = YY_STATE_EOF(YY_START); +- goto do_action; +- } +- +- else +- { +- if ( ! yy_did_buffer_switch_on_eof ) +- YY_NEW_FILE; +- } +- break; +- } +- +- case EOB_ACT_CONTINUE_SCAN: +- yy_c_buf_p = +- yytext_ptr + yy_amount_of_matched_text; +- +- yy_current_state = yy_get_previous_state(); +- +- yy_cp = yy_c_buf_p; +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- goto yy_match; +- +- case EOB_ACT_LAST_MATCH: +- yy_c_buf_p = +- &yy_current_buffer->yy_ch_buf[yy_n_chars]; +- +- yy_current_state = yy_get_previous_state(); +- +- yy_cp = yy_c_buf_p; +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- goto yy_find_action; +- } +- break; +- } +- +- default: +- YY_FATAL_ERROR( +- "fatal flex scanner internal error--no action found" ); +- } /* end of action switch */ +- } /* end of scanning one token */ +- } /* end of yylex */ +- +- +-/* yy_get_next_buffer - try to read in a new buffer +- * +- * Returns a code representing an action: +- * EOB_ACT_LAST_MATCH - +- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position +- * EOB_ACT_END_OF_FILE - end of file +- */ +- +-static int yy_get_next_buffer() +- { +- register char *dest = yy_current_buffer->yy_ch_buf; +- register char *source = yytext_ptr; +- register int number_to_move, i; +- int ret_val; +- +- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) +- YY_FATAL_ERROR( +- "fatal flex scanner internal error--end of buffer missed" ); +- +- if ( yy_current_buffer->yy_fill_buffer == 0 ) +- { /* Don't try to fill the buffer, so this is an EOF. */ +- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) +- { +- /* We matched a singled characater, the EOB, so +- * treat this as a final EOF. +- */ +- return EOB_ACT_END_OF_FILE; +- } +- +- else +- { +- /* We matched some text prior to the EOB, first +- * process it. +- */ +- return EOB_ACT_LAST_MATCH; +- } +- } +- +- /* Try to read more data. */ +- +- /* First move last chars to start of buffer. */ +- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; +- +- for ( i = 0; i < number_to_move; ++i ) +- *(dest++) = *(source++); +- +- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) +- /* don't do the read, it's not guaranteed to return an EOF, +- * just force an EOF +- */ +- yy_n_chars = 0; +- +- else +- { +- int num_to_read = +- yy_current_buffer->yy_buf_size - number_to_move - 1; +- +- while ( num_to_read <= 0 ) +- { /* Not enough room in the buffer - grow it. */ +-#ifdef YY_USES_REJECT +- YY_FATAL_ERROR( +-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +-#else +- +- /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = yy_current_buffer; +- +- int yy_c_buf_p_offset = +- (int) (yy_c_buf_p - b->yy_ch_buf); +- +- if ( b->yy_is_our_buffer ) +- { +- int new_size = b->yy_buf_size * 2; +- +- if ( new_size <= 0 ) +- b->yy_buf_size += b->yy_buf_size / 8; +- else +- b->yy_buf_size *= 2; +- +- b->yy_ch_buf = (char *) +- /* Include room in for 2 EOB chars. */ +- yy_flex_realloc( (void *) b->yy_ch_buf, +- b->yy_buf_size + 2 ); +- } +- else +- /* Can't grow it, we don't own it. */ +- b->yy_ch_buf = 0; +- +- if ( ! b->yy_ch_buf ) +- YY_FATAL_ERROR( +- "fatal error - scanner input buffer overflow" ); +- +- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; +- +- num_to_read = yy_current_buffer->yy_buf_size - +- number_to_move - 1; +-#endif +- } +- +- if ( num_to_read > YY_READ_BUF_SIZE ) +- num_to_read = YY_READ_BUF_SIZE; +- +- /* Read in more data. */ +- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), +- yy_n_chars, num_to_read ); +- } +- +- if ( yy_n_chars == 0 ) +- { +- if ( number_to_move == YY_MORE_ADJ ) +- { +- ret_val = EOB_ACT_END_OF_FILE; +- yyrestart( yyin ); +- } +- +- else +- { +- ret_val = EOB_ACT_LAST_MATCH; +- yy_current_buffer->yy_buffer_status = +- YY_BUFFER_EOF_PENDING; +- } +- } +- +- else +- ret_val = EOB_ACT_CONTINUE_SCAN; +- +- yy_n_chars += number_to_move; +- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; +- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; +- +- yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; +- +- return ret_val; +- } +- +- +-/* yy_get_previous_state - get the state just before the EOB char was reached */ +- +-static yy_state_type yy_get_previous_state() +- { +- register yy_state_type yy_current_state; +- register char *yy_cp; +- +- yy_current_state = yy_start; +- +- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) +- { +- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 81 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- } +- +- return yy_current_state; +- } +- +- +-/* yy_try_NUL_trans - try to make a transition on the NUL character +- * +- * synopsis +- * next_state = yy_try_NUL_trans( current_state ); +- */ +- +-#ifdef YY_USE_PROTOS +-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +-#else +-static yy_state_type yy_try_NUL_trans( yy_current_state ) +-yy_state_type yy_current_state; +-#endif +- { +- register int yy_is_jam; +- register char *yy_cp = yy_c_buf_p; +- +- register YY_CHAR yy_c = 1; +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 81 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 80); +- +- return yy_is_jam ? 0 : yy_current_state; +- } +- +- +-#ifndef YY_NO_UNPUT +-#ifdef YY_USE_PROTOS +-static void yyunput( int c, register char *yy_bp ) +-#else +-static void yyunput( c, yy_bp ) +-int c; +-register char *yy_bp; +-#endif +- { +- register char *yy_cp = yy_c_buf_p; +- +- /* undo effects of setting up yytext */ +- *yy_cp = yy_hold_char; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- { /* need to shift things up to make room */ +- /* +2 for EOB chars. */ +- register int number_to_move = yy_n_chars + 2; +- register char *dest = &yy_current_buffer->yy_ch_buf[ +- yy_current_buffer->yy_buf_size + 2]; +- register char *source = +- &yy_current_buffer->yy_ch_buf[number_to_move]; +- +- while ( source > yy_current_buffer->yy_ch_buf ) +- *--dest = *--source; +- +- yy_cp += (int) (dest - source); +- yy_bp += (int) (dest - source); +- yy_n_chars = yy_current_buffer->yy_buf_size; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- YY_FATAL_ERROR( "flex scanner push-back overflow" ); +- } +- +- *--yy_cp = (char) c; +- +- +- yytext_ptr = yy_bp; +- yy_hold_char = *yy_cp; +- yy_c_buf_p = yy_cp; +- } +-#endif /* ifndef YY_NO_UNPUT */ +- +- +-#ifdef __cplusplus +-static int yyinput() +-#else +-static int input() +-#endif +- { +- int c; +- +- *yy_c_buf_p = yy_hold_char; +- +- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) +- { +- /* yy_c_buf_p now points to the character we want to return. +- * If this occurs *before* the EOB characters, then it's a +- * valid NUL; if not, then we've hit the end of the buffer. +- */ +- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) +- /* This was really a NUL. */ +- *yy_c_buf_p = '\0'; +- +- else +- { /* need more input */ +- yytext_ptr = yy_c_buf_p; +- ++yy_c_buf_p; +- +- switch ( yy_get_next_buffer() ) +- { +- case EOB_ACT_END_OF_FILE: +- { +- if ( yywrap() ) +- { +- yy_c_buf_p = +- yytext_ptr + YY_MORE_ADJ; +- return EOF; +- } +- +- if ( ! yy_did_buffer_switch_on_eof ) +- YY_NEW_FILE; +-#ifdef __cplusplus +- return yyinput(); +-#else +- return input(); +-#endif +- } +- +- case EOB_ACT_CONTINUE_SCAN: +- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; +- break; +- +- case EOB_ACT_LAST_MATCH: +-#ifdef __cplusplus +- YY_FATAL_ERROR( +- "unexpected last match in yyinput()" ); +-#else +- YY_FATAL_ERROR( +- "unexpected last match in input()" ); +-#endif +- } +- } +- } +- +- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ +- *yy_c_buf_p = '\0'; /* preserve yytext */ +- yy_hold_char = *++yy_c_buf_p; +- +- +- return c; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yyrestart( FILE *input_file ) +-#else +-void yyrestart( input_file ) +-FILE *input_file; +-#endif +- { +- if ( ! yy_current_buffer ) +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); +- +- yy_init_buffer( yy_current_buffer, input_file ); +- yy_load_buffer_state(); +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +-#else +-void yy_switch_to_buffer( new_buffer ) +-YY_BUFFER_STATE new_buffer; +-#endif +- { +- if ( yy_current_buffer == new_buffer ) +- return; +- +- if ( yy_current_buffer ) +- { +- /* Flush out information for old buffer. */ +- *yy_c_buf_p = yy_hold_char; +- yy_current_buffer->yy_buf_pos = yy_c_buf_p; +- yy_current_buffer->yy_n_chars = yy_n_chars; +- } +- +- yy_current_buffer = new_buffer; +- yy_load_buffer_state(); +- +- /* We don't actually know whether we did this switch during +- * EOF (yywrap()) processing, but the only time this flag +- * is looked at is after yywrap() is called, so it's safe +- * to go ahead and always set it. +- */ +- yy_did_buffer_switch_on_eof = 1; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_load_buffer_state( void ) +-#else +-void yy_load_buffer_state() +-#endif +- { +- yy_n_chars = yy_current_buffer->yy_n_chars; +- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; +- yyin = yy_current_buffer->yy_input_file; +- yy_hold_char = *yy_c_buf_p; +- } +- +- +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +-#else +-YY_BUFFER_STATE yy_create_buffer( file, size ) +-FILE *file; +-int size; +-#endif +- { +- YY_BUFFER_STATE b; +- +- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); +- if ( ! b ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +- +- b->yy_buf_size = size; +- +- /* yy_ch_buf has to be 2 characters longer than the size given because +- * we need to put in 2 end-of-buffer characters. +- */ +- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); +- if ( ! b->yy_ch_buf ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +- +- b->yy_is_our_buffer = 1; +- +- yy_init_buffer( b, file ); +- +- return b; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_delete_buffer( YY_BUFFER_STATE b ) +-#else +-void yy_delete_buffer( b ) +-YY_BUFFER_STATE b; +-#endif +- { +- if ( ! b ) +- return; +- +- if ( b == yy_current_buffer ) +- yy_current_buffer = (YY_BUFFER_STATE) 0; +- +- if ( b->yy_is_our_buffer ) +- yy_flex_free( (void *) b->yy_ch_buf ); +- +- yy_flex_free( (void *) b ); +- } +- +- +-#ifndef YY_ALWAYS_INTERACTIVE +-#ifndef YY_NEVER_INTERACTIVE +-extern int isatty YY_PROTO(( int )); +-#endif +-#endif +- +-#ifdef YY_USE_PROTOS +-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +-#else +-void yy_init_buffer( b, file ) +-YY_BUFFER_STATE b; +-FILE *file; +-#endif +- +- +- { +- yy_flush_buffer( b ); +- +- b->yy_input_file = file; +- b->yy_fill_buffer = 1; +- +-#if YY_ALWAYS_INTERACTIVE +- b->yy_is_interactive = 1; +-#else +-#if YY_NEVER_INTERACTIVE +- b->yy_is_interactive = 0; +-#else +- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +-#endif +-#endif +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_flush_buffer( YY_BUFFER_STATE b ) +-#else +-void yy_flush_buffer( b ) +-YY_BUFFER_STATE b; +-#endif +- +- { +- b->yy_n_chars = 0; +- +- /* We always need two end-of-buffer characters. The first causes +- * a transition to the end-of-buffer state. The second causes +- * a jam in that state. +- */ +- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; +- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; +- +- b->yy_buf_pos = &b->yy_ch_buf[0]; +- +- b->yy_at_bol = 1; +- b->yy_buffer_status = YY_BUFFER_NEW; +- +- if ( b == yy_current_buffer ) +- yy_load_buffer_state(); +- } +- +- +-#ifndef YY_NO_SCAN_BUFFER +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +-#else +-YY_BUFFER_STATE yy_scan_buffer( base, size ) +-char *base; +-yy_size_t size; +-#endif +- { +- YY_BUFFER_STATE b; +- +- if ( size < 2 || +- base[size-2] != YY_END_OF_BUFFER_CHAR || +- base[size-1] != YY_END_OF_BUFFER_CHAR ) +- /* They forgot to leave room for the EOB's. */ +- return 0; +- +- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); +- if ( ! b ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); +- +- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ +- b->yy_buf_pos = b->yy_ch_buf = base; +- b->yy_is_our_buffer = 0; +- b->yy_input_file = 0; +- b->yy_n_chars = b->yy_buf_size; +- b->yy_is_interactive = 0; +- b->yy_at_bol = 1; +- b->yy_fill_buffer = 0; +- b->yy_buffer_status = YY_BUFFER_NEW; +- +- yy_switch_to_buffer( b ); +- +- return b; +- } +-#endif +- +- +-#ifndef YY_NO_SCAN_STRING +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_string( yyconst char *str ) +-#else +-YY_BUFFER_STATE yy_scan_string( str ) +-yyconst char *str; +-#endif +- { +- int len; +- for ( len = 0; str[len]; ++len ) +- ; +- +- return yy_scan_bytes( str, len ); +- } +-#endif +- +- +-#ifndef YY_NO_SCAN_BYTES +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +-#else +-YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +-yyconst char *bytes; +-int len; +-#endif +- { +- YY_BUFFER_STATE b; +- char *buf; +- yy_size_t n; +- int i; +- +- /* Get memory for full buffer, including space for trailing EOB's. */ +- n = len + 2; +- buf = (char *) yy_flex_alloc( n ); +- if ( ! buf ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); +- +- for ( i = 0; i < len; ++i ) +- buf[i] = bytes[i]; +- +- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; +- +- b = yy_scan_buffer( buf, n ); +- if ( ! b ) +- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); +- +- /* It's okay to grow etc. this buffer, and we should throw it +- * away when we're done. +- */ +- b->yy_is_our_buffer = 1; +- +- return b; +- } +-#endif +- +- +-#ifndef YY_NO_PUSH_STATE +-#ifdef YY_USE_PROTOS +-static void yy_push_state( int new_state ) +-#else +-static void yy_push_state( new_state ) +-int new_state; +-#endif +- { +- if ( yy_start_stack_ptr >= yy_start_stack_depth ) +- { +- yy_size_t new_size; +- +- yy_start_stack_depth += YY_START_STACK_INCR; +- new_size = yy_start_stack_depth * sizeof( int ); +- +- if ( ! yy_start_stack ) +- yy_start_stack = (int *) yy_flex_alloc( new_size ); +- +- else +- yy_start_stack = (int *) yy_flex_realloc( +- (void *) yy_start_stack, new_size ); +- +- if ( ! yy_start_stack ) +- YY_FATAL_ERROR( +- "out of memory expanding start-condition stack" ); +- } +- +- yy_start_stack[yy_start_stack_ptr++] = YY_START; +- +- BEGIN(new_state); +- } +-#endif +- +- +-#ifndef YY_NO_POP_STATE +-static void yy_pop_state() +- { +- if ( --yy_start_stack_ptr < 0 ) +- YY_FATAL_ERROR( "start-condition stack underflow" ); +- +- BEGIN(yy_start_stack[yy_start_stack_ptr]); +- } +-#endif +- +- +-#ifndef YY_NO_TOP_STATE +-static int yy_top_state() +- { +- return yy_start_stack[yy_start_stack_ptr - 1]; +- } +-#endif +- +-#ifndef YY_EXIT_FAILURE +-#define YY_EXIT_FAILURE 2 +-#endif +- +-#ifdef YY_USE_PROTOS +-static void yy_fatal_error( yyconst char msg[] ) +-#else +-static void yy_fatal_error( msg ) +-char msg[]; +-#endif +- { +- (void) fprintf( stderr, "%s\n", msg ); +- exit( YY_EXIT_FAILURE ); +- } +- +- +- +-/* Redefine yyless() so it works in section 3 code. */ +- +-#undef yyless +-#define yyless(n) \ +- do \ +- { \ +- /* Undo effects of setting up yytext. */ \ +- yytext[yyleng] = yy_hold_char; \ +- yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ +- yy_hold_char = *yy_c_buf_p; \ +- *yy_c_buf_p = '\0'; \ +- yyleng = n; \ +- } \ +- while ( 0 ) +- +- +-/* Internal utility routines. */ +- +-#ifndef yytext_ptr +-#ifdef YY_USE_PROTOS +-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +-#else +-static void yy_flex_strncpy( s1, s2, n ) +-char *s1; +-yyconst char *s2; +-int n; +-#endif +- { +- register int i; +- for ( i = 0; i < n; ++i ) +- s1[i] = s2[i]; +- } +-#endif +- +- +-#ifdef YY_USE_PROTOS +-static void *yy_flex_alloc( yy_size_t size ) +-#else +-static void *yy_flex_alloc( size ) +-yy_size_t size; +-#endif +- { +- return (void *) malloc( size ); +- } +- +-#ifdef YY_USE_PROTOS +-static void *yy_flex_realloc( void *ptr, yy_size_t size ) +-#else +-static void *yy_flex_realloc( ptr, size ) +-void *ptr; +-yy_size_t size; +-#endif +- { +- /* The cast to (char *) in the following accommodates both +- * implementations that use char* generic pointers, and those +- * that use void* generic pointers. It works with the latter +- * because both ANSI C and C++ allow castless assignment from +- * any pointer type to void*, and deal with argument conversions +- * as though doing an assignment. +- */ +- return (void *) realloc( (char *) ptr, size ); +- } +- +-#ifdef YY_USE_PROTOS +-static void yy_flex_free( void *ptr ) +-#else +-static void yy_flex_free( ptr ) +-void *ptr; +-#endif +- { +- free( ptr ); +- } +- +-#if YY_MAIN +-int main() +- { +- yylex(); +- return 0; +- } +-#endif +-#line 52 "/5g/ian/binutils/release/copy/binutils/syslex.l" +diff -rup --new-file binutils-2.9.1/binutils/sysroff.info binutils-2.9.1/binutils/sysroff.info +--- binutils-2.9.1/binutils/sysroff.info Fri May 1 08:49:36 1998 ++++ binutils-2.9.1/binutils/sysroff.info Wed Dec 31 17:00:00 1969 +@@ -1,504 +0,0 @@ +-("cs" 0x0 +- (("size") (1 byte) ("size")) +- +- (("hd") (1 byte) ("hd")) +- (("hs") (1 byte) ("hs")) +- (("un") (1 byte) ("un")) +- (("us") (1 byte) ("us")) +- +- (("sc") (1 byte) ("sc")) +- (("ss") (1 byte) ("ss")) +- (("er") (1 byte) ("er")) +- (("ed") (1 byte) ("ed")) +- +- (("sh") (1 byte) ("sh")) +- (("ob") (1 byte) ("ob")) +- (("rl") (1 byte) ("rl")) +- (("du") (1 byte) ("du")) +- +- (("dps") (1 byte) ("dps")) +- (("dsy") (1 byte) ("dsy")) +- (("dty") (1 byte) ("dty")) +- (("dln") (1 byte) ("dln")) +- +- (("dso") (1 byte) ("dso")) +- (("dus") (1 byte) ("dus")) +- (("dss") (1 byte) ("dss")) +- (("dbt") (1 byte) ("dbt")) +- +- (("dpp") (1 byte) ("dpp")) +- (("dfp") (1 byte) ("dfp")) +- (("den") (1 byte) ("den")) +- (("dds") (1 byte) ("dds")) +- +- (("dar") (1 byte) ("dar")) +- (("dpt") (1 byte) ("dpt")) +- (("dul") (1 byte) ("dul")) +- (("dse") (1 byte) ("dse")) +- +- (("dot") (1 byte) ("dot"))) +- +- +-("hd" 0x04 +- (("module type") (4 bits) ("mt") +- (("MTYPE_ABS_LM" "0") +- ("MTYPE_REL_LM" "1") +- ("MTYPE_OMS_OR_LMS" "2") +- ("MTYPE_UNSPEC" "0xf"))) +- (("spare")(4 bits) ("spare1")) +- (("creation date")( chars 12 bytes)( "cd")) +- (("number of units") (2 bytes) ("nu")) +- (("code") (1 byte) ("code")) +- (("version") (chars 4 bytes) ("ver")) +- (("address update") (1 byte) ("au")) +- (("segment identifier") (1 bit) ("si")) +- (("address field length") (4 bits) ("afl")) +- (("spare")(3 bits) ("spare2")) +- (("space size within segment") (1 byte) ("spcsz")) +- (("segment size") (1 byte) ("segsz")) +- (("segment shift") (1 byte) ("segsh")) +- (("entry point") (1 byte) ("ep")) +- (cond "ptr->ep" +- (cond "ptr->mt != MTYPE_ABS_LM" +- (("unit appearance number") (2 bytes) ("uan")) +- (("section appearance number") (2 bytes) ("sa"))) +- (cond "segmented_p" +- (("segment address") (segsize bytes) ("sad"))) +- (("address") (addrsize bytes) ("address"))) +- (("os name") (chars variable bytes) ("os")) +- (("sys name") (chars variable bytes) ("sys")) +- (("module name") (chars variable bytes) ("mn")) +- (("cpu") (chars variable bytes) ("cpu"))) +- +- +-("hs" 0x05 +- (("neg number") (2 bytes) ("neg"))) +- +- +-("un" 0x06 +- (("format") (2 bits) ("format") +- (("FORMAT_LM" "0") +- ("FORMAT_OM" "1") +- ("FORMAT_OMS_OR_LMS" "2"))) +- (("spare") (6 bits) ("spare1")) +- (("number of sections") (2 bytes) ("nsections")) +- (("number of external refs") (2 bytes) ("nextrefs")) +- (("number of external defs") (2 bytes) ("nextdefs")) +- (("unit name") (chars variable byte) ("name")) +- (("tool name") (chars variable byte) ("tool")) +- (("creation date") (chars 12 bytes) ("tcd")) +- (("linker name") (chars variable byte) ("linker")) +- (("creation date") (chars 12 bytes) ("lcd"))) +- +- +-("us" 0x07 +- (("negotiation number") (2 bytes) ("neg"))) +- +- +-("sc" 0x08 +- (("format") (2 bits) ("format")) +- (("spare") (6 bits) ("spare")) +- (("segment address") (segsize bytes) ("segadd")) +- (("address") (addrsize bytes) ("addr")) +- (("length") (addrsize bytes) ("length")) +- (("alignment") (addrsize bytes) ("align")) +- (("contents") (4 bits) ("contents") +- (("CONTENTS_CODE" "0") +- ("CONTENTS_DATA" "1") +- ("CONTENTS_STACK" "2") +- ("CONTENTS_DUMMY" "3") +- ("CONTENTS_SPECIAL" "4") +- ("CONTENTS_NONSPEC" "0xf"))) +- (("concat") (4 bits) ("concat") +- (("CONCAT_SIMPLE" "0") +- ("CONCAT_SHAREDC" "1") +- ("CONCAT_DUMMY" "2") +- ("CONCAT_GROUP" "3") +- ("CONCAT_SHARED" "4") +- ("CONCAT_PRIVATE" "5") +- ("CONCAT_UNSPEC" "0xf"))) +- (("read") (2 bits) ("read")) +- (("write") (2 bits) ("write")) +- (("exec") (2 bits) ("exec")) +- (("initialized") (2 bits) ("init")) +- (("mode") (2 bits) ("mode")) +- (("spare") (6 bits) ("spare1")) +- (("name") (chars variable byte) ("name"))) +- +- +-("ss" 0x09 +- (("neg number") (2 bytes) ("neg"))) +- +- +-("er" 0x0c +- (("symbol type") (2 bits) ("type") +- (("ER_ENTRY" "0") +- ("ER_DATA" "1") +- ("ER_NOTDEF" "2") +- ("ER_NOTSPEC" "3"))) +- (("spare") (6 bits) ("spare")) +- (("symbol name") (chars variable byte) ("name"))) +- +- +-("ed" 0x14 +- (("section appearance number") (2 bytes) ("section")) +- (("symbol type") (3 bits) ("type") +- (("ED_TYPE_ENTRY" "0") +- ("ED_TYPE_DATA" "1") +- ("ED_TYPE_CONST" "2") +- ("ED_TYPE_NOTSPEC" "7"))) +- (("spare") (5 bits) ("spare")) +- (cond "ptr->type==ED_TYPE_ENTRY || ptr->type==ED_TYPE_DATA" +- (("symbol address") (addrsize bytes) ("address"))) +- (cond "ptr->type==ED_TYPE_CONST" +- (("constant value") (addrsize bytes) ("constant"))) +- (("symbol name") (chars variable byte) ("name"))) +- +- +-("sh" 0x1a +- (("unit appearance number") (2 bytes) ("unit")) +- (("section appearance number") (2 bytes) ("section"))) +- +- +-("ob" 0x1c +- (("starting address flag") (1 bit) ("saf")) +- (("compression flag") (1 bit) ("cpf")) +- (("spare") (6 bits) ("spare")) +- (cond "ptr->saf" +- ( ("starting address") (addrsize bytes) ("address"))) +- (cond "ptr->cpf" +- (("comp reps") (addrsize bytes) ("compreps"))) +- (("data") (barray counted byte) ("data"))) +- +- +-("rl" 0x20 +- (("boundary of relocateable area") (4 bits) ("boundary")) +- (("address polarity") (1 bit) ("apol")) +- (("segment number") (1 bit) ("segment")) +- (("sign of relocation") (1 bit) ("sign")) +- (("check range") (1 bit) ("check")) +- (("reloc address") (addrsize bytes) ("addr")) +- +- (("bit loc") (1 byte) ("bitloc")) +- (("field length") (1 byte) ("flen")) +- (("bcount") (1 byte) ("bcount")) +- (("operator") (1 byte) ("op") +- (("OP_RELOC_ADDR" "1") +- ("OP_SEC_REF" "0") +- ("OP_EXT_REF" "2"))) +- (cond "ptr->op == OP_EXT_REF" +- (("symbol number") (2 bytes) ("symn")) ) +- +- (cond "ptr->op == OP_SEC_REF" +- (("section number") (2 bytes) ("secn")) +- (("const opcode") (1 byte) ("copcode_is_3")) +- (("addend length") (1 byte) ("alength_is_4")) +- (("addend") (4 byte) ("addend")) +- (("plus opcode") (1 byte) ("aopcode_is_0x20"))) +- +- (cond "ptr->op == OP_RELOC_ADDR" +- (("dunno") (2 bytes) ("dunno"))) +- +- (("end") (1 byte) ("end"))) +- +- +-("du" 0x30 +- (("format") (2 bits) ("format")) +- (("optimized") (1 bit) ("optimized")) +- (("stackfrmt") (2 bits) ("stackfrmt")) +- (("spare") (3 bits) ("spare")) +- (("unit number") (2 bytes) ("unit")) +- (("sections") (2 bytes) ("sections")) +- (repeat "ptr->sections" +- (("section appearance number") (2 bytes) ("san")) +- (("address") (addrsize bytes) ("address")) +- (("section length") (addrsize bytes) ("length"))) +- (("tool name") (chars variable byte) ("tool")) +- (("creation date") (chars 12 bytes) ("date"))) +- +- +-("dsy" 0x34 +- (("symbol type") (7 bits) ("type") +- (("STYPE_VAR" "0") +- ("STYPE_LAB" "1") +- ("STYPE_PROC" "2") +- ("STYPE_FUNC" "3") +- ("STYPE_TYPE" "4") +- ("STYPE_CONST" "5") +- ("STYPE_ENTRY" "6") +- ("STYPE_MEMBER" "7") +- ("STYPE_ENUM" "8") +- ("STYPE_TAG" "9") +- ("STYPE_PACKAGE" "10") +- ("STYPE_GENERIC" "11") +- ("STYPE_TASK" "12") +- ("STYPE_EXCEPTION" "13") +- ("STYPE_PARAMETER" "14") +- ("STYPE_EQUATE" "15") +- ("STYPE_UNSPEC" "0x7f"))) +- (("assignment info") (1 bit) ("assign")) +- (("symbol id") (2 bytes) ("snumber")) +- (("symbol name") (chars variable bytes) ("sname")) +- (("nesting level") (2 bytes) ("nesting")) +- (cond "ptr->assign" +- (("assignment type") (1 byte) ("ainfo") +- (("AINFO_REG" "1") +- ("AINFO_STATIC_EXT_DEF" "2") +- ("AINFO_STATIC_EXT_REF" "3") +- ("AINFO_STATIC_INT" "4") +- ("AINFO_STATIC_COM" "5") +- ("AINFO_AUTO" "6") +- ("AINFO_CONST" "7") +- ("AINFO_UNSPEC" "0xff"))) +- (("data length") (addrsize bytes) ("dlength")) +- (cond "ptr->ainfo == AINFO_STATIC_EXT_DEF +- || ptr->ainfo == AINFO_STATIC_INT +- || ptr->ainfo == AINFO_STATIC_COM" +- (("section number") (2 bytes) ("section"))) +- (cond "ptr->ainfo == AINFO_STATIC_EXT_DEF +- || ptr->ainfo == AINFO_STATIC_INT +- || ptr->ainfo == AINFO_STATIC_COM +- || ptr->ainfo == AINFO_AUTO" +- (("address") (addrsize bytes) ("address"))) +- (cond "ptr->ainfo == AINFO_REG" +- (("register name") (chars variable bytes) ("reg"))) +- (cond "ptr->ainfo == AINFO_STATIC_EXT_DEF +- || ptr->ainfo == AINFO_STATIC_EXT_REF" +- (("external name") (chars variable bytes) ("ename"))) +- (cond "ptr->ainfo == AINFO_CONST" +- (("constant") (chars variable bytes) ("constant")))) +- (cond "ptr->type == STYPE_MEMBER" +- (("assignment unit") (1 bit) ("bitunit")) +- (("spare") (7 bits) ("spare2")) +- (("field length") (addrsize bytes) ("field_len")) +- (("field offset") (addrsize bytes) ("field_off")) +- (cond "ptr->bitunit" +- (("bit offset") (addrsize bytes) ("field_bitoff")))) +- (cond "ptr->type== STYPE_ENUM" +- (("value length") (1 byte) ("evallen")) +- (("value") (4 bytes) ("evalue"))) +- (cond "ptr->type == STYPE_CONST" +- (("value") (chars variable bytes) ("cvalue"))) +- (cond "ptr->type == STYPE_EQUATE" +- (("value length") (1 byte) ("qvallen")) +- (("value") (4 bytes) ("qvalue")) +- (("basic type") (1 byte) ("btype")) +- (("size information") (addrsize bytes) ("sizeinfo")) +- (("sign") (2 bits) ("sign")) +- (("floating point type") (6 bits) ("flt_type"))) +- (("source file number") (2 bytes) ("sfn")) +- (("source line number") (2 bytes) ("sln")) +- (("negotiation number") (2 bytes) ("neg")) +- (cond "ptr->type == STYPE_TAG" +- (("magic") (1 byte) ("magic")))) +- +- +- +-("dul" 0x52 +- (("max declaration type flag") (1 bit) ("max_variable")) +- (("max spare") (7 bits) ("maxspare")) +- (cond "ptr->max_variable == 0" +- (("maximum") (addrsize bytes) ("max")) +- (("max mode") (chars variable bytes) ("maxmode"))) +- +- (("min declaration type flag") (1 bit) ("min_variable")) +- (("min spare") (7 bits) ("minspare")) +- (cond "ptr->min_variable == 0" +- (("minimum") (addrsize bytes) ("min")) +- (("min mode") (chars variable bytes) ("minmode")))) +- +- +-("dty" 0x36 +- (("end flag") (1 bit) ("end")) +- (("spare") (7 bits) ("spare")) +- (cond "!ptr->end" +- (("negotiation") (2 bytes) ("neg")))) +- +- +-("dbt" 0x44 +- (("basic type") (1 byte) ("btype") +- (("BTYPE_VOID" "0") +- ("BTYPE_UNDEF" "1") +- ("BTYPE_CHAR" "2") +- ("BTYPE_INT" "3") +- ("BTYPE_FLOAT" "4") +- ("BTYPE_BIT" "5") +- ("BTYPE_STRING" "6") +- ("BTYPE_DECIMAL" "7") +- ("BTYPE_ENUM" "8") +- ("BTYPE_STRUCT" "9") +- ("BTYPE_TYPE" "10") +- ("BTYPE_TAG" "11") +- ("BTYPE_UNSPEC" "0xff"))) +- (("size info") (addrsize bytes) ("bitsize")) +- (("sign") (2 bits) ("sign") +- (("SIGN_SIGNED" "0") +- ("SIGN_UNSIGNED" "1") +- ("SIGN_UNSPEC" "3"))) +- (("floating point type") (6 bits) ("fptype") +- (("FPTYPE_SINGLE" "0") +- ("FPTYPE_DOUBLE" "1") +- ("FPTYPE_EXTENDED" "2") +- ("FPTYPE_NOTSPEC" "0x3f"))) +- (cond "ptr->btype==BTYPE_TAG || ptr->btype == BTYPE_TYPE" +- (("symbol id") (2 bytes) ("sid"))) +- (("negotiation") (2 bytes) ("neg"))) +- +-("dar" 0x4e +- (("element length" ) (addrsize bytes) ("length")) +- (("dims") (1 byte) ("dims")) +- (repeat "ptr->dims" +- (("variable flag") (1 bit) ("variable") +- (("VARIABLE_FIXED" "0") +- ("VARIABLE_VARIABLE" "1"))) +- +- (("subscript type") (1 bit) ("subtype") +- (("SUB_INTEGER" "0") +- ("SUB_TYPE" "1"))) +- +- (("spare") (6 bits) ("spare")) +- +- (cond "ptr->subtype[n] == SUB_TYPE" +- (("sub symbol id") (2 bytes) ("sid"))) +- +- (cond "ptr->subtype[n] == SUB_INTEGER" +- (("max declaration type flag") (1 bit) ("max_variable")) +- (("max spare") (7 bits) ("maxspare")) +- ;; FIXME: next field should be conditional on max_variable, +- (("maximum") (addrsize bytes) ("max")) +- +- (("min declaration type flag") (1 bit) ("min_variable")) +- (("min spare") (7 bits) ("minspare")) +- ;; FIXME: next field should be conditional on min_variable +- (("minimum") (addrsize bytes) ("min")))) +- (("negotiation") (2 bytes) ("neg"))) +- +- +-("dso" 0x3a +- (("function name") (2 bytes) ("sid")) +- (("sp update count") (4 bytes) ("spupdates")) +- (repeat "ptr->spupdates" +- (("update address") (addrsize bytes) ("address")) +- (("offset") (addrsize bytes) ("offset")))) +- +-("dln" 0x38 +- (("number of lines") (2 bytes) ("nln")) +- (repeat "ptr->nln" +- (("source file number") (2 bytes) ("sfn")) +- (("source line number") (2 bytes) ("sln")) +- (("section number") (2 bytes) ("section")) +- (("from address") (addrsize bytes) ("from_address")) +- (("to address") (addrsize bytes) ("to_address")) +- (("call count") (2 bytes) ("cc")) +- ) +- (("neg") (2 bytes) ("neg"))) +- +-("dpp" 0x46 +- (("start/end") (1 bit) ("end")) +- (("spare") (7 bits) ("spare")) +- (cond "!ptr->end" +- (("params") (1 byte) ("params")) +- (("neg number") (2 bytes) ("neg")))) +- +-("den" 0x4a +- (("start/end") (1 bit) ("end")) +- (("spare") (7 bits) ("spare")) +- (cond "!ptr->end" +- (("neg number") (2 bytes) ("neg")))) +- +-("dfp" 0x48 +- (("start/end flag") (1 bit) ("end")) +- (("spare") (7 bits) ("spare")) +- (cond "!ptr->end" +- (("number of parameters") (1 byte) ("nparams")) +- (("neg number") (2 bytes) ("neg")))) +- +-("dds" 0x4c +- (("start/end") (1 bit) ("end")) +- (("spare") (7 bits) ("spare")) +- (cond "!ptr->end" +- (("neg number") (2 bytes) ("neg")))) +- +-("dpt" 0x50 +- (("neg number") (2 bytes) ("neg")) +- (("dunno") (1 byte) ("dunno"))) +- +-("dse" 0x54 +- (("neg number") (2 bytes) ("neg")) +- (("dunno") (1 byte) ("dunno"))) +- +-("dot" 0x56 +- (("unknown") (1 byte) ("unknown"))) +-; FIXME: unknown field should be repeated symbol number? +- +- +-("dss" 0x42 +- (("type") (1 byte) ("type")) +- (("external/internal") (1 bit) ("internal")) +- (("spare") (7 bits) ("spare")) +- (cond "!ptr->internal" +- ( ("package name") (chars variable byte) ("package"))) +- (cond "ptr->internal" +- (("symbol id") (2 bytes) ("id"))) +- (("record type") (2 bytes) ("record")) +- (("rules") (chars variable byte) ("rules")) +- (("number of symbols") (2 bytes) ("nsymbols")) +- (("unknown" ) (2 bytes) ("fixme"))) +- +-("pss" 0x40 +- (("negotiation number") (2 bytes) ("efn")) +- (("number of source files") (2 bytes) ("ns")) +- (repeat "ptr->ns" +- (("directory reference bit") (1 bit) ("drb")) +- (("spare") (7 bits) ("spare")) +- (("completed file name") (chars variable byte) ("fname")) +- (cond "ptr->drb[n]" +- (("directory apperance number") (2 bytes) ("dan")))) +- +- (("number of directories") (2 bytes) ("ndir")) +- (repeat "ptr->ndir" +- (("directory name") (chars variable bytes) ("dname")))) +- +- +-; FIXME: the tr block has no contents. sysinfo, etc. aren't prepared +-; to deal with that. +-; ("tr" 0x7f) +- +- +-("dus" 0x40 +- (("negotiation number") (2 bytes) ("efn")) +- (("number of source files") (2 bytes) ("ns")) +- (repeat "ptr->ns" +- (("directory reference bit") (1 bit) ("drb")) +- (("spare") (7 bits) ("spare")) +- (("completed file name") (chars variable byte) ("fname")) +- (cond "ptr->drb[n]" +- (("directory apperance number") (2 bytes) ("dan")))) +- (("number of directories") (2 bytes) ("ndir")) +- (repeat "ptr->ndir" +- (("directory name") (chars variable bytes) ("dname")))) +- +- +-("dps" 0x32 +- (("start/end flag") (1 bit) ("end")) +- (("block type") (7 bits) ("type") +- (("BLOCK_TYPE_COMPUNIT" "0") +- ("BLOCK_TYPE_PROCEDURE" "2") +- ("BLOCK_TYPE_FUNCTION" "3") +- ("BLOCK_TYPE_BLOCK" "4") +- ("BLOCK_TYPE_BASIC" "9"))) +- (cond "!ptr->end" +- (("optimization") (1 byte) ("opt")) +- (("section number") (2 bytes) ("san")) +- (("address") (addrsize bytes) ("address")) +- (("block size") (addrsize bytes) ("block_size")) +- (("nesting") (1 byte) ("nesting")) +- (cond "ptr->type == BLOCK_TYPE_PROCEDURE +- || ptr->type == BLOCK_TYPE_FUNCTION" +- (("return address") (1 bit) ("retaddr")) +- (("interrupt function flag") (1 bit) ("intrflag")) +- (("stack update flag") (1 bit) ("stackflag")) +- (("intra page JMP") (1 bit) ("intrpagejmp")) +- (("spare") (4 bits) ("spare"))) +- (("neg number") (2 bytes) ("neg")))) +- +diff -rup --new-file binutils-2.9.1/config/mh-amigaos binutils-2.9.1/config/mh-amigaos +--- binutils-2.9.1/config/mh-amigaos Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/config/mh-amigaos Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,13 @@ ++# Host makefile fragment for Commodore Amiga running AmigaOS. ++ ++# There is no standard system compiler. Assume using GNU C. ++CC = gcc ++CFLAGS = -g -O2 -mstackextend ++ ++# We have both types of links under AmigaOS with GNU ++# utils, however the links need to be made in canonical ++# AmigaOS format (foo:bar/bell/file) rather than UNIX ++# format (/foo/bar/bell/file). When this is fixed, then ++# these can go away. ++SYMLINK = cp ++HARDLINK = cp +diff -rup --new-file binutils-2.9.1/config/mh-cxux binutils-2.9.1/config/mh-cxux +--- binutils-2.9.1/config/mh-cxux Fri May 1 08:48:42 1998 ++++ binutils-2.9.1/config/mh-cxux Sun Aug 23 00:00:00 1998 +@@ -8,7 +8,7 @@ RANLIB = true + CXXFLAGS=-O + + # The l flag generates a warning from the SVR4 archiver, remove it. +-AR_FLAGS = cq ++ARFLAGS = cq + + # Under CX/UX, we want to tell the compiler to use ANSI mode. + CC=cc -Xa +diff -rup --new-file binutils-2.9.1/config/mh-ncr3000 binutils-2.9.1/config/mh-ncr3000 +--- binutils-2.9.1/config/mh-ncr3000 Fri May 1 08:48:43 1998 ++++ binutils-2.9.1/config/mh-ncr3000 Sun Aug 23 00:00:00 1998 +@@ -14,4 +14,4 @@ SYSV = -DSYSV -DSVR4 + RANLIB = true + + # The l flag generates a warning from the SVR4 archiver, remove it. +-AR_FLAGS = cq ++ARFLAGS = cq +diff -rup --new-file binutils-2.9.1/config/mh-sysv4 binutils-2.9.1/config/mh-sysv4 +--- binutils-2.9.1/config/mh-sysv4 Fri May 1 08:48:44 1998 ++++ binutils-2.9.1/config/mh-sysv4 Sun Aug 23 00:00:00 1998 +@@ -6,6 +6,6 @@ RANLIB = true + CXXFLAGS=-O + + # The l flag generates a warning from the SVR4 archiver, remove it. +-AR_FLAGS = cr ++ARFLAGS = cr + + X11_EXTRA_LIBS = -lnsl +diff -rup --new-file binutils-2.9.1/config/mpw/g-mpw-make.sed binutils-2.9.1/config/mpw/g-mpw-make.sed +--- binutils-2.9.1/config/mpw/g-mpw-make.sed Fri May 1 08:48:45 1998 ++++ binutils-2.9.1/config/mpw/g-mpw-make.sed Sun Aug 23 00:00:00 1998 +@@ -52,7 +52,7 @@ + /CC/s/^CC *=/#CC =/ + /CFLAGS/s/^CFLAGS *=/#CFLAGS =/ + /AR/s/^AR *=/#AR =/ +-/AR_FLAGS/s/^AR_FLAGS *=/#AR_FLAGS =/ ++/ARFLAGS/s/^ARFLAGS *=/#ARFLAGS =/ + /RANLIB/s/^RANLIB *=/#RANLIB =/ + /CC_LD/s/^CC_LD *=/#CC_LD =/ + /LDFLAGS/s/^LDFLAGS *=/#LDFLAGS =/ +diff -rup --new-file binutils-2.9.1/config/mpw-mh-mpw binutils-2.9.1/config/mpw-mh-mpw +--- binutils-2.9.1/config/mpw-mh-mpw Fri May 1 08:48:44 1998 ++++ binutils-2.9.1/config/mpw-mh-mpw Sun Aug 23 00:00:00 1998 +@@ -55,7 +55,7 @@ AR_MWLINKPPC = MWLinkPPC -xm library + + AR_AR = ar + +-AR_FLAGS = -o ++ARFLAGS = -o + + RANLIB_NULL = null-command + +diff -rup --new-file binutils-2.9.1/config.guess binutils-2.9.1/config.guess +--- binutils-2.9.1/config.guess Fri May 1 08:48:46 1998 ++++ binutils-2.9.1/config.guess Sun Aug 23 00:00:00 1998 +@@ -112,6 +112,9 @@ EOF + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; ++ *:[Aa]miga[Oo][Ss]:*:*) ++ echo ${UNAME_MACHINE}-unknown-amigaos ++ exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; +@@ -795,6 +798,9 @@ EOF + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos ++ exit 0 ;; ++ BePC:BeOS:*:*) # BeOS running on Intel PC compatible. ++ echo i586-pc-beos + exit 0 ;; + esac + +diff -rup --new-file binutils-2.9.1/config.sub binutils-2.9.1/config.sub +--- binutils-2.9.1/config.sub Fri May 1 08:48:46 1998 ++++ binutils-2.9.1/config.sub Sun Aug 23 00:00:00 1998 +@@ -287,11 +287,11 @@ case $basic_machine in + os=-sysv + ;; + amiga | amiga-*) +- basic_machine=m68k-cbm ++ basic_machine=m68k-unknown + ;; +- amigados) +- basic_machine=m68k-cbm +- os=-amigados ++ amigaos) ++ basic_machine=m68k-unknown ++ os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm +@@ -925,7 +925,7 @@ case $os in + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ +- | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ ++ | -amigaos* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ +@@ -1098,7 +1098,7 @@ case $basic_machine in + os=-sysv + ;; + *-cbm) +- os=-amigados ++ os=-amigaos + ;; + *-dg) + os=-dgux +@@ -1180,9 +1180,6 @@ case $basic_machine in + ;; + -aix*) + vendor=ibm +- ;; +- -beos*) # CYGNUS LOCAL +- vendor=be + ;; + -hpux*) + vendor=hp +diff -rup --new-file binutils-2.9.1/configure binutils-2.9.1/configure +--- binutils-2.9.1/configure Fri May 1 08:48:46 1998 ++++ binutils-2.9.1/configure Sun Aug 23 00:00:00 1998 +@@ -34,8 +34,8 @@ + export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0 $argv; kill $$) + + remove=rm +-hard_link=ln +-symbolic_link='ln -s' ++hard_link=cp ++symbolic_link=cp + + #for Test + #remove="echo rm" +@@ -64,7 +64,10 @@ norecursion= + other_options= + package_makefile_frag= + package_makefile_rules_frag= +-prefix=/usr/local ++# This is a hack so we don't have to remember to always configure using ++# the "--prefix=/gg" option. Personally I feel this should be settable ++# in a config file. -fnf ++prefix=/gg + progname= + program_prefix= + program_prefixoption= +@@ -144,9 +147,12 @@ NO_EDIT="This file was generated automat + ## path. Since PATH might include "." we also add `pwd` to the end of PATH. + ## + +-progname=$0 ++# For some reason, the value of $0 in AmigaOS pdksh ends up with a ++# trailing '/' that needs to be stripped. ++progname=`echo $0 | sed 's:/$::'` + # if PWD already has a value, it is probably wrong. +-if [ -n "$PWD" ]; then PWD=`pwd`; fi ++# The AmigaOS pksh can't change the value of PWD, it's readonly. ++#if [ -n "$PWD" ]; then PWD=`pwd`; fi + + case "${progname}" in + /*) ;; +@@ -964,18 +970,76 @@ else + fi + done + IFS="$save_ifs" +- CC=${CC-cc} ++ fi ++ # If CC is still not set, try to get bcc. ++ if [ -z "${CC}" ]; then ++ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" ++ for dir in $PATH; do ++ test -z "$dir" && dir=. ++ if test -f $dir/bcc; then ++ CC="bcc" ++ echo 'void f(){}' > conftest.c ++ if test -z "`${CC} -g -c conftest.c 2>&1`"; then ++ CFLAGS=${CFLAGS-"-g -O2"} ++ CXXFLAGS=${CFLAGS-"-g -O2"} ++ else ++ CFLAGS=${CFLAGS-"-O2"} ++ CXXFLAGS=${CFLAGS-"-O2"} ++ fi ++ rm -f conftest* ++ break ++ fi ++ done ++ IFS="$save_ifs" ++ fi ++ # If CC is still not set, try to get mwcc. ++ if [ -z "${CC}" ]; then ++ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" ++ for dir in $PATH; do ++ test -z "$dir" && dir=. ++ if test -f $dir/mwcc; then ++ CC="mwcc -I- -I. -I${prefix}/include -L${prefix}/lib -opt global -nodup" ++ echo 'void f(){}' > conftest.c ++ if test -z "`${CC} -g -c conftest.c 2>&1`"; then ++ CFLAGS=${CFLAGS-"-g -O2"} ++ CXXFLAGS=${CFLAGS-"-g -O2"} ++ else ++ CFLAGS=${CFLAGS-"-O2"} ++ CXXFLAGS=${CFLAGS-"-O2"} ++ fi ++ rm -f conftest* ++ break ++ fi ++ done ++ IFS="$save_ifs" + fi + ++ CC=${CC-gcc} + CXX=${CXX-"c++"} + CFLAGS=${CFLAGS-"-g"} + CXXFLAGS=${CXXFLAGS-"-g -O2"} + fi + ++case "$CC" in ++ *mwcc* | *bcc* ) ++ AR="mwld" ++ ARFLAGS="-xml -o" ++ RANLIB="true" ++ ;; ++ *) ++ AR=${AR-"ar"} ++ ARFLAGS=${ARFLAGS-"cr"} ++ RANLIB=${RANLIB-"ranlib"} ++ ;; ++esac ++ + export CC + export CXX + export CFLAGS + export CXXFLAGS ++export AR ++export ARFLAGS ++export RANLIB + + # FIXME: This should be in configure.in, not configure + case "$host" in +@@ -983,6 +1047,8 @@ case "$host" in + enable_gdbtk=no ;; + *msdosdjgpp*) + enable_gdbtk=no ;; ++ *beos*) ++ enable_gdbtk=no ;; + esac + + # FIXME: This should be in configure.in, not configure +@@ -1305,6 +1371,9 @@ EOF + s%^CXXFLAGS[ ]*=.*$%CXXFLAGS = ${CXXFLAGS}% + }" \ + -e "s|^SHELL[ ]*=.*$|SHELL = ${config_shell}|" \ ++ -e "s:^AR[ ]*=.*$:AR = ${AR}:" \ ++ -e "s:^ARFLAGS[ ]*=.*$:ARFLAGS = ${ARFLAGS}:" \ ++ -e "s:^RANLIB[ ]*=.*$:RANLIB = ${RANLIB}:" \ + -e "s|^srcdir[ ]*=.*$|srcdir = ${makesrcdir}|" \ + -e "s/ //" \ + -e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \ +@@ -1468,7 +1537,9 @@ if [ -z "${norecursion}" -a -n "${config + + ### The recursion line is here. + if [ ! -z "${recprog}" ] ; then +- if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \ ++ echo ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} ${prefixoption} ${tmpdiroption} ${exec_prefixoption} ${srcdiroption} ${program_prefixoption} ${program_suffixoption} \ ++ ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${removing} ${other_options} ${redirect} ++ if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \ + ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \ + ${srcdiroption} ${diroptions} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then + true +diff -rup --new-file binutils-2.9.1/configure.in binutils-2.9.1/configure.in +--- binutils-2.9.1/configure.in Fri May 1 09:00:42 1998 ++++ binutils-2.9.1/configure.in Sun Aug 23 00:00:00 1998 +@@ -179,6 +179,9 @@ case "${host}" in + i[3456]86-*-msdosdjgpp*) + host_makefile_frag="${host_makefile_frag} config/mh-go32" + ;; ++ *-*-amigaos*) ++ host_makefile_frag="${host_makefile_frag} config/mh-amigaos" ++ ;; + *-cygwin32*) + host_makefile_frag="${host_makefile_frag} config/mh-cygwin32" + ;; +diff -rup --new-file binutils-2.9.1/etc/Makefile.in binutils-2.9.1/etc/Makefile.in +--- binutils-2.9.1/etc/Makefile.in Fri May 1 08:48:45 1998 ++++ binutils-2.9.1/etc/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -24,6 +24,7 @@ man7dir = $(mandir)/man7 + man8dir = $(mandir)/man8 + man9dir = $(mandir)/man9 + infodir = @infodir@ ++guidedir = $(prefix)/guide + + SHELL = /bin/sh + +@@ -41,11 +42,12 @@ TEXIDIR = $(srcdir)/../texinfo + ### + + INFOFILES = standards.info ++GUIDEFILES = standards.guide + DVIFILES = standards.dvi + +-all: ++all: info guide + +-install: ++install: install-info install-guide + + uninstall: + +@@ -57,6 +59,14 @@ install-info: info + $(INSTALL_DATA) $$i $(infodir)/$$i; \ + done + ++guide: $(GUIDEFILES) ++ ++install-guide: guide ++ if test ! -f standards.guide; then cd $(srcdir); fi; \ ++ for i in standards.guide; do \ ++ $(INSTALL_DATA) $$i $(guidedir)/$$i; \ ++ done ++ + dvi: $(DVIFILES) + + standards.info: $(srcdir)/standards.texi $(srcdir)/make-stds.texi +@@ -65,10 +75,14 @@ standards.info: $(srcdir)/standards.texi + standards.dvi: $(srcdir)/standards.texi + TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/standards.texi + ++standards.guide: $(srcdir)/standards.texi ++ $(MAKEINFO) -I$(srcdir) --amiga --no-split -o standards.guide $(srcdir)/standards.texi ++ + + clean: + rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log + rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs ++ rm -f *.guide + + mostlyclean: clean + +diff -rup --new-file binutils-2.9.1/etc/configure binutils-2.9.1/etc/configure +--- binutils-2.9.1/etc/configure Fri May 1 08:48:45 1998 ++++ binutils-2.9.1/etc/configure Thu Jan 21 19:39:43 1999 +@@ -1,7 +1,7 @@ + #! /bin/sh + + # Guess values for system-dependent variables and create Makefiles. +-# Generated automatically using autoconf version 2.12.1 ++# Generated automatically using autoconf version 2.13 + # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation +@@ -44,6 +44,10 @@ libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' ++guidedir='${prefix}/guide' ++htmldir='${prefix}/html' ++psdir='${prefix}/ps' ++dvidir='${prefix}/dvi' + mandir='${prefix}/man' + + # Initialize some other variables. +@@ -161,6 +165,10 @@ Directory and file names: + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] ++ --guidedir=DIR Amigaguide documentation in DIR [PREFIX/guide] ++ --htmldir=DIR HTML documentation in DIR [PREFIX/html] ++ --psdir=DIR postscript documentation in DIR [PREFIX/ps] ++ --dvidir=DIR TeX dvi documentation in DIR [PREFIX/dvi] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names +@@ -203,6 +211,22 @@ EOF + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + ++ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui) ++ ac_prev=guidedir ;; ++ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+ guidedir="$ac_optarg" ;; ++ ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+ htmldir="$ac_optarg" ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+ psdir="$ac_optarg" ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+ dvidir="$ac_optarg" ;; ++ + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) +@@ -333,7 +357,7 @@ EOF + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) +- echo "configure generated by autoconf version 2.12.1" ++ echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) +@@ -503,9 +527,11 @@ ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + ++ac_exeext= ++ac_objext=o + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then +@@ -546,21 +572,22 @@ ac_configure=$ac_aux_dir/configure # Thi + # SunOS /usr/etc/install + # IRIX /sbin/install + # AIX /bin/install ++# AmigaOS /c/install + # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:555: checking for a BSD compatible install" >&5 ++echo "configure:582: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in +- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root +@@ -599,6 +626,8 @@ echo "$ac_t""$INSTALL" 1>&6 + # It thinks the first close brace ends the variable substitution. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +@@ -625,7 +654,7 @@ EOF + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. + (set) 2>&1 | +- case `(ac_space=' '; set) 2>&1 | grep ac_space` in ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). +@@ -665,6 +694,7 @@ fi + + trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + ++ + # Transform confdefs.h into DEFS. + # Protect against shell expansion while executing Makefile rules. + # Protect against Makefile macro expansion. +@@ -683,7 +713,9 @@ rm -f conftest.defs + : ${CONFIG_STATUS=./config.status} + + echo creating $CONFIG_STATUS +-rm -f $CONFIG_STATUS ++# Some systems, like AmigaOS, won't allow you to remove a script that is ++# being executed, so just move it out of the way instead. ++if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi + cat > $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + exit 0 + EOF + chmod +x $CONFIG_STATUS ++rm -f CONFIG.STATUS.old + rm -fr confdefs* $ac_clean_files + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +diff -rup --new-file binutils-2.9.1/etc/standards.info binutils-2.9.1/etc/standards.info +--- binutils-2.9.1/etc/standards.info Fri May 1 09:00:17 1998 ++++ binutils-2.9.1/etc/standards.info Wed Dec 31 17:00:00 1969 +@@ -1,3832 +0,0 @@ +-This is Info file standards.info, produced by Makeinfo version 1.68 +-from the input file ./standards.texi. +- +-START-INFO-DIR-ENTRY +-* Standards: (standards). GNU coding standards. +-END-INFO-DIR-ENTRY +- +- GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996, +-1997, 1998 Free Software Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions, except that this permission notice may be stated in a +-translation approved by the Free Software Foundation. +- +- +-File: standards.info, Node: Top, Next: Preface, Prev: (dir), Up: (dir) +- +-Version +-******* +- +- Last updated March 13, 1998. +- +-* Menu: +- +-* Preface:: About the GNU Coding Standards +-* Intellectual Property:: Keeping Free Software Free +-* Design Advice:: General Program Design +-* Program Behavior:: Program Behavior for All Programs +-* Writing C:: Making The Best Use of C +-* Documentation:: Documenting Programs +-* Managing Releases:: The Release Process +- +- +-File: standards.info, Node: Preface, Next: Intellectual Property, Prev: Top, Up: Top +- +-About the GNU Coding Standards +-****************************** +- +- The GNU Coding Standards were written by Richard Stallman and other +-GNU Project volunteers. Their purpose is to make the GNU system clean, +-consistent, and easy to install. This document can also be read as a +-guide to writing portable, robust and reliable programs. It focuses on +-programs written in C, but many of the rules and principles are useful +-even if you write in another programming language. The rules often +-state reasons for writing in a certain way. +- +- Corrections or suggestions for this document should be sent to +-. If you make a suggestion, please include a suggested +-new wording for it; our time is limited. We prefer a context diff to +-the `standards.texi' or `make-stds.texi' files, but if you don't have +-those files, please mail your suggestion anyway. +- +- This release of the GNU Coding Standards was last updated March 13, +-1998. +- +- +-File: standards.info, Node: Intellectual Property, Next: Design Advice, Prev: Preface, Up: Top +- +-Keeping Free Software Free +-************************** +- +- This node discusses how you can make sure that GNU software remains +-unencumbered. +- +-* Menu: +- +-* Reading Non-Free Code:: Referring to Proprietary Programs +-* Contributions:: Accepting Contributions +- +- +-File: standards.info, Node: Reading Non-Free Code, Next: Contributions, Up: Intellectual Property +- +-Referring to Proprietary Programs +-================================= +- +- Don't in any circumstances refer to Unix source code for or during +-your work on GNU! (Or to any other proprietary programs.) +- +- If you have a vague recollection of the internals of a Unix program, +-this does not absolutely mean you can't write an imitation of it, but +-do try to organize the imitation internally along different lines, +-because this is likely to make the details of the Unix version +-irrelevant and dissimilar to your results. +- +- For example, Unix utilities were generally optimized to minimize +-memory use; if you go for speed instead, your program will be very +-different. You could keep the entire input file in core and scan it +-there instead of using stdio. Use a smarter algorithm discovered more +-recently than the Unix program. Eliminate use of temporary files. Do +-it in one pass instead of two (we did this in the assembler). +- +- Or, on the contrary, emphasize simplicity instead of speed. For some +-applications, the speed of today's computers makes simpler algorithms +-adequate. +- +- Or go for generality. For example, Unix programs often have static +-tables or fixed-size strings, which make for arbitrary limits; use +-dynamic allocation instead. Make sure your program handles NULs and +-other funny characters in the input files. Add a programming language +-for extensibility and write part of the program in that language. +- +- Or turn some parts of the program into independently usable +-libraries. Or use a simple garbage collector instead of tracking +-precisely when to free memory, or use a new GNU facility such as +-obstacks. +- +- +-File: standards.info, Node: Contributions, Prev: Reading Non-Free Code, Up: Intellectual Property +- +-Accepting Contributions +-======================= +- +- If someone else sends you a piece of code to add to the program you +-are working on, we need legal papers to use it--the same sort of legal +-papers we will need to get from you. *Each* significant contributor to +-a program must sign some sort of legal papers in order for us to have +-clear title to the program. The main author alone is not enough. +- +- So, before adding in any contributions from other people, please tell +-us, so we can arrange to get the papers. Then wait until we tell you +-that we have received the signed papers, before you actually use the +-contribution. +- +- This applies both before you release the program and afterward. If +-you receive diffs to fix a bug, and they make significant changes, we +-need legal papers for that change. +- +- This also applies to comments and documentation files. For copyright +-law, comments and code are just text. Copyright applies to all kinds of +-text, so we need legal papers for all kinds. +- +- You don't need papers for changes of a few lines here or there, since +-they are not significant for copyright purposes. Also, you don't need +-papers if all you get from the suggestion is some ideas, not actual code +-which you use. For example, if you write a different solution to the +-problem, you don't need to get papers. +- +- We know this is frustrating; it's frustrating for us as well. But if +-you don't wait, you are going out on a limb--for example, what if the +-contributor's employer won't sign a disclaimer? You might have to take +-that code out again! +- +- The very worst thing is if you forget to tell us about the other +-contributor. We could be very embarrassed in court some day as a +-result. +- +- We have more detailed advice for maintainers of programs; if you have +-reached the stage of actually maintaining a program for GNU (whether +-released or not), please ask us for a copy. +- +- +-File: standards.info, Node: Design Advice, Next: Program Behavior, Prev: Intellectual Property, Up: Top +- +-General Program Design +-********************** +- +- This node discusses some of the issues you should take into account +-when designing your program. +- +-* Menu: +- +-* Compatibility:: Compatibility with other implementations +-* Using Extensions:: Using non-standard features +-* ANSI C:: Using ANSI C features +-* Source Language:: Using languages other than C +- +- +-File: standards.info, Node: Compatibility, Next: Using Extensions, Up: Design Advice +- +-Compatibility with Other Implementations +-======================================== +- +- With occasional exceptions, utility programs and libraries for GNU +-should be upward compatible with those in Berkeley Unix, and upward +-compatible with ANSI C if ANSI C specifies their behavior, and upward +-compatible with POSIX if POSIX specifies their behavior. +- +- When these standards conflict, it is useful to offer compatibility +-modes for each of them. +- +- ANSI C and POSIX prohibit many kinds of extensions. Feel free to +-make the extensions anyway, and include a `--ansi', `--posix', or +-`--compatible' option to turn them off. However, if the extension has +-a significant chance of breaking any real programs or scripts, then it +-is not really upward compatible. Try to redesign its interface. +- +- Many GNU programs suppress extensions that conflict with POSIX if the +-environment variable `POSIXLY_CORRECT' is defined (even if it is +-defined with a null value). Please make your program recognize this +-variable if appropriate. +- +- When a feature is used only by users (not by programs or command +-files), and it is done poorly in Unix, feel free to replace it +-completely with something totally different and better. (For example, +-`vi' is replaced with Emacs.) But it is nice to offer a compatible +-feature as well. (There is a free `vi' clone, so we offer it.) +- +- Additional useful features not in Berkeley Unix are welcome. +- +- +-File: standards.info, Node: Using Extensions, Next: ANSI C, Prev: Compatibility, Up: Design Advice +- +-Using Non-standard Features +-=========================== +- +- Many GNU facilities that already exist support a number of convenient +-extensions over the comparable Unix facilities. Whether to use these +-extensions in implementing your program is a difficult question. +- +- On the one hand, using the extensions can make a cleaner program. +-On the other hand, people will not be able to build the program unless +-the other GNU tools are available. This might cause the program to +-work on fewer kinds of machines. +- +- With some extensions, it might be easy to provide both alternatives. +-For example, you can define functions with a "keyword" `INLINE' and +-define that as a macro to expand into either `inline' or nothing, +-depending on the compiler. +- +- In general, perhaps it is best not to use the extensions if you can +-straightforwardly do without them, but to use the extensions if they +-are a big improvement. +- +- An exception to this rule are the large, established programs (such +-as Emacs) which run on a great variety of systems. Such programs would +-be broken by use of GNU extensions. +- +- Another exception is for programs that are used as part of +-compilation: anything that must be compiled with other compilers in +-order to bootstrap the GNU compilation facilities. If these require +-the GNU compiler, then no one can compile them without having them +-installed already. That would be no good. +- +- +-File: standards.info, Node: ANSI C, Next: Source Language, Prev: Using Extensions, Up: Design Advice +- +-ANSI C and pre-ANSI C +-===================== +- +- Do not ever use the "trigraph" feature of ANSI C. +- +- ANSI C is widespread enough now that it is ok to write new programs +-that use ANSI C features (and therefore will not work in non-ANSI +-compilers). And if a program is already written in ANSI C, there's no +-need to convert it to support non-ANSI compilers. +- +- However, it is easy to support non-ANSI compilers in most programs, +-so you might still consider doing so when you write a program. Instead +-of writing function definitions in ANSI prototype form, +- +- int +- foo (int x, int y) +- ... +- +-write the definition in pre-ANSI style like this, +- +- int +- foo (x, y) +- int x, y; +- ... +- +-and use a separate declaration to specify the argument prototype: +- +- int foo (int, int); +- +- You need such a declaration anyway, in a header file, to get the +-benefit of ANSI C prototypes in all the files where the function is +-called. And once you have it, you lose nothing by writing the function +-definition in the pre-ANSI style. +- +- If you don't know non-ANSI C, there's no need to learn it; just +-write in ANSI C. +- +- +-File: standards.info, Node: Source Language, Prev: ANSI C, Up: Design Advice +- +-Using Languages Other Than C +-============================ +- +- Using a language other than C is like using a non-standard feature: +-it will cause trouble for users. Even if GCC supports the other +-language, users may find it inconvenient to have to install the +-compiler for that other language in order to build your program. For +-example, if you write your program in C++, people will have to install +-the C++ compiler in order to compile your program. Thus, it is better +-if you write in C. +- +- But there are three situations when there is no disadvantage in using +-some other language: +- +- * It is okay to use another language if your program contains an +- interpreter for that language. +- +- For example, if your program links with GUILE, it is ok to write +- part of the program in Scheme or another language supported by +- GUILE. +- +- * It is okay to use another language in a tool specifically intended +- for use with that language. +- +- This is okay because the only people who want to build the tool +- will be those who have installed the other language anyway. +- +- * If an application is of interest to a narrow community, then +- perhaps it's not important if the application is inconvenient to +- install. +- +- C has one other advantage over C++ and other compiled languages: more +-people know C, so more people will find it easy to read and modify the +-program if it is written in C. +- +- +-File: standards.info, Node: Program Behavior, Next: Writing C, Prev: Design Advice, Up: Top +- +-Program Behavior for All Programs +-********************************* +- +- This node describes how to write robust software. It also describes +-general standards for error messages, the command line interface, and +-how libraries should behave. +- +-* Menu: +- +-* Semantics:: Writing robust programs +-* Libraries:: Library behavior +-* Errors:: Formatting error messages +-* User Interfaces:: Standards for command line interfaces +-* Option Table:: Table of long options. +-* Memory Usage:: When and how to care about memory needs +- +- +-File: standards.info, Node: Semantics, Next: Libraries, Up: Program Behavior +- +-Writing Robust Programs +-======================= +- +- Avoid arbitrary limits on the length or number of *any* data +-structure, including file names, lines, files, and symbols, by +-allocating all data structures dynamically. In most Unix utilities, +-"long lines are silently truncated". This is not acceptable in a GNU +-utility. +- +- Utilities reading files should not drop NUL characters, or any other +-nonprinting characters *including those with codes above 0177*. The +-only sensible exceptions would be utilities specifically intended for +-interface to certain types of printers that can't handle those +-characters. +- +- Check every system call for an error return, unless you know you +-wish to ignore errors. Include the system error text (from `perror' or +-equivalent) in *every* error message resulting from a failing system +-call, as well as the name of the file if any and the name of the +-utility. Just "cannot open foo.c" or "stat failed" is not sufficient. +- +- Check every call to `malloc' or `realloc' to see if it returned +-zero. Check `realloc' even if you are making the block smaller; in a +-system that rounds block sizes to a power of 2, `realloc' may get a +-different block if you ask for less space. +- +- In Unix, `realloc' can destroy the storage block if it returns zero. +-GNU `realloc' does not have this bug: if it fails, the original block +-is unchanged. Feel free to assume the bug is fixed. If you wish to +-run your program on Unix, and wish to avoid lossage in this case, you +-can use the GNU `malloc'. +- +- You must expect `free' to alter the contents of the block that was +-freed. Anything you want to fetch from the block, you must fetch before +-calling `free'. +- +- If `malloc' fails in a noninteractive program, make that a fatal +-error. In an interactive program (one that reads commands from the +-user), it is better to abort the command and return to the command +-reader loop. This allows the user to kill other processes to free up +-virtual memory, and then try the command again. +- +- Use `getopt_long' to decode arguments, unless the argument syntax +-makes this unreasonable. +- +- When static storage is to be written in during program execution, use +-explicit C code to initialize it. Reserve C initialized declarations +-for data that will not be changed. +- +- Try to avoid low-level interfaces to obscure Unix data structures +-(such as file directories, utmp, or the layout of kernel memory), since +-these are less likely to work compatibly. If you need to find all the +-files in a directory, use `readdir' or some other high-level interface. +-These will be supported compatibly by GNU. +- +- By default, the GNU system will provide the signal handling +-functions of BSD and of POSIX. So GNU software should be written to use +-these. +- +- In error checks that detect "impossible" conditions, just abort. +-There is usually no point in printing any message. These checks +-indicate the existence of bugs. Whoever wants to fix the bugs will have +-to read the source code and run a debugger. So explain the problem with +-comments in the source. The relevant data will be in variables, which +-are easy to examine with the debugger, so there is no point moving them +-elsewhere. +- +- Do not use a count of errors as the exit status for a program. +-*That does not work*, because exit status values are limited to 8 bits +-(0 through 255). A single run of the program might have 256 errors; if +-you try to return 256 as the exit status, the parent process will see 0 +-as the status, and it will appear that the program succeeded. +- +- If you make temporary files, check the `TMPDIR' environment +-variable; if that variable is defined, use the specified directory +-instead of `/tmp'. +- +- +-File: standards.info, Node: Libraries, Next: Errors, Prev: Semantics, Up: Program Behavior +- +-Library Behavior +-================ +- +- Try to make library functions reentrant. If they need to do dynamic +-storage allocation, at least try to avoid any nonreentrancy aside from +-that of `malloc' itself. +- +- Here are certain name conventions for libraries, to avoid name +-conflicts. +- +- Choose a name prefix for the library, more than two characters long. +-All external function and variable names should start with this prefix. +-In addition, there should only be one of these in any given library +-member. This usually means putting each one in a separate source file. +- +- An exception can be made when two external symbols are always used +-together, so that no reasonable program could use one without the +-other; then they can both go in the same file. +- +- External symbols that are not documented entry points for the user +-should have names beginning with `_'. They should also contain the +-chosen name prefix for the library, to prevent collisions with other +-libraries. These can go in the same files with user entry points if +-you like. +- +- Static functions and variables can be used as you like and need not +-fit any naming convention. +- +- +-File: standards.info, Node: Errors, Next: User Interfaces, Prev: Libraries, Up: Program Behavior +- +-Formatting Error Messages +-========================= +- +- Error messages from compilers should look like this: +- +- SOURCE-FILE-NAME:LINENO: MESSAGE +- +- Error messages from other noninteractive programs should look like +-this: +- +- PROGRAM:SOURCE-FILE-NAME:LINENO: MESSAGE +- +-when there is an appropriate source file, or like this: +- +- PROGRAM: MESSAGE +- +-when there is no relevant source file. +- +- In an interactive program (one that is reading commands from a +-terminal), it is better not to include the program name in an error +-message. The place to indicate which program is running is in the +-prompt or with the screen layout. (When the same program runs with +-input from a source other than a terminal, it is not interactive and +-would do best to print error messages using the noninteractive style.) +- +- The string MESSAGE should not begin with a capital letter when it +-follows a program name and/or file name. Also, it should not end with +-a period. +- +- Error messages from interactive programs, and other messages such as +-usage messages, should start with a capital letter. But they should not +-end with a period. +- +- +-File: standards.info, Node: User Interfaces, Next: Option Table, Prev: Errors, Up: Program Behavior +- +-Standards for Command Line Interfaces +-===================================== +- +- Please don't make the behavior of a utility depend on the name used +-to invoke it. It is useful sometimes to make a link to a utility with +-a different name, and that should not change what it does. +- +- Instead, use a run time option or a compilation switch or both to +-select among the alternate behaviors. +- +- Likewise, please don't make the behavior of the program depend on the +-type of output device it is used with. Device independence is an +-important principle of the system's design; do not compromise it merely +-to save someone from typing an option now and then. +- +- If you think one behavior is most useful when the output is to a +-terminal, and another is most useful when the output is a file or a +-pipe, then it is usually best to make the default behavior the one that +-is useful with output to a terminal, and have an option for the other +-behavior. +- +- Compatibility requires certain programs to depend on the type of +-output device. It would be disastrous if `ls' or `sh' did not do so in +-the way all users expect. In some of these cases, we supplement the +-program with a preferred alternate version that does not depend on the +-output device type. For example, we provide a `dir' program much like +-`ls' except that its default output format is always multi-column +-format. +- +- It is a good idea to follow the POSIX guidelines for the +-command-line options of a program. The easiest way to do this is to use +-`getopt' to parse them. Note that the GNU version of `getopt' will +-normally permit options anywhere among the arguments unless the special +-argument `--' is used. This is not what POSIX specifies; it is a GNU +-extension. +- +- Please define long-named options that are equivalent to the +-single-letter Unix-style options. We hope to make GNU more user +-friendly this way. This is easy to do with the GNU function +-`getopt_long'. +- +- One of the advantages of long-named options is that they can be +-consistent from program to program. For example, users should be able +-to expect the "verbose" option of any GNU program which has one, to be +-spelled precisely `--verbose'. To achieve this uniformity, look at the +-table of common long-option names when you choose the option names for +-your program (*note Option Table::.). +- +- It is usually a good idea for file names given as ordinary arguments +-to be input files only; any output files would be specified using +-options (preferably `-o' or `--output'). Even if you allow an output +-file name as an ordinary argument for compatibility, try to provide an +-option as another way to specify it. This will lead to more consistency +-among GNU utilities, and fewer idiosyncracies for users to remember. +- +- All programs should support two standard options: `--version' and +-`--help'. +- +-`--version' +- This option should direct the program to information about its +- name, version, origin and legal status, all on standard output, +- and then exit successfully. Other options and arguments should be +- ignored once this is seen, and the program should not perform its +- normal function. +- +- The first line is meant to be easy for a program to parse; the +- version number proper starts after the last space. In addition, +- it contains the canonical name for this program, in this format: +- +- GNU Emacs 19.30 +- +- The program's name should be a constant string; *don't* compute it +- from `argv[0]'. The idea is to state the standard or canonical +- name for the program, not its file name. There are other ways to +- find out the precise file name where a command is found in `PATH'. +- +- If the program is a subsidiary part of a larger package, mention +- the package name in parentheses, like this: +- +- emacsserver (GNU Emacs) 19.30 +- +- If the package has a version number which is different from this +- program's version number, you can mention the package version +- number just before the close-parenthesis. +- +- If you *need* to mention the version numbers of libraries which +- are distributed separately from the package which contains this +- program, you can do so by printing an additional line of version +- info for each library you want to mention. Use the same format +- for these lines as for the first line. +- +- Please do not mention all of the libraries that the program uses +- "just for completeness"--that would produce a lot of unhelpful +- clutter. Please mention library version numbers only if you find +- in practice that they are very important to you in debugging. +- +- The following line, after the version number line or lines, should +- be a copyright notice. If more than one copyright notice is +- called for, put each on a separate line. +- +- Next should follow a brief statement that the program is free +- software, and that users are free to copy and change it on certain +- conditions. If the program is covered by the GNU GPL, say so +- here. Also mention that there is no warranty, to the extent +- permitted by law. +- +- It is ok to finish the output with a list of the major authors of +- the program, as a way of giving credit. +- +- Here's an example of output that follows these rules: +- +- GNU Emacs 19.34.5 +- Copyright (C) 1996 Free Software Foundation, Inc. +- GNU Emacs comes with NO WARRANTY, +- to the extent permitted by law. +- You may redistribute copies of GNU Emacs +- under the terms of the GNU General Public License. +- For more information about these matters, +- see the files named COPYING. +- +- You should adapt this to your program, of course, filling in the +- proper year, copyright holder, name of program, and the references +- to distribution terms, and changing the rest of the wording as +- necessary. +- +- This copyright notice only needs to mention the most recent year in +- which changes were made--there's no need to list the years for +- previous versions' changes. You don't have to mention the name of +- the program in these notices, if that is inconvenient, since it +- appeared in the first line. +- +-`--help' +- This option should output brief documentation for how to invoke the +- program, on standard output, then exit successfully. Other +- options and arguments should be ignored once this is seen, and the +- program should not perform its normal function. +- +- Near the end of the `--help' option's output there should be a line +- that says where to mail bug reports. It should have this format: +- +- Report bugs to MAILING-ADDRESS. +- +- +-File: standards.info, Node: Option Table, Next: Memory Usage, Prev: User Interfaces, Up: Program Behavior +- +-Table of Long Options +-===================== +- +- Here is a table of long options used by GNU programs. It is surely +-incomplete, but we aim to list all the options that a new program might +-want to be compatible with. If you use names not already in the table, +-please send a list of them, with their meanings, so we +-can update the table. +- +-`after-date' +- `-N' in `tar'. +- +-`all' +- `-a' in `du', `ls', `nm', `stty', `uname', and `unexpand'. +- +-`all-text' +- `-a' in `diff'. +- +-`almost-all' +- `-A' in `ls'. +- +-`append' +- `-a' in `etags', `tee', `time'; `-r' in `tar'. +- +-`archive' +- `-a' in `cp'. +- +-`archive-name' +- `-n' in `shar'. +- +-`arglength' +- `-l' in `m4'. +- +-`ascii' +- `-a' in `diff'. +- +-`assign' +- `-v' in `gawk'. +- +-`assume-new' +- `-W' in Make. +- +-`assume-old' +- `-o' in Make. +- +-`auto-check' +- `-a' in `recode'. +- +-`auto-pager' +- `-a' in `wdiff'. +- +-`auto-reference' +- `-A' in `ptx'. +- +-`avoid-wraps' +- `-n' in `wdiff'. +- +-`backward-search' +- `-B' in `ctags'. +- +-`basename' +- `-f' in `shar'. +- +-`batch' +- Used in GDB. +- +-`baud' +- Used in GDB. +- +-`before' +- `-b' in `tac'. +- +-`binary' +- `-b' in `cpio' and `diff'. +- +-`bits-per-code' +- `-b' in `shar'. +- +-`block-size' +- Used in `cpio' and `tar'. +- +-`blocks' +- `-b' in `head' and `tail'. +- +-`break-file' +- `-b' in `ptx'. +- +-`brief' +- Used in various programs to make output shorter. +- +-`bytes' +- `-c' in `head', `split', and `tail'. +- +-`c++' +- `-C' in `etags'. +- +-`catenate' +- `-A' in `tar'. +- +-`cd' +- Used in various programs to specify the directory to use. +- +-`changes' +- `-c' in `chgrp' and `chown'. +- +-`classify' +- `-F' in `ls'. +- +-`colons' +- `-c' in `recode'. +- +-`command' +- `-c' in `su'; `-x' in GDB. +- +-`compare' +- `-d' in `tar'. +- +-`compat' +- Used in `gawk'. +- +-`compress' +- `-Z' in `tar' and `shar'. +- +-`concatenate' +- `-A' in `tar'. +- +-`confirmation' +- `-w' in `tar'. +- +-`context' +- Used in `diff'. +- +-`copyleft' +- `-W copyleft' in `gawk'. +- +-`copyright' +- `-C' in `ptx', `recode', and `wdiff'; `-W copyright' in `gawk'. +- +-`core' +- Used in GDB. +- +-`count' +- `-q' in `who'. +- +-`count-links' +- `-l' in `du'. +- +-`create' +- Used in `tar' and `cpio'. +- +-`cut-mark' +- `-c' in `shar'. +- +-`cxref' +- `-x' in `ctags'. +- +-`date' +- `-d' in `touch'. +- +-`debug' +- `-d' in Make and `m4'; `-t' in Bison. +- +-`define' +- `-D' in `m4'. +- +-`defines' +- `-d' in Bison and `ctags'. +- +-`delete' +- `-D' in `tar'. +- +-`dereference' +- `-L' in `chgrp', `chown', `cpio', `du', `ls', and `tar'. +- +-`dereference-args' +- `-D' in `du'. +- +-`diacritics' +- `-d' in `recode'. +- +-`dictionary-order' +- `-d' in `look'. +- +-`diff' +- `-d' in `tar'. +- +-`digits' +- `-n' in `csplit'. +- +-`directory' +- Specify the directory to use, in various programs. In `ls', it +- means to show directories themselves rather than their contents. +- In `rm' and `ln', it means to not treat links to directories +- specially. +- +-`discard-all' +- `-x' in `strip'. +- +-`discard-locals' +- `-X' in `strip'. +- +-`dry-run' +- `-n' in Make. +- +-`ed' +- `-e' in `diff'. +- +-`elide-empty-files' +- `-z' in `csplit'. +- +-`end-delete' +- `-x' in `wdiff'. +- +-`end-insert' +- `-z' in `wdiff'. +- +-`entire-new-file' +- `-N' in `diff'. +- +-`environment-overrides' +- `-e' in Make. +- +-`eof' +- `-e' in `xargs'. +- +-`epoch' +- Used in GDB. +- +-`error-limit' +- Used in `makeinfo'. +- +-`error-output' +- `-o' in `m4'. +- +-`escape' +- `-b' in `ls'. +- +-`exclude-from' +- `-X' in `tar'. +- +-`exec' +- Used in GDB. +- +-`exit' +- `-x' in `xargs'. +- +-`exit-0' +- `-e' in `unshar'. +- +-`expand-tabs' +- `-t' in `diff'. +- +-`expression' +- `-e' in `sed'. +- +-`extern-only' +- `-g' in `nm'. +- +-`extract' +- `-i' in `cpio'; `-x' in `tar'. +- +-`faces' +- `-f' in `finger'. +- +-`fast' +- `-f' in `su'. +- +-`fatal-warnings' +- `-E' in `m4'. +- +-`file' +- `-f' in `info', `gawk', Make, `mt', and `tar'; `-n' in `sed'; `-r' +- in `touch'. +- +-`field-separator' +- `-F' in `gawk'. +- +-`file-prefix' +- `-b' in Bison. +- +-`file-type' +- `-F' in `ls'. +- +-`files-from' +- `-T' in `tar'. +- +-`fill-column' +- Used in `makeinfo'. +- +-`flag-truncation' +- `-F' in `ptx'. +- +-`fixed-output-files' +- `-y' in Bison. +- +-`follow' +- `-f' in `tail'. +- +-`footnote-style' +- Used in `makeinfo'. +- +-`force' +- `-f' in `cp', `ln', `mv', and `rm'. +- +-`force-prefix' +- `-F' in `shar'. +- +-`format' +- Used in `ls', `time', and `ptx'. +- +-`freeze-state' +- `-F' in `m4'. +- +-`fullname' +- Used in GDB. +- +-`gap-size' +- `-g' in `ptx'. +- +-`get' +- `-x' in `tar'. +- +-`graphic' +- `-i' in `ul'. +- +-`graphics' +- `-g' in `recode'. +- +-`group' +- `-g' in `install'. +- +-`gzip' +- `-z' in `tar' and `shar'. +- +-`hashsize' +- `-H' in `m4'. +- +-`header' +- `-h' in `objdump' and `recode' +- +-`heading' +- `-H' in `who'. +- +-`help' +- Used to ask for brief usage information. +- +-`here-delimiter' +- `-d' in `shar'. +- +-`hide-control-chars' +- `-q' in `ls'. +- +-`idle' +- `-u' in `who'. +- +-`ifdef' +- `-D' in `diff'. +- +-`ignore' +- `-I' in `ls'; `-x' in `recode'. +- +-`ignore-all-space' +- `-w' in `diff'. +- +-`ignore-backups' +- `-B' in `ls'. +- +-`ignore-blank-lines' +- `-B' in `diff'. +- +-`ignore-case' +- `-f' in `look' and `ptx'; `-i' in `diff' and `wdiff'. +- +-`ignore-errors' +- `-i' in Make. +- +-`ignore-file' +- `-i' in `ptx'. +- +-`ignore-indentation' +- `-I' in `etags'. +- +-`ignore-init-file' +- `-f' in Oleo. +- +-`ignore-interrupts' +- `-i' in `tee'. +- +-`ignore-matching-lines' +- `-I' in `diff'. +- +-`ignore-space-change' +- `-b' in `diff'. +- +-`ignore-zeros' +- `-i' in `tar'. +- +-`include' +- `-i' in `etags'; `-I' in `m4'. +- +-`include-dir' +- `-I' in Make. +- +-`incremental' +- `-G' in `tar'. +- +-`info' +- `-i', `-l', and `-m' in Finger. +- +-`initial' +- `-i' in `expand'. +- +-`initial-tab' +- `-T' in `diff'. +- +-`inode' +- `-i' in `ls'. +- +-`interactive' +- `-i' in `cp', `ln', `mv', `rm'; `-e' in `m4'; `-p' in `xargs'; +- `-w' in `tar'. +- +-`intermix-type' +- `-p' in `shar'. +- +-`jobs' +- `-j' in Make. +- +-`just-print' +- `-n' in Make. +- +-`keep-going' +- `-k' in Make. +- +-`keep-files' +- `-k' in `csplit'. +- +-`kilobytes' +- `-k' in `du' and `ls'. +- +-`language' +- `-l' in `etags'. +- +-`less-mode' +- `-l' in `wdiff'. +- +-`level-for-gzip' +- `-g' in `shar'. +- +-`line-bytes' +- `-C' in `split'. +- +-`lines' +- Used in `split', `head', and `tail'. +- +-`link' +- `-l' in `cpio'. +- +-`lint' +-`lint-old' +- Used in `gawk'. +- +-`list' +- `-t' in `cpio'; `-l' in `recode'. +- +-`list' +- `-t' in `tar'. +- +-`literal' +- `-N' in `ls'. +- +-`load-average' +- `-l' in Make. +- +-`login' +- Used in `su'. +- +-`machine' +- No listing of which programs already use this; someone should +- check to see if any actually do, and tell . +- +-`macro-name' +- `-M' in `ptx'. +- +-`mail' +- `-m' in `hello' and `uname'. +- +-`make-directories' +- `-d' in `cpio'. +- +-`makefile' +- `-f' in Make. +- +-`mapped' +- Used in GDB. +- +-`max-args' +- `-n' in `xargs'. +- +-`max-chars' +- `-n' in `xargs'. +- +-`max-lines' +- `-l' in `xargs'. +- +-`max-load' +- `-l' in Make. +- +-`max-procs' +- `-P' in `xargs'. +- +-`mesg' +- `-T' in `who'. +- +-`message' +- `-T' in `who'. +- +-`minimal' +- `-d' in `diff'. +- +-`mixed-uuencode' +- `-M' in `shar'. +- +-`mode' +- `-m' in `install', `mkdir', and `mkfifo'. +- +-`modification-time' +- `-m' in `tar'. +- +-`multi-volume' +- `-M' in `tar'. +- +-`name-prefix' +- `-a' in Bison. +- +-`nesting-limit' +- `-L' in `m4'. +- +-`net-headers' +- `-a' in `shar'. +- +-`new-file' +- `-W' in Make. +- +-`no-builtin-rules' +- `-r' in Make. +- +-`no-character-count' +- `-w' in `shar'. +- +-`no-check-existing' +- `-x' in `shar'. +- +-`no-common' +- `-3' in `wdiff'. +- +-`no-create' +- `-c' in `touch'. +- +-`no-defines' +- `-D' in `etags'. +- +-`no-deleted' +- `-1' in `wdiff'. +- +-`no-dereference' +- `-d' in `cp'. +- +-`no-inserted' +- `-2' in `wdiff'. +- +-`no-keep-going' +- `-S' in Make. +- +-`no-lines' +- `-l' in Bison. +- +-`no-piping' +- `-P' in `shar'. +- +-`no-prof' +- `-e' in `gprof'. +- +-`no-regex' +- `-R' in `etags'. +- +-`no-sort' +- `-p' in `nm'. +- +-`no-split' +- Used in `makeinfo'. +- +-`no-static' +- `-a' in `gprof'. +- +-`no-time' +- `-E' in `gprof'. +- +-`no-timestamp' +- `-m' in `shar'. +- +-`no-validate' +- Used in `makeinfo'. +- +-`no-wait' +- Used in `emacsclient'. +- +-`no-warn' +- Used in various programs to inhibit warnings. +- +-`node' +- `-n' in `info'. +- +-`nodename' +- `-n' in `uname'. +- +-`nonmatching' +- `-f' in `cpio'. +- +-`nstuff' +- `-n' in `objdump'. +- +-`null' +- `-0' in `xargs'. +- +-`number' +- `-n' in `cat'. +- +-`number-nonblank' +- `-b' in `cat'. +- +-`numeric-sort' +- `-n' in `nm'. +- +-`numeric-uid-gid' +- `-n' in `cpio' and `ls'. +- +-`nx' +- Used in GDB. +- +-`old-archive' +- `-o' in `tar'. +- +-`old-file' +- `-o' in Make. +- +-`one-file-system' +- `-l' in `tar', `cp', and `du'. +- +-`only-file' +- `-o' in `ptx'. +- +-`only-prof' +- `-f' in `gprof'. +- +-`only-time' +- `-F' in `gprof'. +- +-`output' +- In various programs, specify the output file name. +- +-`output-prefix' +- `-o' in `shar'. +- +-`override' +- `-o' in `rm'. +- +-`overwrite' +- `-c' in `unshar'. +- +-`owner' +- `-o' in `install'. +- +-`paginate' +- `-l' in `diff'. +- +-`paragraph-indent' +- Used in `makeinfo'. +- +-`parents' +- `-p' in `mkdir' and `rmdir'. +- +-`pass-all' +- `-p' in `ul'. +- +-`pass-through' +- `-p' in `cpio'. +- +-`port' +- `-P' in `finger'. +- +-`portability' +- `-c' in `cpio' and `tar'. +- +-`posix' +- Used in `gawk'. +- +-`prefix-builtins' +- `-P' in `m4'. +- +-`prefix' +- `-f' in `csplit'. +- +-`preserve' +- Used in `tar' and `cp'. +- +-`preserve-environment' +- `-p' in `su'. +- +-`preserve-modification-time' +- `-m' in `cpio'. +- +-`preserve-order' +- `-s' in `tar'. +- +-`preserve-permissions' +- `-p' in `tar'. +- +-`print' +- `-l' in `diff'. +- +-`print-chars' +- `-L' in `cmp'. +- +-`print-data-base' +- `-p' in Make. +- +-`print-directory' +- `-w' in Make. +- +-`print-file-name' +- `-o' in `nm'. +- +-`print-symdefs' +- `-s' in `nm'. +- +-`printer' +- `-p' in `wdiff'. +- +-`prompt' +- `-p' in `ed'. +- +-`query-user' +- `-X' in `shar'. +- +-`question' +- `-q' in Make. +- +-`quiet' +- Used in many programs to inhibit the usual output. *Note:* every +- program accepting `--quiet' should accept `--silent' as a synonym. +- +-`quiet-unshar' +- `-Q' in `shar' +- +-`quote-name' +- `-Q' in `ls'. +- +-`rcs' +- `-n' in `diff'. +- +-`re-interval' +- Used in `gawk'. +- +-`read-full-blocks' +- `-B' in `tar'. +- +-`readnow' +- Used in GDB. +- +-`recon' +- `-n' in Make. +- +-`record-number' +- `-R' in `tar'. +- +-`recursive' +- Used in `chgrp', `chown', `cp', `ls', `diff', and `rm'. +- +-`reference-limit' +- Used in `makeinfo'. +- +-`references' +- `-r' in `ptx'. +- +-`regex' +- `-r' in `tac' and `etags'. +- +-`release' +- `-r' in `uname'. +- +-`reload-state' +- `-R' in `m4'. +- +-`relocation' +- `-r' in `objdump'. +- +-`rename' +- `-r' in `cpio'. +- +-`replace' +- `-i' in `xargs'. +- +-`report-identical-files' +- `-s' in `diff'. +- +-`reset-access-time' +- `-a' in `cpio'. +- +-`reverse' +- `-r' in `ls' and `nm'. +- +-`reversed-ed' +- `-f' in `diff'. +- +-`right-side-defs' +- `-R' in `ptx'. +- +-`same-order' +- `-s' in `tar'. +- +-`same-permissions' +- `-p' in `tar'. +- +-`save' +- `-g' in `stty'. +- +-`se' +- Used in GDB. +- +-`sentence-regexp' +- `-S' in `ptx'. +- +-`separate-dirs' +- `-S' in `du'. +- +-`separator' +- `-s' in `tac'. +- +-`sequence' +- Used by `recode' to chose files or pipes for sequencing passes. +- +-`shell' +- `-s' in `su'. +- +-`show-all' +- `-A' in `cat'. +- +-`show-c-function' +- `-p' in `diff'. +- +-`show-ends' +- `-E' in `cat'. +- +-`show-function-line' +- `-F' in `diff'. +- +-`show-tabs' +- `-T' in `cat'. +- +-`silent' +- Used in many programs to inhibit the usual output. *Note:* every +- program accepting `--silent' should accept `--quiet' as a synonym. +- +-`size' +- `-s' in `ls'. +- +-`sort' +- Used in `ls'. +- +-`source' +- `-W source' in `gawk'. +- +-`sparse' +- `-S' in `tar'. +- +-`speed-large-files' +- `-H' in `diff'. +- +-`split-at' +- `-E' in `unshar'. +- +-`split-size-limit' +- `-L' in `shar'. +- +-`squeeze-blank' +- `-s' in `cat'. +- +-`start-delete' +- `-w' in `wdiff'. +- +-`start-insert' +- `-y' in `wdiff'. +- +-`starting-file' +- Used in `tar' and `diff' to specify which file within a directory +- to start processing with. +- +-`statistics' +- `-s' in `wdiff'. +- +-`stdin-file-list' +- `-S' in `shar'. +- +-`stop' +- `-S' in Make. +- +-`strict' +- `-s' in `recode'. +- +-`strip' +- `-s' in `install'. +- +-`strip-all' +- `-s' in `strip'. +- +-`strip-debug' +- `-S' in `strip'. +- +-`submitter' +- `-s' in `shar'. +- +-`suffix' +- `-S' in `cp', `ln', `mv'. +- +-`suffix-format' +- `-b' in `csplit'. +- +-`sum' +- `-s' in `gprof'. +- +-`summarize' +- `-s' in `du'. +- +-`symbolic' +- `-s' in `ln'. +- +-`symbols' +- Used in GDB and `objdump'. +- +-`synclines' +- `-s' in `m4'. +- +-`sysname' +- `-s' in `uname'. +- +-`tabs' +- `-t' in `expand' and `unexpand'. +- +-`tabsize' +- `-T' in `ls'. +- +-`terminal' +- `-T' in `tput' and `ul'. `-t' in `wdiff'. +- +-`text' +- `-a' in `diff'. +- +-`text-files' +- `-T' in `shar'. +- +-`time' +- Used in `ls' and `touch'. +- +-`to-stdout' +- `-O' in `tar'. +- +-`total' +- `-c' in `du'. +- +-`touch' +- `-t' in Make, `ranlib', and `recode'. +- +-`trace' +- `-t' in `m4'. +- +-`traditional' +- `-t' in `hello'; `-W traditional' in `gawk'; `-G' in `ed', `m4', +- and `ptx'. +- +-`tty' +- Used in GDB. +- +-`typedefs' +- `-t' in `ctags'. +- +-`typedefs-and-c++' +- `-T' in `ctags'. +- +-`typeset-mode' +- `-t' in `ptx'. +- +-`uncompress' +- `-z' in `tar'. +- +-`unconditional' +- `-u' in `cpio'. +- +-`undefine' +- `-U' in `m4'. +- +-`undefined-only' +- `-u' in `nm'. +- +-`update' +- `-u' in `cp', `ctags', `mv', `tar'. +- +-`usage' +- Used in `gawk'; same as `--help'. +- +-`uuencode' +- `-B' in `shar'. +- +-`vanilla-operation' +- `-V' in `shar'. +- +-`verbose' +- Print more information about progress. Many programs support this. +- +-`verify' +- `-W' in `tar'. +- +-`version' +- Print the version number. +- +-`version-control' +- `-V' in `cp', `ln', `mv'. +- +-`vgrind' +- `-v' in `ctags'. +- +-`volume' +- `-V' in `tar'. +- +-`what-if' +- `-W' in Make. +- +-`whole-size-limit' +- `-l' in `shar'. +- +-`width' +- `-w' in `ls' and `ptx'. +- +-`word-regexp' +- `-W' in `ptx'. +- +-`writable' +- `-T' in `who'. +- +-`zeros' +- `-z' in `gprof'. +- +- +-File: standards.info, Node: Memory Usage, Prev: Option Table, Up: Program Behavior +- +-Memory Usage +-============ +- +- If it typically uses just a few meg of memory, don't bother making +-any effort to reduce memory usage. For example, if it is impractical +-for other reasons to operate on files more than a few meg long, it is +-reasonable to read entire input files into core to operate on them. +- +- However, for programs such as `cat' or `tail', that can usefully +-operate on very large files, it is important to avoid using a technique +-that would artificially limit the size of files it can handle. If a +-program works by lines and could be applied to arbitrary user-supplied +-input files, it should keep only a line in memory, because this is not +-very hard and users will want to be able to operate on input files that +-are bigger than will fit in core all at once. +- +- If your program creates complicated data structures, just make them +-in core and give a fatal error if `malloc' returns zero. +- +- +-File: standards.info, Node: Writing C, Next: Documentation, Prev: Program Behavior, Up: Top +- +-Making The Best Use of C +-************************ +- +- This node provides advice on how best to use the C language when +-writing GNU software. +- +-* Menu: +- +-* Formatting:: Formatting Your Source Code +-* Comments:: Commenting Your Work +-* Syntactic Conventions:: Clean Use of C Constructs +-* Names:: Naming Variables and Functions +-* System Portability:: Portability between different operating systems +-* CPU Portability:: Supporting the range of CPU types +-* System Functions:: Portability and "standard" library functions +-* Internationalization:: Techniques for internationalization +-* Mmap:: How you can safely use `mmap'. +- +- +-File: standards.info, Node: Formatting, Next: Comments, Up: Writing C +- +-Formatting Your Source Code +-=========================== +- +- It is important to put the open-brace that starts the body of a C +-function in column zero, and avoid putting any other open-brace or +-open-parenthesis or open-bracket in column zero. Several tools look +-for open-braces in column zero to find the beginnings of C functions. +-These tools will not work on code not formatted that way. +- +- It is also important for function definitions to start the name of +-the function in column zero. This helps people to search for function +-definitions, and may also help certain tools recognize them. Thus, the +-proper format is this: +- +- static char * +- concat (s1, s2) /* Name starts in column zero here */ +- char *s1, *s2; +- { /* Open brace in column zero here */ +- ... +- } +- +-or, if you want to use ANSI C, format the definition like this: +- +- static char * +- concat (char *s1, char *s2) +- { +- ... +- } +- +- In ANSI C, if the arguments don't fit nicely on one line, split it +-like this: +- +- int +- lots_of_args (int an_integer, long a_long, short a_short, +- double a_double, float a_float) +- ... +- +- For the body of the function, we prefer code formatted like this: +- +- if (x < foo (y, z)) +- haha = bar[4] + 5; +- else +- { +- while (z) +- { +- haha += foo (z, z); +- z--; +- } +- return ++x + bar (); +- } +- +- We find it easier to read a program when it has spaces before the +-open-parentheses and after the commas. Especially after the commas. +- +- When you split an expression into multiple lines, split it before an +-operator, not after one. Here is the right way: +- +- if (foo_this_is_long && bar > win (x, y, z) +- && remaining_condition) +- +- Try to avoid having two operators of different precedence at the same +-level of indentation. For example, don't write this: +- +- mode = (inmode[j] == VOIDmode +- || GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j]) +- ? outmode[j] : inmode[j]); +- +- Instead, use extra parentheses so that the indentation shows the +-nesting: +- +- mode = ((inmode[j] == VOIDmode +- || (GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j]))) +- ? outmode[j] : inmode[j]); +- +- Insert extra parentheses so that Emacs will indent the code properly. +-For example, the following indentation looks nice if you do it by hand, +-but Emacs would mess it up: +- +- v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 +- + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000; +- +- But adding a set of parentheses solves the problem: +- +- v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 +- + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000); +- +- Format do-while statements like this: +- +- do +- { +- a = foo (a); +- } +- while (a > 0); +- +- Please use formfeed characters (control-L) to divide the program into +-pages at logical places (but not within a function). It does not matter +-just how long the pages are, since they do not have to fit on a printed +-page. The formfeeds should appear alone on lines by themselves. +- +- +-File: standards.info, Node: Comments, Next: Syntactic Conventions, Prev: Formatting, Up: Writing C +- +-Commenting Your Work +-==================== +- +- Every program should start with a comment saying briefly what it is +-for. Example: `fmt - filter for simple filling of text'. +- +- Please write the comments in a GNU program in English, because +-English is the one language that nearly all programmers in all +-countries can read. If you do not write English well, please write +-comments in English as well as you can, then ask other people to help +-rewrite them. If you can't write comments in English, please find +-someone to work with you and translate your comments into English. +- +- Please put a comment on each function saying what the function does, +-what sorts of arguments it gets, and what the possible values of +-arguments mean and are used for. It is not necessary to duplicate in +-words the meaning of the C argument declarations, if a C type is being +-used in its customary fashion. If there is anything nonstandard about +-its use (such as an argument of type `char *' which is really the +-address of the second character of a string, not the first), or any +-possible values that would not work the way one would expect (such as, +-that strings containing newlines are not guaranteed to work), be sure +-to say so. +- +- Also explain the significance of the return value, if there is one. +- +- Please put two spaces after the end of a sentence in your comments, +-so that the Emacs sentence commands will work. Also, please write +-complete sentences and capitalize the first word. If a lower-case +-identifier comes at the beginning of a sentence, don't capitalize it! +-Changing the spelling makes it a different identifier. If you don't +-like starting a sentence with a lower case letter, write the sentence +-differently (e.g., "The identifier lower-case is ..."). +- +- The comment on a function is much clearer if you use the argument +-names to speak about the argument values. The variable name itself +-should be lower case, but write it in upper case when you are speaking +-about the value rather than the variable itself. Thus, "the inode +-number NODE_NUM" rather than "an inode". +- +- There is usually no purpose in restating the name of the function in +-the comment before it, because the reader can see that for himself. +-There might be an exception when the comment is so long that the +-function itself would be off the bottom of the screen. +- +- There should be a comment on each static variable as well, like this: +- +- /* Nonzero means truncate lines in the display; +- zero means continue them. */ +- int truncate_lines; +- +- Every `#endif' should have a comment, except in the case of short +-conditionals (just a few lines) that are not nested. The comment should +-state the condition of the conditional that is ending, *including its +-sense*. `#else' should have a comment describing the condition *and +-sense* of the code that follows. For example: +- +- #ifdef foo +- ... +- #else /* not foo */ +- ... +- #endif /* not foo */ +- #ifdef foo +- ... +- #endif /* foo */ +- +-but, by contrast, write the comments this way for a `#ifndef': +- +- #ifndef foo +- ... +- #else /* foo */ +- ... +- #endif /* foo */ +- #ifndef foo +- ... +- #endif /* not foo */ +- +- +-File: standards.info, Node: Syntactic Conventions, Next: Names, Prev: Comments, Up: Writing C +- +-Clean Use of C Constructs +-========================= +- +- Please explicitly declare all arguments to functions. Don't omit +-them just because they are `int's. +- +- Declarations of external functions and functions to appear later in +-the source file should all go in one place near the beginning of the +-file (somewhere before the first function definition in the file), or +-else should go in a header file. Don't put `extern' declarations inside +-functions. +- +- It used to be common practice to use the same local variables (with +-names like `tem') over and over for different values within one +-function. Instead of doing this, it is better declare a separate local +-variable for each distinct purpose, and give it a name which is +-meaningful. This not only makes programs easier to understand, it also +-facilitates optimization by good compilers. You can also move the +-declaration of each local variable into the smallest scope that includes +-all its uses. This makes the program even cleaner. +- +- Don't use local variables or parameters that shadow global +-identifiers. +- +- Don't declare multiple variables in one declaration that spans lines. +-Start a new declaration on each line, instead. For example, instead of +-this: +- +- int foo, +- bar; +- +-write either this: +- +- int foo, bar; +- +-or this: +- +- int foo; +- int bar; +- +-(If they are global variables, each should have a comment preceding it +-anyway.) +- +- When you have an `if'-`else' statement nested in another `if' +-statement, always put braces around the `if'-`else'. Thus, never write +-like this: +- +- if (foo) +- if (bar) +- win (); +- else +- lose (); +- +-always like this: +- +- if (foo) +- { +- if (bar) +- win (); +- else +- lose (); +- } +- +- If you have an `if' statement nested inside of an `else' statement, +-either write `else if' on one line, like this, +- +- if (foo) +- ... +- else if (bar) +- ... +- +-with its `then'-part indented like the preceding `then'-part, or write +-the nested `if' within braces like this: +- +- if (foo) +- ... +- else +- { +- if (bar) +- ... +- } +- +- Don't declare both a structure tag and variables or typedefs in the +-same declaration. Instead, declare the structure tag separately and +-then use it to declare the variables or typedefs. +- +- Try to avoid assignments inside `if'-conditions. For example, don't +-write this: +- +- if ((foo = (char *) malloc (sizeof *foo)) == 0) +- fatal ("virtual memory exhausted"); +- +-instead, write this: +- +- foo = (char *) malloc (sizeof *foo); +- if (foo == 0) +- fatal ("virtual memory exhausted"); +- +- Don't make the program ugly to placate `lint'. Please don't insert +-any casts to `void'. Zero without a cast is perfectly fine as a null +-pointer constant, except when calling a varargs function. +- +- +-File: standards.info, Node: Names, Next: System Portability, Prev: Syntactic Conventions, Up: Writing C +- +-Naming Variables and Functions +-============================== +- +- The names of global variables and functions in a program serve as +-comments of a sort. So don't choose terse names--instead, look for +-names that give useful information about the meaning of the variable or +-function. In a GNU program, names should be English, like other +-comments. +- +- Local variable names can be shorter, because they are used only +-within one context, where (presumably) comments explain their purpose. +- +- Please use underscores to separate words in a name, so that the Emacs +-word commands can be useful within them. Stick to lower case; reserve +-upper case for macros and `enum' constants, and for name-prefixes that +-follow a uniform convention. +- +- For example, you should use names like `ignore_space_change_flag'; +-don't use names like `iCantReadThis'. +- +- Variables that indicate whether command-line options have been +-specified should be named after the meaning of the option, not after +-the option-letter. A comment should state both the exact meaning of +-the option and its letter. For example, +- +- /* Ignore changes in horizontal whitespace (-b). */ +- int ignore_space_change_flag; +- +- When you want to define names with constant integer values, use +-`enum' rather than `#define'. GDB knows about enumeration constants. +- +- Use file names of 14 characters or less, to avoid creating gratuitous +-problems on older System V systems. You can use the program `doschk' +-to test for this. `doschk' also tests for potential name conflicts if +-the files were loaded onto an MS-DOS file system--something you may or +-may not care about. +- +- +-File: standards.info, Node: System Portability, Next: CPU Portability, Prev: Names, Up: Writing C +- +-Portability between System Types +-================================ +- +- In the Unix world, "portability" refers to porting to different Unix +-versions. For a GNU program, this kind of portability is desirable, but +-not paramount. +- +- The primary purpose of GNU software is to run on top of the GNU +-kernel, compiled with the GNU C compiler, on various types of CPU. The +-amount and kinds of variation among GNU systems on different CPUs will +-be comparable to the variation among Linux-based GNU systems or among +-BSD systems today. So the kinds of portability that are absolutely +-necessary are quite limited. +- +- But many users do run GNU software on non-GNU Unix or Unix-like +-systems. So supporting a variety of Unix-like systems is desirable, +-although not paramount. +- +- The easiest way to achieve portability to most Unix-like systems is +-to use Autoconf. It's unlikely that your program needs to know more +-information about the host platform than Autoconf can provide, simply +-because most of the programs that need such knowledge have already been +-written. +- +- Avoid using the format of semi-internal data bases (e.g., +-directories) when there is a higher-level alternative (`readdir'). +- +- As for systems that are not like Unix, such as MSDOS, Windows, the +-Macintosh, VMS, and MVS, supporting them is usually so much work that it +-is better if you don't. +- +- The planned GNU kernel is not finished yet, but you can tell which +-facilities it will provide by looking at the GNU C Library Manual. The +-GNU kernel is based on Mach, so the features of Mach will also be +-available. However, if you use Mach features, you'll probably have +-trouble debugging your program today. +- +- +-File: standards.info, Node: CPU Portability, Next: System Functions, Prev: System Portability, Up: Writing C +- +-Portability between CPUs +-======================== +- +- Even GNU systems will differ because of differences among CPU +-types--for example, difference in byte ordering and alignment +-requirements. It is absolutely essential to handle these differences. +-However, don't make any effort to cater to the possibility that an +-`int' will be less than 32 bits. We don't support 16-bit machines in +-GNU. +- +- Don't assume that the address of an `int' object is also the address +-of its least-significant byte. This is false on big-endian machines. +-Thus, don't make the following mistake: +- +- int c; +- ... +- while ((c = getchar()) != EOF) +- write(file_descriptor, &c, 1); +- +- When calling functions, you need not worry about the difference +-between pointers of various types, or between pointers and integers. +-On most machines, there's no difference anyway. As for the few +-machines where there is a difference, all of them support ANSI C, so +-you can use prototypes (conditionalized to be active only in ANSI C) to +-make the code work on those systems. +- +- In certain cases, it is ok to pass integer and pointer arguments +-indiscriminately to the same function, and use no prototype on any +-system. For example, many GNU programs have error-reporting functions +-that pass their arguments along to `printf' and friends: +- +- error (s, a1, a2, a3) +- char *s; +- int a1, a2, a3; +- { +- fprintf (stderr, "error: "); +- fprintf (stderr, s, a1, a2, a3); +- } +- +-In practice, this works on all machines, and it is much simpler than any +-"correct" alternative. Be sure *not* to use a prototype for such +-functions. +- +- However, avoid casting pointers to integers unless you really need +-to. These assumptions really reduce portability, and in most programs +-they are easy to avoid. In the cases where casting pointers to +-integers is essential--such as, a Lisp interpreter which stores type +-information as well as an address in one word--it is ok to do so, but +-you'll have to make explicit provisions to handle different word sizes. +- +- +-File: standards.info, Node: System Functions, Next: Internationalization, Prev: CPU Portability, Up: Writing C +- +-Calling System Functions +-======================== +- +- C implementations differ substantially. ANSI C reduces but does not +-eliminate the incompatibilities; meanwhile, many users wish to compile +-GNU software with pre-ANSI compilers. This chapter gives +-recommendations for how to use the more or less standard C library +-functions to avoid unnecessary loss of portability. +- +- * Don't use the value of `sprintf'. It returns the number of +- characters written on some systems, but not on all systems. +- +- * `main' should be declared to return type `int'. It should +- terminate either by calling `exit' or by returning the integer +- status code; make sure it cannot ever return an undefined value. +- +- * Don't declare system functions explicitly. +- +- Almost any declaration for a system function is wrong on some +- system. To minimize conflicts, leave it to the system header +- files to declare system functions. If the headers don't declare a +- function, let it remain undeclared. +- +- While it may seem unclean to use a function without declaring it, +- in practice this works fine for most system library functions on +- the systems where this really happens; thus, the disadvantage is +- only theoretical. By contrast, actual declarations have +- frequently caused actual conflicts. +- +- * If you must declare a system function, don't specify the argument +- types. Use an old-style declaration, not an ANSI prototype. The +- more you specify about the function, the more likely a conflict. +- +- * In particular, don't unconditionally declare `malloc' or `realloc'. +- +- Most GNU programs use those functions just once, in functions +- conventionally named `xmalloc' and `xrealloc'. These functions +- call `malloc' and `realloc', respectively, and check the results. +- +- Because `xmalloc' and `xrealloc' are defined in your program, you +- can declare them in other files without any risk of type conflict. +- +- On most systems, `int' is the same length as a pointer; thus, the +- calls to `malloc' and `realloc' work fine. For the few +- exceptional systems (mostly 64-bit machines), you can use +- *conditionalized* declarations of `malloc' and `realloc'--or put +- these declarations in configuration files specific to those +- systems. +- +- * The string functions require special treatment. Some Unix systems +- have a header file `string.h'; others have `strings.h'. Neither +- file name is portable. There are two things you can do: use +- Autoconf to figure out which file to include, or don't include +- either file. +- +- * If you don't include either strings file, you can't get +- declarations for the string functions from the header file in the +- usual way. +- +- That causes less of a problem than you might think. The newer ANSI +- string functions should be avoided anyway because many systems +- still don't support them. The string functions you can use are +- these: +- +- strcpy strncpy strcat strncat +- strlen strcmp strncmp +- strchr strrchr +- +- The copy and concatenate functions work fine without a declaration +- as long as you don't use their values. Using their values without +- a declaration fails on systems where the width of a pointer +- differs from the width of `int', and perhaps in other cases. It +- is trivial to avoid using their values, so do that. +- +- The compare functions and `strlen' work fine without a declaration +- on most systems, possibly all the ones that GNU software runs on. +- You may find it necessary to declare them *conditionally* on a few +- systems. +- +- The search functions must be declared to return `char *'. Luckily, +- there is no variation in the data type they return. But there is +- variation in their names. Some systems give these functions the +- names `index' and `rindex'; other systems use the names `strchr' +- and `strrchr'. Some systems support both pairs of names, but +- neither pair works on all systems. +- +- You should pick a single pair of names and use it throughout your +- program. (Nowadays, it is better to choose `strchr' and `strrchr' +- for new programs, since those are the standard ANSI names.) +- Declare both of those names as functions returning `char *'. On +- systems which don't support those names, define them as macros in +- terms of the other pair. For example, here is what to put at the +- beginning of your file (or in a header) if you want to use the +- names `strchr' and `strrchr' throughout: +- +- #ifndef HAVE_STRCHR +- #define strchr index +- #endif +- #ifndef HAVE_STRRCHR +- #define strrchr rindex +- #endif +- +- char *strchr (); +- char *strrchr (); +- +- Here we assume that `HAVE_STRCHR' and `HAVE_STRRCHR' are macros +-defined in systems where the corresponding functions exist. One way to +-get them properly defined is to use Autoconf. +- +- +-File: standards.info, Node: Internationalization, Next: Mmap, Prev: System Functions, Up: Writing C +- +-Internationalization +-==================== +- +- GNU has a library called GNU gettext that makes it easy to translate +-the messages in a program into various languages. You should use this +-library in every program. Use English for the messages as they appear +-in the program, and let gettext provide the way to translate them into +-other languages. +- +- Using GNU gettext involves putting a call to the `gettext' macro +-around each string that might need translation--like this: +- +- printf (gettext ("Processing file `%s'...")); +- +-This permits GNU gettext to replace the string `"Processing file +-`%s'..."' with a translated version. +- +- Once a program uses gettext, please make a point of writing calls to +-`gettext' when you add new strings that call for translation. +- +- Using GNU gettext in a package involves specifying a "text domain +-name" for the package. The text domain name is used to separate the +-translations for this package from the translations for other packages. +-Normally, the text domain name should be the same as the name of the +-package--for example, `fileutils' for the GNU file utilities. +- +- To enable gettext to work well, avoid writing code that makes +-assumptions about the structure of words or sentences. When you want +-the precise text of a sentence to vary depending on the data, use two or +-more alternative string constants each containing a complete sentences, +-rather than inserting conditionalized words or phrases into a single +-sentence framework. +- +- Here is an example of what not to do: +- +- printf ("%d file%s processed", nfiles, +- nfiles != 1 ? "s" : ""); +- +-The problem with that example is that it assumes that plurals are made +-by adding `s'. If you apply gettext to the format string, like this, +- +- printf (gettext ("%d file%s processed"), nfiles, +- nfiles != 1 ? "s" : ""); +- +-the message can use different words, but it will still be forced to use +-`s' for the plural. Here is a better way: +- +- printf ((nfiles != 1 ? "%d files processed" +- : "%d file processed"), +- nfiles); +- +-This way, you can apply gettext to each of the two strings +-independently: +- +- printf ((nfiles != 1 ? gettext ("%d files processed") +- : gettext ("%d file processed")), +- nfiles); +- +-This can be any method of forming the plural of the word for "file", and +-also handles languages that require agreement in the word for +-"processed". +- +- A similar problem appears at the level of sentence structure with +-this code: +- +- printf ("# Implicit rule search has%s been done.\n", +- f->tried_implicit ? "" : " not"); +- +-Adding `gettext' calls to this code cannot give correct results for all +-languages, because negation in some languages requires adding words at +-more than one place in the sentence. By contrast, adding `gettext' +-calls does the job straightfowardly if the code starts out like this: +- +- printf (f->tried_implicit +- ? "# Implicit rule search has been done.\n", +- : "# Implicit rule search has not been done.\n"); +- +- +-File: standards.info, Node: Mmap, Prev: Internationalization, Up: Writing C +- +-Mmap +-==== +- +- Don't assume that `mmap' either works on all files or fails for all +-files. It may work on some files and fail on others. +- +- The proper way to use `mmap' is to try it on the specific file for +-which you want to use it--and if `mmap' doesn't work, fall back on +-doing the job in another way using `read' and `write'. +- +- The reason this precaution is needed is that the GNU kernel (the +-HURD) provides a user-extensible file system, in which there can be many +-different kinds of "ordinary files." Many of them support `mmap', but +-some do not. It is important to make programs handle all these kinds +-of files. +- +- +-File: standards.info, Node: Documentation, Next: Managing Releases, Prev: Writing C, Up: Top +- +-Documenting Programs +-******************** +- +-* Menu: +- +-* GNU Manuals:: Writing proper manuals. +-* Manual Structure Details:: Specific structure conventions. +-* NEWS File:: NEWS files supplement manuals. +-* Change Logs:: Recording Changes +-* Man Pages:: Man pages are secondary. +-* Reading other Manuals:: How far you can go in learning +- from other manuals. +- +- +-File: standards.info, Node: GNU Manuals, Next: Manual Structure Details, Up: Documentation +- +-GNU Manuals +-=========== +- +- The preferred way to document part of the GNU system is to write a +-manual in the Texinfo formatting language. See the Texinfo manual, +-either the hardcopy, or the on-line version available through `info' or +-the Emacs Info subsystem (`C-h i'). +- +- Programmers often find it most natural to structure the documentation +-following the structure of the implementation, which they know. But +-this structure is not necessarily good for explaining how to use the +-program; it may be irrelevant and confusing for a user. +- +- At every level, from the sentences in a paragraph to the grouping of +-topics into separate manuals, the right way to structure documentation +-is according to the concepts and questions that a user will have in mind +-when reading it. Sometimes this structure of ideas matches the +-structure of the implementation of the software being documented--but +-often they are different. Often the most important part of learning to +-write good documentation is learning to notice when you are structuring +-the documentation like the implementation, and think about better +-alternatives. +- +- For example, each program in the GNU system probably ought to be +-documented in one manual; but this does not mean each program should +-have its own manual. That would be following the structure of the +-implementation, rather than the structure that helps the user +-understand. +- +- Instead, each manual should cover a coherent *topic*. For example, +-instead of a manual for `diff' and a manual for `diff3', we have one +-manual for "comparison of files" which covers both of those programs, +-as well as `cmp'. By documenting these programs together, we can make +-the whole subject clearer. +- +- The manual which discusses a program should document all of the +-program's command-line options and all of its commands. It should give +-examples of their use. But don't organize the manual as a list of +-features. Instead, organize it logically, by subtopics. Address the +-questions that a user will ask when thinking about the job that the +-program does. +- +- In general, a GNU manual should serve both as tutorial and reference. +-It should be set up for convenient access to each topic through Info, +-and for reading straight through (appendixes aside). A GNU manual +-should give a good introduction to a beginner reading through from the +-start, and should also provide all the details that hackers want. +- +- That is not as hard as it first sounds. Arrange each chapter as a +-logical breakdown of its topic, but order the sections, and write their +-text, so that reading the chapter straight through makes sense. Do +-likewise when structuring the book into chapters, and when structuring a +-section into paragraphs. The watchword is, *at each point, address the +-most fundamental and important issue raised by the preceding text.* +- +- If necessary, add extra chapters at the beginning of the manual which +-are purely tutorial and cover the basics of the subject. These provide +-the framework for a beginner to understand the rest of the manual. The +-Bison manual provides a good example of how to do this. +- +- Don't use Unix man pages as a model for how to write GNU +-documentation; most of them are terse, badly structured, and give +-inadequate explanation of the underlying concepts. (There are, of +-course exceptions.) Also Unix man pages use a particular format which +-is different from what we use in GNU manuals. +- +- Please do not use the term "pathname" that is used in Unix +-documentation; use "file name" (two words) instead. We use the term +-"path" only for search paths, which are lists of file names. +- +- Please do not use the term "illegal" to refer to erroneous input to a +-computer program. Please use "invalid" for this, and reserve the term +-"illegal" for violations of law. +- +- +-File: standards.info, Node: Manual Structure Details, Next: NEWS File, Prev: GNU Manuals, Up: Documentation +- +-Manual Structure Details +-======================== +- +- The title page of the manual should state the version of the +-programs or packages documented in the manual. The Top node of the +-manual should also contain this information. If the manual is changing +-more frequently than or independent of the program, also state a version +-number for the manual in both of these places. +- +- Each program documented in the manual should should have a node named +-`PROGRAM Invocation' or `Invoking PROGRAM'. This node (together with +-its subnodes, if any) should describe the program's command line +-arguments and how to run it (the sort of information people would look +-in a man page for). Start with an `@example' containing a template for +-all the options and arguments that the program uses. +- +- Alternatively, put a menu item in some menu whose item name fits one +-of the above patterns. This identifies the node which that item points +-to as the node for this purpose, regardless of the node's actual name. +- +- There will be automatic features for specifying a program name and +-quickly reading just this part of its manual. +- +- If one manual describes several programs, it should have such a node +-for each program described. +- +- +-File: standards.info, Node: NEWS File, Next: Change Logs, Prev: Manual Structure Details, Up: Documentation +- +-The NEWS File +-============= +- +- In addition to its manual, the package should have a file named +-`NEWS' which contains a list of user-visible changes worth mentioning. +-In each new release, add items to the front of the file and identify +-the version they pertain to. Don't discard old items; leave them in +-the file after the newer items. This way, a user upgrading from any +-previous version can see what is new. +- +- If the `NEWS' file gets very long, move some of the older items into +-a file named `ONEWS' and put a note at the end referring the user to +-that file. +- +- +-File: standards.info, Node: Change Logs, Next: Man Pages, Prev: NEWS File, Up: Documentation +- +-Change Logs +-=========== +- +- Keep a change log to describe all the changes made to program source +-files. The purpose of this is so that people investigating bugs in the +-future will know about the changes that might have introduced the bug. +-Often a new bug can be found by looking at what was recently changed. +-More importantly, change logs can help you eliminate conceptual +-inconsistencies between different parts of a program, by giving you a +-history of how the conflicting concepts arose and who they came from. +- +-* Menu: +- +-* Change Log Concepts:: +-* Style of Change Logs:: +-* Simple Changes:: +-* Conditional Changes:: +- +- +-File: standards.info, Node: Change Log Concepts, Next: Style of Change Logs, Up: Change Logs +- +-Change Log Concepts +-------------------- +- +- You can think of the change log as a conceptual "undo list" which +-explains how earlier versions were different from the current version. +-People can see the current version; they don't need the change log to +-tell them what is in it. What they want from a change log is a clear +-explanation of how the earlier version differed. +- +- The change log file is normally called `ChangeLog' and covers an +-entire directory. Each directory can have its own change log, or a +-directory can use the change log of its parent directory-it's up to you. +- +- Another alternative is to record change log information with a +-version control system such as RCS or CVS. This can be converted +-automatically to a `ChangeLog' file. +- +- There's no need to describe the full purpose of the changes or how +-they work together. If you think that a change calls for explanation, +-you're probably right. Please do explain it--but please put the +-explanation in comments in the code, where people will see it whenever +-they see the code. For example, "New function" is enough for the +-change log when you add a function, because there should be a comment +-before the function definition to explain what it does. +- +- However, sometimes it is useful to write one line to describe the +-overall purpose of a batch of changes. +- +- The easiest way to add an entry to `ChangeLog' is with the Emacs +-command `M-x add-change-log-entry'. An entry should have an asterisk, +-the name of the changed file, and then in parentheses the name of the +-changed functions, variables or whatever, followed by a colon. Then +-describe the changes you made to that function or variable. +- +- +-File: standards.info, Node: Style of Change Logs, Next: Simple Changes, Prev: Change Log Concepts, Up: Change Logs +- +-Style of Change Logs +--------------------- +- +- Here are some examples of change log entries: +- +- * register.el (insert-register): Return nil. +- (jump-to-register): Likewise. +- +- * sort.el (sort-subr): Return nil. +- +- * tex-mode.el (tex-bibtex-file, tex-file, tex-region): +- Restart the tex shell if process is gone or stopped. +- (tex-shell-running): New function. +- +- * expr.c (store_one_arg): Round size up for move_block_to_reg. +- (expand_call): Round up when emitting USE insns. +- * stmt.c (assign_parms): Round size up for move_block_from_reg. +- +- It's important to name the changed function or variable in full. +-Don't abbreviate function or variable names, and don't combine them. +-Subsequent maintainers will often search for a function name to find all +-the change log entries that pertain to it; if you abbreviate the name, +-they won't find it when they search. +- +- For example, some people are tempted to abbreviate groups of function +-names by writing `* register.el ({insert,jump-to}-register)'; this is +-not a good idea, since searching for `jump-to-register' or +-`insert-register' would not find that entry. +- +- Separate unrelated change log entries with blank lines. When two +-entries represent parts of the same change, so that they work together, +-then don't put blank lines between them. Then you can omit the file +-name and the asterisk when successive entries are in the same file. +- +- +-File: standards.info, Node: Simple Changes, Next: Conditional Changes, Prev: Style of Change Logs, Up: Change Logs +- +-Simple Changes +--------------- +- +- Certain simple kinds of changes don't need much detail in the change +-log. +- +- When you change the calling sequence of a function in a simple +-fashion, and you change all the callers of the function, there is no +-need to make individual entries for all the callers that you changed. +-Just write in the entry for the function being called, "All callers +-changed." +- +- * keyboard.c (Fcommand_execute): New arg SPECIAL. +- All callers changed. +- +- When you change just comments or doc strings, it is enough to write +-an entry for the file, without mentioning the functions. Just "Doc +-fixes" is enough for the change log. +- +- There's no need to make change log entries for documentation files. +-This is because documentation is not susceptible to bugs that are hard +-to fix. Documentation does not consist of parts that must interact in a +-precisely engineered fashion. To correct an error, you need not know +-the history of the erroneous passage; it is enough to compare what the +-documentation says with the way the program actually works. +- +- +-File: standards.info, Node: Conditional Changes, Prev: Simple Changes, Up: Change Logs +- +-Conditional Changes +-------------------- +- +- C programs often contain compile-time `#if' conditionals. Many +-changes are conditional; sometimes you add a new definition which is +-entirely contained in a conditional. It is very useful to indicate in +-the change log the conditions for which the change applies. +- +- Our convention for indicating conditional changes is to use square +-brackets around the name of the condition. +- +- Here is a simple example, describing a change which is conditional +-but does not have a function or entity name associated with it: +- +- * xterm.c [SOLARIS2]: Include string.h. +- +- Here is an entry describing a new definition which is entirely +-conditional. This new definition for the macro `FRAME_WINDOW_P' is +-used only when `HAVE_X_WINDOWS' is defined: +- +- * frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined. +- +- Here is an entry for a change within the function `init_display', +-whose definition as a whole is unconditional, but the changes themselves +-are contained in a `#ifdef HAVE_LIBNCURSES' conditional: +- +- * dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent. +- +- Here is an entry for a change that takes affect only when a certain +-macro is *not* defined: +- +- (gethostname) [!HAVE_SOCKETS]: Replace with winsock version. +- +- +-File: standards.info, Node: Man Pages, Next: Reading other Manuals, Prev: Change Logs, Up: Documentation +- +-Man Pages +-========= +- +- In the GNU project, man pages are secondary. It is not necessary or +-expected for every GNU program to have a man page, but some of them do. +-It's your choice whether to include a man page in your program. +- +- When you make this decision, consider that supporting a man page +-requires continual effort each time the program is changed. The time +-you spend on the man page is time taken away from more useful work. +- +- For a simple program which changes little, updating the man page may +-be a small job. Then there is little reason not to include a man page, +-if you have one. +- +- For a large program that changes a great deal, updating a man page +-may be a substantial burden. If a user offers to donate a man page, +-you may find this gift costly to accept. It may be better to refuse +-the man page unless the same person agrees to take full responsibility +-for maintaining it--so that you can wash your hands of it entirely. If +-this volunteer later ceases to do the job, then don't feel obliged to +-pick it up yourself; it may be better to withdraw the man page from the +-distribution until someone else agrees to update it. +- +- When a program changes only a little, you may feel that the +-discrepancies are small enough that the man page remains useful without +-updating. If so, put a prominent note near the beginning of the man +-page explaining that you don't maintain it and that the Texinfo manual +-is more authoritative. The note should say how to access the Texinfo +-documentation. +- +- +-File: standards.info, Node: Reading other Manuals, Prev: Man Pages, Up: Documentation +- +-Reading other Manuals +-===================== +- +- There may be non-free books or documentation files that describe the +-program you are documenting. +- +- It is ok to use these documents for reference, just as the author of +-a new algebra textbook can read other books on algebra. A large portion +-of any non-fiction book consists of facts, in this case facts about how +-a certain program works, and these facts are necessarily the same for +-everyone who writes about the subject. But be careful not to copy your +-outline structure, wording, tables or examples from preexisting non-free +-documentation. Copying from free documentation may be ok; please check +-with the FSF about the individual case. +- +- +-File: standards.info, Node: Managing Releases, Prev: Documentation, Up: Top +- +-The Release Process +-******************* +- +- Making a release is more than just bundling up your source files in a +-tar file and putting it up for FTP. You should set up your software so +-that it can be configured to run on a variety of systems. Your Makefile +-should conform to the GNU standards described below, and your directory +-layout should also conform to the standards discussed below. Doing so +-makes it easy to include your package into the larger framework of all +-GNU software. +- +-* Menu: +- +-* Configuration:: How Configuration Should Work +-* Makefile Conventions:: Makefile Conventions +-* Releases:: Making Releases +- +- +-File: standards.info, Node: Configuration, Next: Makefile Conventions, Up: Managing Releases +- +-How Configuration Should Work +-============================= +- +- Each GNU distribution should come with a shell script named +-`configure'. This script is given arguments which describe the kind of +-machine and system you want to compile the program for. +- +- The `configure' script must record the configuration options so that +-they affect compilation. +- +- One way to do this is to make a link from a standard name such as +-`config.h' to the proper configuration file for the chosen system. If +-you use this technique, the distribution should *not* contain a file +-named `config.h'. This is so that people won't be able to build the +-program without configuring it first. +- +- Another thing that `configure' can do is to edit the Makefile. If +-you do this, the distribution should *not* contain a file named +-`Makefile'. Instead, it should include a file `Makefile.in' which +-contains the input used for editing. Once again, this is so that people +-won't be able to build the program without configuring it first. +- +- If `configure' does write the `Makefile', then `Makefile' should +-have a target named `Makefile' which causes `configure' to be rerun, +-setting up the same configuration that was set up last time. The files +-that `configure' reads should be listed as dependencies of `Makefile'. +- +- All the files which are output from the `configure' script should +-have comments at the beginning explaining that they were generated +-automatically using `configure'. This is so that users won't think of +-trying to edit them by hand. +- +- The `configure' script should write a file named `config.status' +-which describes which configuration options were specified when the +-program was last configured. This file should be a shell script which, +-if run, will recreate the same configuration. +- +- The `configure' script should accept an option of the form +-`--srcdir=DIRNAME' to specify the directory where sources are found (if +-it is not the current directory). This makes it possible to build the +-program in a separate directory, so that the actual source directory is +-not modified. +- +- If the user does not specify `--srcdir', then `configure' should +-check both `.' and `..' to see if it can find the sources. If it finds +-the sources in one of these places, it should use them from there. +-Otherwise, it should report that it cannot find the sources, and should +-exit with nonzero status. +- +- Usually the easy way to support `--srcdir' is by editing a +-definition of `VPATH' into the Makefile. Some rules may need to refer +-explicitly to the specified source directory. To make this possible, +-`configure' can add to the Makefile a variable named `srcdir' whose +-value is precisely the specified directory. +- +- The `configure' script should also take an argument which specifies +-the type of system to build the program for. This argument should look +-like this: +- +- CPU-COMPANY-SYSTEM +- +- For example, a Sun 3 might be `m68k-sun-sunos4.1'. +- +- The `configure' script needs to be able to decode all plausible +-alternatives for how to describe a machine. Thus, `sun3-sunos4.1' +-would be a valid alias. For many programs, `vax-dec-ultrix' would be +-an alias for `vax-dec-bsd', simply because the differences between +-Ultrix and BSD are rarely noticeable, but a few programs might need to +-distinguish them. +- +- There is a shell script called `config.sub' that you can use as a +-subroutine to validate system types and canonicalize aliases. +- +- Other options are permitted to specify in more detail the software +-or hardware present on the machine, and include or exclude optional +-parts of the package: +- +-`--enable-FEATURE[=PARAMETER]' +- Configure the package to build and install an optional user-level +- facility called FEATURE. This allows users to choose which +- optional features to include. Giving an optional PARAMETER of +- `no' should omit FEATURE, if it is built by default. +- +- No `--enable' option should *ever* cause one feature to replace +- another. No `--enable' option should ever substitute one useful +- behavior for another useful behavior. The only proper use for +- `--enable' is for questions of whether to build part of the program +- or exclude it. +- +-`--with-PACKAGE' +- The package PACKAGE will be installed, so configure this package +- to work with PACKAGE. +- +- Possible values of PACKAGE include `gnu-as' (or `gas'), `gnu-ld', +- `gnu-libc', `gdb', `x', and `x-toolkit'. +- +- Do not use a `--with' option to specify the file name to use to +- find certain files. That is outside the scope of what `--with' +- options are for. +- +-`--nfp' +- The target machine has no floating point processor. +- +-`--gas' +- The target machine assembler is GAS, the GNU assembler. This is +- obsolete; users should use `--with-gnu-as' instead. +- +-`--x' +- The target machine has the X Window System installed. This is +- obsolete; users should use `--with-x' instead. +- +- All `configure' scripts should accept all of these "detail" options, +-whether or not they make any difference to the particular package at +-hand. In particular, they should accept any option that starts with +-`--with-' or `--enable-'. This is so users will be able to configure +-an entire GNU source tree at once with a single set of options. +- +- You will note that the categories `--with-' and `--enable-' are +-narrow: they *do not* provide a place for any sort of option you might +-think of. That is deliberate. We want to limit the possible +-configuration options in GNU software. We do not want GNU programs to +-have idiosyncratic configuration options. +- +- Packages that perform part of the compilation process may support +-cross-compilation. In such a case, the host and target machines for +-the program may be different. The `configure' script should normally +-treat the specified type of system as both the host and the target, +-thus producing a program which works for the same type of machine that +-it runs on. +- +- The way to build a cross-compiler, cross-assembler, or what have +-you, is to specify the option `--host=HOSTTYPE' when running +-`configure'. This specifies the host system without changing the type +-of target system. The syntax for HOSTTYPE is the same as described +-above. +- +- Bootstrapping a cross-compiler requires compiling it on a machine +-other than the host it will run on. Compilation packages accept a +-configuration option `--build=HOSTTYPE' for specifying the +-configuration on which you will compile them, in case that is different +-from the host. +- +- Programs for which cross-operation is not meaningful need not accept +-the `--host' option, because configuring an entire operating system for +-cross-operation is not a meaningful thing. +- +- Some programs have ways of configuring themselves automatically. If +-your program is set up to do this, your `configure' script can simply +-ignore most of its arguments. +- +- +-File: standards.info, Node: Makefile Conventions, Next: Releases, Prev: Configuration, Up: Managing Releases +- +-Makefile Conventions +-==================== +- +- This node describes conventions for writing the Makefiles for GNU +-programs. +- +-* Menu: +- +-* Makefile Basics:: General Conventions for Makefiles +-* Utilities in Makefiles:: Utilities in Makefiles +-* Command Variables:: Variables for Specifying Commands +-* Directory Variables:: Variables for Installation Directories +-* Standard Targets:: Standard Targets for Users +-* Install Command Categories:: Three categories of commands in the `install' +- rule: normal, pre-install and post-install. +- +- +-File: standards.info, Node: Makefile Basics, Next: Utilities in Makefiles, Up: Makefile Conventions +- +-General Conventions for Makefiles +---------------------------------- +- +- Every Makefile should contain this line: +- +- SHELL = /bin/sh +- +-to avoid trouble on systems where the `SHELL' variable might be +-inherited from the environment. (This is never a problem with GNU +-`make'.) +- +- Different `make' programs have incompatible suffix lists and +-implicit rules, and this sometimes creates confusion or misbehavior. So +-it is a good idea to set the suffix list explicitly using only the +-suffixes you need in the particular Makefile, like this: +- +- .SUFFIXES: +- .SUFFIXES: .c .o +- +-The first line clears out the suffix list, the second introduces all +-suffixes which may be subject to implicit rules in this Makefile. +- +- Don't assume that `.' is in the path for command execution. When +-you need to run programs that are a part of your package during the +-make, please make sure that it uses `./' if the program is built as +-part of the make or `$(srcdir)/' if the file is an unchanging part of +-the source code. Without one of these prefixes, the current search +-path is used. +- +- The distinction between `./' (the "build directory") and +-`$(srcdir)/' (the "source directory") is important because users can +-build in a separate directory using the `--srcdir' option to +-`configure'. A rule of the form: +- +- foo.1 : foo.man sedscript +- sed -e sedscript foo.man > foo.1 +- +-will fail when the build directory is not the source directory, because +-`foo.man' and `sedscript' are in the the source directory. +- +- When using GNU `make', relying on `VPATH' to find the source file +-will work in the case where there is a single dependency file, since +-the `make' automatic variable `$<' will represent the source file +-wherever it is. (Many versions of `make' set `$<' only in implicit +-rules.) A Makefile target like +- +- foo.o : bar.c +- $(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o +- +-should instead be written as +- +- foo.o : bar.c +- $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@ +- +-in order to allow `VPATH' to work correctly. When the target has +-multiple dependencies, using an explicit `$(srcdir)' is the easiest way +-to make the rule work well. For example, the target above for `foo.1' +-is best written as: +- +- foo.1 : foo.man sedscript +- sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@ +- +- GNU distributions usually contain some files which are not source +-files--for example, Info files, and the output from Autoconf, Automake, +-Bison or Flex. Since these files normally appear in the source +-directory, they should always appear in the source directory, not in the +-build directory. So Makefile rules to update them should put the +-updated files in the source directory. +- +- However, if a file does not appear in the distribution, then the +-Makefile should not put it in the source directory, because building a +-program in ordinary circumstances should not modify the source directory +-in any way. +- +- Try to make the build and installation targets, at least (and all +-their subtargets) work correctly with a parallel `make'. +- +- +-File: standards.info, Node: Utilities in Makefiles, Next: Command Variables, Prev: Makefile Basics, Up: Makefile Conventions +- +-Utilities in Makefiles +----------------------- +- +- Write the Makefile commands (and any shell scripts, such as +-`configure') to run in `sh', not in `csh'. Don't use any special +-features of `ksh' or `bash'. +- +- The `configure' script and the Makefile rules for building and +-installation should not use any utilities directly except these: +- +- cat cmp cp diff echo egrep expr false grep install-info +- ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true +- +- The compression program `gzip' can be used in the `dist' rule. +- +- Stick to the generally supported options for these programs. For +-example, don't use `mkdir -p', convenient as it may be, because most +-systems don't support it. +- +- It is a good idea to avoid creating symbolic links in makefiles, +-since a few systems don't support them. +- +- The Makefile rules for building and installation can also use +-compilers and related programs, but should do so via `make' variables +-so that the user can substitute alternatives. Here are some of the +-programs we mean: +- +- ar bison cc flex install ld ldconfig lex +- make makeinfo ranlib texi2dvi yacc +- +- Use the following `make' variables to run those programs: +- +- $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX) +- $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) +- +- When you use `ranlib' or `ldconfig', you should make sure nothing +-bad happens if the system does not have the program in question. +-Arrange to ignore an error from that command, and print a message before +-the command to tell the user that failure of this command does not mean +-a problem. (The Autoconf `AC_PROG_RANLIB' macro can help with this.) +- +- If you use symbolic links, you should implement a fallback for +-systems that don't have symbolic links. +- +- Additional utilities that can be used via Make variables are: +- +- chgrp chmod chown mknod +- +- It is ok to use other utilities in Makefile portions (or scripts) +-intended only for particular systems where you know those utilities +-exist. +- +- +-File: standards.info, Node: Command Variables, Next: Directory Variables, Prev: Utilities in Makefiles, Up: Makefile Conventions +- +-Variables for Specifying Commands +---------------------------------- +- +- Makefiles should provide variables for overriding certain commands, +-options, and so on. +- +- In particular, you should run most utility programs via variables. +-Thus, if you use Bison, have a variable named `BISON' whose default +-value is set with `BISON = bison', and refer to it with `$(BISON)' +-whenever you need to use Bison. +- +- File management utilities such as `ln', `rm', `mv', and so on, need +-not be referred to through variables in this way, since users don't +-need to replace them with other programs. +- +- Each program-name variable should come with an options variable that +-is used to supply options to the program. Append `FLAGS' to the +-program-name variable name to get the options variable name--for +-example, `BISONFLAGS'. (The names `CFLAGS' for the C compiler, +-`YFLAGS' for yacc, and `LFLAGS' for lex, are exceptions to this rule, +-but we keep them because they are standard.) Use `CPPFLAGS' in any +-compilation command that runs the preprocessor, and use `LDFLAGS' in +-any compilation command that does linking as well as in any direct use +-of `ld'. +- +- If there are C compiler options that *must* be used for proper +-compilation of certain files, do not include them in `CFLAGS'. Users +-expect to be able to specify `CFLAGS' freely themselves. Instead, +-arrange to pass the necessary options to the C compiler independently +-of `CFLAGS', by writing them explicitly in the compilation commands or +-by defining an implicit rule, like this: +- +- CFLAGS = -g +- ALL_CFLAGS = -I. $(CFLAGS) +- .c.o: +- $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< +- +- Do include the `-g' option in `CFLAGS', because that is not +-*required* for proper compilation. You can consider it a default that +-is only recommended. If the package is set up so that it is compiled +-with GCC by default, then you might as well include `-O' in the default +-value of `CFLAGS' as well. +- +- Put `CFLAGS' last in the compilation command, after other variables +-containing compiler options, so the user can use `CFLAGS' to override +-the others. +- +- `CFLAGS' should be used in every invocation of the C compiler, both +-those which do compilation and those which do linking. +- +- Every Makefile should define the variable `INSTALL', which is the +-basic command for installing a file into the system. +- +- Every Makefile should also define the variables `INSTALL_PROGRAM' +-and `INSTALL_DATA'. (The default for each of these should be +-`$(INSTALL)'.) Then it should use those variables as the commands for +-actual installation, for executables and nonexecutables respectively. +-Use these variables as follows: +- +- $(INSTALL_PROGRAM) foo $(bindir)/foo +- $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a +- +- Optionally, you may prepend the value of `DESTDIR' to the target +-filename. Doing this allows the installer to create a snapshot of the +-installation to be copied onto the real target filesystem later. Do not +-set the value of `DESTDIR' in your Makefile, and do not include it in +-any installed files. With support for `DESTDIR', the above examples +-become: +- +- $(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo +- $(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a +- +-Always use a file name, not a directory name, as the second argument of +-the installation commands. Use a separate command for each file to be +-installed. +- +- +-File: standards.info, Node: Directory Variables, Next: Standard Targets, Prev: Command Variables, Up: Makefile Conventions +- +-Variables for Installation Directories +--------------------------------------- +- +- Installation directories should always be named by variables, so it +-is easy to install in a nonstandard place. The standard names for these +-variables are described below. They are based on a standard filesystem +-layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and +-other modern operating systems. +- +- These two variables set the root for the installation. All the other +-installation directories should be subdirectories of one of these two, +-and nothing should be directly installed into these two directories. +- +-`prefix' +- A prefix used in constructing the default values of the variables +- listed below. The default value of `prefix' should be +- `/usr/local'. When building the complete GNU system, the prefix +- will be empty and `/usr' will be a symbolic link to `/'. (If you +- are using Autoconf, write it as `@prefix@'.) +- +- Running `make install' with a different value of `prefix' from the +- one used to build the program should NOT recompile the program. +- +-`exec_prefix' +- A prefix used in constructing the default values of some of the +- variables listed below. The default value of `exec_prefix' should +- be `$(prefix)'. (If you are using Autoconf, write it as +- `@exec_prefix@'.) +- +- Generally, `$(exec_prefix)' is used for directories that contain +- machine-specific files (such as executables and subroutine +- libraries), while `$(prefix)' is used directly for other +- directories. +- +- Running `make install' with a different value of `exec_prefix' +- from the one used to build the program should NOT recompile the +- program. +- +- Executable programs are installed in one of the following +-directories. +- +-`bindir' +- The directory for installing executable programs that users can +- run. This should normally be `/usr/local/bin', but write it as +- `$(exec_prefix)/bin'. (If you are using Autoconf, write it as +- `@bindir@'.) +- +-`sbindir' +- The directory for installing executable programs that can be run +- from the shell, but are only generally useful to system +- administrators. This should normally be `/usr/local/sbin', but +- write it as `$(exec_prefix)/sbin'. (If you are using Autoconf, +- write it as `@sbindir@'.) +- +-`libexecdir' +- The directory for installing executable programs to be run by other +- programs rather than by users. This directory should normally be +- `/usr/local/libexec', but write it as `$(exec_prefix)/libexec'. +- (If you are using Autoconf, write it as `@libexecdir@'.) +- +- Data files used by the program during its execution are divided into +-categories in two ways. +- +- * Some files are normally modified by programs; others are never +- normally modified (though users may edit some of these). +- +- * Some files are architecture-independent and can be shared by all +- machines at a site; some are architecture-dependent and can be +- shared only by machines of the same kind and operating system; +- others may never be shared between two machines. +- +- This makes for six different possibilities. However, we want to +-discourage the use of architecture-dependent files, aside from object +-files and libraries. It is much cleaner to make other data files +-architecture-independent, and it is generally not hard. +- +- Therefore, here are the variables Makefiles should use to specify +-directories: +- +-`datadir' +- The directory for installing read-only architecture independent +- data files. This should normally be `/usr/local/share', but write +- it as `$(prefix)/share'. (If you are using Autoconf, write it as +- `@datadir@'.) As a special exception, see `$(infodir)' and +- `$(includedir)' below. +- +-`sysconfdir' +- The directory for installing read-only data files that pertain to a +- single machine-that is to say, files for configuring a host. +- Mailer and network configuration files, `/etc/passwd', and so +- forth belong here. All the files in this directory should be +- ordinary ASCII text files. This directory should normally be +- `/usr/local/etc', but write it as `$(prefix)/etc'. (If you are +- using Autoconf, write it as `@sysconfdir@'.) +- +- Do not install executables here in this directory (they probably +- belong in `$(libexecdir)' or `$(sbindir)'). Also do not install +- files that are modified in the normal course of their use (programs +- whose purpose is to change the configuration of the system +- excluded). Those probably belong in `$(localstatedir)'. +- +-`sharedstatedir' +- The directory for installing architecture-independent data files +- which the programs modify while they run. This should normally be +- `/usr/local/com', but write it as `$(prefix)/com'. (If you are +- using Autoconf, write it as `@sharedstatedir@'.) +- +-`localstatedir' +- The directory for installing data files which the programs modify +- while they run, and that pertain to one specific machine. Users +- should never need to modify files in this directory to configure +- the package's operation; put such configuration information in +- separate files that go in `$(datadir)' or `$(sysconfdir)'. +- `$(localstatedir)' should normally be `/usr/local/var', but write +- it as `$(prefix)/var'. (If you are using Autoconf, write it as +- `@localstatedir@'.) +- +-`libdir' +- The directory for object files and libraries of object code. Do +- not install executables here, they probably ought to go in +- `$(libexecdir)' instead. The value of `libdir' should normally be +- `/usr/local/lib', but write it as `$(exec_prefix)/lib'. (If you +- are using Autoconf, write it as `@libdir@'.) +- +-`infodir' +- The directory for installing the Info files for this package. By +- default, it should be `/usr/local/info', but it should be written +- as `$(prefix)/info'. (If you are using Autoconf, write it as +- `@infodir@'.) +- +-`lispdir' +- The directory for installing any Emacs Lisp files in this package. +- By default, it should be `/usr/local/share/emacs/site-lisp', but +- it should be written as `$(prefix)/share/emacs/site-lisp'. +- +- If you are using Autoconf, write the default as `@lispdir@'. In +- order to make `@lispdir@' work, you need the following lines in +- your `configure.in' file: +- +- lispdir='${datadir}/emacs/site-lisp' +- AC_SUBST(lispdir) +- +-`includedir' +- The directory for installing header files to be included by user +- programs with the C `#include' preprocessor directive. This +- should normally be `/usr/local/include', but write it as +- `$(prefix)/include'. (If you are using Autoconf, write it as +- `@includedir@'.) +- +- Most compilers other than GCC do not look for header files in +- directory `/usr/local/include'. So installing the header files +- this way is only useful with GCC. Sometimes this is not a problem +- because some libraries are only really intended to work with GCC. +- But some libraries are intended to work with other compilers. +- They should install their header files in two places, one +- specified by `includedir' and one specified by `oldincludedir'. +- +-`oldincludedir' +- The directory for installing `#include' header files for use with +- compilers other than GCC. This should normally be `/usr/include'. +- (If you are using Autoconf, you can write it as `@oldincludedir@'.) +- +- The Makefile commands should check whether the value of +- `oldincludedir' is empty. If it is, they should not try to use +- it; they should cancel the second installation of the header files. +- +- A package should not replace an existing header in this directory +- unless the header came from the same package. Thus, if your Foo +- package provides a header file `foo.h', then it should install the +- header file in the `oldincludedir' directory if either (1) there +- is no `foo.h' there or (2) the `foo.h' that exists came from the +- Foo package. +- +- To tell whether `foo.h' came from the Foo package, put a magic +- string in the file--part of a comment--and `grep' for that string. +- +- Unix-style man pages are installed in one of the following: +- +-`mandir' +- The top-level directory for installing the man pages (if any) for +- this package. It will normally be `/usr/local/man', but you should +- write it as `$(prefix)/man'. (If you are using Autoconf, write it +- as `@mandir@'.) +- +-`man1dir' +- The directory for installing section 1 man pages. Write it as +- `$(mandir)/man1'. +- +-`man2dir' +- The directory for installing section 2 man pages. Write it as +- `$(mandir)/man2' +- +-`...' +- *Don't make the primary documentation for any GNU software be a +- man page. Write a manual in Texinfo instead. Man pages are just +- for the sake of people running GNU software on Unix, which is a +- secondary application only.* +- +-`manext' +- The file name extension for the installed man page. This should +- contain a period followed by the appropriate digit; it should +- normally be `.1'. +- +-`man1ext' +- The file name extension for installed section 1 man pages. +- +-`man2ext' +- The file name extension for installed section 2 man pages. +- +-`...' +- Use these names instead of `manext' if the package needs to +- install man pages in more than one section of the manual. +- +- And finally, you should set the following variable: +- +-`srcdir' +- The directory for the sources being compiled. The value of this +- variable is normally inserted by the `configure' shell script. +- (If you are using Autconf, use `srcdir = @srcdir@'.) +- +- For example: +- +- # Common prefix for installation directories. +- # NOTE: This directory must exist when you start the install. +- prefix = /usr/local +- exec_prefix = $(prefix) +- # Where to put the executable for the command `gcc'. +- bindir = $(exec_prefix)/bin +- # Where to put the directories used by the compiler. +- libexecdir = $(exec_prefix)/libexec +- # Where to put the Info files. +- infodir = $(prefix)/info +- +- If your program installs a large number of files into one of the +-standard user-specified directories, it might be useful to group them +-into a subdirectory particular to that program. If you do this, you +-should write the `install' rule to create these subdirectories. +- +- Do not expect the user to include the subdirectory name in the value +-of any of the variables listed above. The idea of having a uniform set +-of variable names for installation directories is to enable the user to +-specify the exact same values for several different GNU packages. In +-order for this to be useful, all the packages must be designed so that +-they will work sensibly when the user does so. +- +- +-File: standards.info, Node: Standard Targets, Next: Install Command Categories, Prev: Directory Variables, Up: Makefile Conventions +- +-Standard Targets for Users +--------------------------- +- +- All GNU programs should have the following targets in their +-Makefiles: +- +-`all' +- Compile the entire program. This should be the default target. +- This target need not rebuild any documentation files; Info files +- should normally be included in the distribution, and DVI files +- should be made only when explicitly asked for. +- +- By default, the Make rules should compile and link with `-g', so +- that executable programs have debugging symbols. Users who don't +- mind being helpless can strip the executables later if they wish. +- +-`install' +- Compile the program and copy the executables, libraries, and so on +- to the file names where they should reside for actual use. If +- there is a simple test to verify that a program is properly +- installed, this target should run that test. +- +- Do not strip executables when installing them. Devil-may-care +- users can use the `install-strip' target to do that. +- +- If possible, write the `install' target rule so that it does not +- modify anything in the directory where the program was built, +- provided `make all' has just been done. This is convenient for +- building the program under one user name and installing it under +- another. +- +- The commands should create all the directories in which files are +- to be installed, if they don't already exist. This includes the +- directories specified as the values of the variables `prefix' and +- `exec_prefix', as well as all subdirectories that are needed. One +- way to do this is by means of an `installdirs' target as described +- below. +- +- Use `-' before any command for installing a man page, so that +- `make' will ignore any errors. This is in case there are systems +- that don't have the Unix man page documentation system installed. +- +- The way to install Info files is to copy them into `$(infodir)' +- with `$(INSTALL_DATA)' (*note Command Variables::.), and then run +- the `install-info' program if it is present. `install-info' is a +- program that edits the Info `dir' file to add or update the menu +- entry for the given Info file; it is part of the Texinfo package. +- Here is a sample rule to install an Info file: +- +- $(DESTDIR)$(infodir)/foo.info: foo.info +- $(POST_INSTALL) +- # There may be a newer info file in . than in srcdir. +- -if test -f foo.info; then d=.; \ +- else d=$(srcdir); fi; \ +- $(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@; \ +- # Run install-info only if it exists. +- # Use `if' instead of just prepending `-' to the +- # line so we notice real errors from install-info. +- # We use `$(SHELL) -c' because some shells do not +- # fail gracefully when there is an unknown command. +- if $(SHELL) -c 'install-info --version' \ +- >/dev/null 2>&1; then \ +- install-info --dir-file=$(DESTDIR)$(infodir)/dir \ +- $(DESTDIR)$(infodir)/foo.info; \ +- else true; fi +- +- When writing the `install' target, you must classify all the +- commands into three categories: normal ones, "pre-installation" +- commands and "post-installation" commands. *Note Install Command +- Categories::. +- +-`uninstall' +- Delete all the installed files--the copies that the `install' +- target creates. +- +- This rule should not modify the directories where compilation is +- done, only the directories where files are installed. +- +- The uninstallation commands are divided into three categories, +- just like the installation commands. *Note Install Command +- Categories::. +- +-`install-strip' +- Like `install', but strip the executable files while installing +- them. In many cases, the definition of this target can be very +- simple: +- +- install-strip: +- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ +- install +- +- Normally we do not recommend stripping an executable unless you +- are sure the program has no bugs. However, it can be reasonable +- to install a stripped executable for actual execution while saving +- the unstripped executable elsewhere in case there is a bug. +- +-`clean' +- Delete all files from the current directory that are normally +- created by building the program. Don't delete the files that +- record the configuration. Also preserve files that could be made +- by building, but normally aren't because the distribution comes +- with them. +- +- Delete `.dvi' files here if they are not part of the distribution. +- +-`distclean' +- Delete all files from the current directory that are created by +- configuring or building the program. If you have unpacked the +- source and built the program without creating any other files, +- `make distclean' should leave only the files that were in the +- distribution. +- +-`mostlyclean' +- Like `clean', but may refrain from deleting a few files that people +- normally don't want to recompile. For example, the `mostlyclean' +- target for GCC does not delete `libgcc.a', because recompiling it +- is rarely necessary and takes a lot of time. +- +-`maintainer-clean' +- Delete almost everything from the current directory that can be +- reconstructed with this Makefile. This typically includes +- everything deleted by `distclean', plus more: C source files +- produced by Bison, tags tables, Info files, and so on. +- +- The reason we say "almost everything" is that running the command +- `make maintainer-clean' should not delete `configure' even if +- `configure' can be remade using a rule in the Makefile. More +- generally, `make maintainer-clean' should not delete anything that +- needs to exist in order to run `configure' and then begin to build +- the program. This is the only exception; `maintainer-clean' should +- delete everything else that can be rebuilt. +- +- The `maintainer-clean' target is intended to be used by a +- maintainer of the package, not by ordinary users. You may need +- special tools to reconstruct some of the files that `make +- maintainer-clean' deletes. Since these files are normally +- included in the distribution, we don't take care to make them easy +- to reconstruct. If you find you need to unpack the full +- distribution again, don't blame us. +- +- To help make users aware of this, the commands for the special +- `maintainer-clean' target should start with these two: +- +- @echo 'This command is intended for maintainers to use; it' +- @echo 'deletes files that may need special tools to rebuild.' +- +-`TAGS' +- Update a tags table for this program. +- +-`info' +- Generate any Info files needed. The best way to write the rules +- is as follows: +- +- info: foo.info +- +- foo.info: foo.texi chap1.texi chap2.texi +- $(MAKEINFO) $(srcdir)/foo.texi +- +- You must define the variable `MAKEINFO' in the Makefile. It should +- run the `makeinfo' program, which is part of the Texinfo +- distribution. +- +- Normally a GNU distribution comes with Info files, and that means +- the Info files are present in the source directory. Therefore, +- the Make rule for an info file should update it in the source +- directory. When users build the package, ordinarily Make will not +- update the Info files because they will already be up to date. +- +-`dvi' +- Generate DVI files for all Texinfo documentation. For example: +- +- dvi: foo.dvi +- +- foo.dvi: foo.texi chap1.texi chap2.texi +- $(TEXI2DVI) $(srcdir)/foo.texi +- +- You must define the variable `TEXI2DVI' in the Makefile. It should +- run the program `texi2dvi', which is part of the Texinfo +- distribution.(1) Alternatively, write just the dependencies, and +- allow GNU `make' to provide the command. +- +-`dist' +- Create a distribution tar file for this program. The tar file +- should be set up so that the file names in the tar file start with +- a subdirectory name which is the name of the package it is a +- distribution for. This name can include the version number. +- +- For example, the distribution tar file of GCC version 1.40 unpacks +- into a subdirectory named `gcc-1.40'. +- +- The easiest way to do this is to create a subdirectory +- appropriately named, use `ln' or `cp' to install the proper files +- in it, and then `tar' that subdirectory. +- +- Compress the tar file file with `gzip'. For example, the actual +- distribution file for GCC version 1.40 is called `gcc-1.40.tar.gz'. +- +- The `dist' target should explicitly depend on all non-source files +- that are in the distribution, to make sure they are up to date in +- the distribution. *Note Making Releases: Releases. +- +-`check' +- Perform self-tests (if any). The user must build the program +- before running the tests, but need not install the program; you +- should write the self-tests so that they work when the program is +- built but not installed. +- +- The following targets are suggested as conventional names, for +-programs in which they are useful. +- +-`installcheck' +- Perform installation tests (if any). The user must build and +- install the program before running the tests. You should not +- assume that `$(bindir)' is in the search path. +- +-`installdirs' +- It's useful to add a target named `installdirs' to create the +- directories where files are installed, and their parent +- directories. There is a script called `mkinstalldirs' which is +- convenient for this; you can find it in the Texinfo package. You +- can use a rule like this: +- +- # Make sure all installation directories (e.g. $(bindir)) +- # actually exist by making them if necessary. +- installdirs: mkinstalldirs +- $(srcdir)/mkinstalldirs $(bindir) $(datadir) \ +- $(libdir) $(infodir) \ +- $(mandir) +- +- This rule should not modify the directories where compilation is +- done. It should do nothing but create installation directories. +- +- ---------- Footnotes ---------- +- +- (1) `texi2dvi' uses TeX to do the real work of formatting. TeX is +-not distributed with Texinfo. +- +- +-File: standards.info, Node: Install Command Categories, Prev: Standard Targets, Up: Makefile Conventions +- +-Install Command Categories +--------------------------- +- +- When writing the `install' target, you must classify all the +-commands into three categories: normal ones, "pre-installation" +-commands and "post-installation" commands. +- +- Normal commands move files into their proper places, and set their +-modes. They may not alter any files except the ones that come entirely +-from the package they belong to. +- +- Pre-installation and post-installation commands may alter other +-files; in particular, they can edit global configuration files or data +-bases. +- +- Pre-installation commands are typically executed before the normal +-commands, and post-installation commands are typically run after the +-normal commands. +- +- The most common use for a post-installation command is to run +-`install-info'. This cannot be done with a normal command, since it +-alters a file (the Info directory) which does not come entirely and +-solely from the package being installed. It is a post-installation +-command because it needs to be done after the normal command which +-installs the package's Info files. +- +- Most programs don't need any pre-installation commands, but we have +-the feature just in case it is needed. +- +- To classify the commands in the `install' rule into these three +-categories, insert "category lines" among them. A category line +-specifies the category for the commands that follow. +- +- A category line consists of a tab and a reference to a special Make +-variable, plus an optional comment at the end. There are three +-variables you can use, one for each category; the variable name +-specifies the category. Category lines are no-ops in ordinary execution +-because these three Make variables are normally undefined (and you +-*should not* define them in the makefile). +- +- Here are the three possible category lines, each with a comment that +-explains what it means: +- +- $(PRE_INSTALL) # Pre-install commands follow. +- $(POST_INSTALL) # Post-install commands follow. +- $(NORMAL_INSTALL) # Normal commands follow. +- +- If you don't use a category line at the beginning of the `install' +-rule, all the commands are classified as normal until the first category +-line. If you don't use any category lines, all the commands are +-classified as normal. +- +- These are the category lines for `uninstall': +- +- $(PRE_UNINSTALL) # Pre-uninstall commands follow. +- $(POST_UNINSTALL) # Post-uninstall commands follow. +- $(NORMAL_UNINSTALL) # Normal commands follow. +- +- Typically, a pre-uninstall command would be used for deleting entries +-from the Info directory. +- +- If the `install' or `uninstall' target has any dependencies which +-act as subroutines of installation, then you should start *each* +-dependency's commands with a category line, and start the main target's +-commands with a category line also. This way, you can ensure that each +-command is placed in the right category regardless of which of the +-dependencies actually run. +- +- Pre-installation and post-installation commands should not run any +-programs except for these: +- +- [ basename bash cat chgrp chmod chown cmp cp dd diff echo +- egrep expand expr false fgrep find getopt grep gunzip gzip +- hostname install install-info kill ldconfig ln ls md5sum +- mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee +- test touch true uname xargs yes +- +- The reason for distinguishing the commands in this way is for the +-sake of making binary packages. Typically a binary package contains +-all the executables and other files that need to be installed, and has +-its own method of installing them--so it does not need to run the normal +-installation commands. But installing the binary package does need to +-execute the pre-installation and post-installation commands. +- +- Programs to build binary packages work by extracting the +-pre-installation and post-installation commands. Here is one way of +-extracting the pre-installation commands: +- +- make -n install -o all \ +- PRE_INSTALL=pre-install \ +- POST_INSTALL=post-install \ +- NORMAL_INSTALL=normal-install \ +- | gawk -f pre-install.awk +- +-where the file `pre-install.awk' could contain this: +- +- $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ {on = 0} +- on {print $0} +- $0 ~ /^\t[ \t]*pre_install[ \t]*$/ {on = 1} +- +- The resulting file of pre-installation commands is executed as a +-shell script as part of installing the binary package. +- +- +-File: standards.info, Node: Releases, Prev: Makefile Conventions, Up: Managing Releases +- +-Making Releases +-=============== +- +- Package the distribution of `Foo version 69.96' up in a gzipped tar +-file with the name `foo-69.96.tar.gz'. It should unpack into a +-subdirectory named `foo-69.96'. +- +- Building and installing the program should never modify any of the +-files contained in the distribution. This means that all the files +-that form part of the program in any way must be classified into "source +-files" and "non-source files". Source files are written by humans and +-never changed automatically; non-source files are produced from source +-files by programs under the control of the Makefile. +- +- Naturally, all the source files must be in the distribution. It is +-okay to include non-source files in the distribution, provided they are +-up-to-date and machine-independent, so that building the distribution +-normally will never modify them. We commonly include non-source files +-produced by Bison, `lex', TeX, and `makeinfo'; this helps avoid +-unnecessary dependencies between our distributions, so that users can +-install whichever packages they want to install. +- +- Non-source files that might actually be modified by building and +-installing the program should *never* be included in the distribution. +-So if you do distribute non-source files, always make sure they are up +-to date when you make a new distribution. +- +- Make sure that the directory into which the distribution unpacks (as +-well as any subdirectories) are all world-writable (octal mode 777). +-This is so that old versions of `tar' which preserve the ownership and +-permissions of the files from the tar archive will be able to extract +-all the files even if the user is unprivileged. +- +- Make sure that all the files in the distribution are world-readable. +- +- Make sure that no file name in the distribution is more than 14 +-characters long. Likewise, no file created by building the program +-should have a name longer than 14 characters. The reason for this is +-that some systems adhere to a foolish interpretation of the POSIX +-standard, and refuse to open a longer name, rather than truncating as +-they did in the past. +- +- Don't include any symbolic links in the distribution itself. If the +-tar file contains symbolic links, then people cannot even unpack it on +-systems that don't support symbolic links. Also, don't use multiple +-names for one file in different directories, because certain file +-systems cannot handle this and that prevents unpacking the distribution. +- +- Try to make sure that all the file names will be unique on MS-DOS. A +-name on MS-DOS consists of up to 8 characters, optionally followed by a +-period and up to three characters. MS-DOS will truncate extra +-characters both before and after the period. Thus, `foobarhacker.c' +-and `foobarhacker.o' are not ambiguous; they are truncated to +-`foobarha.c' and `foobarha.o', which are distinct. +- +- Include in your distribution a copy of the `texinfo.tex' you used to +-test print any `*.texinfo' or `*.texi' files. +- +- Likewise, if your program uses small GNU software packages like +-regex, getopt, obstack, or termcap, include them in the distribution +-file. Leaving them out would make the distribution file a little +-smaller at the expense of possible inconvenience to a user who doesn't +-know what other files to get. +- +- +- +-Tag Table: +-Node: Top988 +-Node: Preface1531 +-Node: Intellectual Property2558 +-Node: Reading Non-Free Code2933 +-Node: Contributions4665 +-Node: Design Advice6659 +-Node: Compatibility7176 +-Node: Using Extensions8687 +-Node: ANSI C10189 +-Node: Source Language11425 +-Node: Program Behavior12918 +-Node: Semantics13627 +-Node: Libraries17381 +-Node: Errors18616 +-Node: User Interfaces19839 +-Node: Option Table26586 +-Node: Memory Usage40675 +-Node: Writing C41669 +-Node: Formatting42508 +-Node: Comments45780 +-Node: Syntactic Conventions49078 +-Node: Names52016 +-Node: System Portability53752 +-Node: CPU Portability55528 +-Node: System Functions57689 +-Node: Internationalization62793 +-Node: Mmap65941 +-Node: Documentation66646 +-Node: GNU Manuals67204 +-Node: Manual Structure Details71091 +-Node: NEWS File72421 +-Node: Change Logs73102 +-Node: Change Log Concepts73819 +-Node: Style of Change Logs75587 +-Node: Simple Changes77141 +-Node: Conditional Changes78332 +-Node: Man Pages79709 +-Node: Reading other Manuals81328 +-Node: Managing Releases82112 +-Node: Configuration82848 +-Node: Makefile Conventions89788 +-Node: Makefile Basics90468 +-Node: Utilities in Makefiles93637 +-Node: Command Variables95773 +-Node: Directory Variables99274 +-Node: Standard Targets110151 +-Node: Install Command Categories120691 +-Node: Releases125264 +- +-End Tag Table +diff -rup --new-file binutils-2.9.1/gas/ChangeLog binutils-2.9.1/gas/ChangeLog +--- binutils-2.9.1/gas/ChangeLog Fri May 1 08:45:02 1998 ++++ binutils-2.9.1/gas/ChangeLog Sun Aug 23 00:00:00 1998 +@@ -1,3 +1,24 @@ ++Sat Jun 6 23:06:18 1998 Fred Fish ++ ++ * config/tc-i386.c (md_section_align): Re-enable use of forced ++ section alignment based only on BFD_ASSEMBLER being defined. ++ * write.c (write_contents): Work around bug in BeOS memset. ++ ++Thu Jun 4 22:18:50 1998 Fred Fish ++ ++ * configure.in (i386-*-beos8): Set bfd_gas to yes. ++ * configure: Regenerated. ++ * read.c (output_leb128): Do not inline as it is used externally ++ for some configuration.s ++ ++1998-06-02 David Zaroski ++ ++ * config/tc-m68k.c: Add missing param to add_fix in "case '_'" ++ ++Thu Apr 30 13:09:39 1998 Fred Fish ++ ++ * read.c (sizeof_leb128): Referenced in write.c, so cannot be inlined. ++ + Mon Apr 27 13:45:04 1998 Ian Lance Taylor + + * configure.in: Set version number to 2.9.1. +@@ -230,11 +251,21 @@ Sat Feb 21 22:36:52 1998 Richard Hender + * read.c (s_set): Record file and line info for symbols when -as. + (pseudo_set): Don't overwrite that dummy fragment. + ++Sat Feb 21 16:11:31 1998 Fred Fish ++ ++ * itbl-parse.c: Only use gcc's builtin alloca if C_ALLOCA ++ is not defined. Only include if C_ALLOCA is ++ not defined. ++ + Fri Feb 20 15:03:13 1998 Ian Lance Taylor + + * config/tc-ppc.c (md_pseudo_table): Add "section". + (ppc_named_section): New static function. + ++Fri Feb 20 07:48:52 1998 Fred Fish ++ ++ * as.h (alloca.h): Only include if C_ALLOCA is not defined. ++ + Thu Feb 19 22:25:42 1998 Richard Henderson + + * tc-ppc.c (ppc_biei): Cache the last symbol we inserted +@@ -781,6 +812,11 @@ Sun Nov 16 10:05:07 1997 Fred Fish ++ ++ * configure.in (i386-*-beos*): Add x86 BeOS config. ++ * configure: Regenerated. ++ + Thu Nov 13 13:53:10 1997 Andrew Cagney + + * configure.in (emulations): Make FreeBSD an aout / i386bsd +@@ -910,6 +946,14 @@ Thu Oct 30 13:46:20 1997 Nick Clifton + * config/tc-arm.c (md_apply_fix3): Fix thumb ADR pseudo op. Patch + from Tony Thompson at ARM: athompso@arm.com + ++Tue Oct 28 09:05:21 1997 Fred Fish ++ ++ * configure.in (BFDLIB,OPCODES_LIB): For BeOS hosts, directly ++ include libraries rather than using -L search paths. ++ * configure: Regenerated. ++ * config/tc-sh.c (sh_do_align): Cast second arg of frag_align_pattern ++ calls from "char *" to "const char *". ++ + Fri Oct 24 15:56:47 1997 Ian Lance Taylor + + * config/tc-ppc.c (md_assemble): When handling @l, always sign +@@ -961,6 +1005,17 @@ Tue Oct 21 10:20:11 1997 Doug Evans ++ ++ * config/tc-sh.c (insert): Add extra 0 arg for fix_new_exp call. ++ (md_assemble): Add extra 0 arg for fix_new call. ++ (sh_frob_label): Add extra 0 arg for fix_new call. ++ (sh_flush_pending_output): Add extra 0 arg for fix_new call. ++ (s_uses): Add extra 0 arg for fix_new_exp call. ++ (sh_frob_section): Add extra 0 arg for fix_new call. ++ (md_convert_frag): Add extra 0 arg for fix_new calls. ++ (sh_handle_align): Add extra 0 arg for fix_new call. ++ + Mon Oct 20 14:54:06 1997 Klaus K"ampf + + * makefile.vms: Fix for dec c. +@@ -973,6 +1028,12 @@ Mon Oct 20 14:54:06 1997 Klaus K"ampf + + * config/obj-evax.c: support .weak pseudo-op + ++Mon Oct 20 11:12:29 1997 Fred Fish ++ ++ * doc/Makefile.in (AR, ARFLAGS): Remove, not used. ++ * Makefile (AR, ARFLAGS): Remove, not used. ++ (FLAGS_TO_PASS): Don't need to pass AR or ARFLAGS. ++ + Mon Oct 20 10:13:32 1997 Doug Evans + + * config/tc-sparc.c (default_arch_size): New static local. +@@ -1115,6 +1176,12 @@ Wed Oct 8 12:33:32 1997 Richard Hender + recognizes alphaev5 etc. + * configure: Rebuild. + ++Wed Oct 8 10:40:55 1997 Fred Fish ++ ++ * config/tc-i386.c (md_assemble): Add extra 0 arg for fix_new_exp calls. ++ (md_create_long_jump): Add extra 0 arg for fix_new calls. ++ (md_estimate_size_before_relax): Ditto. ++ + Wed Oct 8 00:04:05 1997 Gavin Koch + + * config/tc-mips.c (md_begin): Replace the TARGET_CPU value +@@ -1398,6 +1465,12 @@ Tue Aug 26 12:23:25 1997 Ian Lance Tayl + for a WORD_PREFIX_OPCODE, change it to ADDR_PREFIX_OPCODE if this + is jcxz or a loop instruction. + ++Mon Aug 25 16:32:00 1997 Steffen Opel ++ ++ * Makefile.in (guide, install-guide, clean-guide): New targets ++ for AmigaGuide documentation. ++ (install): Add install-info and install-guide. ++ + Mon Aug 25 16:04:14 1997 Nick Clifton + + * config/tc-v850.c (pre_defined_registers): Add 'hp' as alias for +@@ -3396,6 +3469,13 @@ Fri Dec 27 11:42:29 1996 Ian Lance Tayl + * doc/as.texinfo (M): Mention explicitly that -M changes macro + handling. + ++Sun Dec 22 10:45:58 1996 Fred Fish ++ ++ * configure.in: Add support for BeOS target. ++ * configure: Regenerate. ++ * config/tc-ppc.c (ppc_set_cpu): For BeOS set ppc_cpu ++ to PPC_OPCODE_PPC. ++ + Thu Dec 19 12:06:08 1996 Ian Lance Taylor + + * write.c (adjust_reloc_syms): If the fixup symbol has been +@@ -3748,6 +3828,12 @@ Mon Nov 18 15:22:28 1996 Michael Meissn + (write_2_short): Call parallel_ok to check whether two short + instructions the user requested execute in parallel, can be + executed that way. ++ ++Sun Nov 17 21:09:55 1996 Kamil Iskra ++ ++ * config/tc-m68k.c (md_estimate_size_before_relax): Do not ++ output 'bsrl' instructions for external function calls when ++ compiling with '-m68020' or higher. + + Thu Nov 14 11:17:49 1996 Martin M. Hunt + +diff -rup --new-file binutils-2.9.1/gas/Makefile.am binutils-2.9.1/gas/Makefile.am +--- binutils-2.9.1/gas/Makefile.am Fri May 1 08:45:03 1998 ++++ binutils-2.9.1/gas/Makefile.am Sun Aug 23 00:00:00 1998 +@@ -63,6 +63,7 @@ CPU_TYPES = \ + # We deliberately omit som, since it does not work as a cross assembler. + + OBJ_FORMATS = \ ++ amigahunk \ + aout \ + bout \ + coff \ +@@ -239,6 +240,7 @@ TARGET_CPU_HFILES = \ + # OBJ files in config + + OBJ_FORMAT_CFILES = \ ++ config/obj-amigahunk.c \ + config/obj-aout.c \ + config/obj-bout.c \ + config/obj-coff.c \ +@@ -251,6 +253,7 @@ OBJ_FORMAT_CFILES = \ + config/obj-vms.c + + OBJ_FORMAT_HFILES = \ ++ config/obj-amigahunk.h \ + config/obj-aout.h \ + config/obj-bout.h \ + config/obj-coff.h \ +@@ -266,6 +269,7 @@ OBJ_FORMAT_HFILES = \ + + TARG_ENV_HFILES = \ + config/te-386bsd.h \ ++ config/te-amiga.h \ + config/te-aux.h \ + config/te-delta.h \ + config/te-delt88.h \ +@@ -352,7 +356,7 @@ stamp-mk.com: vmsconf.sh Makefile + EXTRA_DIST = make-gas.com + + DISTSTUFF = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c +-diststuff: $(DISTSTUFF) info ++diststuff: $(DISTSTUFF) info guide + + DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-opc.h + +@@ -448,6 +452,8 @@ ecoff.o : ecoff.c ecoff.h $(INCDIR)/coff + # We need all these explicit rules for the multi stuff. Because of + # these rules, we don't need one for OBJ_FORMAT_O. + ++obj-amigahunk.o : $(srcdir)/config/obj-amigahunk.c ++ $(COMPILE) -c $(srcdir)/config/obj-amigahunk.c + obj-aout.o : $(srcdir)/config/obj-aout.c + $(COMPILE) -c $(srcdir)/config/obj-aout.c + obj-bout.o : $(srcdir)/config/obj-bout.c +@@ -964,6 +970,9 @@ TCDEP_m32r_elf = $(srcdir)/config/obj-el + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \ + $(INCDIR)/opcode/cgen.h ++TCDEP_m68k_amigaoshunk = $(srcdir)/config/obj-amigahunk.h $(srcdir)/config/tc-m68k.h \ ++ $(BFDDIR)/libamiga.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ ++ subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h + TCDEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h +@@ -1213,6 +1222,9 @@ OBJDEP_m32r_elf = $(srcdir)/config/obj-e + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h ++OBJDEP_m68k_amigaoshunk = $(srcdir)/config/obj-amigahunk.h $(srcdir)/config/tc-m68k.h \ ++ $(BFDDIR)/libamiga.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ ++ $(INCDIR)/obstack.h + OBJDEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +@@ -1436,6 +1448,8 @@ DEP_m32r_coff = $(srcdir)/config/obj-cof + DEP_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h ++DEP_m68k_amigaoshunk = $(srcdir)/config/obj-amigahunk.h \ ++ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libamiga.h $(INCDIR)/bfdlink.h + DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h + DEP_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ +diff -rup --new-file binutils-2.9.1/gas/Makefile.in binutils-2.9.1/gas/Makefile.in +--- binutils-2.9.1/gas/Makefile.in Fri May 1 08:45:03 1998 ++++ binutils-2.9.1/gas/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -1,4 +1,4 @@ +-# Makefile.in generated automatically by automake 1.2e from Makefile.am ++# Makefile.in generated automatically by automake 1.3 from Makefile.am + + # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation +@@ -11,7 +11,7 @@ + # PARTICULAR PURPOSE. + + +-SHELL = @SHELL@ ++SHELL = /bin/sh + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -28,10 +28,16 @@ sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ ++guidedir = @guidedir@ ++htmldir = @htmldir@ ++dvidir = @dvidir@ ++psdir = @psdir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + ++DISTDIR = ++ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +@@ -144,6 +150,7 @@ CPU_TYPES = \ + # We deliberately omit som, since it does not work as a cross assembler. + + OBJ_FORMATS = \ ++ amigahunk \ + aout \ + bout \ + coff \ +@@ -320,6 +327,7 @@ TARGET_CPU_HFILES = \ + # OBJ files in config + + OBJ_FORMAT_CFILES = \ ++ config/obj-amigahunk.c \ + config/obj-aout.c \ + config/obj-bout.c \ + config/obj-coff.c \ +@@ -332,6 +340,7 @@ OBJ_FORMAT_CFILES = \ + config/obj-vms.c + + OBJ_FORMAT_HFILES = \ ++ config/obj-amigahunk.h \ + config/obj-aout.h \ + config/obj-bout.h \ + config/obj-coff.h \ +@@ -347,6 +356,7 @@ OBJ_FORMAT_HFILES = \ + + TARG_ENV_HFILES = \ + config/te-386bsd.h \ ++ config/te-amiga.h \ + config/te-aux.h \ + config/te-delta.h \ + config/te-delt88.h \ +@@ -610,6 +620,9 @@ TCDEP_m32r_elf = $(srcdir)/config/obj-el + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \ + $(INCDIR)/opcode/cgen.h ++TCDEP_m68k_amigaoshunk = $(srcdir)/config/obj-amigahunk.h $(srcdir)/config/tc-m68k.h \ ++ $(BFDDIR)/libamiga.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ ++ subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h + TCDEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h +@@ -859,6 +872,9 @@ OBJDEP_m32r_elf = $(srcdir)/config/obj-e + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h ++OBJDEP_m68k_amigaoshunk = $(srcdir)/config/obj-amigahunk.h $(srcdir)/config/tc-m68k.h \ ++ $(BFDDIR)/libamiga.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ ++ $(INCDIR)/obstack.h + OBJDEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +@@ -1082,6 +1098,8 @@ DEP_m32r_coff = $(srcdir)/config/obj-cof + DEP_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h ++DEP_m68k_amigaoshunk = $(srcdir)/config/obj-amigahunk.h \ ++ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libamiga.h $(INCDIR)/bfdlink.h + DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h + DEP_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ +@@ -1228,21 +1246,21 @@ acconfig.h acinclude.m4 aclocal.m4 confi + configure configure.in gdbinit.in itbl-lex.c itbl-parse.c stamp-h.in + + +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +- ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) \ ++ $(INFOS) $(GUIDES) $(HTMLS) $(MANS) + TAR = tar + GZIP = --best + SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) $(gasp_new_SOURCES) + OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS) $(gasp_new_OBJECTS) + +-default: all ++all: all-recursive-am all-am + + .SUFFIXES: + .SUFFIXES: .S .c .l .lo .o .s .y +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile ++$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus --include-deps Makefile + +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +@@ -1354,7 +1372,8 @@ itbl-parse.h: itbl-parse.c + + all-recursive install-data-recursive install-exec-recursive \ + installdirs-recursive install-recursive uninstall-recursive install-info-recursive \ +-check-recursive installcheck-recursive info-recursive dvi-recursive: ++check-recursive installcheck-recursive info-recursive dvi-recursive \ ++guide-recursive ps-recursive html-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + target=`echo $@ | sed s/-recursive//`; \ +@@ -1482,6 +1501,9 @@ site.exp: Makefile + -@mv site.exp site.bak + @mv $@-t site.exp + info: info-recursive ++guide: guide-recursive ++html: html-recursive ++ps: ps-recursive + dvi: dvi-recursive + check: + $(MAKE) check-recursive check-DEJAGNU +@@ -1505,8 +1527,6 @@ install: install-recursive install-exec- + + uninstall: uninstall-recursive + +-all: all-recursive-am all-am +- + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: installdirs-recursive +@@ -1556,20 +1576,21 @@ maintainer-clean: maintainer-clean-recu + @echo "it deletes files that may require special tools to rebuild." + -rm -f config.status + +-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ +-maintainer-clean-hdr mostlyclean-noinstPROGRAMS \ +-distclean-noinstPROGRAMS clean-noinstPROGRAMS \ +-maintainer-clean-noinstPROGRAMS mostlyclean-compile distclean-compile \ +-clean-compile maintainer-clean-compile mostlyclean-libtool \ +-distclean-libtool clean-libtool maintainer-clean-libtool \ +-install-data-recursive uninstall-data-recursive install-exec-recursive \ ++.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ ++mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ ++clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ ++mostlyclean-compile distclean-compile clean-compile \ ++maintainer-clean-compile mostlyclean-libtool distclean-libtool \ ++clean-libtool maintainer-clean-libtool install-data-recursive \ ++uninstall-data-recursive install-exec-recursive \ + uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ + all-recursive check-recursive installcheck-recursive info-recursive \ +-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ ++guide-recursive html-recursive ps-recursive dvi-recursive \ ++mostlyclean-recursive distclean-recursive clean-recursive \ + maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ + distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \ +-info dvi installcheck install-info all-recursive-am all-am \ +-install-exec-am install-exec install-data install uninstall all \ ++info guide html ps dvi installcheck install-info all-recursive-am \ ++all-am install-exec-am install-exec install-data install uninstall all \ + installdirs mostlyclean-generic distclean-generic clean-generic \ + maintainer-clean-generic clean mostlyclean distclean maintainer-clean + +@@ -1579,7 +1600,7 @@ stamp-mk.com: vmsconf.sh Makefile + sh $(srcdir)/vmsconf.sh $(GENERIC_OBJS) > new-make.com + $(SHELL) $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com + touch stamp-mk.com +-diststuff: $(DISTSTUFF) info ++diststuff: $(DISTSTUFF) info guide + + $(OBJS): @ALL_OBJ_DEPS@ + +@@ -1628,6 +1649,8 @@ ecoff.o : ecoff.c ecoff.h $(INCDIR)/coff + # We need all these explicit rules for the multi stuff. Because of + # these rules, we don't need one for OBJ_FORMAT_O. + ++obj-amigahunk.o : $(srcdir)/config/obj-amigahunk.c ++ $(COMPILE) -c $(srcdir)/config/obj-amigahunk.c + obj-aout.o : $(srcdir)/config/obj-aout.c + $(COMPILE) -c $(srcdir)/config/obj-aout.c + obj-bout.o : $(srcdir)/config/obj-bout.c +diff -rup --new-file binutils-2.9.1/gas/as.c binutils-2.9.1/gas/as.c +--- binutils-2.9.1/gas/as.c Fri May 1 08:45:05 1998 ++++ binutils-2.9.1/gas/as.c Sun Aug 23 00:00:00 1998 +@@ -76,6 +76,9 @@ char *myname; /* argv[0] */ + #ifdef BFD_ASSEMBLER + segT reg_section, expr_section; + segT text_section, data_section, bss_section; ++#ifdef TE_AMIGA ++segT data_chip_section, bss_chip_section; ++#endif + #endif + + /* The default obstack chunk size. If we set this to zero, the +@@ -924,6 +927,10 @@ perform_an_assembly_pass (argc, argv) + text_section = subseg_new (TEXT_SECTION_NAME, 0); + data_section = subseg_new (DATA_SECTION_NAME, 0); + bss_section = subseg_new (BSS_SECTION_NAME, 0); ++#ifdef TE_AMIGA ++ data_chip_section = subseg_new (".data_chip", 0); ++ bss_chip_section = subseg_new (".bss_chip", 0); ++#endif + /* @@ FIXME -- we're setting the RELOC flag so that sections are assumed + to have relocs, otherwise we don't find out in time. */ + applicable = bfd_applicable_section_flags (stdoutput); +@@ -934,6 +941,12 @@ perform_an_assembly_pass (argc, argv) + bfd_set_section_flags (stdoutput, data_section, + applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)); + bfd_set_section_flags (stdoutput, bss_section, applicable & SEC_ALLOC); ++#ifdef TE_AMIGA ++ bfd_set_section_flags (stdoutput, data_chip_section, ++ applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)); ++ bfd_set_section_flags (stdoutput, bss_chip_section, applicable & SEC_ALLOC); ++#endif ++ + seg_info (bss_section)->bss = 1; + subseg_new (BFD_ABS_SECTION_NAME, 0); + subseg_new (BFD_UND_SECTION_NAME, 0); +diff -rup --new-file binutils-2.9.1/gas/as.h binutils-2.9.1/gas/as.h +--- binutils-2.9.1/gas/as.h Fri May 1 08:45:05 1998 ++++ binutils-2.9.1/gas/as.h Sun Aug 23 00:00:00 1998 +@@ -51,7 +51,7 @@ + /* Force void* decl for hpux. This is what Bison uses. --KR 1995.08.16 */ + + /* AIX requires this to be the first thing in the file. */ +-#ifdef __GNUC__ ++#if defined __GNUC__ && !defined (C_ALLOCA) + # ifndef alloca + # ifdef __STDC__ + extern void *alloca (); +@@ -60,7 +60,7 @@ extern char *alloca (); + # endif + # endif + #else +-# if HAVE_ALLOCA_H ++# if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA) + # include + # else + # ifdef _AIX +diff -rup --new-file binutils-2.9.1/gas/config/amigaos.mh binutils-2.9.1/gas/config/amigaos.mh +--- binutils-2.9.1/gas/config/amigaos.mh Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/gas/config/amigaos.mh Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,13 @@ ++# Host makefile fragment for Commodore Amiga running AmigaOS. ++ ++# There is no standard system compiler. Assume use GNU C. ++CC = gcc ++# There is no support for -g yet. But use -O instead. ++CFLAGS = -O ++# We have both types of links under AmigaOS with GNU ++# utils, however the links need to be made in canonical ++# AmigaOS format (foo:bar/bell/file) rather than UNIX ++# format (/foo/bar/bell/file). When this is fixed, then ++# these can go away. ++SYMLINK = cp ++HARDLINK = cp +diff -rup --new-file binutils-2.9.1/gas/config/m68k-parse.h binutils-2.9.1/gas/config/m68k-parse.h +--- binutils-2.9.1/gas/config/m68k-parse.h Fri May 1 08:44:34 1998 ++++ binutils-2.9.1/gas/config/m68k-parse.h Sun Aug 23 00:00:00 1998 +@@ -225,6 +225,9 @@ struct m68k_exp + + /* The expression itself. */ + expressionS exp; ++ ++ /* base-relative? */ ++ short baserel; + }; + + /* The operand modes. */ +diff -rup --new-file binutils-2.9.1/gas/config/m68k-parse.y binutils-2.9.1/gas/config/m68k-parse.y +--- binutils-2.9.1/gas/config/m68k-parse.y Fri May 1 08:44:35 1998 ++++ binutils-2.9.1/gas/config/m68k-parse.y Sun Aug 23 00:00:00 1998 +@@ -945,6 +945,7 @@ yylex () + } + + yylval.exp.size = SIZE_UNSPEC; ++ yylval.exp.baserel = 0; + if (s <= str + 2 + || (s[-2] != '.' && s[-2] != ':')) + tail = 0; +@@ -952,18 +953,21 @@ yylex () + { + switch (s[-1]) + { ++ case 'B': ++ yylval.exp.baserel = 1; + case 's': + case 'S': + case 'b': +- case 'B': + yylval.exp.size = SIZE_BYTE; + break; +- case 'w': + case 'W': ++ yylval.exp.baserel = 1; ++ case 'w': + yylval.exp.size = SIZE_WORD; + break; +- case 'l': + case 'L': ++ yylval.exp.baserel = 1; ++ case 'l': + yylval.exp.size = SIZE_LONG; + break; + default: +diff -rup --new-file binutils-2.9.1/gas/config/obj-amigahunk.c binutils-2.9.1/gas/config/obj-amigahunk.c +--- binutils-2.9.1/gas/config/obj-amigahunk.c Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/gas/config/obj-amigahunk.c Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,560 @@ ++/* AmigaOS object file format ++ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. ++ ++This file is part of GAS, the GNU Assembler. ++ ++GAS is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as ++published by the Free Software Foundation; either version 2, ++or (at your option) any later version. ++ ++GAS is distributed in the hope that it will be useful, but ++WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See ++the GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public ++License along with GAS; see the file COPYING. If not, write ++to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ++ ++#include "as.h" ++ ++#ifdef BFD_ASSEMBLER ++#undef NO_RELOC ++#endif ++#include "obstack.h" ++ ++#ifndef BFD_ASSEMBLER ++/* in: segT out: N_TYPE bits */ ++const short seg_N_TYPE[] = ++{ ++ N_ABS, ++ N_TEXT, ++ N_DATA, ++ N_BSS, ++ N_UNDF, /* unknown */ ++ N_UNDF, /* error */ ++ N_UNDF, /* expression */ ++ N_UNDF, /* debug */ ++ N_UNDF, /* ntv */ ++ N_UNDF, /* ptv */ ++ N_REGISTER, /* register */ ++}; ++ ++const segT N_TYPE_seg[N_TYPE + 2] = ++{ /* N_TYPE == 0x1E = 32-2 */ ++ SEG_UNKNOWN, /* N_UNDF == 0 */ ++ SEG_GOOF, ++ SEG_ABSOLUTE, /* N_ABS == 2 */ ++ SEG_GOOF, ++ SEG_TEXT, /* N_TEXT == 4 */ ++ SEG_GOOF, ++ SEG_DATA, /* N_DATA == 6 */ ++ SEG_GOOF, ++ SEG_BSS, /* N_BSS == 8 */ ++ SEG_GOOF, ++ SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, ++ SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, ++ SEG_GOOF, SEG_GOOF, SEG_GOOF, SEG_GOOF, ++ SEG_REGISTER, /* dummy N_REGISTER for regs = 30 */ ++ SEG_GOOF, ++}; ++#endif ++ ++static void obj_amiga_line PARAMS ((int)); ++static void obj_amiga_weak PARAMS ((int)); ++ ++const pseudo_typeS obj_pseudo_table[] = ++{ ++ {"line", obj_amiga_line, 0}, /* source code line number */ ++ {"ln", obj_amiga_line, 0}, /* coff line number that we use anyway */ ++ ++ {"weak", obj_amiga_weak, 0}, /* mark symbol as weak. */ ++ ++ /* coff debug pseudos (ignored) */ ++ {"def", s_ignore, 0}, ++ {"dim", s_ignore, 0}, ++ {"endef", s_ignore, 0}, ++ {"ident", s_ignore, 0}, ++ {"line", s_ignore, 0}, ++ {"ln", s_ignore, 0}, ++ {"scl", s_ignore, 0}, ++ {"size", s_ignore, 0}, ++ {"tag", s_ignore, 0}, ++ {"type", s_ignore, 0}, ++ {"val", s_ignore, 0}, ++ {"version", s_ignore, 0}, ++ ++ {"optim", s_ignore, 0}, /* For sun386i cc (?) */ ++ ++ /* other stuff */ ++ {"ABORT", s_abort, 0}, ++ ++ {NULL} /* end sentinel */ ++}; /* obj_pseudo_table */ ++ ++ ++#ifdef BFD_ASSEMBLER ++ ++void ++obj_amiga_frob_symbol (sym, punt) ++ symbolS *sym; ++ int *punt; ++{ ++ flagword flags; ++ asection *sec; ++ int desc, type, other; ++ ++ flags = sym->bsym->flags; ++ type = S_GET_TYPE (sym); ++ desc = S_GET_DESC (sym); ++ other = S_GET_OTHER (sym); ++ sec = sym->bsym->section; ++ ++ /* Only frob simple symbols this way right now. */ ++ if (! (type & ~ (N_TYPE | N_EXT))) ++ { ++ if (type == (N_UNDF | N_EXT) ++ && sec == &bfd_abs_section) ++ sym->bsym->section = sec = bfd_und_section_ptr; ++ ++ if ((type & N_TYPE) != N_INDR ++ && (type & N_TYPE) != N_SETA ++ && (type & N_TYPE) != N_SETT ++ && (type & N_TYPE) != N_SETD ++ && (type & N_TYPE) != N_SETB ++ && type != N_WARNING ++ && (sec == &bfd_abs_section ++ || sec == &bfd_und_section)) ++ return; ++ if (flags & BSF_EXPORT) ++ type |= N_EXT; ++ ++ switch (type & N_TYPE) ++ { ++ case N_SETA: ++ case N_SETT: ++ case N_SETD: ++ case N_SETB: ++ /* Set the debugging flag for constructor symbols so that ++ BFD leaves them alone. */ ++ sym->bsym->flags |= BSF_DEBUGGING; ++ ++ /* You can't put a common symbol in a set. The way a set ++ element works is that the symbol has a definition and a ++ name, and the linker adds the definition to the set of ++ that name. That does not work for a common symbol, ++ because the linker can't tell which common symbol the ++ user means. FIXME: Using as_bad here may be ++ inappropriate, since the user may want to force a ++ particular type without regard to the semantics of sets; ++ on the other hand, we certainly don't want anybody to be ++ mislead into thinking that their code will work. */ ++ if (S_IS_COMMON (sym)) ++ as_bad ("Attempt to put a common symbol into set %s", ++ S_GET_NAME (sym)); ++ /* Similarly, you can't put an undefined symbol in a set. */ ++ else if (! S_IS_DEFINED (sym)) ++ as_bad ("Attempt to put an undefined symbol into set %s", ++ S_GET_NAME (sym)); ++ ++ break; ++ case N_INDR: ++ /* Put indirect symbols in the indirect section. */ ++ sym->bsym->section = bfd_ind_section_ptr; ++ sym->bsym->flags |= BSF_INDIRECT; ++ if (type & N_EXT) ++ { ++ sym->bsym->flags |= BSF_EXPORT; ++ sym->bsym->flags &=~ BSF_LOCAL; ++ } ++ break; ++ case N_WARNING: ++ /* Mark warning symbols. */ ++ sym->bsym->flags |= BSF_WARNING; ++ break; ++ } ++ } ++ else ++ { ++ sym->bsym->flags |= BSF_DEBUGGING; ++ } ++ ++ S_SET_TYPE (sym, type); ++ ++ /* Double check weak symbols. */ ++ if (sym->bsym->flags & BSF_WEAK) ++ { ++ if (S_IS_COMMON (sym)) ++ as_bad ("Symbol `%s' can not be both weak and common", ++ S_GET_NAME (sym)); ++ } ++} ++ ++void ++obj_amiga_frob_file () ++{ ++ /* Relocation processing may require knowing the VMAs of the sections. ++ Since writing to a section will cause the BFD back end to compute the ++ VMAs, fake it out here.... */ ++ bfd_byte b = 0; ++ boolean x = true; ++ if (bfd_section_size (stdoutput, text_section) != 0) ++ { ++ x = bfd_set_section_contents (stdoutput, text_section, &b, (file_ptr) 0, ++ (bfd_size_type) 1); ++ } ++ else if (bfd_section_size (stdoutput, data_section) != 0) ++ { ++ x = bfd_set_section_contents (stdoutput, data_section, &b, (file_ptr) 0, ++ (bfd_size_type) 1); ++ } ++ assert (x == true); ++} ++ ++#else ++ ++/* Relocation. */ ++ ++/* ++ * emit_relocations() ++ * ++ * Crawl along a fixS chain. Emit the segment's relocations. ++ */ ++void ++obj_emit_relocations (where, fixP, segment_address_in_file) ++ char **where; ++ fixS *fixP; /* Fixup chain for this segment. */ ++ relax_addressT segment_address_in_file; ++{ ++ for (; fixP; fixP = fixP->fx_next) ++ if (fixP->fx_done == 0) ++ { ++ tc_aout_fix_to_chars (*where, fixP, segment_address_in_file); ++ *where += md_reloc_size; ++ } ++} ++ ++#ifndef obj_header_append ++/* Aout file generation & utilities */ ++void ++obj_header_append (where, headers) ++ char **where; ++ object_headers *headers; ++{ ++ tc_headers_hook (headers); ++ ++#ifdef CROSS_COMPILE ++ md_number_to_chars (*where, headers->header.a_info, sizeof (headers->header.a_info)); ++ *where += sizeof (headers->header.a_info); ++ md_number_to_chars (*where, headers->header.a_text, sizeof (headers->header.a_text)); ++ *where += sizeof (headers->header.a_text); ++ md_number_to_chars (*where, headers->header.a_data, sizeof (headers->header.a_data)); ++ *where += sizeof (headers->header.a_data); ++ md_number_to_chars (*where, headers->header.a_bss, sizeof (headers->header.a_bss)); ++ *where += sizeof (headers->header.a_bss); ++ md_number_to_chars (*where, headers->header.a_syms, sizeof (headers->header.a_syms)); ++ *where += sizeof (headers->header.a_syms); ++ md_number_to_chars (*where, headers->header.a_entry, sizeof (headers->header.a_entry)); ++ *where += sizeof (headers->header.a_entry); ++ md_number_to_chars (*where, headers->header.a_trsize, sizeof (headers->header.a_trsize)); ++ *where += sizeof (headers->header.a_trsize); ++ md_number_to_chars (*where, headers->header.a_drsize, sizeof (headers->header.a_drsize)); ++ *where += sizeof (headers->header.a_drsize); ++ ++#else /* CROSS_COMPILE */ ++ ++ append (where, (char *) &headers->header, sizeof (headers->header)); ++#endif /* CROSS_COMPILE */ ++ ++} ++#endif ++ ++void ++obj_symbol_to_chars (where, symbolP) ++ char **where; ++ symbolS *symbolP; ++{ ++ md_number_to_chars ((char *) &(S_GET_OFFSET (symbolP)), ++ S_GET_OFFSET (symbolP), ++ sizeof (S_GET_OFFSET (symbolP))); ++ ++ md_number_to_chars ((char *) &(S_GET_DESC (symbolP)), ++ S_GET_DESC (symbolP), ++ sizeof (S_GET_DESC (symbolP))); ++ ++ md_number_to_chars ((char *) &(symbolP->sy_symbol.n_value), ++ S_GET_VALUE (symbolP), ++ sizeof (symbolP->sy_symbol.n_value)); ++ ++ append (where, (char *) &symbolP->sy_symbol, sizeof (obj_symbol_type)); ++} ++ ++void ++obj_emit_symbols (where, symbol_rootP) ++ char **where; ++ symbolS *symbol_rootP; ++{ ++ symbolS *symbolP; ++ ++ /* Emit all symbols left in the symbol chain. */ ++ for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) ++ { ++ /* Used to save the offset of the name. It is used to point ++ to the string in memory but must be a file offset. */ ++ register char *temp; ++ ++ temp = S_GET_NAME (symbolP); ++ S_SET_OFFSET (symbolP, symbolP->sy_name_offset); ++ ++ /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */ ++ if (!S_IS_DEBUG (symbolP) && !S_IS_DEFINED (symbolP)) ++ S_SET_EXTERNAL (symbolP); ++ ++ /* Adjust the type of a weak symbol. */ ++ if (S_GET_WEAK (symbolP)) ++ { ++ switch (S_GET_TYPE (symbolP)) ++ { ++ case N_UNDF: S_SET_TYPE (symbolP, N_WEAKU); break; ++ case N_ABS: S_SET_TYPE (symbolP, N_WEAKA); break; ++ case N_TEXT: S_SET_TYPE (symbolP, N_WEAKT); break; ++ case N_DATA: S_SET_TYPE (symbolP, N_WEAKD); break; ++ case N_BSS: S_SET_TYPE (symbolP, N_WEAKB); break; ++ default: as_bad ("%s: bad type for weak symbol", temp); break; ++ } ++ } ++ ++ obj_symbol_to_chars (where, symbolP); ++ S_SET_NAME (symbolP, temp); ++ } ++} ++ ++#endif /* ! BFD_ASSEMBLER */ ++ ++static void ++obj_amiga_line (ignore) ++ int ignore; ++{ ++ /* Assume delimiter is part of expression. ++ BSD4.2 as fails with delightful bug, so we ++ are not being incompatible here. */ ++ new_logical_line ((char *) NULL, (int) (get_absolute_expression ())); ++ demand_empty_rest_of_line (); ++} /* obj_aout_line() */ ++ ++/* Handle .weak. This is a GNU extension. */ ++ ++static void ++obj_amiga_weak (ignore) ++ int ignore; ++{ ++ char *name; ++ int c; ++ symbolS *symbolP; ++ ++ do ++ { ++ name = input_line_pointer; ++ c = get_symbol_end (); ++ symbolP = symbol_find_or_make (name); ++ *input_line_pointer = c; ++ SKIP_WHITESPACE (); ++ S_SET_WEAK (symbolP); ++ if (c == ',') ++ { ++ input_line_pointer++; ++ SKIP_WHITESPACE (); ++ if (*input_line_pointer == '\n') ++ c = '\n'; ++ } ++ } ++ while (c == ','); ++ demand_empty_rest_of_line (); ++} ++ ++void ++obj_read_begin_hook () ++{ ++} ++ ++#ifndef BFD_ASSEMBLER ++ ++void ++obj_crawl_symbol_chain (headers) ++ object_headers *headers; ++{ ++ symbolS *symbolP; ++ symbolS **symbolPP; ++ int symbol_number = 0; ++ ++ tc_crawl_symbol_chain (headers); ++ ++ symbolPP = &symbol_rootP; /*->last symbol chain link. */ ++ while ((symbolP = *symbolPP) != NULL) ++ { ++ if (symbolP->sy_mri_common) ++ { ++ if (S_IS_EXTERNAL (symbolP)) ++ as_bad ("%s: global symbols not supported in common sections", ++ S_GET_NAME (symbolP)); ++ *symbolPP = symbol_next (symbolP); ++ continue; ++ } ++ ++ if (flag_readonly_data_in_text && (S_GET_SEGMENT (symbolP) == SEG_DATA)) ++ { ++ S_SET_SEGMENT (symbolP, SEG_TEXT); ++ } /* if pusing data into text */ ++ ++ resolve_symbol_value (symbolP); ++ ++ /* OK, here is how we decide which symbols go out into the brave ++ new symtab. Symbols that do are: ++ ++ * symbols with no name (stabd's?) ++ * symbols with debug info in their N_TYPE ++ ++ Symbols that don't are: ++ * symbols that are registers ++ * symbols with \1 as their 3rd character (numeric labels) ++ * "local labels" as defined by S_LOCAL_NAME(name) if the -L ++ switch was passed to gas. ++ ++ All other symbols are output. We complain if a deleted ++ symbol was marked external. */ ++ ++ ++ if (!S_IS_REGISTER (symbolP) ++ && (!S_GET_NAME (symbolP) ++ || S_IS_DEBUG (symbolP) ++ || !S_IS_DEFINED (symbolP) ++ || S_IS_EXTERNAL (symbolP) ++ || (S_GET_NAME (symbolP)[0] != '\001' ++ && (flag_keep_locals || !S_LOCAL_NAME (symbolP))))) ++ { ++ symbolP->sy_number = symbol_number++; ++ ++ /* The + 1 after strlen account for the \0 at the ++ end of each string */ ++ if (!S_IS_STABD (symbolP)) ++ { ++ /* Ordinary case. */ ++ symbolP->sy_name_offset = string_byte_count; ++ string_byte_count += strlen (S_GET_NAME (symbolP)) + 1; ++ } ++ else /* .Stabd case. */ ++ symbolP->sy_name_offset = 0; ++ symbolPP = &(symbol_next (symbolP)); ++ } ++ else ++ { ++ if (S_IS_EXTERNAL (symbolP) || !S_IS_DEFINED (symbolP)) ++ /* This warning should never get triggered any more. ++ Well, maybe if you're doing twisted things with ++ register names... */ ++ { ++ as_bad ("Local symbol %s never defined.", decode_local_label_name (S_GET_NAME (symbolP))); ++ } /* oops. */ ++ ++ /* Unhook it from the chain */ ++ *symbolPP = symbol_next (symbolP); ++ } /* if this symbol should be in the output */ ++ } /* for each symbol */ ++ ++ H_SET_SYMBOL_TABLE_SIZE (headers, symbol_number); ++} ++ ++/* ++ * Find strings by crawling along symbol table chain. ++ */ ++ ++void ++obj_emit_strings (where) ++ char **where; ++{ ++ symbolS *symbolP; ++ ++#ifdef CROSS_COMPILE ++ /* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK */ ++ md_number_to_chars (*where, string_byte_count, sizeof (string_byte_count)); ++ *where += sizeof (string_byte_count); ++#else /* CROSS_COMPILE */ ++ append (where, (char *) &string_byte_count, (unsigned long) sizeof (string_byte_count)); ++#endif /* CROSS_COMPILE */ ++ ++ for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) ++ { ++ if (S_GET_NAME (symbolP)) ++ append (&next_object_file_charP, S_GET_NAME (symbolP), ++ (unsigned long) (strlen (S_GET_NAME (symbolP)) + 1)); ++ } /* walk symbol chain */ ++} ++ ++void ++obj_pre_write_hook (headers) ++ object_headers *headers; ++{ ++ H_SET_DYNAMIC (headers, 0); ++ H_SET_VERSION (headers, AOUT_VERSION); ++ H_SET_MACHTYPE (headers, AOUT_MACHTYPE); ++ tc_aout_pre_write_hook (headers); ++} ++ ++void ++DEFUN_VOID (s_sect) ++{ ++ /* Strip out the section name */ ++ char *section_name; ++ char *section_name_end; ++ char c; ++ ++ unsigned int len; ++ unsigned int exp; ++ char *save; ++ ++ section_name = input_line_pointer; ++ c = get_symbol_end (); ++ section_name_end = input_line_pointer; ++ ++ len = section_name_end - section_name; ++ input_line_pointer++; ++ save = input_line_pointer; ++ ++ SKIP_WHITESPACE (); ++ if (c == ',') ++ { ++ exp = get_absolute_expression (); ++ } ++ else if (*input_line_pointer == ',') ++ { ++ input_line_pointer++; ++ exp = get_absolute_expression (); ++ } ++ else ++ { ++ input_line_pointer = save; ++ exp = 0; ++ } ++ if (exp >= 1000) ++ { ++ as_bad ("subsegment index too high"); ++ } ++ ++ if (strcmp (section_name, ".text") == 0) ++ { ++ subseg_set (SEG_TEXT, (subsegT) exp); ++ } ++ ++ if (strcmp (section_name, ".data") == 0) ++ { ++ if (flag_readonly_data_in_text) ++ subseg_set (SEG_TEXT, (subsegT) exp + 1000); ++ else ++ subseg_set (SEG_DATA, (subsegT) exp); ++ } ++ ++ *section_name_end = c; ++} ++ ++#endif /* ! BFD_ASSEMBLER */ +diff -rup --new-file binutils-2.9.1/gas/config/obj-amigahunk.h binutils-2.9.1/gas/config/obj-amigahunk.h +--- binutils-2.9.1/gas/config/obj-amigahunk.h Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/gas/config/obj-amigahunk.h Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,219 @@ ++/* obj-amigahunk.h, AmigaOS object file format for gas, the assembler. ++ Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. ++ ++ This file is part of GAS, the GNU Assembler. ++ ++ GAS is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2, ++ or (at your option) any later version. ++ ++ GAS is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See ++ the GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public ++ License along with GAS; see the file COPYING. If not, write ++ to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ++ ++/* Tag to validate an amiga object file format processing */ ++#define OBJ_AMIGAHUNK 1 ++ ++#include "targ-cpu.h" ++#include "aout_gnu.h" ++ ++#ifdef BFD_ASSEMBLER ++ ++#include "bfd/libamiga.h" ++ ++#define OUTPUT_FLAVOR bfd_target_amiga_flavour ++ ++#else /* ! BFD_ASSEMBLER */ ++ ++extern const short seg_N_TYPE[]; ++extern const segT N_TYPE_seg[]; ++ ++#ifndef DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE ++#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (HUNK_UNIT) ++#endif ++ ++#endif /* ! BFD_ASSEMBLER */ ++ ++/* SYMBOL TABLE */ ++/* Symbol table macros and constants */ ++ ++#ifdef BFD_ASSEMBLER ++ ++ ++#define S_SET_OTHER(S,V) (amiga_symbol((S)->bsym)->other = (V)) ++#define S_SET_TYPE(S,T) (amiga_symbol((S)->bsym)->type = (T)) ++#define S_SET_DESC(S,D) (amiga_symbol((S)->bsym)->desc = (D)) ++#define S_GET_OTHER(S) (amiga_symbol((S)->bsym)->other) ++#define S_GET_TYPE(S) (amiga_symbol((S)->bsym)->type) ++#define S_GET_DESC(S) (amiga_symbol((S)->bsym)->desc) ++ ++asection *text_section, *data_section, *bss_section; ++ ++#define obj_frob_symbol(S,PUNT) obj_amiga_frob_symbol (S, &PUNT) ++#define obj_frob_file() obj_amiga_frob_file () ++extern void obj_amiga_frob_symbol PARAMS ((struct symbol *, int *)); ++extern void obj_amiga_frob_file PARAMS ((void)); ++ ++#define obj_sec_sym_ok_for_reloc(SEC) (1) ++ ++#else ++ ++/* We use the sy_obj field to record whether a symbol is weak. */ ++#define OBJ_SYMFIELD_TYPE char ++ ++/* ++ * Macros to extract information from a symbol table entry. ++ * This syntaxic indirection allows independence regarding a.out or coff. ++ * The argument (s) of all these macros is a pointer to a symbol table entry. ++ */ ++ ++/* True if the symbol is external */ ++#define S_IS_EXTERNAL(s) ((s)->sy_symbol.n_type & N_EXT) ++ ++/* True if symbol has been defined, ie is in N_{TEXT,DATA,BSS,ABS} or N_EXT */ ++#define S_IS_DEFINED(s) ((S_GET_TYPE(s) != N_UNDF) || (S_GET_OTHER(s) != 0) || (S_GET_DESC(s) != 0)) ++ ++#define S_IS_REGISTER(s) ((s)->sy_symbol.n_type == N_REGISTER) ++ ++/* True if a debug special symbol entry */ ++#define S_IS_DEBUG(s) ((s)->sy_symbol.n_type & N_STAB) ++/* True if a symbol is local symbol name */ ++/* A symbol name whose name begin with ^A is a gas internal pseudo symbol ++ nameless symbols come from .stab directives. */ ++#define S_IS_LOCAL(s) (S_GET_NAME(s) && \ ++ !S_IS_DEBUG(s) && \ ++ (S_GET_NAME(s)[0] == '\001' || \ ++ (S_LOCAL_NAME(s) && !flag_keep_locals))) ++/* True if a symbol is not defined in this file */ ++#define S_IS_EXTERN(s) ((s)->sy_symbol.n_type & N_EXT) ++/* True if the symbol has been generated because of a .stabd directive */ ++#define S_IS_STABD(s) (S_GET_NAME(s) == (char *)0) ++ ++/* Accessors */ ++/* The name of the symbol */ ++#define S_GET_NAME(s) ((s)->sy_symbol.n_un.n_name) ++/* The pointer to the string table */ ++#define S_GET_OFFSET(s) ((s)->sy_symbol.n_un.n_strx) ++/* The type of the symbol */ ++#define S_GET_TYPE(s) ((s)->sy_symbol.n_type & N_TYPE) ++/* The numeric value of the segment */ ++#define S_GET_SEGMENT(s) (N_TYPE_seg[S_GET_TYPE(s)]) ++/* The n_other expression value */ ++#define S_GET_OTHER(s) ((s)->sy_symbol.n_other) ++/* The n_desc expression value */ ++#define S_GET_DESC(s) ((s)->sy_symbol.n_desc) ++/* Whether the symbol is weak. */ ++#define S_GET_WEAK(s) ((s)->sy_obj) ++ ++/* Modifiers */ ++/* Assume that a symbol cannot be simultaneously in more than on segment */ ++/* set segment */ ++#define S_SET_SEGMENT(s,seg) ((s)->sy_symbol.n_type &= ~N_TYPE,(s)->sy_symbol.n_type|=SEGMENT_TO_SYMBOL_TYPE(seg)) ++/* The symbol is external */ ++#define S_SET_EXTERNAL(s) ((s)->sy_symbol.n_type |= N_EXT) ++/* The symbol is not external */ ++#define S_CLEAR_EXTERNAL(s) ((s)->sy_symbol.n_type &= ~N_EXT) ++/* Set the name of the symbol */ ++#define S_SET_NAME(s,v) ((s)->sy_symbol.n_un.n_name = (v)) ++/* Set the offset in the string table */ ++#define S_SET_OFFSET(s,v) ((s)->sy_symbol.n_un.n_strx = (v)) ++/* Set the n_type field */ ++#define S_SET_TYPE(s,t) ((s)->sy_symbol.n_type = (t)) ++/* Set the n_other expression value */ ++#define S_SET_OTHER(s,v) ((s)->sy_symbol.n_other = (v)) ++/* Set the n_desc expression value */ ++#define S_SET_DESC(s,v) ((s)->sy_symbol.n_desc = (v)) ++/* Mark the symbol as weak. This causes n_type to be adjusted when ++ the symbol is written out. */ ++#define S_SET_WEAK(s) ((s)->sy_obj = 1) ++ ++/* File header macro and type definition */ ++ ++#define H_GET_FILE_SIZE(h) (H_GET_HEADER_SIZE(h) \ ++ + H_GET_TEXT_SIZE(h) \ ++ + H_GET_DATA_SIZE(h) \ ++ + H_GET_SYMBOL_TABLE_SIZE(h) \ ++ + H_GET_TEXT_RELOCATION_SIZE(h) \ ++ + H_GET_DATA_RELOCATION_SIZE(h) \ ++ + H_GET_STRING_SIZE(h)) ++ ++#define H_GET_HEADER_SIZE(h) (EXEC_BYTES_SIZE) ++#define H_GET_TEXT_SIZE(h) ((h)->header.a_text) ++#define H_GET_DATA_SIZE(h) ((h)->header.a_data) ++#define H_GET_BSS_SIZE(h) ((h)->header.a_bss) ++#define H_GET_TEXT_RELOCATION_SIZE(h) ((h)->header.a_trsize) ++#define H_GET_DATA_RELOCATION_SIZE(h) ((h)->header.a_drsize) ++#define H_GET_SYMBOL_TABLE_SIZE(h) ((h)->header.a_syms) ++#define H_GET_ENTRY_POINT(h) ((h)->header.a_entry) ++#define H_GET_STRING_SIZE(h) ((h)->string_table_size) ++#define H_GET_LINENO_SIZE(h) (0) ++ ++#define H_GET_DYNAMIC(h) ((h)->header.a_info >> 31) ++#define H_GET_VERSION(h) (((h)->header.a_info >> 24) & 0x7f) ++#define H_GET_MACHTYPE(h) (((h)->header.a_info >> 16) & 0xff) ++#define H_GET_MAGIC_NUMBER(h) ((h)->header.a_info & 0xffff) ++ ++#define H_SET_DYNAMIC(h,v) ((h)->header.a_info = (((v) << 31) \ ++ | (H_GET_VERSION(h) << 24) \ ++ | (H_GET_MACHTYPE(h) << 16) \ ++ | (H_GET_MAGIC_NUMBER(h)))) ++ ++#define H_SET_VERSION(h,v) ((h)->header.a_info = ((H_GET_DYNAMIC(h) << 31) \ ++ | ((v) << 24) \ ++ | (H_GET_MACHTYPE(h) << 16) \ ++ | (H_GET_MAGIC_NUMBER(h)))) ++ ++#define H_SET_MACHTYPE(h,v) ((h)->header.a_info = ((H_GET_DYNAMIC(h) << 31) \ ++ | (H_GET_VERSION(h) << 24) \ ++ | ((v) << 16) \ ++ | (H_GET_MAGIC_NUMBER(h)))) ++ ++#define H_SET_MAGIC_NUMBER(h,v) ((h)->header.a_info = ((H_GET_DYNAMIC(h) << 31) \ ++ | (H_GET_VERSION(h) << 24) \ ++ | (H_GET_MACHTYPE(h) << 16) \ ++ | ((v)))) ++ ++#define H_SET_TEXT_SIZE(h,v) ((h)->header.a_text = md_section_align(SEG_TEXT, (v))) ++#define H_SET_DATA_SIZE(h,v) ((h)->header.a_data = md_section_align(SEG_DATA, (v))) ++#define H_SET_BSS_SIZE(h,v) ((h)->header.a_bss = md_section_align(SEG_BSS, (v))) ++ ++#define H_SET_RELOCATION_SIZE(h,t,d) (H_SET_TEXT_RELOCATION_SIZE((h),(t)),\ ++ H_SET_DATA_RELOCATION_SIZE((h),(d))) ++ ++#define H_SET_TEXT_RELOCATION_SIZE(h,v) ((h)->header.a_trsize = (v)) ++#define H_SET_DATA_RELOCATION_SIZE(h,v) ((h)->header.a_drsize = (v)) ++#define H_SET_SYMBOL_TABLE_SIZE(h,v) ((h)->header.a_syms = (v) * 12) ++ ++#define H_SET_ENTRY_POINT(h,v) ((h)->header.a_entry = (v)) ++#define H_SET_STRING_SIZE(h,v) ((h)->string_table_size = (v)) ++ ++typedef struct ++ { ++ struct exec header; /* a.out header */ ++ long string_table_size; /* names + '\0' + sizeof(int) */ ++ } ++ ++object_headers; ++ ++/* line numbering stuff. */ ++#define OBJ_EMIT_LINENO(a, b, c) {;} ++ ++struct fix; ++void tc_aout_fix_to_chars PARAMS ((char *where, struct fix *fixP, relax_addressT segment_address)); ++ ++#endif ++ ++#define obj_symbol_new_hook(s) {;} ++ ++#define EMIT_SECTION_SYMBOLS 0 ++ ++#define AOUT_STABS ++ ++ ++/* end of obj-aout.h */ +diff -rup --new-file binutils-2.9.1/gas/config/tc-i386.c binutils-2.9.1/gas/config/tc-i386.c +--- binutils-2.9.1/gas/config/tc-i386.c Fri May 1 08:44:41 1998 ++++ binutils-2.9.1/gas/config/tc-i386.c Sun Aug 23 00:00:00 1998 +@@ -1807,7 +1807,7 @@ md_assemble (line) + else + { + fix_new_exp (frag_now, p - frag_now->fr_literal, size, +- i.disps[0], 1, reloc (size, 1, i.disp_reloc[0])); ++ i.disps[0], 1, reloc (size, 1, i.disp_reloc[0]), 0); + + } + } +@@ -1826,7 +1826,7 @@ md_assemble (line) + md_number_to_chars (p + 1, (valueT) i.imms[1]->X_add_number, 4); + else + fix_new_exp (frag_now, p + 1 - frag_now->fr_literal, 4, +- i.imms[1], 0, BFD_RELOC_32); ++ i.imms[1], 0, BFD_RELOC_32, 0); + if (i.imms[0]->X_op != O_constant) + as_bad ("can't handle non absolute segment in long call/jmp"); + md_number_to_chars (p + 5, (valueT) i.imms[0]->X_add_number, 2); +@@ -1952,7 +1952,7 @@ md_assemble (line) + insn_size += 4; + fix_new_exp (frag_now, p - frag_now->fr_literal, 4, + i.disps[n], 0, +- TC_RELOC(i.disp_reloc[n], BFD_RELOC_32)); ++ TC_RELOC(i.disp_reloc[n], BFD_RELOC_32), 0); + } + } + } +@@ -2026,7 +2026,7 @@ md_assemble (line) + } + #endif + fix_new_exp (frag_now, p - frag_now->fr_literal, size, +- i.imms[n], pcrel, r_type); ++ i.imms[n], pcrel, r_type, 0); + } + } + } +@@ -2577,7 +2577,7 @@ md_estimate_size_before_relax (fragP, se + think it does not matter that much, as + this will be right most of the time. ERY*/ + S_GET_SEGMENT(fragP->fr_symbol) == undefined_section)? +- BFD_RELOC_386_PLT32 : BFD_RELOC_32_PCREL); ++ BFD_RELOC_386_PLT32 : BFD_RELOC_32_PCREL, 0); + break; + + default: +@@ -2593,7 +2593,7 @@ md_estimate_size_before_relax (fragP, se + presence of @PLT, but I cannot see how + to get to that from here. ERY */ + S_GET_SEGMENT(fragP->fr_symbol) == undefined_section)? +- BFD_RELOC_386_PLT32 : BFD_RELOC_32_PCREL); ++ BFD_RELOC_386_PLT32 : BFD_RELOC_32_PCREL, 0); + break; + } + frag_wane (fragP); +@@ -2729,7 +2729,7 @@ md_create_long_jump (ptr, from_addr, to_ + md_number_to_chars (ptr, (valueT) 0xe9, 1);/* opcode for long jmp */ + md_number_to_chars (ptr + 1, (valueT) offset, 4); + fix_new (frag, (ptr + 1) - frag->fr_literal, 4, +- to_symbol, (offsetT) 0, 0, BFD_RELOC_32); ++ to_symbol, (offsetT) 0, 0, BFD_RELOC_32, 0); + } + else + { +@@ -3064,7 +3064,11 @@ md_section_align (segment, size) + segT segment; + valueT size; + { +-#ifdef OBJ_AOUT ++/* fnf hack - check to see if BFD really should handle this or not. It is currently ++ not, at least for the BeOS port, and since stdio does not guarantee that holes ++ in files are zero filled, the holes are ending up with random contents. This ++ really screws things like gcc's bootstrap success/fail testing. */ ++#if 1 + #ifdef BFD_ASSEMBLER + /* For a.out, force the section size to be aligned. If we don't do + this, BFD will align it for us, but it will not write out the +diff -rup --new-file binutils-2.9.1/gas/config/tc-m68k.c binutils-2.9.1/gas/config/tc-m68k.c +--- binutils-2.9.1/gas/config/tc-m68k.c Fri May 1 08:44:43 1998 ++++ binutils-2.9.1/gas/config/tc-m68k.c Sun Aug 23 00:00:00 1998 +@@ -27,6 +27,12 @@ + #include "opcode/m68k.h" + #include "m68k-parse.h" + ++/* FIXME: delete this #define as soon as the code that references ++ N_TEXT is changed */ ++#ifdef BFD_ASSEMBLER ++#define N_TEXT 4 ++#endif ++ + /* This string holds the chars that always start a comment. If the + pre-processor is disabled, these aren't very useful. The macro + tc_comment_chars points to this. We use this, rather than the +@@ -70,6 +76,7 @@ int flag_want_pic; + + static int flag_short_refs; /* -l option */ + static int flag_long_jumps; /* -S option */ ++static int flag_small_code; /* -sc option */ + + #ifdef REGISTER_PREFIX_OPTIONAL + int flag_reg_prefix_optional = REGISTER_PREFIX_OPTIONAL; +@@ -156,6 +163,9 @@ static struct obstack robyn; + /* Mode AINDX (apc-relative) using PC, with variable target, might fit + in 16 or 8 bits. */ + #define PCINDEX 7 ++/* AmigaOS relocations */ ++#define ABSREL 8 ++#define IMMREL 9 + + struct m68k_incant + { +@@ -243,6 +253,7 @@ struct m68k_it + so, which. */ + enum pic_relocation pic_reloc; + #endif ++ char baserel; + } + reloc[5]; /* Five is enough??? */ + }; +@@ -268,7 +279,7 @@ static struct m68k_it the_ins; /* the in + /* Static functions. */ + + static void insop PARAMS ((int, const struct m68k_incant *)); +-static void add_fix PARAMS ((int, struct m68k_exp *, int, int)); ++static void add_fix PARAMS ((int, struct m68k_exp *, int, int, int)); + static void add_frag PARAMS ((symbolS *, offsetT, int)); + + /* Like addword, but goes BEFORE general operands */ +@@ -291,11 +302,12 @@ insop (w, opcode) + /* The numo+1 kludge is so we can hit the low order byte of the prev word. + Blecch. */ + static void +-add_fix (width, exp, pc_rel, pc_fix) ++add_fix (width, exp, pc_rel, pc_fix, base_rel) + int width; + struct m68k_exp *exp; + int pc_rel; + int pc_fix; ++ int base_rel; + { + the_ins.reloc[the_ins.nrel].n = ((width == 'B' || width == '3') + ? (the_ins.numo*2-1) +@@ -308,7 +320,8 @@ add_fix (width, exp, pc_rel, pc_fix) + #ifdef OBJ_ELF + the_ins.reloc[the_ins.nrel].pic_reloc = exp->pic_reloc; + #endif +- the_ins.reloc[the_ins.nrel++].pcrel = pc_rel; ++ the_ins.reloc[the_ins.nrel].pcrel = pc_rel; ++ the_ins.reloc[the_ins.nrel++].baserel = base_rel; + } + + /* Cause an extra frag to be generated here, inserting up to 10 bytes +@@ -425,6 +438,15 @@ static const int n_archs = sizeof (archs + /* BCC68000 is for patching in an extra jmp instruction for long offsets + on the 68000. The 68000 doesn't support long branches with branchs */ + ++/* ABSREL (nice name;-)) is used in small-code, it might be ++ * implemented base-relative (a4), pc-relative, or base-rel with an extra ++ * add instruction to add the base-register ++ * ++ * IMMREL is the analogous mode for immediate addressing of variables. This ++ * one can lead into situations, where a replacement is not possible: ++ * addl #foo,a0 ++ * can't be made pc-relative, if foo is in the text segment */ ++ + /* This table desribes how you change sizes for the various types of variable + size expressions. This version only supports two kinds. */ + +@@ -479,6 +501,17 @@ relax_typeS md_relax_table[] = + {32765, -32770, 2, TAB (PCINDEX, LONG)}, + {0, 0, 4, 0}, + {1, 1, 0, 0}, ++ ++ {127, -128, 0, 0}, ++ {32767, -32768, 2, TAB(ABSREL,LONG)}, ++ {0, 0, 6, 0}, ++ {1, 1, 0, 0}, ++ ++ {127, -128, 0, 0}, ++ {32767, -32768, 2, TAB(IMMREL,LONG)}, ++ {0, 0, 6, 0}, ++ {1, 1, 0, 0}, ++ + }; + + /* These are the machine dependent pseudo-ops. These are included so +@@ -500,12 +533,14 @@ const pseudo_typeS md_pseudo_table[] = + {"even", s_even, 0}, + {"skip", s_space, 0}, + {"proc", s_proc, 0}, ++#ifndef __amigaos__ + #if defined (TE_SUN3) || defined (OBJ_ELF) + {"align", s_align_bytes, 0}, + #endif + #ifdef OBJ_ELF + {"swbeg", s_ignore, 0}, + #endif ++#endif + {"extend", float_cons, 'x'}, + {"ldouble", float_cons, 'x'}, + +@@ -1820,7 +1855,20 @@ m68k_ip (instring) + else + nextword = get_num (&opP->disp, 0); + if (isvar (&opP->disp)) +- add_fix (s[1], &opP->disp, 0, 0); ++ { ++/* This doesn't work when the symbol is N_UNDF! So we ignore this for the moment. ++ ++ if (flag_small_code) ++ { ++ add_frag (adds(&opP->disp), ++ offs(&opP->disp), ++ TAB(IMMREL, SZ_UNDEF)); ++ break; ++ } ++ else ++*/ ++ add_fix(s[1], &opP->disp, 0, 0, opP->disp.baserel); ++ } + switch (s[1]) + { + case 'b': +@@ -1980,7 +2028,7 @@ m68k_ip (instring) + ) + { + addword (0x0170); +- add_fix ('l', &opP->disp, 1, 2); ++ add_fix ('l', &opP->disp, 1, 2, opP->disp.baserel); + } + else + { +@@ -1993,7 +2041,7 @@ m68k_ip (instring) + else + { + addword (0x0170); +- add_fix ('l', &opP->disp, 0, 0); ++ add_fix ('l', &opP->disp, 0, 0, opP->disp.baserel); + } + } + else +@@ -2011,10 +2059,10 @@ m68k_ip (instring) + { + if (opP->reg == PC) + { +- add_fix ('w', &opP->disp, 1, 0); ++ add_fix ('w', &opP->disp, 1, 0, opP->disp.baserel); + } + else +- add_fix ('w', &opP->disp, 0, 0); ++ add_fix ('w', &opP->disp, 0, 0, opP->disp.baserel); + } + } + addword (nextword); +@@ -2119,9 +2167,9 @@ m68k_ip (instring) + fit (possible on m68000) let the + fixup processing complain later. */ + if (opP->reg == PC) +- add_fix ('B', &opP->disp, 1, 1); ++ add_fix ('B', &opP->disp, 1, 1, 0); /* FIXME? -fnf */ + else +- add_fix ('B', &opP->disp, 0, 0); ++ add_fix ('B', &opP->disp, 0, 0, 0); /* FIXME? -fnf */ + } + else if (siz1 != SIZE_BYTE) + { +@@ -2251,9 +2299,9 @@ m68k_ip (instring) + if (siz1 != SIZE_UNSPEC && isvar (&opP->disp)) + { + if (opP->reg == PC || opP->reg == ZPC) +- add_fix (siz1 == SIZE_LONG ? 'l' : 'w', &opP->disp, 1, 2); ++ add_fix (siz1 == SIZE_LONG ? 'l' : 'w', &opP->disp, 1, 2, opP->disp.baserel); + else +- add_fix (siz1 == SIZE_LONG ? 'l' : 'w', &opP->disp, 0, 0); ++ add_fix (siz1 == SIZE_LONG ? 'l' : 'w', &opP->disp, 0, 0, opP->disp.baserel); + } + if (siz1 == SIZE_LONG) + addword (baseo >> 16); +@@ -2261,7 +2309,7 @@ m68k_ip (instring) + addword (baseo); + + if (siz2 != SIZE_UNSPEC && isvar (&opP->odisp)) +- add_fix (siz2 == SIZE_LONG ? 'l' : 'w', &opP->odisp, 0, 0); ++ add_fix (siz2 == SIZE_LONG ? 'l' : 'w', &opP->odisp, 0, 0, opP->disp.baserel); + if (siz2 == SIZE_LONG) + addword (outro >> 16); + if (siz2 != SIZE_UNSPEC) +@@ -2293,7 +2341,7 @@ m68k_ip (instring) + && opP->disp.pic_reloc == pic_none + #endif + && S_GET_SEGMENT (adds (&opP->disp)) == now_seg +- && HAVE_LONG_BRANCH(current_architecture) ++ && (HAVE_LONG_BRANCH(current_architecture) || flag_small_code) + && !flag_long_jumps + && !strchr ("~%&$?", s[0])) + { +@@ -2305,8 +2353,20 @@ m68k_ip (instring) + } + /* Fall through into long */ + case SIZE_LONG: ++#if 0 ++ /* This doesn't work when the symbol is N_UNDF! We ignore this for now. */ ++ ++ if (flag_small_code) ++ { ++ tmpreg=0x3A; /* 7.2 */ ++ add_frag (adds(&opP->disp), ++ offs(&opP->disp), ++ TAB(ABSREL, SZ_UNDEF)); ++ break; ++ } ++#endif + if (isvar (&opP->disp)) +- add_fix ('l', &opP->disp, 0, 0); ++ add_fix ('l', &opP->disp, 0, 0, opP->disp.baserel); + + tmpreg = 0x39;/* 7.1 mode */ + addword (nextword >> 16); +@@ -2318,7 +2378,7 @@ m68k_ip (instring) + /* Fall through. */ + case SIZE_WORD: /* Word */ + if (isvar (&opP->disp)) +- add_fix ('w', &opP->disp, 0, 0); ++ add_fix ('w', &opP->disp, 0, 0, opP->disp.baserel); + + tmpreg = 0x38;/* 7.0 mode */ + addword (nextword); +@@ -2354,7 +2414,7 @@ m68k_ip (instring) + } + tmpreg = get_num (&opP->disp, tmpreg); + if (isvar (&opP->disp)) +- add_fix (s[1], &opP->disp, 0, 0); ++ add_fix (s[1], &opP->disp, 0, 0, opP->disp.baserel); + switch (s[1]) + { + case 'b': /* Danger: These do no check for +@@ -2423,10 +2483,10 @@ m68k_ip (instring) + which is a char, and may therefore be unsigned. We + want to pass -1, but we pass 64 instead, and convert + back in md_pcrel_from. */ +- add_fix ('B', &opP->disp, 1, 64); ++ add_fix ('B', &opP->disp, 1, 64, opP->disp.baserel); + break; + case 'W': +- add_fix ('w', &opP->disp, 1, 0); ++ add_fix ('w', &opP->disp, 1, 0, opP->disp.baserel); + addword (0); + break; + case 'L': +@@ -2434,7 +2494,7 @@ m68k_ip (instring) + if (!HAVE_LONG_BRANCH(current_architecture)) + as_warn ("Can't use long branches on 68000/68010/5200"); + the_ins.opcode[the_ins.numo - 1] |= 0xff; +- add_fix ('l', &opP->disp, 1, 0); ++ add_fix ('l', &opP->disp, 1, 0, opP->disp.baserel); + addword (0); + addword (0); + break; +@@ -2479,19 +2539,19 @@ m68k_ip (instring) + break; + } + #endif +- add_fix ('w', &opP->disp, 1, 0); ++ add_fix ('w', &opP->disp, 1, 0, opP->disp.baserel); + } + addword (0); + break; + case 'C': /* Fixed size LONG coproc branches */ +- add_fix ('l', &opP->disp, 1, 0); ++ add_fix ('l', &opP->disp, 1, 0, opP->disp.baserel); + addword (0); + addword (0); + break; + case 'c': /* Var size Coprocesssor branches */ + if (subs (&opP->disp)) + { +- add_fix ('l', &opP->disp, 1, 0); ++ add_fix ('l', &opP->disp, 1, 0, opP->disp.baserel); + add_frag ((symbolS *) 0, (offsetT) 0, TAB (FBRANCH, LONG)); + } + else if (adds (&opP->disp)) +@@ -2502,7 +2562,7 @@ m68k_ip (instring) + /* add_frag ((symbolS *) 0, offs (&opP->disp), + TAB(FBRANCH,SHORT)); */ + the_ins.opcode[the_ins.numo - 1] |= 0x40; +- add_fix ('l', &opP->disp, 1, 0); ++ add_fix ('l', &opP->disp, 1, 0, opP->disp.baserel); + addword (0); + addword (0); + } +@@ -2856,7 +2916,7 @@ m68k_ip (instring) + break; + case '_': /* used only for move16 absolute 32-bit address */ + if (isvar (&opP->disp)) +- add_fix ('l', &opP->disp, 0, 0); ++ add_fix ('l', &opP->disp, 0, 0, opP->disp.baserel); + tmpreg = get_num (&opP->disp, 80); + addword (tmpreg >> 16); + addword (tmpreg & 0xFFFF); +@@ -3162,8 +3222,8 @@ static const struct init_entry init_tabl + { "a3", ADDR3 }, + { "a4", ADDR4 }, + { "a5", ADDR5 }, ++ { "fp", ADDR5 }, + { "a6", ADDR6 }, +- { "fp", ADDR6 }, + { "a7", ADDR7 }, + { "sp", ADDR7 }, + { "ssp", ADDR7 }, +@@ -3439,7 +3499,8 @@ md_assemble (str) + &the_ins.reloc[m].exp, + the_ins.reloc[m].pcrel, + get_reloc_code (n, the_ins.reloc[m].pcrel, +- the_ins.reloc[m].pic_reloc)); ++ the_ins.reloc[m].pic_reloc), ++ the_ins.reloc[m].baserel); + fixP->fx_pcrel_adjust = the_ins.reloc[m].pcrel_fix; + if (the_ins.reloc[m].wid == 'B') + fixP->fx_signed = 1; +@@ -3486,7 +3547,8 @@ md_assemble (str) + &the_ins.reloc[m].exp, + the_ins.reloc[m].pcrel, + get_reloc_code (wid, the_ins.reloc[m].pcrel, +- the_ins.reloc[m].pic_reloc)); ++ the_ins.reloc[m].pic_reloc), ++ the_ins.reloc[m].baserel); + fixP->fx_pcrel_adjust = the_ins.reloc[m].pcrel_fix; + } + (void) frag_var (rs_machine_dependent, 10, 0, +@@ -3523,7 +3585,8 @@ md_assemble (str) + &the_ins.reloc[m].exp, + the_ins.reloc[m].pcrel, + get_reloc_code (wid, the_ins.reloc[m].pcrel, +- the_ins.reloc[m].pic_reloc)); ++ the_ins.reloc[m].pic_reloc), ++ the_ins.reloc[m].baserel); + fixP->fx_pcrel_adjust = the_ins.reloc[m].pcrel_fix; + } + } +@@ -4146,7 +4209,11 @@ md_convert_frag_1 (fragP) + case TAB (ABRANCH, LONG): + if (!HAVE_LONG_BRANCH(current_architecture)) + { +- if (fragP->fr_opcode[0] == 0x61) ++ if (flag_small_code) ++ { ++ as_bad("Long branch in small code model, not supported."); ++ } ++ else if (fragP->fr_opcode[0] == 0x61) + /* BSR */ + { + fragP->fr_opcode[0] = 0x4E; +@@ -4158,7 +4225,7 @@ md_convert_frag_1 (fragP) + fragP->fr_symbol, + fragP->fr_offset, + 0, +- NO_RELOC); ++ NO_RELOC, 0); + + fragP->fr_fix += 4; + ext = 0; +@@ -4169,7 +4236,7 @@ md_convert_frag_1 (fragP) + fragP->fr_opcode[0] = 0x4E; + fragP->fr_opcode[1] = (char) 0xF9; /* JMP with ABSL LONG offset */ + fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, +- fragP->fr_offset, 0, NO_RELOC); ++ fragP->fr_offset, 0, NO_RELOC, 0); + fragP->fr_fix += 4; + ext = 0; + } +@@ -4197,7 +4264,7 @@ md_convert_frag_1 (fragP) + *buffer_address++ = (char) 0xf9; + fragP->fr_fix += 2; /* account for jmp instruction */ + fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, +- fragP->fr_offset, 0, NO_RELOC); ++ fragP->fr_offset, 0, NO_RELOC, 0); + fragP->fr_fix += 4; + ext = 0; + break; +@@ -4214,7 +4281,7 @@ md_convert_frag_1 (fragP) + + fragP->fr_fix += 6; /* account for bra/jmp instructions */ + fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, +- fragP->fr_offset, 0, NO_RELOC); ++ fragP->fr_offset, 0, NO_RELOC, 0); + fragP->fr_fix += 4; + ext = 0; + break; +@@ -4233,8 +4300,10 @@ md_convert_frag_1 (fragP) + /* The thing to do here is force it to ABSOLUTE LONG, since + PCREL is really trying to shorten an ABSOLUTE address anyway */ + /* JF FOO This code has not been tested */ ++ if (flag_small_code) ++ as_bad ("Trying to force a pcrel thing into absolute mode while in small code mode"); + fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, +- 0, NO_RELOC); ++ 0, NO_RELOC, 0); + if ((fragP->fr_opcode[1] & 0x3F) != 0x3A) + as_bad ("Internal error (long PC-relative operand) for insn 0x%04x at 0x%lx", + (unsigned) fragP->fr_opcode[0], +@@ -4246,14 +4315,14 @@ md_convert_frag_1 (fragP) + break; + case TAB (PCLEA, SHORT): + fix_new (fragP, (int) (fragP->fr_fix), 2, fragP->fr_symbol, +- fragP->fr_offset, 1, NO_RELOC); ++ fragP->fr_offset, 1, NO_RELOC, 0); + fragP->fr_opcode[1] &= ~0x3F; + fragP->fr_opcode[1] |= 0x3A; /* 072 - mode 7.2 */ + ext = 2; + break; + case TAB (PCLEA, LONG): + fixP = fix_new (fragP, (int) (fragP->fr_fix) + 2, 4, fragP->fr_symbol, +- fragP->fr_offset, 1, NO_RELOC); ++ fragP->fr_offset, 1, NO_RELOC, 0); + fixP->fx_pcrel_adjust = 2; + /* Already set to mode 7.3; this indicates: PC indirect with + suppressed index, 32-bit displacement. */ +@@ -4283,7 +4352,7 @@ md_convert_frag_1 (fragP) + buffer_address[-1] = 0x20; + fixP = fix_new (fragP, (int) (fragP->fr_fix), 2, fragP->fr_symbol, + fragP->fr_offset, (fragP->fr_opcode[1] & 077) == 073, +- NO_RELOC); ++ NO_RELOC, 0); + fixP->fx_pcrel_adjust = 2; + ext = 2; + break; +@@ -4291,13 +4360,89 @@ md_convert_frag_1 (fragP) + disp += 2; + fixP = fix_new (fragP, (int) (fragP->fr_fix), 4, fragP->fr_symbol, + fragP->fr_offset, (fragP->fr_opcode[1] & 077) == 073, +- NO_RELOC); ++ NO_RELOC, 0); + fixP->fx_pcrel_adjust = 2; + assert (fragP->fr_fix >= 2); + buffer_address[-2] |= 0x1; + buffer_address[-1] = 0x30; + ext = 4; + break; ++ case TAB(ABSREL,BYTE): ++ as_bad ("ABSREL_BYTE: how the ** does this look ?? \n"); ++ break; ++ case TAB(ABSREL,SHORT): ++ subseg_change (text_section, 0); ++ ext = 2; ++ fragP->fr_opcode[1] &= ~0x3f; ++ if ((S_GET_TYPE (fragP->fr_symbol)) == N_TEXT) ++ { ++ /* so this is really a pc-relative address */ ++ fragP->fr_opcode[1] |= 0x3a; ++ fix_new(fragP,(int)(fragP->fr_fix),2,fragP->fr_symbol, fragP->fr_offset+2, 1, NO_RELOC, 0); ++ break; ++ } ++ /* in that case we have to generate base-relative code ++ * (note: if we're in N_UNDF, this could as well be pc-relative, but the linker ++ * will have to do the final patch in that case) */ ++ fragP->fr_opcode[1] |= 0x2c; /* (a4) */ ++ fix_new(fragP,(int)(fragP->fr_fix),2,fragP->fr_symbol,fragP->fr_offset, 0, NO_RELOC, 1); ++ break; ++ case TAB(ABSREL,LONG): ++ as_bad ("ABSREL_LONG: sorry, not supported.\n"); ++ break; ++ ++ case TAB(IMMREL,BYTE): ++ as_bad ("IMMREL_BYTE: how the ** does this look ?? \n"); ++ break; ++ case TAB(IMMREL,SHORT): ++ subseg_change (text_section, 0); ++ ext = 0; ++ if ((S_GET_TYPE (fragP->fr_symbol)) == N_TEXT) ++ { ++ /* we can only fix operations on data registers, not on */ ++ if ((fragP->fr_opcode[1] & 0x38) != 0) ++ { ++ /* use the normal reloc32, sigh... */ ++ fix_new (fragP,(int)(fragP->fr_fix),4,fragP->fr_symbol, fragP->fr_offset, 0, NO_RELOC, 0); ++ fragP->fr_fix += 4; ++ break; ++ } ++ ++ /* so this is really a pc-relative address ++ * What we have to do now is a VERY UGLY AND BIG KLUDGE. Basically do the ++ * following thing: ++ * turn ++ * addl #foo,d0 (foo is N_TEXT) ++ * into ++ * pea foo(pc) ++ * addl (sp)+,d0 ++ */ ++ *buffer_address++ = fragP->fr_opcode[0]; /* save the original command */ ++ *buffer_address++ = fragP->fr_opcode[1]; ++ fragP->fr_opcode[0] = 0x48; /* PEA */ ++ fragP->fr_opcode[1] = 0x7a; ++ fix_new(fragP,(int)(fragP->fr_fix),2,fragP->fr_symbol, fragP->fr_offset+2, 1, NO_RELOC, 0); ++ ++ *buffer_address++ = 0x9f; /* sp@+ */ ++ fragP->fr_fix += 4; /* two byte fix, two byte code extension */ ++ break; ++ } ++ /* in that case we have to generate base-relative code ++ * (note: if we're in N_UNDF, this could as well be pc-relative, but the linker ++ * will have to do the final patch in that case) */ ++ ++ /* analogous (more or less;-)) to above, the following conversion is done ++ * turn ++ * addl #bar,d0 (bar is N_DATA) ++ * into ++ * addl #,d0 where is a baserel-reloc ++ * addl a4,d0 ++ */ ++ ++ fix_new(fragP,(int)(fragP->fr_fix), 4,fragP->fr_symbol,fragP->fr_offset, 0, NO_RELOC, 1); ++ *buffer_address++ = 0xd0; ++ *buffer_address++ = 0x8c; ++ break; + } + + if (ext) +@@ -4355,26 +4500,68 @@ md_estimate_size_before_relax (fragP, se + fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), BYTE); + break; + } +- else if ((fragP->fr_symbol == 0) || !HAVE_LONG_BRANCH(current_architecture)) ++ else if ((fragP->fr_symbol == 0) || !HAVE_LONG_BRANCH(current_architecture) || !flag_small_code) + { + /* On 68000, or for absolute value, switch to abs long */ + /* FIXME, we should check abs val, pick short or long */ +- if (fragP->fr_opcode[0] == 0x61) ++ if (fragP->fr_opcode[0] == 0x61) + { +- fragP->fr_opcode[0] = 0x4E; +- fragP->fr_opcode[1] = (char) 0xB9; /* JBSR with ABSL LONG offset */ +- fix_new (fragP, fragP->fr_fix, 4, +- fragP->fr_symbol, fragP->fr_offset, 0, NO_RELOC); +- fragP->fr_fix += 4; ++ if (flag_small_code) ++ { ++ /* leave the BSR, no need to change ++ * it into a JSR (PC,..) */ ++ subseg_change(text_section, 0); ++ fix_new(fragP, fragP->fr_fix, 2, ++ fragP->fr_symbol, fragP->fr_offset, 1, NO_RELOC, 0); ++ fragP->fr_fix+=2; ++ fragP->fr_opcode[1]=0x00; ++ } ++ else if (flag_short_refs) ++ { ++ subseg_change(text_section, 0); ++ fix_new(fragP,(int)(fragP->fr_fix),2,fragP->fr_symbol, ++ fragP->fr_offset + 2, 0, NO_RELOC, 0); ++ fragP->fr_fix+=2; ++ fragP->fr_opcode[1]=0x00; ++ } ++ else ++ { ++ fragP->fr_opcode[0] = 0x4E; ++ fragP->fr_opcode[1] = (char) 0xB9; /* JBSR with ABSL LONG offset */ ++ subseg_change (text_section, 0); ++ fix_new (fragP, fragP->fr_fix, 4, ++ fragP->fr_symbol, fragP->fr_offset, 0, NO_RELOC, 0); ++ fragP->fr_fix += 4; ++ } + frag_wane (fragP); + } + else if (fragP->fr_opcode[0] == 0x60) + { +- fragP->fr_opcode[0] = 0x4E; +- fragP->fr_opcode[1] = (char) 0xF9; /* JMP with ABSL LONG offset */ +- fix_new (fragP, fragP->fr_fix, 4, +- fragP->fr_symbol, fragP->fr_offset, 0, NO_RELOC); +- fragP->fr_fix += 4; ++ if (flag_small_code) ++ { ++ subseg_change(text_section, 0); ++ fix_new(fragP, fragP->fr_fix, 2, ++ fragP->fr_symbol, fragP->fr_offset, 1, NO_RELOC, 0); ++ fragP->fr_fix+=2; ++ } ++ else if (flag_short_refs) ++ { ++ fragP->fr_opcode[0]= 0x4E; ++ fragP->fr_opcode[1]= 0xF8; /* JMP with ABSL WORD offset */ ++ subseg_change(text_section, 0); ++ fix_new(fragP, fragP->fr_fix, 2, ++ fragP->fr_symbol, fragP->fr_offset, 0, NO_RELOC, 0); ++ fragP->fr_fix+=2; ++ } ++ else ++ { ++ fragP->fr_opcode[0] = 0x4E; ++ fragP->fr_opcode[1] = (char) 0xF9; /* JMP with ABSL LONG offset */ ++ subseg_change (text_section, 0); ++ fix_new (fragP, fragP->fr_fix, 4, ++ fragP->fr_symbol, fragP->fr_offset, 0, NO_RELOC, 0); ++ fragP->fr_fix += 4; ++ } + frag_wane (fragP); + } + else +@@ -4385,7 +4572,7 @@ md_estimate_size_before_relax (fragP, se + else + { /* Symbol is still undefined. Make it simple */ + fix_new (fragP, (int) (fragP->fr_fix), 4, fragP->fr_symbol, +- fragP->fr_offset, 1, NO_RELOC); ++ fragP->fr_offset, 1, NO_RELOC, 0); + fragP->fr_fix += 4; + fragP->fr_opcode[1] = (char) 0xff; + frag_wane (fragP); +@@ -4405,7 +4592,7 @@ md_estimate_size_before_relax (fragP, se + else + { + fix_new (fragP, (int) fragP->fr_fix, 4, fragP->fr_symbol, +- fragP->fr_offset, 1, NO_RELOC); ++ fragP->fr_offset, 1, NO_RELOC, 0); + fragP->fr_fix += 4; + fragP->fr_opcode[1] |= 0x40; /* Turn on LONG bit */ + frag_wane (fragP); +@@ -4450,7 +4637,7 @@ md_estimate_size_before_relax (fragP, se + buffer_address[1] = (char) 0xf8; + fragP->fr_fix += 2; /* account for jmp instruction */ + fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, +- fragP->fr_offset, 0, NO_RELOC); ++ fragP->fr_offset, 0, NO_RELOC, 0); + fragP->fr_fix += 2; + } + else +@@ -4461,7 +4648,7 @@ md_estimate_size_before_relax (fragP, se + buffer_address[1] = (char) 0xf9; + fragP->fr_fix += 2; /* account for jmp instruction */ + fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, +- fragP->fr_offset, 0, NO_RELOC); ++ fragP->fr_offset, 0, NO_RELOC, 0); + fragP->fr_fix += 4; + } + frag_wane (fragP); +@@ -4491,7 +4678,7 @@ md_estimate_size_before_relax (fragP, se + buffer_address[5] = (char) 0xf8; + fragP->fr_fix += 6; /* account for bra/jmp instruction */ + fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, +- fragP->fr_offset, 0, NO_RELOC); ++ fragP->fr_offset, 0, NO_RELOC, 0); + fragP->fr_fix += 2; + } + else +@@ -4502,7 +4689,7 @@ md_estimate_size_before_relax (fragP, se + buffer_address[5] = (char) 0xf9; + fragP->fr_fix += 6; /* account for bra/jmp instruction */ + fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, +- fragP->fr_offset, 0, NO_RELOC); ++ fragP->fr_offset, 0, NO_RELOC, 0); + fragP->fr_fix += 4; + } + +@@ -4542,6 +4729,16 @@ md_estimate_size_before_relax (fragP, se + } + break; + ++ case TAB(ABSREL,SZ_UNDEF): ++ if ((S_GET_SEGMENT (fragP->fr_symbol)) == segment || flag_short_refs || flag_small_code) { ++ fragP->fr_subtype = TAB(ABSREL, SHORT); ++ fragP->fr_var += 2; ++ } else { ++ fragP->fr_subtype = TAB(ABSREL, LONG); ++ fragP->fr_var += 6; ++ } ++ break; ++ + default: + break; + } +@@ -4604,7 +4801,7 @@ md_ri_to_chars (the_bytes, ri) + the_bytes[5] = (ri->r_symbolnum >> 8) & 0x0ff; + the_bytes[6] = ri->r_symbolnum & 0x0ff; + the_bytes[7] = (((ri->r_pcrel << 7) & 0x80) | ((ri->r_length << 5) & 0x60) | +- ((ri->r_extern << 4) & 0x10)); ++ ((ri->r_extern << 4) & 0x10) | ((ri->r_baserel << 3) & 0x08)); + } + + #endif /* comment */ +@@ -4638,7 +4835,7 @@ tc_aout_fix_to_chars (where, fixP, segme + where[5] = (r_symbolnum >> 8) & 0x0ff; + where[6] = r_symbolnum & 0x0ff; + where[7] = (((fixP->fx_pcrel << 7) & 0x80) | ((nbytes_r_length[fixP->fx_size] << 5) & 0x60) | +- (((!S_IS_DEFINED (fixP->fx_addsy)) << 4) & 0x10)); ++ (((!S_IS_DEFINED (fixP->fx_addsy)) << 4) & 0x10) | ((fixP->tc_fix_data << 3) & 0x08)); + } + #endif + +@@ -4678,7 +4875,7 @@ md_create_long_jump (ptr, from_addr, to_ + md_number_to_chars (ptr, (valueT) 0x4EF9, 2); + md_number_to_chars (ptr + 2, (valueT) offset, 4); + fix_new (frag, (ptr + 2) - frag->fr_literal, 4, to_symbol, (offsetT) 0, +- 0, NO_RELOC); ++ 0, NO_RELOC, 0); + } + else + { +@@ -6549,7 +6746,7 @@ s_mri_endw (ignore) + #ifdef OBJ_ELF + CONST char *md_shortopts = "lSA:m:kQ:V"; + #else +-CONST char *md_shortopts = "lSA:m:k"; ++CONST char *md_shortopts = "SA:m:s:k"; + #endif + + struct option md_longopts[] = { +@@ -6589,6 +6786,13 @@ md_parse_option (c, arg) + flag_long_jumps = 1; + break; + ++ case 's': ++ if (!strcmp(arg, "c") || !strcmp(arg, "mallcode")) ++ flag_small_code = 1; ++ else ++ return 0; ++ break; ++ + case 'A': + if (*arg == 'm') + arg++; +@@ -6731,7 +6935,6 @@ md_show_usage (stream) + { + fprintf(stream, "\ + 680X0 options:\n\ +--l use 1 word for refs to undefined symbols [default 2]\n\ + -m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060\n\ + | -m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360\n\ + | -mcpu32 | -m5200\n\ +@@ -6745,6 +6948,7 @@ md_show_usage (stream) + [default yes for 68020 and up]\n\ + -pic, -k generate position independent code\n\ + -S turn jbsr into jsr\n\ ++-smallcode, -sc small code model\n\ + --register-prefix-optional\n\ + recognize register names without prefix character\n\ + --bitwise-or do not treat `|' as a comment character\n"); +diff -rup --new-file binutils-2.9.1/gas/config/tc-m68k.h binutils-2.9.1/gas/config/tc-m68k.h +--- binutils-2.9.1/gas/config/tc-m68k.h Fri May 1 08:44:43 1998 ++++ binutils-2.9.1/gas/config/tc-m68k.h Sun Aug 23 00:00:00 1998 +@@ -35,6 +35,9 @@ struct fix; + #ifdef TE_NetBSD + #define TARGET_FORMAT "a.out-m68k-netbsd" + #endif ++#ifdef TE_AMIGA ++#define TARGET_FORMAT "a.out-amiga" ++#endif + #ifdef TE_LINUX + #define TARGET_FORMAT "a.out-m68k-linux" + #endif +@@ -43,6 +46,10 @@ struct fix; + #endif + #endif + ++#ifdef OBJ_AMIGAHUNK ++#define TARGET_FORMAT "amiga" ++#endif ++ + #ifdef OBJ_ELF + #define TARGET_FORMAT "elf32-m68k" + #endif +@@ -74,13 +81,10 @@ struct fix; + #define TC_COFF_FIX2RTYPE(fixP) tc_coff_fix2rtype(fixP) + #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag) + extern int tc_coff_sizemachdep PARAMS ((struct frag *)); +-#ifdef TE_SUN3 + /* This variable contains the value to write out at the beginning of +- the a.out file. The 2<<16 means that this is a 68020 file instead + of an old-style 68000 file */ + +-#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (2<<16|OMAGIC); /* Magic byte for file header */ +-#endif /* TE_SUN3 */ ++#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (OMAGIC); /* Magic byte for file header */ + + #ifndef AOUT_MACHTYPE + #define AOUT_MACHTYPE m68k_aout_machtype +@@ -200,6 +204,9 @@ extern int m68k_parse_long_option PARAMS + + extern struct relax_type md_relax_table[]; + #define TC_GENERIC_RELAX_TABLE md_relax_table ++ ++#define TC_FIX_TYPE char ++#define TC_INIT_FIX_DATA(p) + + /* Copied from write.c */ + /* This was formerly called M68K_AIM_KLUDGE. */ +diff -rup --new-file binutils-2.9.1/gas/config/tc-ppc.c binutils-2.9.1/gas/config/tc-ppc.c +--- binutils-2.9.1/gas/config/tc-ppc.c Fri May 1 08:44:45 1998 ++++ binutils-2.9.1/gas/config/tc-ppc.c Sun Aug 23 00:00:00 1998 +@@ -1278,7 +1278,7 @@ ppc_elf_cons (nbytes) + register char *p = frag_more ((int) nbytes); + int offset = nbytes - size; + +- fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size, &exp, 0, reloc); ++ fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size, &exp, 0, reloc, 0); + } + } + else +@@ -1656,7 +1656,7 @@ md_assemble (str) + /* If there are fewer operands in the line then are called + for by the instruction, we want to skip the optional + operand. */ +- if (opcount < strlen (opcode->operands)) ++ if (opcount < strlen ((const char *) opcode->operands)) + skip_optional = 1; + + break; +@@ -2000,7 +2000,7 @@ md_assemble (str) + + fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size, + &fixups[i].exp, reloc_howto->pc_relative, +- fixups[i].reloc); ++ fixups[i].reloc, 0); + + /* Turn off complaints that the addend is too large for things like + foo+100000@ha. */ +@@ -2022,7 +2022,7 @@ md_assemble (str) + &fixups[i].exp, + (operand->flags & PPC_OPERAND_RELATIVE) != 0, + ((bfd_reloc_code_real_type) +- (fixups[i].opindex + (int) BFD_RELOC_UNUSED))); ++ (fixups[i].opindex + (int) BFD_RELOC_UNUSED)),0); + } + } + +diff -rup --new-file binutils-2.9.1/gas/config/tc-ppc.h binutils-2.9.1/gas/config/tc-ppc.h +--- binutils-2.9.1/gas/config/tc-ppc.h Fri May 1 08:44:45 1998 ++++ binutils-2.9.1/gas/config/tc-ppc.h Sun Aug 23 00:00:00 1998 +@@ -60,6 +60,11 @@ extern int target_big_endian; + #endif + #endif + ++/* This is used by the Amiga to produce sun3 style a.out objects */ ++#if defined(OBJ_AOUT) && defined(TE_SUN3) && 0 ++#define TARGET_FORMAT "a.out-amiga" ++#endif ++ + /* PowerMac has a BFD slightly different from AIX's. */ + #ifdef TE_POWERMAC + #ifdef TARGET_FORMAT +diff -rup --new-file binutils-2.9.1/gas/config/tc-sh.c binutils-2.9.1/gas/config/tc-sh.c +--- binutils-2.9.1/gas/config/tc-sh.c Fri May 1 08:44:45 1998 ++++ binutils-2.9.1/gas/config/tc-sh.c Sun Aug 23 00:00:00 1998 +@@ -853,7 +853,7 @@ insert (where, how, pcrel) + 2, + &immediate, + pcrel, +- how); ++ how, 0); + } + + static void +@@ -1020,7 +1020,7 @@ md_assemble (str) + /* Output a CODE reloc to tell the linker that the following + bytes are instructions, not data. */ + fix_new (frag_now, frag_now_fix (), 2, &abs_symbol, 0, 0, +- BFD_RELOC_SH_CODE); ++ BFD_RELOC_SH_CODE, 0); + seg_info (now_seg)->tc_segment_info_data.in_code = 1; + } + +@@ -1072,7 +1072,7 @@ sh_frob_label () + if (frag_now != last_label_frag + || offset != last_label_offset) + { +- fix_new (frag_now, offset, 2, &abs_symbol, 0, 0, BFD_RELOC_SH_LABEL); ++ fix_new (frag_now, offset, 2, &abs_symbol, 0, 0, BFD_RELOC_SH_LABEL, 0); + last_label_frag = frag_now; + last_label_offset = offset; + } +@@ -1089,7 +1089,7 @@ sh_flush_pending_output () + && seg_info (now_seg)->tc_segment_info_data.in_code) + { + fix_new (frag_now, frag_now_fix (), 2, &abs_symbol, 0, 0, +- BFD_RELOC_SH_DATA); ++ BFD_RELOC_SH_DATA, 0); + seg_info (now_seg)->tc_segment_info_data.in_code = 0; + } + } +@@ -1202,7 +1202,7 @@ s_uses (ignore) + return; + } + +- fix_new_exp (frag_now, frag_now_fix (), 2, &ex, 1, BFD_RELOC_SH_USES); ++ fix_new_exp (frag_now, frag_now_fix (), 2, &ex, 1, BFD_RELOC_SH_USES, 0); + + demand_empty_rest_of_line (); + } +@@ -1440,7 +1440,7 @@ sh_frob_section (abfd, sec, ignore) + fragment address, so we undo that adjustment here. */ + subseg_change (sec, 0); + fix_new (sym->sy_frag, S_GET_VALUE (sym) - sym->sy_frag->fr_address, +- 4, &abs_symbol, info.count, 0, BFD_RELOC_SH_COUNT); ++ 4, &abs_symbol, info.count, 0, BFD_RELOC_SH_COUNT, 0); + } + } + +@@ -1492,7 +1492,7 @@ md_convert_frag (headers, seg, fragP) + case C (COND_JUMP, COND8): + subseg_change (seg, 0); + fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset, +- 1, BFD_RELOC_SH_PCDISP8BY2); ++ 1, BFD_RELOC_SH_PCDISP8BY2, 0); + fragP->fr_fix += 2; + fragP->fr_var = 0; + break; +@@ -1500,7 +1500,7 @@ md_convert_frag (headers, seg, fragP) + case C (UNCOND_JUMP, UNCOND12): + subseg_change (seg, 0); + fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset, +- 1, BFD_RELOC_SH_PCDISP12BY2); ++ 1, BFD_RELOC_SH_PCDISP12BY2, 0); + fragP->fr_fix += 2; + fragP->fr_var = 0; + break; +@@ -1578,13 +1578,13 @@ md_convert_frag (headers, seg, fragP) + seg_info (seg)->dot, + #endif + fragP->fr_address + fragP->fr_fix + 6, +- 1, BFD_RELOC_SH_PCDISP8BY2); ++ 1, BFD_RELOC_SH_PCDISP8BY2, 0); + + /* Set up a jump instruction. */ + buffer[highbyte + 2] = 0xa0; + buffer[lowbyte + 2] = 0; + fix_new (fragP, fragP->fr_fix + 2, 2, fragP->fr_symbol, +- fragP->fr_offset, 1, BFD_RELOC_SH_PCDISP12BY2); ++ fragP->fr_offset, 1, BFD_RELOC_SH_PCDISP12BY2, 0); + + /* Fill in a NOP instruction. */ + buffer[highbyte + 4] = 0x0; +@@ -1755,7 +1755,7 @@ sh_handle_align (frag) + && frag->fr_offset > 1 + && now_seg != bss_section) + fix_new (frag, frag->fr_fix, 2, &abs_symbol, frag->fr_offset, 0, +- BFD_RELOC_SH_ALIGN); ++ BFD_RELOC_SH_ALIGN, 0); + + if (frag->fr_type == rs_align_code + && frag->fr_next->fr_address - frag->fr_address - frag->fr_fix != 0) +@@ -2115,9 +2115,9 @@ sh_do_align (n, fill, len, max) + .byte. */ + frag_align (1, 0, 0); + if (target_big_endian) +- frag_align_pattern (n, big_nop_pattern, sizeof big_nop_pattern, max); ++ frag_align_pattern (n, (const char *) big_nop_pattern, sizeof big_nop_pattern, max); + else +- frag_align_pattern (n, little_nop_pattern, sizeof little_nop_pattern, ++ frag_align_pattern (n, (const char *) little_nop_pattern, sizeof little_nop_pattern, + max); + return 1; + } +diff -rup --new-file binutils-2.9.1/gas/config/te-amiga.h binutils-2.9.1/gas/config/te-amiga.h +--- binutils-2.9.1/gas/config/te-amiga.h Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/gas/config/te-amiga.h Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,14 @@ ++/* ++ * te-amiga.h -- Amiga target environment declarations. ++ */ ++ ++#define TE_AMIGA 1 ++ ++#define LOCAL_LABELS_DOLLAR 1 ++#define LOCAL_LABELS_FB 1 ++ ++#ifdef OBJ_HEADER ++#include OBJ_HEADER ++#else ++#include "obj-format.h" ++#endif +diff -rup --new-file binutils-2.9.1/gas/configure binutils-2.9.1/gas/configure +--- binutils-2.9.1/gas/configure Fri May 1 08:45:07 1998 ++++ binutils-2.9.1/gas/configure Thu Jan 21 19:39:46 1999 +@@ -1,7 +1,7 @@ + #! /bin/sh + + # Guess values for system-dependent variables and create Makefiles. +-# Generated automatically using autoconf version 2.12.1 ++# Generated automatically using autoconf version 2.13 + # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation +@@ -63,6 +63,10 @@ libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' ++guidedir='${prefix}/guide' ++htmldir='${prefix}/html' ++psdir='${prefix}/ps' ++dvidir='${prefix}/dvi' + mandir='${prefix}/man' + + # Initialize some other variables. +@@ -180,6 +184,10 @@ Directory and file names: + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] ++ --guidedir=DIR Amigaguide documentation in DIR [PREFIX/guide] ++ --htmldir=DIR HTML documentation in DIR [PREFIX/html] ++ --psdir=DIR postscript documentation in DIR [PREFIX/ps] ++ --dvidir=DIR TeX dvi documentation in DIR [PREFIX/dvi] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names +@@ -222,6 +230,22 @@ EOF + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + ++ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui) ++ ac_prev=guidedir ;; ++ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+ guidedir="$ac_optarg" ;; ++ ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+ htmldir="$ac_optarg" ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+ psdir="$ac_optarg" ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+ dvidir="$ac_optarg" ;; ++ + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) +@@ -352,7 +376,7 @@ EOF + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) +- echo "configure generated by autoconf version 2.12.1" ++ echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) +@@ -522,9 +546,11 @@ ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + ++ac_exeext= ++ac_objext=o + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then +@@ -586,7 +612,7 @@ else { echo "configure: error: can not r + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 +-echo "configure:590: checking host system type" >&5 ++echo "configure:616: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in +@@ -607,7 +633,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- + echo "$ac_t""$host" 1>&6 + + echo $ac_n "checking target system type""... $ac_c" 1>&6 +-echo "configure:611: checking target system type" >&5 ++echo "configure:637: checking target system type" >&5 + + target_alias=$target + case "$target_alias" in +@@ -625,7 +651,7 @@ target_os=`echo $target | sed 's/^\([^-] + echo "$ac_t""$target" 1>&6 + + echo $ac_n "checking build system type""... $ac_c" 1>&6 +-echo "configure:629: checking build system type" >&5 ++echo "configure:655: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in +@@ -655,21 +681,22 @@ test "$host_alias" != "$target_alias" && + # SunOS /usr/etc/install + # IRIX /sbin/install + # AIX /bin/install ++# AmigaOS /c/install + # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:664: checking for a BSD compatible install" >&5 ++echo "configure:691: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in +- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root +@@ -708,13 +735,15 @@ echo "$ac_t""$INSTALL" 1>&6 + # It thinks the first close brace ends the variable substitution. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + + echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +-echo "configure:718: checking whether build environment is sane" >&5 ++echo "configure:747: checking whether build environment is sane" >&5 + # Just in case + sleep 1 + echo timestamp > conftestfile +@@ -771,7 +800,7 @@ test "$program_suffix" != NONE && + test "$program_transform_name" = "" && program_transform_name="s,x,x," + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-echo "configure:775: checking whether ${MAKE-make} sets \${MAKE}" >&5 ++echo "configure:804: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -817,7 +846,7 @@ EOF + + missing_dir=`cd $ac_aux_dir && pwd` + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +-echo "configure:821: checking for working aclocal" >&5 ++echo "configure:850: checking for working aclocal" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -830,7 +859,7 @@ else + fi + + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +-echo "configure:834: checking for working autoconf" >&5 ++echo "configure:863: checking for working autoconf" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -843,7 +872,7 @@ else + fi + + echo $ac_n "checking for working automake""... $ac_c" 1>&6 +-echo "configure:847: checking for working automake" >&5 ++echo "configure:876: checking for working automake" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -856,7 +885,7 @@ else + fi + + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +-echo "configure:860: checking for working autoheader" >&5 ++echo "configure:889: checking for working autoheader" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -869,7 +898,7 @@ else + fi + + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +-echo "configure:873: checking for working makeinfo" >&5 ++echo "configure:902: checking for working makeinfo" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -932,15 +961,16 @@ fi + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:936: checking for $ac_word" >&5 ++echo "configure:965: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" +@@ -961,15 +991,16 @@ fi + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:965: checking for $ac_word" >&5 ++echo "configure:995: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -987,19 +1018,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1025: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1058: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1087: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:994: checking for $ac_word" >&5 ++echo "configure:1120: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1034,25 +1161,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:1172: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:1203: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 1214 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:1219: \"$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 +@@ -1066,18 +1229,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1076: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:1245: 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:1081: checking whether we are using GNU C" >&5 ++echo "configure:1250: 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 +@@ -1086,7 +1255,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1090: \"$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:1259: \"$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 +@@ -1097,11 +1266,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1105: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:1278: 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 +@@ -1116,18 +1289,45 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + # Check whether --with-gnu-ld or --without-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" +@@ -1141,7 +1341,7 @@ ac_prog=ld + if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +-echo "configure:1145: checking for ld used by GCC" >&5 ++echo "configure:1345: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. +@@ -1159,10 +1359,10 @@ echo "configure:1145: checking for ld us + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +-echo "configure:1163: checking for GNU ld" >&5 ++echo "configure:1363: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +-echo "configure:1166: checking for non-GNU ld" >&5 ++echo "configure:1366: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1198,7 +1398,7 @@ fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +-echo "configure:1202: checking if the linker ($LD) is GNU ld" >&5 ++echo "configure:1402: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1214,7 +1414,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +-echo "configure:1218: checking for BSD-compatible nm" >&5 ++echo "configure:1418: checking for BSD-compatible nm" >&5 + if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1251,7 +1451,7 @@ echo "$ac_t""$NM" 1>&6 + + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:1255: checking whether ln -s works" >&5 ++echo "configure:1455: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1261,14 +1461,24 @@ then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" + else +- ac_cv_prog_LN_S=ln ++ if ln X conftestdata 2>/dev/null ++ then ++ rm -f conftestdata ++ ac_cv_prog_LN_S=ln ++ else ++ ac_cv_prog_LN_S=cp ++ fi + fi + fi + LN_S="$ac_cv_prog_LN_S" + if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 + else +- echo "$ac_t""no" 1>&6 ++ if test "$ac_cv_prog_LN_S" = "ln"; then ++ echo "$ac_t""no, using ln" 1>&6 ++ else ++ echo "$ac_t""no, and neither does ln, so using cp" 1>&6 ++ fi + fi + + # Always use our own libtool. +@@ -1287,8 +1497,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libto + case "$host" in + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 1291 "configure"' > conftest.$ac_ext +- if { (eval echo configure:1292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ echo '#line 1501 "configure"' > conftest.$ac_ext ++ if { (eval echo configure:1502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" +@@ -1506,6 +1716,7 @@ EOF + fmt=aout em=mach bfd_gas=yes ;; + i386-*-msdos*) fmt=aout ;; + i386-*-moss*) fmt=elf ;; ++ i386-*-beos*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-pe) fmt=coff em=pe ;; + i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; +@@ -1521,6 +1732,8 @@ EOF + + m32r-*-*) fmt=elf bfd_gas=yes ;; + ++ m68*-*-amigaoshunk) fmt=amigahunk em=amiga bfd_gas=yes ;; ++ m68*-*-amigaos*) fmt=aout em=amiga ;; + m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) + fmt=aout em=sun3 ;; + m68k-motorola-sysv*) fmt=coff em=delta ;; +@@ -1567,7 +1780,7 @@ EOF + fmt=coff em=pe ;; + ppc-*-aix*) fmt=coff ;; + ppc-*-beos*) fmt=coff ;; +- ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) ++ ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4* | ppc-*-amigaos*) + fmt=elf ;; + ppc-*-linux-gnu*) fmt=elf + case "$endian" in +@@ -1974,7 +2187,7 @@ EOF + + case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in + yes-*-coff) need_bfd=yes ;; +- no-*-coff) need_bfd=yes ++ no-*-coff | yes-m68k-amigahunk | no-m68k-amigahunk) need_bfd=yes + cat >> confdefs.h <<\EOF + #define MANY_SEGMENTS 1 + EOF +@@ -2045,15 +2258,16 @@ 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:2049: checking for $ac_word" >&5 ++echo "configure:2262: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -2071,19 +2285,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2292: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2325: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2354: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:2078: checking for $ac_word" >&5 ++echo "configure:2387: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -2118,25 +2428,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:2439: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:2126: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:2470: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 2481 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2486: \"$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 +@@ -2150,18 +2496,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:2160: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:2512: 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:2165: checking whether we are using GNU C" >&5 ++echo "configure:2517: 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 +@@ -2170,7 +2522,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2174: \"$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:2526: \"$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 +@@ -2181,11 +2533,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:2189: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:2545: 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 +@@ -2200,33 +2556,73 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ ++ ++### begin-GG-local ++# Check for additional host specific CFLAGS. ++echo $ac_n "checking for host dependent CFLAGS""... $ac_c" 1>&6 ++echo "configure:2603: checking for host dependent CFLAGS" >&5 ++other_host_cflags="" ++case "${host}" in ++ m68*-*-amigaos*) other_host_cflags="-mstackextend" ;; ++esac ++test -n "$other_host_cflags" && CFLAGS="$CFLAGS $other_host_cflags" ++echo "$ac_t""$other_host_cflags" 1>&6 ++### end-GG-local + + for ac_prog in 'bison -y' byacc + 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:2222: checking for $ac_word" >&5 ++echo "configure:2617: 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 + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_YACC="$ac_prog" +@@ -2250,15 +2646,16 @@ test -n "$YACC" || YACC="yacc" + # 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:2254: checking for $ac_word" >&5 ++echo "configure:2650: 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 + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LEX="flex" +@@ -2283,7 +2680,7 @@ then + *) ac_lib=l ;; + esac + echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 +-echo "configure:2287: checking for yywrap in -l$ac_lib" >&5 ++echo "configure:2684: 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 +@@ -2291,7 +2688,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-l$ac_lib $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2703: \"$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 +@@ -2325,7 +2722,7 @@ fi + fi + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:2329: checking how to run the C preprocessor" >&5 ++echo "configure:2726: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -2340,14 +2737,14 @@ 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:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2747: \"$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 + : + else +@@ -2357,14 +2754,31 @@ 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:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2764: \"$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 ++ : ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ 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:2781: \"$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 + : + else +@@ -2377,6 +2791,8 @@ fi + rm -f conftest* + fi + rm -f conftest* ++fi ++rm -f conftest* + ac_cv_prog_CPP="$CPP" + fi + CPP="$ac_cv_prog_CPP" +@@ -2386,7 +2802,7 @@ fi + echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking lex output file root""... $ac_c" 1>&6 +-echo "configure:2390: checking lex output file root" >&5 ++echo "configure:2806: 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 +@@ -2407,7 +2823,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:2411: checking whether yytext is a pointer" >&5 ++echo "configure:2827: 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 +@@ -2419,14 +2835,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; then ++if { (eval echo configure:2846: \"$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 +@@ -2449,7 +2865,7 @@ fi + + + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +-echo "configure:2453: checking whether to enable maintainer-specific portions of Makefiles" >&5 ++echo "configure:2869: 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" +@@ -2467,19 +2883,19 @@ fi + + + echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 +-echo "configure:2471: checking for Cygwin32 environment" >&5 ++echo "configure:2887: checking for Cygwin32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_cygwin32'+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:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_cygwin32=yes + else +@@ -2496,19 +2912,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 + CYGWIN32= + test "$am_cv_cygwin32" = yes && CYGWIN32=yes + echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 +-echo "configure:2500: checking for Mingw32 environment" >&5 ++echo "configure:2916: checking for Mingw32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_mingw32=yes + else +@@ -2527,7 +2943,7 @@ test "$am_cv_mingw32" = yes && MINGW32=y + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +-echo "configure:2531: checking for executable suffix" >&5 ++echo "configure:2947: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2555,18 +2971,18 @@ 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:2559: checking for $ac_hdr" >&5 ++echo "configure:2975: 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:2569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +@@ -2595,7 +3011,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:2599: checking whether compiling a cross-assembler" >&5 ++echo "configure:3015: checking whether compiling a cross-assembler" >&5 + if test "${host}" = "${target}"; then + cross_gas=no + else +@@ -2610,19 +3026,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:2614: checking for working alloca.h" >&5 ++echo "configure:3030: 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:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:3042: \"$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 +@@ -2642,26 +3058,44 @@ EOF + + fi + ++# Temporary ugly hack for BeOS. Don't try to run the test for alloca ++# since it will succeed due to finding the version of alloca in the ++# runtime library. We don't want to use that version, so let's pretend ++# we loaded it from the cache (default to 'no') and thus the package will configure ++# itself to use it's private copy of the C alloca replacement. When the ++# horribly small default stack size problem is fixed (exists up through ++# at least DR8.2) then we can build gcc to start using it's builtin ++# alloca, we can allow mwcc to use it's builtin alloca, and this hack ++# can go away. ++if test "`uname`" = "BeOS"; then ++ test -z "$ac_cv_func_alloca_works" && ac_cv_func_alloca_works=no ++fi ++ + echo $ac_n "checking for alloca""... $ac_c" 1>&6 +-echo "configure:2647: checking for alloca" >&5 ++echo "configure:3076: 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 < ++# ifdef _MSC_VER ++# include ++# define alloca _alloca + # else +-# ifdef _AIX +- #pragma alloca ++# if HAVE_ALLOCA_H ++# include + # else +-# ifndef alloca /* predefined by HP cc +Olibcalls */ ++# ifdef _AIX ++ #pragma alloca ++# else ++# ifndef alloca /* predefined by HP cc +Olibcalls */ + char *alloca (); ++# endif + # endif + # endif + # endif +@@ -2671,7 +3105,7 @@ int main() { + char *p = (char *) alloca(1); + ; return 0; } + EOF +-if { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:3109: \"$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 +@@ -2696,19 +3130,19 @@ if test $ac_cv_func_alloca_works = no; t + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. +- ALLOCA=alloca.o ++ ALLOCA=alloca.${ac_objext} + cat >> confdefs.h <<\EOF + #define C_ALLOCA 1 + EOF + + + echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +-echo "configure:2707: checking whether alloca needs Cray hooks" >&5 ++echo "configure:3141: 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:2737: checking for $ac_func" >&5 ++echo "configure:3171: 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; then ++if { (eval echo configure:3199: \"$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 +@@ -2788,7 +3222,7 @@ done + fi + + echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +-echo "configure:2792: checking stack direction for C alloca" >&5 ++echo "configure:3226: 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 +@@ -2796,7 +3230,7 @@ else + ac_cv_c_stack_direction=0 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:3253: \"$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 +@@ -2837,21 +3271,21 @@ EOF + fi + + echo $ac_n "checking for inline""... $ac_c" 1>&6 +-echo "configure:2841: checking for inline" >&5 ++echo "configure:3275: 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:3289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break + else +@@ -2881,12 +3315,12 @@ esac + for ac_func in unlink remove + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2885: checking for $ac_func" >&5 ++echo "configure:3319: 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; then ++if { (eval echo configure:3347: \"$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 +@@ -2938,12 +3372,12 @@ done + for ac_func in sbrk + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2942: checking for $ac_func" >&5 ++echo "configure:3376: 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; then ++if { (eval echo configure:3404: \"$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 +@@ -2995,12 +3429,12 @@ done + # enough, but on some of those systems, the assert macro relies on requoting + # working properly! + echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 +-echo "configure:2999: checking for working assert macro" >&5 ++echo "configure:3433: 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 +@@ -3016,7 +3450,7 @@ assert (a == b + + ; return 0; } + EOF +-if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + gas_cv_assert_ok=yes + else +@@ -3057,12 +3491,12 @@ gas_test_headers=" + " + + echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 +-echo "configure:3061: checking whether declaration is required for strstr" >&5 ++echo "configure:3495: 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; then ++if { (eval echo configure:3511: \"$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 +@@ -3094,12 +3528,12 @@ EOF + + + echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 +-echo "configure:3098: checking whether declaration is required for malloc" >&5 ++echo "configure:3532: 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; then ++if { (eval echo configure:3548: \"$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 +@@ -3131,12 +3565,12 @@ EOF + + + echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 +-echo "configure:3135: checking whether declaration is required for free" >&5 ++echo "configure:3569: 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; then ++if { (eval echo configure:3585: \"$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 +@@ -3168,12 +3602,12 @@ EOF + + + echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 +-echo "configure:3172: checking whether declaration is required for sbrk" >&5 ++echo "configure:3606: 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; then ++if { (eval echo configure:3622: \"$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 +@@ -3208,12 +3642,12 @@ EOF + # for it? + + echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 +-echo "configure:3212: checking whether declaration is required for errno" >&5 ++echo "configure:3646: 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; then ++if { (eval echo configure:3666: \"$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 +@@ -3273,7 +3707,7 @@ EOF + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. + (set) 2>&1 | +- case `(ac_space=' '; set) 2>&1 | grep ac_space` in ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). +@@ -3319,7 +3753,9 @@ DEFS=-DHAVE_CONFIG_H + : ${CONFIG_STATUS=./config.status} + + echo creating $CONFIG_STATUS +-rm -f $CONFIG_STATUS ++# Some systems, like AmigaOS, won't allow you to remove a script that is ++# being executed, so just move it out of the way instead. ++if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi + cat > $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h +@@ -3657,6 +4101,7 @@ rm -f targ-cpu.c targ-cpu.h obj-format.h + exit 0 + EOF + chmod +x $CONFIG_STATUS ++rm -f CONFIG.STATUS.old + rm -fr confdefs* $ac_clean_files + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +diff -rup --new-file binutils-2.9.1/gas/configure.in binutils-2.9.1/gas/configure.in +--- binutils-2.9.1/gas/configure.in Fri May 1 08:45:07 1998 ++++ binutils-2.9.1/gas/configure.in Sun Aug 23 00:00:00 1998 +@@ -177,6 +177,7 @@ changequote([,])dnl + fmt=aout em=mach bfd_gas=yes ;; + i386-*-msdos*) fmt=aout ;; + i386-*-moss*) fmt=elf ;; ++ i386-*-beos*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-pe) fmt=coff em=pe ;; + i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; +@@ -192,6 +193,8 @@ changequote([,])dnl + + m32r-*-*) fmt=elf bfd_gas=yes ;; + ++ m68*-*-amigaoshunk) fmt=amigahunk em=amiga bfd_gas=yes ;; ++ m68*-*-amigaos*) fmt=aout em=amiga ;; + m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) + fmt=aout em=sun3 ;; + m68k-motorola-sysv*) fmt=coff em=delta ;; +@@ -238,7 +241,7 @@ changequote([,])dnl + fmt=coff em=pe ;; + ppc-*-aix*) fmt=coff ;; + ppc-*-beos*) fmt=coff ;; +- ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) ++ ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4* | ppc-*-amigaos*) + fmt=elf ;; + ppc-*-linux-gnu*) fmt=elf + case "$endian" in +@@ -555,7 +558,7 @@ AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$ + + case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in + yes-*-coff) need_bfd=yes ;; +- no-*-coff) need_bfd=yes ++ no-*-coff | yes-m68k-amigahunk | no-m68k-amigahunk) need_bfd=yes + AC_DEFINE(MANY_SEGMENTS) ;; + esac + +@@ -604,6 +607,17 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${tar + AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}") + + AC_PROG_CC ++ ++### begin-GG-local ++# Check for additional host specific CFLAGS. ++AC_MSG_CHECKING(for host dependent CFLAGS) ++other_host_cflags="" ++case "${host}" in ++ m68*-*-amigaos*) other_host_cflags="-mstackextend" ;; ++esac ++test -n "$other_host_cflags" && CFLAGS="$CFLAGS $other_host_cflags" ++AC_MSG_RESULT($other_host_cflags) ++### end-GG-local + + AC_PROG_YACC + AC_PROG_LEX +diff -rup --new-file binutils-2.9.1/gas/doc/Makefile.in binutils-2.9.1/gas/doc/Makefile.in +--- binutils-2.9.1/gas/doc/Makefile.in Fri May 1 08:44:56 1998 ++++ binutils-2.9.1/gas/doc/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -1,4 +1,4 @@ +-# Makefile.in generated automatically by automake 1.2e from Makefile.am ++# Makefile.in generated automatically by automake 1.3 from Makefile.am + + # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation +@@ -11,7 +11,7 @@ + # PARTICULAR PURPOSE. + + +-SHELL = @SHELL@ ++SHELL = /bin/sh + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -28,10 +28,16 @@ sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ ++guidedir = @guidedir@ ++htmldir = @htmldir@ ++dvidir = @dvidir@ ++psdir = @psdir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + ++DISTDIR = ++ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +@@ -123,33 +129,46 @@ TEXINFO_TEX = $(top_srcdir)/../texinfo/t + INFO_DEPS = as.info gasp.info + DVIS = as.dvi gasp.dvi + TEXINFOS = as.texinfo gasp.texi +-MANS = as.1 ++GUIDES = as.guide gasp.guide ++GUIDE_DEPS = as.guide gasp.guide ++HTMLS = as.html gasp.html ++HTML_DEPS = as.html gasp.html ++PS_S = as.ps gasp.ps ++PS_DEPS = as.ps gasp.ps ++man1dir = $(mandir)/man1 ++MANS = $(man_MANS) + + NROFF = nroff + DIST_COMMON = Makefile.am Makefile.in + + +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +- ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) \ ++ $(INFOS) $(GUIDES) $(HTMLS) $(MANS) + TAR = tar + GZIP = --best +-default: all ++all: Makefile $(MANS) + + .SUFFIXES: +-.SUFFIXES: .dvi .info .ps .texi .texinfo +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile ++.SUFFIXES: .dvi .guide .html .info .ps .texi .texinfo .txi ++$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus --include-deps doc/Makefile + +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + + as.info: as.texinfo ++as.guide: as.texinfo ++as.html: as.texinfo ++as.ps: as.dvi + as.dvi: as.texinfo + + + gasp.info: gasp.texi ++gasp.guide: gasp.texi ++gasp.html: gasp.texi ++gasp.ps: gasp.dvi + gasp.dvi: gasp.texi + + +@@ -157,7 +176,7 @@ DVIPS = dvips + + .texi.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I$(srcdir) $< --output=$@ + + .texi.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ +@@ -165,39 +184,51 @@ DVIPS = dvips + + .texi: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi.info: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< ++ ++.txi.dvi: ++ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ ++ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< + .dvi.ps: + $(DVIPS) $< -o $@ + + install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(infodir) ++ $(mkinstalldirs) $(DESTDIR)$(infodir) + @for file in $(INFO_DEPS); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + if test -f $$d/$$ifile; then \ +- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \ +- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ + else : ; fi; \ + done; \ + done + @$(POST_INSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + for file in $(INFO_DEPS); do \ +- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\ +- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\ ++ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ ++ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ + done; \ + else : ; fi + +@@ -208,11 +239,11 @@ uninstall-info: + else ii=; fi; \ + for file in $(INFO_DEPS); do \ + test -z "$ii" \ +- || install-info --info-dir=$(infodir) --remove $$file; \ ++ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ + done +- $(NORMAL_UNINSTALL) ++ @$(NORMAL_UNINSTALL) + for file in $(INFO_DEPS); do \ +- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ ++ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + done + + dist-info: $(INFO_DEPS) +@@ -225,13 +256,155 @@ dist-info: $(INFO_DEPS) + done; \ + done + ++MAKEGUIDE= $(MAKEINFO) --amiga ++ ++MAKEHTML = texi2html -number -split_chapter ++ ++.texi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texinfo.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.txi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texi.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++.texinfo.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++install-guide: $(GUIDE_DEPS) ++ $(mkinstalldirs) $(guidedir) ++ for file in $(GUIDE_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(guidedir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-guide: ++ for file in *.guide*; do \ ++ rm -f $(guidedir)/$$file; \ ++ done ++ ++install-ps: $(PS_S) ++ $(mkinstalldirs) $(psdir) ++ for file in $(PS_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(psdir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-ps: ++ for file in *.ps*; do \ ++ rm -f $(psdir)/$$file; \ ++ done ++ ++install-dvi: $(DVIS) ++ $(mkinstalldirs) $(dvidir) ++ for file in $(DVIS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(dvidir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-dvi: ++ for file in *.dvi*; do \ ++ rm -f $(dvidir)/$$file; \ ++ done ++ ++install-html: $(HTML_DEPS) ++ $(mkinstalldirs) $(htmldir) ++ @touch $(HTML_DEPS) ++ @for file in $(HTML_DEPS); do \ ++ if test -f $$file; then d=.; else d=$(srcdir); fi; \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $$d && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ if test -f $$d/$$ifile; then \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile; \ ++ else : ; fi; \ ++ done; \ ++ done ++ @rm -f $(htmldir)/$(HTML_DEPS) ++ ++uninstall-html: ++ @for file in $(HTML_DEPS); do \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $(htmldir) && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ echo "removing: $(htmldir)/$$ifile"; \ ++ rm -f $(htmldir)/$$ifile; \ ++ done; \ ++ done ++ ++mostlyclean-guide: ++ rm -f as.aux as.cp as.cps as.dvi as.fn as.fns as.ky as.kys as.ps as.log \ ++ as.pg as.toc as.tp as.tps as.vr as.vrs as.op as.tr as.cv \ ++ as.cn as.guide as.html as.ps gasp.aux gasp.cp gasp.cps \ ++ gasp.dvi gasp.fn gasp.fns gasp.ky gasp.kys gasp.ps gasp.log \ ++ gasp.pg gasp.toc gasp.tp gasp.tps gasp.vr gasp.vrs gasp.op \ ++ gasp.tr gasp.cv gasp.cn gasp.guide gasp.html gasp.ps ++ ++clean-guide: ++ ++distclean-guide: ++ ++maintainer-clean-guide: ++ rm -f $(GUIDES) ++ ++mostlyclean-html: ++ rm -f as.aux as.cp as.cps as.dvi as.fn as.fns as.ky as.kys as.ps as.log \ ++ as.pg as.toc as.tp as.tps as.vr as.vrs as.op as.tr as.cv \ ++ as.cn as.guide as.html as.ps gasp.aux gasp.cp gasp.cps \ ++ gasp.dvi gasp.fn gasp.fns gasp.ky gasp.kys gasp.ps gasp.log \ ++ gasp.pg gasp.toc gasp.tp gasp.tps gasp.vr gasp.vrs gasp.op \ ++ gasp.tr gasp.cv gasp.cn gasp.guide gasp.html gasp.ps ++ ++clean-html: ++ ++distclean-html: ++ ++maintainer-clean-html: ++ rm -f $(HTMLS) ++ ++mostlyclean-ps: ++ rm -f as.aux as.cp as.cps as.dvi as.fn as.fns as.ky as.kys as.ps as.log \ ++ as.pg as.toc as.tp as.tps as.vr as.vrs as.op as.tr as.cv \ ++ as.cn as.guide as.html as.ps gasp.aux gasp.cp gasp.cps \ ++ gasp.dvi gasp.fn gasp.fns gasp.ky gasp.kys gasp.ps gasp.log \ ++ gasp.pg gasp.toc gasp.tp gasp.tps gasp.vr gasp.vrs gasp.op \ ++ gasp.tr gasp.cv gasp.cn gasp.guide gasp.html gasp.ps ++ ++clean-ps: ++ ++distclean-ps: ++ ++maintainer-clean-ps: ++ rm -f $(PS_S) ++ ++mostlyclean-dvi: ++ rm -f as.aux as.cp as.cps as.dvi as.fn as.fns as.ky as.kys as.ps as.log \ ++ as.pg as.toc as.tp as.tps as.vr as.vrs as.op as.tr as.cv \ ++ as.cn as.guide as.html as.ps gasp.aux gasp.cp gasp.cps \ ++ gasp.dvi gasp.fn gasp.fns gasp.ky gasp.kys gasp.ps gasp.log \ ++ gasp.pg gasp.toc gasp.tp gasp.tps gasp.vr gasp.vrs gasp.op \ ++ gasp.tr gasp.cv gasp.cn gasp.guide gasp.html gasp.ps ++ ++clean-dvi: ++ ++distclean-dvi: ++ ++maintainer-clean-dvi: ++ rm -f $(DVIS) ++ + mostlyclean-aminfo: + -rm -f as.aux as.cp as.cps as.dvi as.fn as.fns as.ky as.kys as.ps \ + as.log as.pg as.toc as.tp as.tps as.vr as.vrs as.op as.tr \ +- as.cv as.cn gasp.aux gasp.cp gasp.cps gasp.dvi gasp.fn \ +- gasp.fns gasp.ky gasp.kys gasp.ps gasp.log gasp.pg gasp.toc \ +- gasp.tp gasp.tps gasp.vr gasp.vrs gasp.op gasp.tr gasp.cv \ +- gasp.cn ++ as.cv as.cn as.guide as.html as.ps gasp.aux gasp.cp gasp.cps \ ++ gasp.dvi gasp.fn gasp.fns gasp.ky gasp.kys gasp.ps gasp.log \ ++ gasp.pg gasp.toc gasp.tp gasp.tps gasp.vr gasp.vrs gasp.op \ ++ gasp.tr gasp.cv gasp.cn gasp.guide gasp.html gasp.ps + + clean-aminfo: + +@@ -245,21 +418,45 @@ maintainer-clean-aminfo: + fi; \ + done + clean-info: mostlyclean-aminfo +-install-man: $(MANS) +- $(NORMAL_INSTALL) +- $(mkinstalldirs) $(mandir)/man1 +- @sect=1; \ +- inst=`echo "as" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/as.1; then file=$(srcdir)/as.1; \ +- else file=as.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst + +-uninstall-man: +- $(NORMAL_UNINSTALL) +- -inst=`echo "as" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst ++install-man1: ++ $(mkinstalldirs) $(DESTDIR)$(man1dir) ++ @list='$(man1_MANS)'; \ ++ l2='$(man_MANS)'; for i in $$l2; do \ ++ case "$$i" in \ ++ *.1*) list="$$list $$i" ;; \ ++ esac; \ ++ done; \ ++ for i in $$list; do \ ++ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ ++ else file=$$i; fi; \ ++ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ ++ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ ++ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ ++ done + ++uninstall-man1: ++ @list='$(man1_MANS)'; \ ++ l2='$(man_MANS)'; for i in $$l2; do \ ++ case "$$i" in \ ++ *.1*) list="$$list $$i" ;; \ ++ esac; \ ++ done; \ ++ for i in $$list; do \ ++ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ ++ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ ++ rm -f $(DESTDIR)$(man1dir)/$$inst; \ ++ done ++install-man: $(MANS) ++ @$(NORMAL_INSTALL) ++ $(MAKE) install-man1 ++uninstall-man: ++ @$(NORMAL_UNINSTALL) ++ $(MAKE) uninstall-man1 + tags: TAGS + TAGS: + +@@ -277,6 +474,9 @@ distdir: $(DISTFILES) + done + $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info + info: $(INFO_DEPS) ++guide: $(GUIDE_DEPS) ++html: $(HTML_DEPS) ++ps: $(PS_DEPS) + dvi: $(DVIS) + check: + $(MAKE) +@@ -293,12 +493,10 @@ install: install-exec install-data all + + uninstall: uninstall-man + +-all: Makefile $(MANS) +- + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: +- $(mkinstalldirs) $(mandir)/man1 ++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 + + + mostlyclean-generic: +@@ -315,24 +513,34 @@ distclean-generic: + maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +-mostlyclean: mostlyclean-aminfo mostlyclean-generic ++mostlyclean: mostlyclean-aminfo mostlyclean-guide mostlyclean-html \ ++ mostlyclean-dvi mostlyclean-ps mostlyclean-generic + +-clean: clean-aminfo clean-generic mostlyclean ++clean: clean-aminfo clean-guide clean-html clean-dvi clean-ps \ ++ clean-generic mostlyclean + +-distclean: distclean-aminfo distclean-generic clean ++distclean: distclean-aminfo distclean-guide distclean-html \ ++ distclean-dvi distclean-ps distclean-generic clean + -rm -f config.status + -rm -f libtool + +-maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \ +- distclean ++maintainer-clean: maintainer-clean-aminfo maintainer-clean-guide \ ++ maintainer-clean-html maintainer-clean-dvi \ ++ maintainer-clean-ps maintainer-clean-generic distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +-.PHONY: default install-info-am uninstall-info mostlyclean-aminfo \ +-distclean-aminfo clean-aminfo maintainer-clean-aminfo install-man \ +-uninstall-man tags distdir info dvi installcheck install-info \ +-install-exec install-data install uninstall all installdirs \ +-mostlyclean-generic distclean-generic clean-generic \ ++.PHONY: install-info-am uninstall-info install-guide uninstall-guide \ ++install-ps uninstall-ps install-html uninstall-html install-dvi \ ++uninstall-dvi mostlyclean-guide distclean-guide clean-guide \ ++maintainer-clean-guide mostlyclean-html distclean-html clean-html \ ++maintainer-clean-html mostlyclean-ps distclean-ps clean-ps \ ++maintainer-clean-ps mostlyclean-dvi distclean-dvi clean-dvi \ ++maintainer-clean-dvi mostlyclean-aminfo distclean-aminfo clean-aminfo \ ++maintainer-clean-aminfo install-man1 uninstall-man1 install-man \ ++uninstall-man tags distdir info guide html ps dvi installcheck \ ++install-info install-exec install-data install uninstall all \ ++installdirs mostlyclean-generic distclean-generic clean-generic \ + maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +diff -rup --new-file binutils-2.9.1/gas/doc/as.info binutils-2.9.1/gas/doc/as.info +--- binutils-2.9.1/gas/doc/as.info Fri May 1 08:45:00 1998 ++++ binutils-2.9.1/gas/doc/as.info Wed Dec 31 17:00:00 1969 +@@ -1,311 +0,0 @@ +-This is Info file as.info, produced by Makeinfo version 1.68 from the +-input file as.texinfo. +- +-START-INFO-DIR-ENTRY +-* As: (as). The GNU assembler. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU Assembler "as". +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-Indirect: +-as.info-1: 884 +-as.info-2: 48330 +-as.info-3: 97421 +-as.info-4: 147389 +-as.info-5: 197063 +-as.info-6: 239578 +-as.info-7: 278841 +- +-Tag Table: +-(Indirect) +-Node: Top884 +-Node: Overview1543 +-Node: Manual11603 +-Node: GNU Assembler12542 +-Node: Object Formats13709 +-Node: Command Line14156 +-Node: Input Files15238 +-Node: Object17144 +-Node: Errors18091 +-Node: Invoking19289 +-Node: a20989 +-Node: D22323 +-Node: f22543 +-Node: I23046 +-Node: K23585 +-Node: L23884 +-Node: M24735 +-Node: MD29124 +-Node: o29543 +-Node: R29991 +-Node: statistics31007 +-Node: traditional-format31407 +-Node: v31873 +-Node: W32141 +-Node: Z32723 +-Node: Syntax33238 +-Node: Preprocessing33828 +-Node: Whitespace35388 +-Node: Comments35778 +-Node: Symbol Intro37765 +-Node: Statements38448 +-Node: Constants40694 +-Node: Characters41320 +-Node: Strings41813 +-Node: Chars43966 +-Node: Numbers44707 +-Node: Integers45238 +-Node: Bignums45881 +-Node: Flonums46224 +-Node: Sections47956 +-Node: Secs Background48330 +-Node: Ld Sections53356 +-Node: As Sections55750 +-Node: Sub-Sections56655 +-Node: bss59654 +-Node: Symbols60599 +-Node: Labels61246 +-Node: Setting Symbols61972 +-Node: Symbol Names62338 +-Node: Dot65300 +-Node: Symbol Attributes65742 +-Node: Symbol Value66474 +-Node: Symbol Type67510 +-Node: a.out Symbols67889 +-Node: Symbol Desc68139 +-Node: Symbol Other68421 +-Node: COFF Symbols68577 +-Node: SOM Symbols69206 +-Node: Expressions69639 +-Node: Empty Exprs70387 +-Node: Integer Exprs70729 +-Node: Arguments71119 +-Node: Operators72216 +-Node: Prefix Ops72542 +-Node: Infix Ops72861 +-Node: Pseudo Ops74353 +-Node: Abort78267 +-Node: ABORT78668 +-Node: Align78930 +-Node: App-File81095 +-Node: Ascii81632 +-Node: Asciz81937 +-Node: Balign82177 +-Node: Byte84035 +-Node: Comm84268 +-Node: Data85627 +-Node: Def85937 +-Node: Desc86305 +-Node: Dim86800 +-Node: Double87191 +-Node: Eject87522 +-Node: Else87690 +-Node: Endef87979 +-Node: Endif88301 +-Node: Equ88552 +-Node: Equiv88855 +-Node: Err89251 +-Node: Extern89555 +-Node: File89807 +-Node: Fill90458 +-Node: Float91415 +-Node: Global91751 +-Node: hword92494 +-Node: Ident92815 +-Node: If93115 +-Node: Include93971 +-Node: Int94511 +-Node: Irp94880 +-Node: Irpc95674 +-Node: Lcomm96493 +-Node: Lflags97234 +-Node: Line97421 +-Node: Linkonce98444 +-Node: Ln99664 +-Node: MRI99812 +-Node: List100139 +-Node: Long100742 +-Node: Macro100912 +-Node: Nolist103296 +-Node: Octa103712 +-Node: Org104038 +-Node: P2align105313 +-Node: Psize107229 +-Node: Quad107902 +-Node: Rept108342 +-Node: Sbttl108748 +-Node: Scl109106 +-Node: Section109602 +-Node: Set111951 +-Node: Short112504 +-Node: Single112818 +-Node: Size113155 +-Node: Sleb128113550 +-Node: Skip113865 +-Node: Space114180 +-Node: Stab115065 +-Node: String117061 +-Node: Symver117480 +-Node: Tag119065 +-Node: Text119573 +-Node: Title119885 +-Node: Type120257 +-Node: Val120633 +-Node: Uleb128120991 +-Node: Word121306 +-Node: Deprecated123143 +-Node: Machine Dependencies123379 +-Node: ARC-Dependent125075 +-Node: ARC-Opts125389 +-Node: ARC-Float126123 +-Node: ARC-Directives126421 +-Node: AMD29K-Dependent126814 +-Node: AMD29K Options127195 +-Node: AMD29K Syntax127369 +-Node: AMD29K-Macros127633 +-Node: AMD29K-Chars127884 +-Node: AMD29K-Regs128147 +-Node: AMD29K Floating Point129411 +-Node: AMD29K Directives129617 +-Node: AMD29K Opcodes131025 +-Node: ARM-Dependent131361 +-Node: ARM Options131735 +-Node: ARM Syntax133475 +-Node: ARM-Chars133695 +-Node: ARM-Regs133894 +-Node: ARM Floating Point134066 +-Node: ARM Directives134256 +-Node: ARM Opcodes135175 +-Node: D10V-Dependent135511 +-Node: D10V-Opts135855 +-Node: D10V-Syntax136488 +-Node: D10V-Size137008 +-Node: D10V-Subs137968 +-Node: D10V-Chars138990 +-Node: D10V-Regs140576 +-Node: D10V-Addressing141607 +-Node: D10V-Word142280 +-Node: D10V-Float142781 +-Node: D10V-Opcodes143083 +-Node: H8/300-Dependent143467 +-Node: H8/300 Options143871 +-Node: H8/300 Syntax144052 +-Node: H8/300-Chars144339 +-Node: H8/300-Regs144623 +-Node: H8/300-Addressing145527 +-Node: H8/300 Floating Point146553 +-Node: H8/300 Directives146869 +-Node: H8/300 Opcodes147389 +-Node: H8/500-Dependent155742 +-Node: H8/500 Options156146 +-Node: H8/500 Syntax156327 +-Node: H8/500-Chars156614 +-Node: H8/500-Regs156905 +-Node: H8/500-Addressing157661 +-Node: H8/500 Floating Point158278 +-Node: H8/500 Directives158594 +-Node: H8/500 Opcodes158913 +-Node: HPPA-Dependent164026 +-Node: HPPA Notes164448 +-Node: HPPA Options165195 +-Node: HPPA Syntax165379 +-Node: HPPA Floating Point166638 +-Node: HPPA Directives166833 +-Node: HPPA Opcodes173424 +-Node: i386-Dependent173672 +-Node: i386-Options174341 +-Node: i386-Syntax174485 +-Node: i386-Opcodes176435 +-Node: i386-Regs178554 +-Node: i386-prefixes179695 +-Node: i386-Memory181364 +-Node: i386-jumps183638 +-Node: i386-Float184708 +-Node: i386-16bit186199 +-Node: i386-Notes188591 +-Node: i960-Dependent189432 +-Node: Options-i960189824 +-Node: Floating Point-i960193705 +-Node: Directives-i960193962 +-Node: Opcodes for i960195982 +-Node: callj-i960196588 +-Node: Compare-and-branch-i960197063 +-Node: M68K-Dependent198952 +-Node: M68K-Opts199406 +-Node: M68K-Syntax204354 +-Node: M68K-Moto-Syntax206182 +-Node: M68K-Float208760 +-Node: M68K-Directives209269 +-Node: M68K-opcodes209864 +-Node: M68K-Branch210076 +-Node: M68K-Chars212891 +-Node: MIPS-Dependent213289 +-Node: MIPS Opts214169 +-Node: MIPS Object217005 +-Node: MIPS Stabs218560 +-Node: MIPS ISA219271 +-Node: MIPS autoextend220379 +-Node: MIPS insn221090 +-Node: MIPS option stack221576 +-Node: SH-Dependent222289 +-Node: SH Options222672 +-Node: SH Syntax222837 +-Node: SH-Chars223096 +-Node: SH-Regs223375 +-Node: SH-Addressing223974 +-Node: SH Floating Point224868 +-Node: SH Directives225164 +-Node: SH Opcodes225520 +-Node: Sparc-Dependent229767 +-Node: Sparc-Opts230139 +-Node: Sparc-Aligned-Data232385 +-Node: Sparc-Float233229 +-Node: Sparc-Directives233419 +-Node: Z8000-Dependent234637 +-Node: Z8000 Options235596 +-Node: Z8000 Syntax235771 +-Node: Z8000-Chars236047 +-Node: Z8000-Regs236265 +-Node: Z8000-Addressing237037 +-Node: Z8000 Directives237980 +-Node: Z8000 Opcodes239578 +-Node: Vax-Dependent249514 +-Node: VAX-Opts250021 +-Node: VAX-float252311 +-Node: VAX-directives252932 +-Node: VAX-opcodes253781 +-Node: VAX-branch254159 +-Node: VAX-operands256655 +-Node: VAX-no257407 +-Node: V850-Dependent257633 +-Node: V850 Options258019 +-Node: V850 Syntax259049 +-Node: V850-Chars259275 +-Node: V850-Regs259425 +-Node: V850 Floating Point260800 +-Node: V850 Directives260995 +-Node: V850 Opcodes261669 +-Node: Reporting Bugs266162 +-Node: Bug Criteria266885 +-Node: Bug Reporting267645 +-Node: Acknowledgements274214 +-Node: Index278841 +- +-End Tag Table +diff -rup --new-file binutils-2.9.1/gas/doc/as.info-1 binutils-2.9.1/gas/doc/as.info-1 +--- binutils-2.9.1/gas/doc/as.info-1 Fri May 1 08:45:00 1998 ++++ binutils-2.9.1/gas/doc/as.info-1 Wed Dec 31 17:00:00 1969 +@@ -1,1345 +0,0 @@ +-This is Info file as.info, produced by Makeinfo version 1.68 from the +-input file as.texinfo. +- +-START-INFO-DIR-ENTRY +-* As: (as). The GNU assembler. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU Assembler "as". +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: as.info, Node: Top, Next: Overview, Up: (dir) +- +-Using as +-******** +- +- This file is a user guide to the GNU assembler `as'. +- +-* Menu: +- +-* Overview:: Overview +-* Invoking:: Command-Line Options +-* Syntax:: Syntax +-* Sections:: Sections and Relocation +-* Symbols:: Symbols +-* Expressions:: Expressions +-* Pseudo Ops:: Assembler Directives +-* Machine Dependencies:: Machine Dependent Features +-* Reporting Bugs:: Reporting Bugs +-* Acknowledgements:: Who Did What +-* Index:: Index +- +- +-File: as.info, Node: Overview, Next: Invoking, Prev: Top, Up: Top +- +-Overview +-******** +- +- Here is a brief summary of how to invoke `as'. For details, *note +-Comand-Line Options: Invoking.. +- +- as [ -a[cdhlns][=file] ] [ -D ] [ --defsym SYM=VAL ] +- [ -f ] [ --gstabs ] [ --help ] [ -I DIR ] [ -J ] [ -K ] [ -L ] +- [ --keep-locals ] [ -o OBJFILE ] [ -R ] [ --statistics ] [ -v ] +- [ -version ] [ --version ] [ -W ] [ -w ] [ -x ] [ -Z ] +- [ -mbig-endian | -mlittle-endian ] +- [ -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]7[t][[d]m[i]] ] +- [ -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t ] +- [ -mthumb | -mall ] +- [ -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu ] +- [ -EB | -EL ] +- [ -mapcs-32 | -mapcs-26 ] +- [ -O ] +- [ -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite +- -Av8plus | -Av8plusa | -Av9 | -Av9a ] +- [ -xarch=v8plus | -xarch=v8plusa ] [ -bump ] [ -32 | -64 ] +- [ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC ] +- [ -b ] [ -no-relax ] +- [ -l ] [ -m68000 | -m68010 | -m68020 | ... ] +- [ -nocpp ] [ -EL ] [ -EB ] [ -G NUM ] [ -mcpu=CPU ] +- [ -mips1 ] [ -mips2 ] [ -mips3 ] [ -m4650 ] [ -no-m4650 ] +- [ --trap ] [ --break ] +- [ --emulation=NAME ] +- [ -- | FILES ... ] +- +-`-a[cdhlmns]' +- Turn on listings, in any of a variety of ways: +- +- `-ac' +- omit false conditionals +- +- `-ad' +- omit debugging directives +- +- `-ah' +- include high-level source +- +- `-al' +- include assembly +- +- `-am' +- include macro expansions +- +- `-an' +- omit forms processing +- +- `-as' +- include symbols +- +- `=file' +- set the name of the listing file +- +- You may combine these options; for example, use `-aln' for assembly +- listing without forms processing. The `=file' option, if used, +- must be the last one. By itself, `-a' defaults to `-ahls'. +- +-`-D' +- Ignored. This option is accepted for script compatibility with +- calls to other assemblers. +- +-`--defsym SYM=VALUE' +- Define the symbol SYM to be VALUE before assembling the input file. +- VALUE must be an integer constant. As in C, a leading `0x' +- indicates a hexadecimal value, and a leading `0' indicates an +- octal value. +- +-`-f' +- "fast"--skip whitespace and comment preprocessing (assume source is +- compiler output). +- +-`--gstabs' +- Generate stabs debugging information for each assembler line. This +- may help debugging assembler code, if the debugger can handle it. +- +-`--help' +- Print a summary of the command line options and exit. +- +-`-I DIR' +- Add directory DIR to the search list for `.include' directives. +- +-`-J' +- Don't warn about signed overflow. +- +-`-K' +- Issue warnings when difference tables altered for long +- displacements. +- +-`-L' +-`--keep-locals' +- Keep (in the symbol table) local symbols. On traditional a.out +- systems these start with `L', but different systems have different +- local label prefixes. +- +-`-o OBJFILE' +- Name the object-file output from `as' OBJFILE. +- +-`-R' +- Fold the data section into the text section. +- +-`--statistics' +- Print the maximum space (in bytes) and total time (in seconds) +- used by assembly. +- +-`--strip-local-absolute' +- Remove local absolute symbols from the outgoing symbol table. +- +-`-v' +-`-version' +- Print the `as' version. +- +-`--version' +- Print the `as' version and exit. +- +-`-W' +- Suppress warning messages. +- +-`-w' +- Ignored. +- +-`-x' +- Ignored. +- +-`-Z' +- Generate an object file even after errors. +- +-`-- | FILES ...' +- Standard input, or source files to assemble. +- +- The following options are available when as is configured for an ARC +-processor. +- +-`-mbig-endian' +- Generate "big endian" format output. +- +-`-mlittle-endian' +- Generate "little endian" format output. +- +- The following options are available when as is configured for the ARM +-processor family. +- +-`-m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]7[t][[d]m] | -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t' +- Specify which variant of the ARM architecture is the target. +- +-`-mthumb | -mall' +- Enable or disable Thumb only instruction decoding. +- +-`-mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu' +- Select which Floating Point architcture is the target. +- +-`-mapcs-32 | -mapcs-26' +- Select which procedure calling convention is in use. +- +-`-EB | -EL' +- Select either big-endian (-EB) or little-endian (-EL) output. +- +- The following options are available when as is configured for a D10V +-processor. +-`-O' +- Optimize output by parallelizing instructions. +- +- The following options are available when as is configured for the +-Intel 80960 processor. +- +-`-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC' +- Specify which variant of the 960 architecture is the target. +- +-`-b' +- Add code to collect statistics about branches taken. +- +-`-no-relax' +- Do not alter compare-and-branch instructions for long +- displacements; error if necessary. +- +- The following options are available when as is configured for the +-Motorola 68000 series. +- +-`-l' +- Shorten references to undefined symbols, to one word instead of +- two. +- +-`-m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060' +-`| -m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -mcpu32 | -m5200' +- Specify what processor in the 68000 family is the target. The +- default is normally the 68020, but this can be changed at +- configuration time. +- +-`-m68881 | -m68882 | -mno-68881 | -mno-68882' +- The target machine does (or does not) have a floating-point +- coprocessor. The default is to assume a coprocessor for 68020, +- 68030, and cpu32. Although the basic 68000 is not compatible with +- the 68881, a combination of the two can be specified, since it's +- possible to do emulation of the coprocessor instructions with the +- main processor. +- +-`-m68851 | -mno-68851' +- The target machine does (or does not) have a memory-management +- unit coprocessor. The default is to assume an MMU for 68020 and +- up. +- +- The following options are available when `as' is configured for the +-SPARC architecture: +- +-`-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite' +-`-Av8plus | -Av8plusa | -Av9 | -Av9a' +- Explicitly select a variant of the SPARC architecture. +- +- `-Av8plus' and `-Av8plusa' select a 32 bit environment. `-Av9' +- and `-Av9a' select a 64 bit environment. +- +- `-Av8plusa' and `-Av9a' enable the SPARC V9 instruction set with +- UltraSPARC extensions. +- +-`-xarch=v8plus | -xarch=v8plusa' +- For compatibility with the Solaris v9 assembler. These options are +- equivalent to -Av8plus and -Av8plusa, respectively. +- +-`-bump' +- Warn when the assembler switches to another architecture. +- +- The following options are available when as is configured for a MIPS +-processor. +- +-`-G NUM' +- This option sets the largest size of an object that can be +- referenced implicitly with the `gp' register. It is only accepted +- for targets that use ECOFF format, such as a DECstation running +- Ultrix. The default value is 8. +- +-`-EB' +- Generate "big endian" format output. +- +-`-EL' +- Generate "little endian" format output. +- +-`-mips1' +-`-mips2' +-`-mips3' +- Generate code for a particular MIPS Instruction Set Architecture +- level. `-mips1' corresponds to the R2000 and R3000 processors, +- `-mips2' to the R6000 processor, and `-mips3' to the R4000 +- processor. +- +-`-m4650' +-`-no-m4650' +- Generate code for the MIPS R4650 chip. This tells the assembler +- to accept the `mad' and `madu' instruction, and to not schedule +- `nop' instructions around accesses to the `HI' and `LO' registers. +- `-no-m4650' turns off this option. +- +-`-mcpu=CPU' +- Generate code for a particular MIPS cpu. This has little effect +- on the assembler, but it is passed by `gcc'. +- +-`--emulation=NAME' +- This option causes `as' to emulate `as' configured for some other +- target, in all respects, including output format (choosing between +- ELF and ECOFF only), handling of pseudo-opcodes which may generate +- debugging information or store symbol table information, and +- default endianness. The available configuration names are: +- `mipsecoff', `mipself', `mipslecoff', `mipsbecoff', `mipslelf', +- `mipsbelf'. The first two do not alter the default endianness +- from that of the primary target for which the assembler was +- configured; the others change the default to little- or big-endian +- as indicated by the `b' or `l' in the name. Using `-EB' or `-EL' +- will override the endianness selection in any case. +- +- This option is currently supported only when the primary target +- `as' is configured for is a MIPS ELF or ECOFF target. +- Furthermore, the primary target or others specified with +- `--enable-targets=...' at configuration time must include support +- for the other format, if both are to be available. For example, +- the Irix 5 configuration includes support for both. +- +- Eventually, this option will support more configurations, with more +- fine-grained control over the assembler's behavior, and will be +- supported for more processors. +- +-`-nocpp' +- `as' ignores this option. It is accepted for compatibility with +- the native tools. +- +-`--trap' +-`--no-trap' +-`--break' +-`--no-break' +- Control how to deal with multiplication overflow and division by +- zero. `--trap' or `--no-break' (which are synonyms) take a trap +- exception (and only work for Instruction Set Architecture level 2 +- and higher); `--break' or `--no-trap' (also synonyms, and the +- default) take a break exception. +- +-* Menu: +- +-* Manual:: Structure of this Manual +-* GNU Assembler:: The GNU Assembler +-* Object Formats:: Object File Formats +-* Command Line:: Command Line +-* Input Files:: Input Files +-* Object:: Output (Object) File +-* Errors:: Error and Warning Messages +- +- +-File: as.info, Node: Manual, Next: GNU Assembler, Up: Overview +- +-Structure of this Manual +-======================== +- +- This manual is intended to describe what you need to know to use GNU +-`as'. We cover the syntax expected in source files, including notation +-for symbols, constants, and expressions; the directives that `as' +-understands; and of course how to invoke `as'. +- +- This manual also describes some of the machine-dependent features of +-various flavors of the assembler. +- +- On the other hand, this manual is *not* intended as an introduction +-to programming in assembly language--let alone programming in general! +-In a similar vein, we make no attempt to introduce the machine +-architecture; we do *not* describe the instruction set, standard +-mnemonics, registers or addressing modes that are standard to a +-particular architecture. You may want to consult the manufacturer's +-machine architecture manual for this information. +- +- +-File: as.info, Node: GNU Assembler, Next: Object Formats, Prev: Manual, Up: Overview +- +-The GNU Assembler +-================= +- +- GNU `as' is really a family of assemblers. If you use (or have +-used) the GNU assembler on one architecture, you should find a fairly +-similar environment when you use it on another architecture. Each +-version has much in common with the others, including object file +-formats, most assembler directives (often called "pseudo-ops") and +-assembler syntax. +- +- `as' is primarily intended to assemble the output of the GNU C +-compiler `gcc' for use by the linker `ld'. Nevertheless, we've tried +-to make `as' assemble correctly everything that other assemblers for +-the same machine would assemble. Any exceptions are documented +-explicitly (*note Machine Dependencies::.). This doesn't mean `as' +-always uses the same syntax as another assembler for the same +-architecture; for example, we know of several incompatible versions of +-680x0 assembly language syntax. +- +- Unlike older assemblers, `as' is designed to assemble a source +-program in one pass of the source file. This has a subtle impact on the +-`.org' directive (*note `.org': Org.). +- +- +-File: as.info, Node: Object Formats, Next: Command Line, Prev: GNU Assembler, Up: Overview +- +-Object File Formats +-=================== +- +- The GNU assembler can be configured to produce several alternative +-object file formats. For the most part, this does not affect how you +-write assembly language programs; but directives for debugging symbols +-are typically different in different file formats. *Note Symbol +-Attributes: Symbol Attributes. +- +- +-File: as.info, Node: Command Line, Next: Input Files, Prev: Object Formats, Up: Overview +- +-Command Line +-============ +- +- After the program name `as', the command line may contain options +-and file names. Options may appear in any order, and may be before, +-after, or between file names. The order of file names is significant. +- +- `--' (two hyphens) by itself names the standard input file +-explicitly, as one of the files for `as' to assemble. +- +- Except for `--' any command line argument that begins with a hyphen +-(`-') is an option. Each option changes the behavior of `as'. No +-option changes the way another option works. An option is a `-' +-followed by one or more letters; the case of the letter is important. +-All options are optional. +- +- Some options expect exactly one file name to follow them. The file +-name may either immediately follow the option's letter (compatible with +-older assemblers) or it may be the next command argument (GNU +-standard). These two command lines are equivalent: +- +- as -o my-object-file.o mumble.s +- as -omy-object-file.o mumble.s +- +- +-File: as.info, Node: Input Files, Next: Object, Prev: Command Line, Up: Overview +- +-Input Files +-=========== +- +- We use the phrase "source program", abbreviated "source", to +-describe the program input to one run of `as'. The program may be in +-one or more files; how the source is partitioned into files doesn't +-change the meaning of the source. +- +- The source program is a concatenation of the text in all the files, +-in the order specified. +- +- Each time you run `as' it assembles exactly one source program. The +-source program is made up of one or more files. (The standard input is +-also a file.) +- +- You give `as' a command line that has zero or more input file names. +-The input files are read (from left file name to right). A command +-line argument (in any position) that has no special meaning is taken to +-be an input file name. +- +- If you give `as' no file names it attempts to read one input file +-from the `as' standard input, which is normally your terminal. You may +-have to type to tell `as' there is no more program to assemble. +- +- Use `--' if you need to explicitly name the standard input file in +-your command line. +- +- If the source is empty, `as' produces a small, empty object file. +- +-Filenames and Line-numbers +--------------------------- +- +- There are two ways of locating a line in the input file (or files) +-and either may be used in reporting error messages. One way refers to +-a line number in a physical file; the other refers to a line number in a +-"logical" file. *Note Error and Warning Messages: Errors. +- +- "Physical files" are those files named in the command line given to +-`as'. +- +- "Logical files" are simply names declared explicitly by assembler +-directives; they bear no relation to physical files. Logical file names +-help error messages reflect the original source file, when `as' source +-is itself synthesized from other files. *Note `.app-file': App-File. +- +- +-File: as.info, Node: Object, Next: Errors, Prev: Input Files, Up: Overview +- +-Output (Object) File +-==================== +- +- Every time you run `as' it produces an output file, which is your +-assembly language program translated into numbers. This file is the +-object file. Its default name is `a.out', or `b.out' when `as' is +-configured for the Intel 80960. You can give it another name by using +-the `-o' option. Conventionally, object file names end with `.o'. The +-default name is used for historical reasons: older assemblers were +-capable of assembling self-contained programs directly into a runnable +-program. (For some formats, this isn't currently possible, but it can +-be done for the `a.out' format.) +- +- The object file is meant for input to the linker `ld'. It contains +-assembled program code, information to help `ld' integrate the +-assembled program into a runnable file, and (optionally) symbolic +-information for the debugger. +- +- +-File: as.info, Node: Errors, Prev: Object, Up: Overview +- +-Error and Warning Messages +-========================== +- +- `as' may write warnings and error messages to the standard error +-file (usually your terminal). This should not happen when a compiler +-runs `as' automatically. Warnings report an assumption made so that +-`as' could keep assembling a flawed program; errors report a grave +-problem that stops the assembly. +- +- Warning messages have the format +- +- file_name:NNN:Warning Message Text +- +-(where NNN is a line number). If a logical file name has been given +-(*note `.app-file': App-File.) it is used for the filename, otherwise +-the name of the current input file is used. If a logical line number +-was given (*note `.line': Line.) then it is used to calculate the +-number printed, otherwise the actual line in the current source file is +-printed. The message text is intended to be self explanatory (in the +-grand Unix tradition). +- +- Error messages have the format +- file_name:NNN:FATAL:Error Message Text +- The file name and line number are derived as for warning messages. +-The actual message text may be rather less explanatory because many of +-them aren't supposed to happen. +- +- +-File: as.info, Node: Invoking, Next: Syntax, Prev: Overview, Up: Top +- +-Command-Line Options +-******************** +- +- This chapter describes command-line options available in *all* +-versions of the GNU assembler; *note Machine Dependencies::., for +-options specific to particular machine architectures. +- +- If you are invoking `as' via the GNU C compiler (version 2), you can +-use the `-Wa' option to pass arguments through to the assembler. The +-assembler arguments must be separated from each other (and the `-Wa') +-by commas. For example: +- +- gcc -c -g -O -Wa,-alh,-L file.c +- +-emits a listing to standard output with high-level and assembly source. +- +- Usually you do not need to use this `-Wa' mechanism, since many +-compiler command-line options are automatically passed to the assembler +-by the compiler. (You can call the GNU compiler driver with the `-v' +-option to see precisely what options it passes to each compilation +-pass, including the assembler.) +- +-* Menu: +- +-* a:: -a[cdhlns] enable listings +-* D:: -D for compatibility +-* f:: -f to work faster +-* I:: -I for .include search path +- +-* K:: -K for difference tables +- +-* L:: -L to retain local labels +-* M:: -M or -mri to assemble in MRI compatibility mode +-* MD:: -MD for dependency tracking +-* o:: -o to name the object file +-* R:: -R to join data and text sections +-* statistics:: -statistics to see statistics about assembly +-* traditional-format:: -traditional-format for compatible output +-* v:: -v to announce version +-* W:: -W to suppress warnings +-* Z:: -Z to make object file even after errors +- +- +-File: as.info, Node: a, Next: D, Up: Invoking +- +-Enable Listings: `-a[cdhlns]' +-============================= +- +- These options enable listing output from the assembler. By itself, +-`-a' requests high-level, assembly, and symbols listing. You can use +-other letters to select specific options for the list: `-ah' requests a +-high-level language listing, `-al' requests an output-program assembly +-listing, and `-as' requests a symbol table listing. High-level +-listings require that a compiler debugging option like `-g' be used, +-and that assembly listings (`-al') be requested also. +- +- Use the `-ac' option to omit false conditionals from a listing. Any +-lines which are not assembled because of a false `.if' (or `.ifdef', or +-any other conditional), or a true `.if' followed by an `.else', will be +-omitted from the listing. +- +- Use the `-ad' option to omit debugging directives from the listing. +- +- Once you have specified one of these options, you can further control +-listing output and its appearance using the directives `.list', +-`.nolist', `.psize', `.eject', `.title', and `.sbttl'. The `-an' +-option turns off all forms processing. If you do not request listing +-output with one of the `-a' options, the listing-control directives +-have no effect. +- +- The letters after `-a' may be combined into one option, *e.g.*, +-`-aln'. +- +- +-File: as.info, Node: D, Next: f, Prev: a, Up: Invoking +- +-`-D' +-==== +- +- This option has no effect whatsoever, but it is accepted to make it +-more likely that scripts written for other assemblers also work with +-`as'. +- +- +-File: as.info, Node: f, Next: I, Prev: D, Up: Invoking +- +-Work Faster: `-f' +-================= +- +- `-f' should only be used when assembling programs written by a +-(trusted) compiler. `-f' stops the assembler from doing whitespace and +-comment preprocessing on the input file(s) before assembling them. +-*Note Preprocessing: Preprocessing. +- +- *Warning:* if you use `-f' when the files actually need to be +- preprocessed (if they contain comments, for example), `as' does +- not work correctly. +- +- +-File: as.info, Node: I, Next: K, Prev: f, Up: Invoking +- +-`.include' search path: `-I' PATH +-================================= +- +- Use this option to add a PATH to the list of directories `as' +-searches for files specified in `.include' directives (*note +-`.include': Include.). You may use `-I' as many times as necessary to +-include a variety of paths. The current working directory is always +-searched first; after that, `as' searches any `-I' directories in the +-same order as they were specified (left to right) on the command line. +- +- +-File: as.info, Node: K, Next: L, Prev: I, Up: Invoking +- +-Difference Tables: `-K' +-======================= +- +- `as' sometimes alters the code emitted for directives of the form +-`.word SYM1-SYM2'; *note `.word': Word.. You can use the `-K' option +-if you want a warning issued when this is done. +- +- +-File: as.info, Node: L, Next: M, Prev: K, Up: Invoking +- +-Include Local Labels: `-L' +-========================== +- +- Labels beginning with `L' (upper case only) are called "local +-labels". *Note Symbol Names::. Normally you do not see such labels when +-debugging, because they are intended for the use of programs (like +-compilers) that compose assembler programs, not for your notice. +-Normally both `as' and `ld' discard such labels, so you do not normally +-debug with them. +- +- This option tells `as' to retain those `L...' symbols in the object +-file. Usually if you do this you also tell the linker `ld' to preserve +-symbols whose names begin with `L'. +- +- By default, a local label is any label beginning with `L', but each +-target is allowed to redefine the local label prefix. On the HPPA +-local labels begin with `L$'. `;' for the ARM family; +- +- +-File: as.info, Node: M, Next: MD, Prev: L, Up: Invoking +- +-Assemble in MRI Compatibility Mode: `-M' +-======================================== +- +- The `-M' or `--mri' option selects MRI compatibility mode. This +-changes the syntax and pseudo-op handling of `as' to make it compatible +-with the `ASM68K' or the `ASM960' (depending upon the configured +-target) assembler from Microtec Research. The exact nature of the MRI +-syntax will not be documented here; see the MRI manuals for more +-information. Note in particular that the handling of macros and macro +-arguments is somewhat different. The purpose of this option is to +-permit assembling existing MRI assembler code using `as'. +- +- The MRI compatibility is not complete. Certain operations of the +-MRI assembler depend upon its object file format, and can not be +-supported using other object file formats. Supporting these would +-require enhancing each object file format individually. These are: +- +- * global symbols in common section +- +- The m68k MRI assembler supports common sections which are merged +- by the linker. Other object file formats do not support this. +- `as' handles common sections by treating them as a single common +- symbol. It permits local symbols to be defined within a common +- section, but it can not support global symbols, since it has no +- way to describe them. +- +- * complex relocations +- +- The MRI assemblers support relocations against a negated section +- address, and relocations which combine the start addresses of two +- or more sections. These are not support by other object file +- formats. +- +- * `END' pseudo-op specifying start address +- +- The MRI `END' pseudo-op permits the specification of a start +- address. This is not supported by other object file formats. The +- start address may instead be specified using the `-e' option to +- the linker, or in a linker script. +- +- * `IDNT', `.ident' and `NAME' pseudo-ops +- +- The MRI `IDNT', `.ident' and `NAME' pseudo-ops assign a module +- name to the output file. This is not supported by other object +- file formats. +- +- * `ORG' pseudo-op +- +- The m68k MRI `ORG' pseudo-op begins an absolute section at a given +- address. This differs from the usual `as' `.org' pseudo-op, which +- changes the location within the current section. Absolute +- sections are not supported by other object file formats. The +- address of a section may be assigned within a linker script. +- +- There are some other features of the MRI assembler which are not +-supported by `as', typically either because they are difficult or +-because they seem of little consequence. Some of these may be +-supported in future releases. +- +- * EBCDIC strings +- +- EBCDIC strings are not supported. +- +- * packed binary coded decimal +- +- Packed binary coded decimal is not supported. This means that the +- `DC.P' and `DCB.P' pseudo-ops are not supported. +- +- * `FEQU' pseudo-op +- +- The m68k `FEQU' pseudo-op is not supported. +- +- * `NOOBJ' pseudo-op +- +- The m68k `NOOBJ' pseudo-op is not supported. +- +- * `OPT' branch control options +- +- The m68k `OPT' branch control options--`B', `BRS', `BRB', `BRL', +- and `BRW'--are ignored. `as' automatically relaxes all branches, +- whether forward or backward, to an appropriate size, so these +- options serve no purpose. +- +- * `OPT' list control options +- +- The following m68k `OPT' list control options are ignored: `C', +- `CEX', `CL', `CRE', `E', `G', `I', `M', `MEX', `MC', `MD', `X'. +- +- * other `OPT' options +- +- The following m68k `OPT' options are ignored: `NEST', `O', `OLD', +- `OP', `P', `PCO', `PCR', `PCS', `R'. +- +- * `OPT' `D' option is default +- +- The m68k `OPT' `D' option is the default, unlike the MRI assembler. +- `OPT NOD' may be used to turn it off. +- +- * `XREF' pseudo-op. +- +- The m68k `XREF' pseudo-op is ignored. +- +- * `.debug' pseudo-op +- +- The i960 `.debug' pseudo-op is not supported. +- +- * `.extended' pseudo-op +- +- The i960 `.extended' pseudo-op is not supported. +- +- * `.list' pseudo-op. +- +- The various options of the i960 `.list' pseudo-op are not +- supported. +- +- * `.optimize' pseudo-op +- +- The i960 `.optimize' pseudo-op is not supported. +- +- * `.output' pseudo-op +- +- The i960 `.output' pseudo-op is not supported. +- +- * `.setreal' pseudo-op +- +- The i960 `.setreal' pseudo-op is not supported. +- +- +-File: as.info, Node: MD, Next: o, Prev: M, Up: Invoking +- +-Dependency tracking: `--MD' +-=========================== +- +- `as' can generate a dependency file for the file it creates. This +-file consists of a single rule suitable for `make' describing the +-dependencies of the main source file. +- +- The rule is written to the file named in its argument. +- +- This feature is used in the automatic updating of makefiles. +- +- +-File: as.info, Node: o, Next: R, Prev: MD, Up: Invoking +- +-Name the Object File: `-o' +-========================== +- +- There is always one object file output when you run `as'. By +-default it has the name `a.out' (or `b.out', for Intel 960 targets +-only). You use this option (which takes exactly one filename) to give +-the object file a different name. +- +- Whatever the object file is called, `as' overwrites any existing +-file of the same name. +- +- +-File: as.info, Node: R, Next: statistics, Prev: o, Up: Invoking +- +-Join Data and Text Sections: `-R' +-================================= +- +- `-R' tells `as' to write the object file as if all data-section data +-lives in the text section. This is only done at the very last moment: +-your binary data are the same, but data section parts are relocated +-differently. The data section part of your object file is zero bytes +-long because all its bytes are appended to the text section. (*Note +-Sections and Relocation: Sections.) +- +- When you specify `-R' it would be possible to generate shorter +-address displacements (because we do not have to cross between text and +-data section). We refrain from doing this simply for compatibility with +-older versions of `as'. In future, `-R' may work this way. +- +- When `as' is configured for COFF output, this option is only useful +-if you use sections named `.text' and `.data'. +- +- `-R' is not supported for any of the HPPA targets. Using `-R' +-generates a warning from `as'. +- +- +-File: as.info, Node: statistics, Next: traditional-format, Prev: R, Up: Invoking +- +-Display Assembly Statistics: `--statistics' +-=========================================== +- +- Use `--statistics' to display two statistics about the resources +-used by `as': the maximum amount of space allocated during the assembly +-(in bytes), and the total execution time taken for the assembly (in CPU +-seconds). +- +- +-File: as.info, Node: traditional-format, Next: v, Prev: statistics, Up: Invoking +- +-Compatible output: `--traditional-format' +-========================================= +- +- For some targets, the output of `as' is different in some ways from +-the output of some existing assembler. This switch requests `as' to +-use the traditional format instead. +- +- For example, it disables the exception frame optimizations which +-`as' normally does by default on `gcc' output. +- +- +-File: as.info, Node: v, Next: W, Prev: traditional-format, Up: Invoking +- +-Announce Version: `-v' +-====================== +- +- You can find out what version of as is running by including the +-option `-v' (which you can also spell as `-version') on the command +-line. +- +- +-File: as.info, Node: W, Next: Z, Prev: v, Up: Invoking +- +-Suppress Warnings: `-W' +-======================= +- +- `as' should never give a warning or error message when assembling +-compiler output. But programs written by people often cause `as' to +-give a warning that a particular assumption was made. All such +-warnings are directed to the standard error file. If you use this +-option, no warnings are issued. This option only affects the warning +-messages: it does not change any particular of how `as' assembles your +-file. Errors, which stop the assembly, are still reported. +- +- +-File: as.info, Node: Z, Prev: W, Up: Invoking +- +-Generate Object File in Spite of Errors: `-Z' +-============================================= +- +- After an error message, `as' normally produces no output. If for +-some reason you are interested in object file output even after `as' +-gives an error message on your program, use the `-Z' option. If there +-are any errors, `as' continues anyways, and writes an object file after +-a final warning message of the form `N errors, M warnings, generating +-bad object file.' +- +- +-File: as.info, Node: Syntax, Next: Sections, Prev: Invoking, Up: Top +- +-Syntax +-****** +- +- This chapter describes the machine-independent syntax allowed in a +-source file. `as' syntax is similar to what many other assemblers use; +-it is inspired by the BSD 4.2 assembler, except that `as' does not +-assemble Vax bit-fields. +- +-* Menu: +- +-* Preprocessing:: Preprocessing +-* Whitespace:: Whitespace +-* Comments:: Comments +-* Symbol Intro:: Symbols +-* Statements:: Statements +-* Constants:: Constants +- +- +-File: as.info, Node: Preprocessing, Next: Whitespace, Up: Syntax +- +-Preprocessing +-============= +- +- The `as' internal preprocessor: +- * adjusts and removes extra whitespace. It leaves one space or tab +- before the keywords on a line, and turns any other whitespace on +- the line into a single space. +- +- * removes all comments, replacing them with a single space, or an +- appropriate number of newlines. +- +- * converts character constants into the appropriate numeric values. +- +- It does not do macro processing, include file handling, or anything +-else you may get from your C compiler's preprocessor. You can do +-include file processing with the `.include' directive (*note +-`.include': Include.). You can use the GNU C compiler driver to get +-other "CPP" style preprocessing, by giving the input file a `.S' +-suffix. *Note Options Controlling the Kind of Output: +-(gcc.info)Overall Options. +- +- Excess whitespace, comments, and character constants cannot be used +-in the portions of the input text that are not preprocessed. +- +- If the first line of an input file is `#NO_APP' or if you use the +-`-f' option, whitespace and comments are not removed from the input +-file. Within an input file, you can ask for whitespace and comment +-removal in specific portions of the by putting a line that says `#APP' +-before the text that may contain whitespace or comments, and putting a +-line that says `#NO_APP' after this text. This feature is mainly +-intend to support `asm' statements in compilers whose output is +-otherwise free of comments and whitespace. +- +- +-File: as.info, Node: Whitespace, Next: Comments, Prev: Preprocessing, Up: Syntax +- +-Whitespace +-========== +- +- "Whitespace" is one or more blanks or tabs, in any order. +-Whitespace is used to separate symbols, and to make programs neater for +-people to read. Unless within character constants (*note Character +-Constants: Characters.), any whitespace means the same as exactly one +-space. +- +- +-File: as.info, Node: Comments, Next: Symbol Intro, Prev: Whitespace, Up: Syntax +- +-Comments +-======== +- +- There are two ways of rendering comments to `as'. In both cases the +-comment is equivalent to one space. +- +- Anything from `/*' through the next `*/' is a comment. This means +-you may not nest these comments. +- +- /* +- The only way to include a newline ('\n') in a comment +- is to use this sort of comment. +- */ +- +- /* This sort of comment does not nest. */ +- +- Anything from the "line comment" character to the next newline is +-considered a comment and is ignored. The line comment character is `;' +-for the AMD 29K family; `;' on the ARC; `;' for the H8/300 family; `!' +-for the H8/500 family; `;' for the HPPA; `#' on the i960; `!' for the +-Hitachi SH; `!' on the SPARC; `#' on the m32r; `|' on the 680x0; `#' on +-the Vax; `!' for the Z8000; `#' on the V850; see *Note Machine +-Dependencies::. +- +- On some machines there are two different line comment characters. +-One character only begins a comment if it is the first non-whitespace +-character on a line, while the other always begins a comment. +- +- The V850 assembler also supports a double dash as starting a comment +-that extends to the end of the line. +- +- `--'; +- +- To be compatible with past assemblers, lines that begin with `#' +-have a special interpretation. Following the `#' should be an absolute +-expression (*note Expressions::.): the logical line number of the *next* +-line. Then a string (*note Strings: Strings.) is allowed: if present +-it is a new logical file name. The rest of the line, if any, should be +-whitespace. +- +- If the first non-whitespace characters on the line are not numeric, +-the line is ignored. (Just like a comment.) +- +- # This is an ordinary comment. +- # 42-6 "new_file_name" # New logical file name +- # This is logical line # 36. +- This feature is deprecated, and may disappear from future versions +-of `as'. +- +- +-File: as.info, Node: Symbol Intro, Next: Statements, Prev: Comments, Up: Syntax +- +-Symbols +-======= +- +- A "symbol" is one or more characters chosen from the set of all +-letters (both upper and lower case), digits and the three characters +-`_.$'. On most machines, you can also use `$' in symbol names; +-exceptions are noted in *Note Machine Dependencies::. No symbol may +-begin with a digit. Case is significant. There is no length limit: +-all characters are significant. Symbols are delimited by characters +-not in that set, or by the beginning of a file (since the source +-program must end with a newline, the end of a file is not a possible +-symbol delimiter). *Note Symbols::. +- +- +-File: as.info, Node: Statements, Next: Constants, Prev: Symbol Intro, Up: Syntax +- +-Statements +-========== +- +- A "statement" ends at a newline character (`\n') or line separator +-character. (The line separator is usually `;', unless this conflicts +-with the comment character; *note Machine Dependencies::..) The +-newline or separator character is considered part of the preceding +-statement. Newlines and separators within character constants are an +-exception: they do not end statements. +- +- It is an error to end any statement with end-of-file: the last +-character of any input file should be a newline. +- +- You may write a statement on more than one line if you put a +-backslash (`\') immediately in front of any newlines within the +-statement. When `as' reads a backslashed newline both characters are +-ignored. You can even put backslashed newlines in the middle of symbol +-names without changing the meaning of your source program. +- +- An empty statement is allowed, and may include whitespace. It is +-ignored. +- +- A statement begins with zero or more labels, optionally followed by a +-key symbol which determines what kind of statement it is. The key +-symbol determines the syntax of the rest of the statement. If the +-symbol begins with a dot `.' then the statement is an assembler +-directive: typically valid for any computer. If the symbol begins with +-a letter the statement is an assembly language "instruction": it +-assembles into a machine language instruction. Different versions of +-`as' for different computers recognize different instructions. In +-fact, the same symbol may represent a different instruction in a +-different computer's assembly language. +- +- A label is a symbol immediately followed by a colon (`:'). +-Whitespace before a label or after a colon is permitted, but you may not +-have whitespace between a label's symbol and its colon. *Note Labels::. +- +- For HPPA targets, labels need not be immediately followed by a +-colon, but the definition of a label must begin in column zero. This +-also implies that only one label may be defined on each line. +- +- label: .directive followed by something +- another_label: # This is an empty statement. +- instruction operand_1, operand_2, ... +- +- +-File: as.info, Node: Constants, Prev: Statements, Up: Syntax +- +-Constants +-========= +- +- A constant is a number, written so that its value is known by +-inspection, without knowing any context. Like this: +- .byte 74, 0112, 092, 0x4A, 0X4a, 'J, '\J # All the same value. +- .ascii "Ring the bell\7" # A string constant. +- .octa 0x123456789abcdef0123456789ABCDEF0 # A bignum. +- .float 0f-314159265358979323846264338327\ +- 95028841971.693993751E-40 # - pi, a flonum. +- +-* Menu: +- +-* Characters:: Character Constants +-* Numbers:: Number Constants +- +- +-File: as.info, Node: Characters, Next: Numbers, Up: Constants +- +-Character Constants +-------------------- +- +- There are two kinds of character constants. A "character" stands +-for one character in one byte and its value may be used in numeric +-expressions. String constants (properly called string *literals*) are +-potentially many bytes and their values may not be used in arithmetic +-expressions. +- +-* Menu: +- +-* Strings:: Strings +-* Chars:: Characters +- +- +-File: as.info, Node: Strings, Next: Chars, Up: Characters +- +-Strings +-....... +- +- A "string" is written between double-quotes. It may contain +-double-quotes or null characters. The way to get special characters +-into a string is to "escape" these characters: precede them with a +-backslash `\' character. For example `\\' represents one backslash: +-the first `\' is an escape which tells `as' to interpret the second +-character literally as a backslash (which prevents `as' from +-recognizing the second `\' as an escape character). The complete list +-of escapes follows. +- +-`\b' +- Mnemonic for backspace; for ASCII this is octal code 010. +- +-`\f' +- Mnemonic for FormFeed; for ASCII this is octal code 014. +- +-`\n' +- Mnemonic for newline; for ASCII this is octal code 012. +- +-`\r' +- Mnemonic for carriage-Return; for ASCII this is octal code 015. +- +-`\t' +- Mnemonic for horizontal Tab; for ASCII this is octal code 011. +- +-`\ DIGIT DIGIT DIGIT' +- An octal character code. The numeric code is 3 octal digits. For +- compatibility with other Unix systems, 8 and 9 are accepted as +- digits: for example, `\008' has the value 010, and `\009' the +- value 011. +- +-`\`x' HEX-DIGITS...' +- A hex character code. All trailing hex digits are combined. +- Either upper or lower case `x' works. +- +-`\\' +- Represents one `\' character. +- +-`\"' +- Represents one `"' character. Needed in strings to represent this +- character, because an unescaped `"' would end the string. +- +-`\ ANYTHING-ELSE' +- Any other character when escaped by `\' gives a warning, but +- assembles as if the `\' was not present. The idea is that if you +- used an escape sequence you clearly didn't want the literal +- interpretation of the following character. However `as' has no +- other interpretation, so `as' knows it is giving you the wrong +- code and warns you of the fact. +- +- Which characters are escapable, and what those escapes represent, +-varies widely among assemblers. The current set is what we think the +-BSD 4.2 assembler recognizes, and is a subset of what most C compilers +-recognize. If you are in doubt, do not use an escape sequence. +- +- +-File: as.info, Node: Chars, Prev: Strings, Up: Characters +- +-Characters +-.......... +- +- A single character may be written as a single quote immediately +-followed by that character. The same escapes apply to characters as to +-strings. So if you want to write the character backslash, you must +-write `'\\' where the first `\' escapes the second `\'. As you can +-see, the quote is an acute accent, not a grave accent. A newline +-immediately following an acute accent is taken as a literal character +-and does not count as the end of a statement. The value of a character +-constant in a numeric expression is the machine's byte-wide code for +-that character. `as' assumes your character code is ASCII: `'A' means +-65, `'B' means 66, and so on. +- +- +-File: as.info, Node: Numbers, Prev: Characters, Up: Constants +- +-Number Constants +----------------- +- +- `as' distinguishes three kinds of numbers according to how they are +-stored in the target machine. *Integers* are numbers that would fit +-into an `int' in the C language. *Bignums* are integers, but they are +-stored in more than 32 bits. *Flonums* are floating point numbers, +-described below. +- +-* Menu: +- +-* Integers:: Integers +-* Bignums:: Bignums +-* Flonums:: Flonums +- +- +-File: as.info, Node: Integers, Next: Bignums, Up: Numbers +- +-Integers +-........ +- +- A binary integer is `0b' or `0B' followed by zero or more of the +-binary digits `01'. +- +- An octal integer is `0' followed by zero or more of the octal digits +-(`01234567'). +- +- A decimal integer starts with a non-zero digit followed by zero or +-more digits (`0123456789'). +- +- A hexadecimal integer is `0x' or `0X' followed by one or more +-hexadecimal digits chosen from `0123456789abcdefABCDEF'. +- +- Integers have the usual values. To denote a negative integer, use +-the prefix operator `-' discussed under expressions (*note Prefix +-Operators: Prefix Ops.). +- +- +-File: as.info, Node: Bignums, Next: Flonums, Prev: Integers, Up: Numbers +- +-Bignums +-....... +- +- A "bignum" has the same syntax and semantics as an integer except +-that the number (or its negative) takes more than 32 bits to represent +-in binary. The distinction is made because in some places integers are +-permitted while bignums are not. +- +- +-File: as.info, Node: Flonums, Prev: Bignums, Up: Numbers +- +-Flonums +-....... +- +- A "flonum" represents a floating point number. The translation is +-indirect: a decimal floating point number from the text is converted by +-`as' to a generic binary floating point number of more than sufficient +-precision. This generic floating point number is converted to a +-particular computer's floating point format (or formats) by a portion +-of `as' specialized to that computer. +- +- A flonum is written by writing (in order) +- * The digit `0'. (`0' is optional on the HPPA.) +- +- * A letter, to tell `as' the rest of the number is a flonum. `e' is +- recommended. Case is not important. +- +- On the H8/300, H8/500, Hitachi SH, and AMD 29K architectures, the +- letter must be one of the letters `DFPRSX' (in upper or lower +- case). +- +- On the ARC, the letter must be one of the letters `DFRS' (in upper +- or lower case). +- +- On the Intel 960 architecture, the letter must be one of the +- letters `DFT' (in upper or lower case). +- +- On the HPPA architecture, the letter must be `E' (upper case only). +- +- * An optional sign: either `+' or `-'. +- +- * An optional "integer part": zero or more decimal digits. +- +- * An optional "fractional part": `.' followed by zero or more +- decimal digits. +- +- * An optional exponent, consisting of: +- +- * An `E' or `e'. +- +- * Optional sign: either `+' or `-'. +- +- * One or more decimal digits. +- +- At least one of the integer part or the fractional part must be +-present. The floating point number has the usual base-10 value. +- +- `as' does all processing using integers. Flonums are computed +-independently of any floating point hardware in the computer running +-`as'. +- +- +-File: as.info, Node: Sections, Next: Symbols, Prev: Syntax, Up: Top +- +-Sections and Relocation +-*********************** +- +-* Menu: +- +-* Secs Background:: Background +-* Ld Sections:: Linker Sections +-* As Sections:: Assembler Internal Sections +-* Sub-Sections:: Sub-Sections +-* bss:: bss Section +- +diff -rup --new-file binutils-2.9.1/gas/doc/as.info-2 binutils-2.9.1/gas/doc/as.info-2 +--- binutils-2.9.1/gas/doc/as.info-2 Fri May 1 08:45:00 1998 ++++ binutils-2.9.1/gas/doc/as.info-2 Wed Dec 31 17:00:00 1969 +@@ -1,1368 +0,0 @@ +-This is Info file as.info, produced by Makeinfo version 1.68 from the +-input file as.texinfo. +- +-START-INFO-DIR-ENTRY +-* As: (as). The GNU assembler. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU Assembler "as". +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: as.info, Node: Secs Background, Next: Ld Sections, Up: Sections +- +-Background +-========== +- +- Roughly, a section is a range of addresses, with no gaps; all data +-"in" those addresses is treated the same for some particular purpose. +-For example there may be a "read only" section. +- +- The linker `ld' reads many object files (partial programs) and +-combines their contents to form a runnable program. When `as' emits an +-object file, the partial program is assumed to start at address 0. +-`ld' assigns the final addresses for the partial program, so that +-different partial programs do not overlap. This is actually an +-oversimplification, but it suffices to explain how `as' uses sections. +- +- `ld' moves blocks of bytes of your program to their run-time +-addresses. These blocks slide to their run-time addresses as rigid +-units; their length does not change and neither does the order of bytes +-within them. Such a rigid unit is called a *section*. Assigning +-run-time addresses to sections is called "relocation". It includes the +-task of adjusting mentions of object-file addresses so they refer to +-the proper run-time addresses. For the H8/300 and H8/500, and for the +-Hitachi SH, `as' pads sections if needed to ensure they end on a word +-(sixteen bit) boundary. +- +- An object file written by `as' has at least three sections, any of +-which may be empty. These are named "text", "data" and "bss" sections. +- +- When it generates COFF output, `as' can also generate whatever other +-named sections you specify using the `.section' directive (*note +-`.section': Section.). If you do not use any directives that place +-output in the `.text' or `.data' sections, these sections still exist, +-but are empty. +- +- When `as' generates SOM or ELF output for the HPPA, `as' can also +-generate whatever other named sections you specify using the `.space' +-and `.subspace' directives. See `HP9000 Series 800 Assembly Language +-Reference Manual' (HP 92432-90001) for details on the `.space' and +-`.subspace' assembler directives. +- +- Additionally, `as' uses different names for the standard text, data, +-and bss sections when generating SOM output. Program text is placed +-into the `$CODE$' section, data into `$DATA$', and BSS into `$BSS$'. +- +- Within the object file, the text section starts at address `0', the +-data section follows, and the bss section follows the data section. +- +- When generating either SOM or ELF output files on the HPPA, the text +-section starts at address `0', the data section at address `0x4000000', +-and the bss section follows the data section. +- +- To let `ld' know which data changes when the sections are relocated, +-and how to change that data, `as' also writes to the object file +-details of the relocation needed. To perform relocation `ld' must +-know, each time an address in the object file is mentioned: +- * Where in the object file is the beginning of this reference to an +- address? +- +- * How long (in bytes) is this reference? +- +- * Which section does the address refer to? What is the numeric +- value of +- (ADDRESS) - (START-ADDRESS OF SECTION)? +- +- * Is the reference to an address "Program-Counter relative"? +- +- In fact, every address `as' ever uses is expressed as +- (SECTION) + (OFFSET INTO SECTION) +- +-Further, most expressions `as' computes have this section-relative +-nature. (For some object formats, such as SOM for the HPPA, some +-expressions are symbol-relative instead.) +- +- In this manual we use the notation {SECNAME N} to mean "offset N +-into section SECNAME." +- +- Apart from text, data and bss sections you need to know about the +-"absolute" section. When `ld' mixes partial programs, addresses in the +-absolute section remain unchanged. For example, address `{absolute 0}' +-is "relocated" to run-time address 0 by `ld'. Although the linker +-never arranges two partial programs' data sections with overlapping +-addresses after linking, *by definition* their absolute sections must +-overlap. Address `{absolute 239}' in one part of a program is always +-the same address when the program is running as address `{absolute +-239}' in any other part of the program. +- +- The idea of sections is extended to the "undefined" section. Any +-address whose section is unknown at assembly time is by definition +-rendered {undefined U}--where U is filled in later. Since numbers are +-always defined, the only way to generate an undefined address is to +-mention an undefined symbol. A reference to a named common block would +-be such a symbol: its value is unknown at assembly time so it has +-section *undefined*. +- +- By analogy the word *section* is used to describe groups of sections +-in the linked program. `ld' puts all partial programs' text sections +-in contiguous addresses in the linked program. It is customary to +-refer to the *text section* of a program, meaning all the addresses of +-all partial programs' text sections. Likewise for data and bss +-sections. +- +- Some sections are manipulated by `ld'; others are invented for use +-of `as' and have no meaning except during assembly. +- +- +-File: as.info, Node: Ld Sections, Next: As Sections, Prev: Secs Background, Up: Sections +- +-Linker Sections +-=============== +- +- `ld' deals with just four kinds of sections, summarized below. +- +-*named sections* +-*text section* +-*data section* +- These sections hold your program. `as' and `ld' treat them as +- separate but equal sections. Anything you can say of one section +- is true another. When the program is running, however, it is +- customary for the text section to be unalterable. The text +- section is often shared among processes: it contains instructions, +- constants and the like. The data section of a running program is +- usually alterable: for example, C variables would be stored in the +- data section. +- +-*bss section* +- This section contains zeroed bytes when your program begins +- running. It is used to hold unitialized variables or common +- storage. The length of each partial program's bss section is +- important, but because it starts out containing zeroed bytes there +- is no need to store explicit zero bytes in the object file. The +- bss section was invented to eliminate those explicit zeros from +- object files. +- +-*absolute section* +- Address 0 of this section is always "relocated" to runtime address +- 0. This is useful if you want to refer to an address that `ld' +- must not change when relocating. In this sense we speak of +- absolute addresses being "unrelocatable": they do not change +- during relocation. +- +-*undefined section* +- This "section" is a catch-all for address references to objects +- not in the preceding sections. +- +- An idealized example of three relocatable sections follows. The +-example uses the traditional section names `.text' and `.data'. Memory +-addresses are on the horizontal axis. +- +- +-----+----+--+ +- partial program # 1: |ttttt|dddd|00| +- +-----+----+--+ +- +- text data bss +- seg. seg. seg. +- +- +---+---+---+ +- partial program # 2: |TTT|DDD|000| +- +---+---+---+ +- +- +--+---+-----+--+----+---+-----+~~ +- linked program: | |TTT|ttttt| |dddd|DDD|00000| +- +--+---+-----+--+----+---+-----+~~ +- +- addresses: 0 ... +- +- +-File: as.info, Node: As Sections, Next: Sub-Sections, Prev: Ld Sections, Up: Sections +- +-Assembler Internal Sections +-=========================== +- +- These sections are meant only for the internal use of `as'. They +-have no meaning at run-time. You do not really need to know about these +-sections for most purposes; but they can be mentioned in `as' warning +-messages, so it might be helpful to have an idea of their meanings to +-`as'. These sections are used to permit the value of every expression +-in your assembly language program to be a section-relative address. +- +-ASSEMBLER-INTERNAL-LOGIC-ERROR! +- An internal assembler logic error has been found. This means +- there is a bug in the assembler. +- +-expr section +- The assembler stores complex expression internally as combinations +- of symbols. When it needs to represent an expression as a symbol, +- it puts it in the expr section. +- +- +-File: as.info, Node: Sub-Sections, Next: bss, Prev: As Sections, Up: Sections +- +-Sub-Sections +-============ +- +- Assembled bytes conventionally fall into two sections: text and data. +-You may have separate groups of data in named sections that you want to +-end up near to each other in the object file, even though they are not +-contiguous in the assembler source. `as' allows you to use +-"subsections" for this purpose. Within each section, there can be +-numbered subsections with values from 0 to 8192. Objects assembled +-into the same subsection go into the object file together with other +-objects in the same subsection. For example, a compiler might want to +-store constants in the text section, but might not want to have them +-interspersed with the program being assembled. In this case, the +-compiler could issue a `.text 0' before each section of code being +-output, and a `.text 1' before each group of constants being output. +- +- Subsections are optional. If you do not use subsections, everything +-goes in subsection number zero. +- +- Each subsection is zero-padded up to a multiple of four bytes. +-(Subsections may be padded a different amount on different flavors of +-`as'.) +- +- Subsections appear in your object file in numeric order, lowest +-numbered to highest. (All this to be compatible with other people's +-assemblers.) The object file contains no representation of +-subsections; `ld' and other programs that manipulate object files see +-no trace of them. They just see all your text subsections as a text +-section, and all your data subsections as a data section. +- +- To specify which subsection you want subsequent statements assembled +-into, use a numeric argument to specify it, in a `.text EXPRESSION' or +-a `.data EXPRESSION' statement. When generating COFF output, you can +-also use an extra subsection argument with arbitrary named sections: +-`.section NAME, EXPRESSION'. EXPRESSION should be an absolute +-expression. (*Note Expressions::.) If you just say `.text' then +-`.text 0' is assumed. Likewise `.data' means `.data 0'. Assembly +-begins in `text 0'. For instance: +- .text 0 # The default subsection is text 0 anyway. +- .ascii "This lives in the first text subsection. *" +- .text 1 +- .ascii "But this lives in the second text subsection." +- .data 0 +- .ascii "This lives in the data section," +- .ascii "in the first data subsection." +- .text 0 +- .ascii "This lives in the first text section," +- .ascii "immediately following the asterisk (*)." +- +- Each section has a "location counter" incremented by one for every +-byte assembled into that section. Because subsections are merely a +-convenience restricted to `as' there is no concept of a subsection +-location counter. There is no way to directly manipulate a location +-counter--but the `.align' directive changes it, and any label +-definition captures its current value. The location counter of the +-section where statements are being assembled is said to be the "active" +-location counter. +- +- +-File: as.info, Node: bss, Prev: Sub-Sections, Up: Sections +- +-bss Section +-=========== +- +- The bss section is used for local common variable storage. You may +-allocate address space in the bss section, but you may not dictate data +-to load into it before your program executes. When your program starts +-running, all the contents of the bss section are zeroed bytes. +- +- The `.lcomm' pseudo-op defines a symbol in the bss section; see +-*Note `.lcomm': Lcomm. +- +- The `.comm' pseudo-op may be used to declare a common symbol, which +-is another form of uninitialized symbol; see *Note `.comm': Comm. +- +- When assembling for a target which supports multiple sections, such +-as ELF or COFF, you may switch into the `.bss' section and define +-symbols as usual; see *Note `.section': Section. You may only assemble +-zero values into the section. Typically the section will only contain +-symbol definitions and `.skip' directives (*note `.skip': Skip.). +- +- +-File: as.info, Node: Symbols, Next: Expressions, Prev: Sections, Up: Top +- +-Symbols +-******* +- +- Symbols are a central concept: the programmer uses symbols to name +-things, the linker uses symbols to link, and the debugger uses symbols +-to debug. +- +- *Warning:* `as' does not place symbols in the object file in the +- same order they were declared. This may break some debuggers. +- +-* Menu: +- +-* Labels:: Labels +-* Setting Symbols:: Giving Symbols Other Values +-* Symbol Names:: Symbol Names +-* Dot:: The Special Dot Symbol +-* Symbol Attributes:: Symbol Attributes +- +- +-File: as.info, Node: Labels, Next: Setting Symbols, Up: Symbols +- +-Labels +-====== +- +- A "label" is written as a symbol immediately followed by a colon +-`:'. The symbol then represents the current value of the active +-location counter, and is, for example, a suitable instruction operand. +-You are warned if you use the same symbol to represent two different +-locations: the first definition overrides any other definitions. +- +- On the HPPA, the usual form for a label need not be immediately +-followed by a colon, but instead must start in column zero. Only one +-label may be defined on a single line. To work around this, the HPPA +-version of `as' also provides a special directive `.label' for defining +-labels more flexibly. +- +- +-File: as.info, Node: Setting Symbols, Next: Symbol Names, Prev: Labels, Up: Symbols +- +-Giving Symbols Other Values +-=========================== +- +- A symbol can be given an arbitrary value by writing a symbol, +-followed by an equals sign `=', followed by an expression (*note +-Expressions::.). This is equivalent to using the `.set' directive. +-*Note `.set': Set. +- +- +-File: as.info, Node: Symbol Names, Next: Dot, Prev: Setting Symbols, Up: Symbols +- +-Symbol Names +-============ +- +- Symbol names begin with a letter or with one of `._'. On most +-machines, you can also use `$' in symbol names; exceptions are noted in +-*Note Machine Dependencies::. That character may be followed by any +-string of digits, letters, dollar signs (unless otherwise noted in +-*Note Machine Dependencies::), and underscores. For the AMD 29K +-family, `?' is also allowed in the body of a symbol name, though not at +-its beginning. +- +- Case of letters is significant: `foo' is a different symbol name +-than `Foo'. +- +- Each symbol has exactly one name. Each name in an assembly language +-program refers to exactly one symbol. You may use that symbol name any +-number of times in a program. +- +-Local Symbol Names +------------------- +- +- Local symbols help compilers and programmers use names temporarily. +-There are ten local symbol names, which are re-used throughout the +-program. You may refer to them using the names `0' `1' ... `9'. To +-define a local symbol, write a label of the form `N:' (where N +-represents any digit). To refer to the most recent previous definition +-of that symbol write `Nb', using the same digit as when you defined the +-label. To refer to the next definition of a local label, write +-`Nf'--where N gives you a choice of 10 forward references. The `b' +-stands for "backwards" and the `f' stands for "forwards". +- +- Local symbols are not emitted by the current GNU C compiler. +- +- There is no restriction on how you can use these labels, but +-remember that at any point in the assembly you can refer to at most 10 +-prior local labels and to at most 10 forward local labels. +- +- Local symbol names are only a notation device. They are immediately +-transformed into more conventional symbol names before the assembler +-uses them. The symbol names stored in the symbol table, appearing in +-error messages and optionally emitted to the object file have these +-parts: +- +-`L' +- All local labels begin with `L'. Normally both `as' and `ld' +- forget symbols that start with `L'. These labels are used for +- symbols you are never intended to see. If you use the `-L' option +- then `as' retains these symbols in the object file. If you also +- instruct `ld' to retain these symbols, you may use them in +- debugging. +- +-`DIGIT' +- If the label is written `0:' then the digit is `0'. If the label +- is written `1:' then the digit is `1'. And so on up through `9:'. +- +-`C-A' +- This unusual character is included so you do not accidentally +- invent a symbol of the same name. The character has ASCII value +- `\001'. +- +-`*ordinal number*' +- This is a serial number to keep the labels distinct. The first +- `0:' gets the number `1'; The 15th `0:' gets the number `15'; +- *etc.*. Likewise for the other labels `1:' through `9:'. +- +- For instance, the first `1:' is named `L1C-A1', the 44th `3:' is +-named `L3C-A44'. +- +- +-File: as.info, Node: Dot, Next: Symbol Attributes, Prev: Symbol Names, Up: Symbols +- +-The Special Dot Symbol +-====================== +- +- The special symbol `.' refers to the current address that `as' is +-assembling into. Thus, the expression `melvin: .long .' defines +-`melvin' to contain its own address. Assigning a value to `.' is +-treated the same as a `.org' directive. Thus, the expression `.=.+4' +-is the same as saying `.space 4'. +- +- +-File: as.info, Node: Symbol Attributes, Prev: Dot, Up: Symbols +- +-Symbol Attributes +-================= +- +- Every symbol has, as well as its name, the attributes "Value" and +-"Type". Depending on output format, symbols can also have auxiliary +-attributes. +- +- If you use a symbol without defining it, `as' assumes zero for all +-these attributes, and probably won't warn you. This makes the symbol +-an externally defined symbol, which is generally what you would want. +- +-* Menu: +- +-* Symbol Value:: Value +-* Symbol Type:: Type +- +- +-* a.out Symbols:: Symbol Attributes: `a.out' +- +-* COFF Symbols:: Symbol Attributes for COFF +- +-* SOM Symbols:: Symbol Attributes for SOM +- +- +-File: as.info, Node: Symbol Value, Next: Symbol Type, Up: Symbol Attributes +- +-Value +------ +- +- The value of a symbol is (usually) 32 bits. For a symbol which +-labels a location in the text, data, bss or absolute sections the value +-is the number of addresses from the start of that section to the label. +-Naturally for text, data and bss sections the value of a symbol changes +-as `ld' changes section base addresses during linking. Absolute +-symbols' values do not change during linking: that is why they are +-called absolute. +- +- The value of an undefined symbol is treated in a special way. If it +-is 0 then the symbol is not defined in this assembler source file, and +-`ld' tries to determine its value from other files linked into the same +-program. You make this kind of symbol simply by mentioning a symbol +-name without defining it. A non-zero value represents a `.comm' common +-declaration. The value is how much common storage to reserve, in bytes +-(addresses). The symbol refers to the first address of the allocated +-storage. +- +- +-File: as.info, Node: Symbol Type, Next: a.out Symbols, Prev: Symbol Value, Up: Symbol Attributes +- +-Type +----- +- +- The type attribute of a symbol contains relocation (section) +-information, any flag settings indicating that a symbol is external, and +-(optionally), other information for linkers and debuggers. The exact +-format depends on the object-code output format in use. +- +- +-File: as.info, Node: a.out Symbols, Next: COFF Symbols, Prev: Symbol Type, Up: Symbol Attributes +- +-Symbol Attributes: `a.out' +--------------------------- +- +-* Menu: +- +-* Symbol Desc:: Descriptor +-* Symbol Other:: Other +- +- +-File: as.info, Node: Symbol Desc, Next: Symbol Other, Up: a.out Symbols +- +-Descriptor +-.......... +- +- This is an arbitrary 16-bit value. You may establish a symbol's +-descriptor value by using a `.desc' statement (*note `.desc': Desc.). +-A descriptor value means nothing to `as'. +- +- +-File: as.info, Node: Symbol Other, Prev: Symbol Desc, Up: a.out Symbols +- +-Other +-..... +- +- This is an arbitrary 8-bit value. It means nothing to `as'. +- +- +-File: as.info, Node: COFF Symbols, Next: SOM Symbols, Prev: a.out Symbols, Up: Symbol Attributes +- +-Symbol Attributes for COFF +--------------------------- +- +- The COFF format supports a multitude of auxiliary symbol attributes; +-like the primary symbol attributes, they are set between `.def' and +-`.endef' directives. +- +-Primary Attributes +-.................. +- +- The symbol name is set with `.def'; the value and type, +-respectively, with `.val' and `.type'. +- +-Auxiliary Attributes +-.................... +- +- The `as' directives `.dim', `.line', `.scl', `.size', and `.tag' can +-generate auxiliary symbol table information for COFF. +- +- +-File: as.info, Node: SOM Symbols, Prev: COFF Symbols, Up: Symbol Attributes +- +-Symbol Attributes for SOM +-------------------------- +- +- The SOM format for the HPPA supports a multitude of symbol +-attributes set with the `.EXPORT' and `.IMPORT' directives. +- +- The attributes are described in `HP9000 Series 800 Assembly Language +-Reference Manual' (HP 92432-90001) under the `IMPORT' and `EXPORT' +-assembler directive documentation. +- +- +-File: as.info, Node: Expressions, Next: Pseudo Ops, Prev: Symbols, Up: Top +- +-Expressions +-*********** +- +- An "expression" specifies an address or numeric value. Whitespace +-may precede and/or follow an expression. +- +- The result of an expression must be an absolute number, or else an +-offset into a particular section. If an expression is not absolute, +-and there is not enough information when `as' sees the expression to +-know its section, a second pass over the source program might be +-necessary to interpret the expression--but the second pass is currently +-not implemented. `as' aborts with an error message in this situation. +- +-* Menu: +- +-* Empty Exprs:: Empty Expressions +-* Integer Exprs:: Integer Expressions +- +- +-File: as.info, Node: Empty Exprs, Next: Integer Exprs, Up: Expressions +- +-Empty Expressions +-================= +- +- An empty expression has no value: it is just whitespace or null. +-Wherever an absolute expression is required, you may omit the +-expression, and `as' assumes a value of (absolute) 0. This is +-compatible with other assemblers. +- +- +-File: as.info, Node: Integer Exprs, Prev: Empty Exprs, Up: Expressions +- +-Integer Expressions +-=================== +- +- An "integer expression" is one or more *arguments* delimited by +-*operators*. +- +-* Menu: +- +-* Arguments:: Arguments +-* Operators:: Operators +-* Prefix Ops:: Prefix Operators +-* Infix Ops:: Infix Operators +- +- +-File: as.info, Node: Arguments, Next: Operators, Up: Integer Exprs +- +-Arguments +---------- +- +- "Arguments" are symbols, numbers or subexpressions. In other +-contexts arguments are sometimes called "arithmetic operands". In this +-manual, to avoid confusing them with the "instruction operands" of the +-machine language, we use the term "argument" to refer to parts of +-expressions only, reserving the word "operand" to refer only to machine +-instruction operands. +- +- Symbols are evaluated to yield {SECTION NNN} where SECTION is one of +-text, data, bss, absolute, or undefined. NNN is a signed, 2's +-complement 32 bit integer. +- +- Numbers are usually integers. +- +- A number can be a flonum or bignum. In this case, you are warned +-that only the low order 32 bits are used, and `as' pretends these 32 +-bits are an integer. You may write integer-manipulating instructions +-that act on exotic constants, compatible with other assemblers. +- +- Subexpressions are a left parenthesis `(' followed by an integer +-expression, followed by a right parenthesis `)'; or a prefix operator +-followed by an argument. +- +- +-File: as.info, Node: Operators, Next: Prefix Ops, Prev: Arguments, Up: Integer Exprs +- +-Operators +---------- +- +- "Operators" are arithmetic functions, like `+' or `%'. Prefix +-operators are followed by an argument. Infix operators appear between +-their arguments. Operators may be preceded and/or followed by +-whitespace. +- +- +-File: as.info, Node: Prefix Ops, Next: Infix Ops, Prev: Operators, Up: Integer Exprs +- +-Prefix Operator +---------------- +- +- `as' has the following "prefix operators". They each take one +-argument, which must be absolute. +- +-`-' +- "Negation". Two's complement negation. +- +-`~' +- "Complementation". Bitwise not. +- +- +-File: as.info, Node: Infix Ops, Prev: Prefix Ops, Up: Integer Exprs +- +-Infix Operators +---------------- +- +- "Infix operators" take two arguments, one on either side. Operators +-have precedence, but operations with equal precedence are performed left +-to right. Apart from `+' or `-', both arguments must be absolute, and +-the result is absolute. +- +- 1. Highest Precedence +- +- `*' +- "Multiplication". +- +- `/' +- "Division". Truncation is the same as the C operator `/' +- +- `%' +- "Remainder". +- +- `<' +- `<<' +- "Shift Left". Same as the C operator `<<'. +- +- `>' +- `>>' +- "Shift Right". Same as the C operator `>>'. +- +- 2. Intermediate precedence +- +- `|' +- "Bitwise Inclusive Or". +- +- `&' +- "Bitwise And". +- +- `^' +- "Bitwise Exclusive Or". +- +- `!' +- "Bitwise Or Not". +- +- 3. Lowest Precedence +- +- `+' +- "Addition". If either argument is absolute, the result has +- the section of the other argument. You may not add together +- arguments from different sections. +- +- `-' +- "Subtraction". If the right argument is absolute, the result +- has the section of the left argument. If both arguments are +- in the same section, the result is absolute. You may not +- subtract arguments from different sections. +- +- In short, it's only meaningful to add or subtract the *offsets* in an +-address; you can only have a defined section in one of the two +-arguments. +- +- +-File: as.info, Node: Pseudo Ops, Next: Machine Dependencies, Prev: Expressions, Up: Top +- +-Assembler Directives +-******************** +- +- All assembler directives have names that begin with a period (`.'). +-The rest of the name is letters, usually in lower case. +- +- This chapter discusses directives that are available regardless of +-the target machine configuration for the GNU assembler. Some machine +-configurations provide additional directives. *Note Machine +-Dependencies::. +- +-* Menu: +- +-* Abort:: `.abort' +- +-* ABORT:: `.ABORT' +- +-* Align:: `.align ABS-EXPR , ABS-EXPR' +-* App-File:: `.app-file STRING' +-* Ascii:: `.ascii "STRING"'... +-* Asciz:: `.asciz "STRING"'... +-* Balign:: `.balign ABS-EXPR , ABS-EXPR' +-* Byte:: `.byte EXPRESSIONS' +-* Comm:: `.comm SYMBOL , LENGTH ' +-* Data:: `.data SUBSECTION' +- +-* Def:: `.def NAME' +- +-* Desc:: `.desc SYMBOL, ABS-EXPRESSION' +- +-* Dim:: `.dim' +- +-* Double:: `.double FLONUMS' +-* Eject:: `.eject' +-* Else:: `.else' +- +-* Endef:: `.endef' +- +-* Endif:: `.endif' +-* Equ:: `.equ SYMBOL, EXPRESSION' +-* Equiv:: `.equiv SYMBOL, EXPRESSION' +-* Err:: `.err' +-* Extern:: `.extern' +- +-* File:: `.file STRING' +- +-* Fill:: `.fill REPEAT , SIZE , VALUE' +-* Float:: `.float FLONUMS' +-* Global:: `.global SYMBOL', `.globl SYMBOL' +-* hword:: `.hword EXPRESSIONS' +-* Ident:: `.ident' +-* If:: `.if ABSOLUTE EXPRESSION' +-* Include:: `.include "FILE"' +-* Int:: `.int EXPRESSIONS' +-* Irp:: `.irp SYMBOL,VALUES'... +-* Irpc:: `.irpc SYMBOL,VALUES'... +-* Lcomm:: `.lcomm SYMBOL , LENGTH' +-* Lflags:: `.lflags' +- +-* Line:: `.line LINE-NUMBER' +- +-* Ln:: `.ln LINE-NUMBER' +-* Linkonce:: `.linkonce [TYPE]' +-* List:: `.list' +-* Long:: `.long EXPRESSIONS' +- +-* Macro:: `.macro NAME ARGS'... +-* MRI:: `.mri VAL' +- +-* Nolist:: `.nolist' +-* Octa:: `.octa BIGNUMS' +-* Org:: `.org NEW-LC , FILL' +-* P2align:: `.p2align ABS-EXPR , ABS-EXPR' +-* Psize:: `.psize LINES, COLUMNS' +-* Quad:: `.quad BIGNUMS' +-* Rept:: `.rept COUNT' +-* Sbttl:: `.sbttl "SUBHEADING"' +- +-* Scl:: `.scl CLASS' +-* Section:: `.section NAME, SUBSECTION' +- +-* Set:: `.set SYMBOL, EXPRESSION' +-* Short:: `.short EXPRESSIONS' +-* Single:: `.single FLONUMS' +- +-* Size:: `.size' +- +-* Skip:: `.skip SIZE , FILL' +-* Sleb128:: `.sleb128 EXPRESSIONS' +-* Space:: `.space SIZE , FILL' +- +-* Stab:: `.stabd, .stabn, .stabs' +- +-* String:: `.string "STR"' +- +-* Symver:: `.symver NAME,NAME2@NODENAME' +- +-* Tag:: `.tag STRUCTNAME' +- +-* Text:: `.text SUBSECTION' +-* Title:: `.title "HEADING"' +- +-* Type:: `.type INT' +-* Val:: `.val ADDR' +- +-* Uleb128:: `.uleb128 EXPRESSIONS' +-* Word:: `.word EXPRESSIONS' +-* Deprecated:: Deprecated Directives +- +- +-File: as.info, Node: Abort, Next: ABORT, Up: Pseudo Ops +- +-`.abort' +-======== +- +- This directive stops the assembly immediately. It is for +-compatibility with other assemblers. The original idea was that the +-assembly language source would be piped into the assembler. If the +-sender of the source quit, it could use this directive tells `as' to +-quit also. One day `.abort' will not be supported. +- +- +-File: as.info, Node: ABORT, Next: Align, Prev: Abort, Up: Pseudo Ops +- +-`.ABORT' +-======== +- +- When producing COFF output, `as' accepts this directive as a synonym +-for `.abort'. +- +- When producing `b.out' output, `as' accepts this directive, but +-ignores it. +- +- +-File: as.info, Node: Align, Next: App-File, Prev: ABORT, Up: Pseudo Ops +- +-`.align ABS-EXPR, ABS-EXPR, ABS-EXPR' +-===================================== +- +- Pad the location counter (in the current subsection) to a particular +-storage boundary. The first expression (which must be absolute) is the +-alignment required, as described below. +- +- The second expression (also absolute) gives the fill value to be +-stored in the padding bytes. It (and the comma) may be omitted. If it +-is omitted, the padding bytes are normally zero. However, on some +-systems, if the section is marked as containing code and the fill value +-is omitted, the space is filled with no-op instructions. +- +- The third expression is also absolute, and is also optional. If it +-is present, it is the maximum number of bytes that should be skipped by +-this alignment directive. If doing the alignment would require +-skipping more bytes than the specified maximum, then the alignment is +-not done at all. You can omit the fill value (the second argument) +-entirely by simply using two commas after the required alignment; this +-can be useful if you want the alignment to be filled with no-op +-instructions when appropriate. +- +- The way the required alignment is specified varies from system to +-system. For the a29k, hppa, m68k, m88k, w65, sparc, and Hitachi SH, +-and i386 using ELF format, the first expression is the alignment +-request in bytes. For example `.align 8' advances the location counter +-until it is a multiple of 8. If the location counter is already a +-multiple of 8, no change is needed. +- +- For other systems, including the i386 using a.out format, it is the +-number of low-order zero bits the location counter must have after +-advancement. For example `.align 3' advances the location counter +-until it a multiple of 8. If the location counter is already a +-multiple of 8, no change is needed. +- +- This inconsistency is due to the different behaviors of the various +-native assemblers for these systems which GAS must emulate. GAS also +-provides `.balign' and `.p2align' directives, described later, which +-have a consistent behavior across all architectures (but are specific +-to GAS). +- +- +-File: as.info, Node: App-File, Next: Ascii, Prev: Align, Up: Pseudo Ops +- +-`.app-file STRING' +-================== +- +- `.app-file' (which may also be spelled `.file') tells `as' that we +-are about to start a new logical file. STRING is the new file name. +-In general, the filename is recognized whether or not it is surrounded +-by quotes `"'; but if you wish to specify an empty file name is +-permitted, you must give the quotes-`""'. This statement may go away in +-future: it is only recognized to be compatible with old `as' programs. +- +- +-File: as.info, Node: Ascii, Next: Asciz, Prev: App-File, Up: Pseudo Ops +- +-`.ascii "STRING"'... +-==================== +- +- `.ascii' expects zero or more string literals (*note Strings::.) +-separated by commas. It assembles each string (with no automatic +-trailing zero byte) into consecutive addresses. +- +- +-File: as.info, Node: Asciz, Next: Balign, Prev: Ascii, Up: Pseudo Ops +- +-`.asciz "STRING"'... +-==================== +- +- `.asciz' is just like `.ascii', but each string is followed by a +-zero byte. The "z" in `.asciz' stands for "zero". +- +- +-File: as.info, Node: Balign, Next: Byte, Prev: Asciz, Up: Pseudo Ops +- +-`.balign[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR' +-========================================== +- +- Pad the location counter (in the current subsection) to a particular +-storage boundary. The first expression (which must be absolute) is the +-alignment request in bytes. For example `.balign 8' advances the +-location counter until it is a multiple of 8. If the location counter +-is already a multiple of 8, no change is needed. +- +- The second expression (also absolute) gives the fill value to be +-stored in the padding bytes. It (and the comma) may be omitted. If it +-is omitted, the padding bytes are normally zero. However, on some +-systems, if the section is marked as containing code and the fill value +-is omitted, the space is filled with no-op instructions. +- +- The third expression is also absolute, and is also optional. If it +-is present, it is the maximum number of bytes that should be skipped by +-this alignment directive. If doing the alignment would require +-skipping more bytes than the specified maximum, then the alignment is +-not done at all. You can omit the fill value (the second argument) +-entirely by simply using two commas after the required alignment; this +-can be useful if you want the alignment to be filled with no-op +-instructions when appropriate. +- +- The `.balignw' and `.balignl' directives are variants of the +-`.balign' directive. The `.balignw' directive treats the fill pattern +-as a two byte word value. The `.balignl' directives treats the fill +-pattern as a four byte longword value. For example, `.balignw +-4,0x368d' will align to a multiple of 4. If it skips two bytes, they +-will be filled in with the value 0x368d (the exact placement of the +-bytes depends upon the endianness of the processor). If it skips 1 or +-3 bytes, the fill value is undefined. +- +- +-File: as.info, Node: Byte, Next: Comm, Prev: Balign, Up: Pseudo Ops +- +-`.byte EXPRESSIONS' +-=================== +- +- `.byte' expects zero or more expressions, separated by commas. Each +-expression is assembled into the next byte. +- +- +-File: as.info, Node: Comm, Next: Data, Prev: Byte, Up: Pseudo Ops +- +-`.comm SYMBOL , LENGTH ' +-======================== +- +- `.comm' declares a common symbol named SYMBOL. When linking, a +-common symbol in one object file may be merged with a defined or common +-symbol of the same name in another object file. If `ld' does not see a +-definition for the symbol-just one or more common symbols-then it will +-allocate LENGTH bytes of uninitialized memory. LENGTH must be an +-absolute expression. If `ld' sees multiple common symbols with the +-same name, and they do not all have the same size, it will allocate +-space using the largest size. +- +- When using ELF, the `.comm' directive takes an optional third +-argument. This is the desired alignment of the symbol, specified as a +-byte boundary (for example, an alignment of 16 means that the least +-significant 4 bits of the address should be zero). The alignment must +-be an absolute expression, and it must be a power of two. If `ld' +-allocates uninitialized memory for the common symbol, it will use the +-alignment when placing the symbol. If no alignment is specified, `as' +-will set the alignment to the largest power of two less than or equal +-to the size of the symbol, up to a maximum of 16. +- +- The syntax for `.comm' differs slightly on the HPPA. The syntax is +-`SYMBOL .comm, LENGTH'; SYMBOL is optional. +- +- +-File: as.info, Node: Data, Next: Def, Prev: Comm, Up: Pseudo Ops +- +-`.data SUBSECTION' +-================== +- +- `.data' tells `as' to assemble the following statements onto the end +-of the data subsection numbered SUBSECTION (which is an absolute +-expression). If SUBSECTION is omitted, it defaults to zero. +- +- +-File: as.info, Node: Def, Next: Desc, Prev: Data, Up: Pseudo Ops +- +-`.def NAME' +-=========== +- +- Begin defining debugging information for a symbol NAME; the +-definition extends until the `.endef' directive is encountered. +- +- This directive is only observed when `as' is configured for COFF +-format output; when producing `b.out', `.def' is recognized, but +-ignored. +- +- +-File: as.info, Node: Desc, Next: Dim, Prev: Def, Up: Pseudo Ops +- +-`.desc SYMBOL, ABS-EXPRESSION' +-============================== +- +- This directive sets the descriptor of the symbol (*note Symbol +-Attributes::.) to the low 16 bits of an absolute expression. +- +- The `.desc' directive is not available when `as' is configured for +-COFF output; it is only for `a.out' or `b.out' object format. For the +-sake of compatibility, `as' accepts it, but produces no output, when +-configured for COFF. +- +- +-File: as.info, Node: Dim, Next: Double, Prev: Desc, Up: Pseudo Ops +- +-`.dim' +-====== +- +- This directive is generated by compilers to include auxiliary +-debugging information in the symbol table. It is only permitted inside +-`.def'/`.endef' pairs. +- +- `.dim' is only meaningful when generating COFF format output; when +-`as' is generating `b.out', it accepts this directive but ignores it. +- +- +-File: as.info, Node: Double, Next: Eject, Prev: Dim, Up: Pseudo Ops +- +-`.double FLONUMS' +-================= +- +- `.double' expects zero or more flonums, separated by commas. It +-assembles floating point numbers. The exact kind of floating point +-numbers emitted depends on how `as' is configured. *Note Machine +-Dependencies::. +- +- +-File: as.info, Node: Eject, Next: Else, Prev: Double, Up: Pseudo Ops +- +-`.eject' +-======== +- +- Force a page break at this point, when generating assembly listings. +- +- +-File: as.info, Node: Else, Next: Endef, Prev: Eject, Up: Pseudo Ops +- +-`.else' +-======= +- +- `.else' is part of the `as' support for conditional assembly; *note +-`.if': If.. It marks the beginning of a section of code to be +-assembled if the condition for the preceding `.if' was false. +- +- +-File: as.info, Node: Endef, Next: Endif, Prev: Else, Up: Pseudo Ops +- +-`.endef' +-======== +- +- This directive flags the end of a symbol definition begun with +-`.def'. +- +- `.endef' is only meaningful when generating COFF format output; if +-`as' is configured to generate `b.out', it accepts this directive but +-ignores it. +- +- +-File: as.info, Node: Endif, Next: Equ, Prev: Endef, Up: Pseudo Ops +- +-`.endif' +-======== +- +- `.endif' is part of the `as' support for conditional assembly; it +-marks the end of a block of code that is only assembled conditionally. +-*Note `.if': If. +- +- +-File: as.info, Node: Equ, Next: Equiv, Prev: Endif, Up: Pseudo Ops +- +-`.equ SYMBOL, EXPRESSION' +-========================= +- +- This directive sets the value of SYMBOL to EXPRESSION. It is +-synonymous with `.set'; *note `.set': Set.. +- +- The syntax for `equ' on the HPPA is `SYMBOL .equ EXPRESSION'. +- +- +-File: as.info, Node: Equiv, Next: Err, Prev: Equ, Up: Pseudo Ops +- +-`.equiv SYMBOL, EXPRESSION' +-=========================== +- +- The `.equiv' directive is like `.equ' and `.set', except that the +-assembler will signal an error if SYMBOL is already defined. +- +- Except for the contents of the error message, this is roughly +-equivalent to +- .ifdef SYM +- .err +- .endif +- .equ SYM,VAL +- +- +-File: as.info, Node: Err, Next: Extern, Prev: Equiv, Up: Pseudo Ops +- +-`.err' +-====== +- +- If `as' assembles a `.err' directive, it will print an error message +-and, unless the `-Z' option was used, it will not generate an object +-file. This can be used to signal error an conditionally compiled code. +- +- +-File: as.info, Node: Extern, Next: File, Prev: Err, Up: Pseudo Ops +- +-`.extern' +-========= +- +- `.extern' is accepted in the source program--for compatibility with +-other assemblers--but it is ignored. `as' treats all undefined symbols +-as external. +- +- +-File: as.info, Node: File, Next: Fill, Prev: Extern, Up: Pseudo Ops +- +-`.file STRING' +-============== +- +- `.file' (which may also be spelled `.app-file') tells `as' that we +-are about to start a new logical file. STRING is the new file name. +-In general, the filename is recognized whether or not it is surrounded +-by quotes `"'; but if you wish to specify an empty file name, you must +-give the quotes-`""'. This statement may go away in future: it is only +-recognized to be compatible with old `as' programs. In some +-configurations of `as', `.file' has already been removed to avoid +-conflicts with other assemblers. *Note Machine Dependencies::. +- +- +-File: as.info, Node: Fill, Next: Float, Prev: File, Up: Pseudo Ops +- +-`.fill REPEAT , SIZE , VALUE' +-============================= +- +- RESULT, SIZE and VALUE are absolute expressions. This emits REPEAT +-copies of SIZE bytes. REPEAT may be zero or more. SIZE may be zero or +-more, but if it is more than 8, then it is deemed to have the value 8, +-compatible with other people's assemblers. The contents of each REPEAT +-bytes is taken from an 8-byte number. The highest order 4 bytes are +-zero. The lowest order 4 bytes are VALUE rendered in the byte-order of +-an integer on the computer `as' is assembling for. Each SIZE bytes in +-a repetition is taken from the lowest order SIZE bytes of this number. +-Again, this bizarre behavior is compatible with other people's +-assemblers. +- +- SIZE and VALUE are optional. If the second comma and VALUE are +-absent, VALUE is assumed zero. If the first comma and following tokens +-are absent, SIZE is assumed to be 1. +- +- +-File: as.info, Node: Float, Next: Global, Prev: Fill, Up: Pseudo Ops +- +-`.float FLONUMS' +-================ +- +- This directive assembles zero or more flonums, separated by commas. +-It has the same effect as `.single'. The exact kind of floating point +-numbers emitted depends on how `as' is configured. *Note Machine +-Dependencies::. +- +- +-File: as.info, Node: Global, Next: hword, Prev: Float, Up: Pseudo Ops +- +-`.global SYMBOL', `.globl SYMBOL' +-================================= +- +- `.global' makes the symbol visible to `ld'. If you define SYMBOL in +-your partial program, its value is made available to other partial +-programs that are linked with it. Otherwise, SYMBOL takes its +-attributes from a symbol of the same name from another file linked into +-the same program. +- +- Both spellings (`.globl' and `.global') are accepted, for +-compatibility with other assemblers. +- +- On the HPPA, `.global' is not always enough to make it accessible to +-other partial programs. You may need the HPPA-only `.EXPORT' directive +-as well. *Note HPPA Assembler Directives: HPPA Directives. +- +- +-File: as.info, Node: hword, Next: Ident, Prev: Global, Up: Pseudo Ops +- +-`.hword EXPRESSIONS' +-==================== +- +- This expects zero or more EXPRESSIONS, and emits a 16 bit number for +-each. +- +- This directive is a synonym for `.short'; depending on the target +-architecture, it may also be a synonym for `.word'. +- +- +-File: as.info, Node: Ident, Next: If, Prev: hword, Up: Pseudo Ops +- +-`.ident' +-======== +- +- This directive is used by some assemblers to place tags in object +-files. `as' simply accepts the directive for source-file compatibility +-with such assemblers, but does not actually emit anything for it. +- +- +-File: as.info, Node: If, Next: Include, Prev: Ident, Up: Pseudo Ops +- +-`.if ABSOLUTE EXPRESSION' +-========================= +- +- `.if' marks the beginning of a section of code which is only +-considered part of the source program being assembled if the argument +-(which must be an ABSOLUTE EXPRESSION) is non-zero. The end of the +-conditional section of code must be marked by `.endif' (*note `.endif': +-Endif.); optionally, you may include code for the alternative +-condition, flagged by `.else' (*note `.else': Else.). +- +- The following variants of `.if' are also supported: +-`.ifdef SYMBOL' +- Assembles the following section of code if the specified SYMBOL +- has been defined. +- +-`.ifndef SYMBOL' +-`.ifnotdef SYMBOL' +- Assembles the following section of code if the specified SYMBOL +- has not been defined. Both spelling variants are equivalent. +- +- +-File: as.info, Node: Include, Next: Int, Prev: If, Up: Pseudo Ops +- +-`.include "FILE"' +-================= +- +- This directive provides a way to include supporting files at +-specified points in your source program. The code from FILE is +-assembled as if it followed the point of the `.include'; when the end +-of the included file is reached, assembly of the original file +-continues. You can control the search paths used with the `-I' +-command-line option (*note Command-Line Options: Invoking.). Quotation +-marks are required around FILE. +- +- +-File: as.info, Node: Int, Next: Irp, Prev: Include, Up: Pseudo Ops +- +-`.int EXPRESSIONS' +-================== +- +- Expect zero or more EXPRESSIONS, of any section, separated by commas. +-For each expression, emit a number that, at run time, is the value of +-that expression. The byte order and bit size of the number depends on +-what kind of target the assembly is for. +- +- +-File: as.info, Node: Irp, Next: Irpc, Prev: Int, Up: Pseudo Ops +- +-`.irp SYMBOL,VALUES'... +-======================= +- +- Evaluate a sequence of statements assigning different values to +-SYMBOL. The sequence of statements starts at the `.irp' directive, and +-is terminated by an `.endr' directive. For each VALUE, SYMBOL is set +-to VALUE, and the sequence of statements is assembled. If no VALUE is +-listed, the sequence of statements is assembled once, with SYMBOL set +-to the null string. To refer to SYMBOL within the sequence of +-statements, use \SYMBOL. +- +- For example, assembling +- +- .irp param,1,2,3 +- move d\param,sp@- +- .endr +- +- is equivalent to assembling +- +- move d1,sp@- +- move d2,sp@- +- move d3,sp@- +- +- +-File: as.info, Node: Irpc, Next: Lcomm, Prev: Irp, Up: Pseudo Ops +- +-`.irpc SYMBOL,VALUES'... +-======================== +- +- Evaluate a sequence of statements assigning different values to +-SYMBOL. The sequence of statements starts at the `.irpc' directive, +-and is terminated by an `.endr' directive. For each character in VALUE, +-SYMBOL is set to the character, and the sequence of statements is +-assembled. If no VALUE is listed, the sequence of statements is +-assembled once, with SYMBOL set to the null string. To refer to SYMBOL +-within the sequence of statements, use \SYMBOL. +- +- For example, assembling +- +- .irpc param,123 +- move d\param,sp@- +- .endr +- +- is equivalent to assembling +- +- move d1,sp@- +- move d2,sp@- +- move d3,sp@- +- +- +-File: as.info, Node: Lcomm, Next: Lflags, Prev: Irpc, Up: Pseudo Ops +- +-`.lcomm SYMBOL , LENGTH' +-======================== +- +- Reserve LENGTH (an absolute expression) bytes for a local common +-denoted by SYMBOL. The section and value of SYMBOL are those of the +-new local common. The addresses are allocated in the bss section, so +-that at run-time the bytes start off zeroed. SYMBOL is not declared +-global (*note `.global': Global.), so is normally not visible to `ld'. +- +- Some targets permit a third argument to be used with `.lcomm'. This +-argument specifies the desired alignment of the symbol in the bss +-section. +- +- The syntax for `.lcomm' differs slightly on the HPPA. The syntax is +-`SYMBOL .lcomm, LENGTH'; SYMBOL is optional. +- +- +-File: as.info, Node: Lflags, Next: Line, Prev: Lcomm, Up: Pseudo Ops +- +-`.lflags' +-========= +- +- `as' accepts this directive, for compatibility with other +-assemblers, but ignores it. +- +diff -rup --new-file binutils-2.9.1/gas/doc/as.info-3 binutils-2.9.1/gas/doc/as.info-3 +--- binutils-2.9.1/gas/doc/as.info-3 Fri May 1 08:45:00 1998 ++++ binutils-2.9.1/gas/doc/as.info-3 Wed Dec 31 17:00:00 1969 +@@ -1,1589 +0,0 @@ +-This is Info file as.info, produced by Makeinfo version 1.68 from the +-input file as.texinfo. +- +-START-INFO-DIR-ENTRY +-* As: (as). The GNU assembler. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU Assembler "as". +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: as.info, Node: Line, Next: Ln, Prev: Lflags, Up: Pseudo Ops +- +-`.line LINE-NUMBER' +-=================== +- +- Change the logical line number. LINE-NUMBER must be an absolute +-expression. The next line has that logical line number. Therefore any +-other statements on the current line (after a statement separator +-character) are reported as on logical line number LINE-NUMBER - 1. One +-day `as' will no longer support this directive: it is recognized only +-for compatibility with existing assembler programs. +- +- *Warning:* In the AMD29K configuration of as, this command is not +-available; use the synonym `.ln' in that context. +- +- Even though this is a directive associated with the `a.out' or +-`b.out' object-code formats, `as' still recognizes it when producing +-COFF output, and treats `.line' as though it were the COFF `.ln' *if* +-it is found outside a `.def'/`.endef' pair. +- +- Inside a `.def', `.line' is, instead, one of the directives used by +-compilers to generate auxiliary symbol information for debugging. +- +- +-File: as.info, Node: Linkonce, Next: List, Prev: Ln, Up: Pseudo Ops +- +-`.linkonce [TYPE]' +-================== +- +- Mark the current section so that the linker only includes a single +-copy of it. This may be used to include the same section in several +-different object files, but ensure that the linker will only include it +-once in the final output file. The `.linkonce' pseudo-op must be used +-for each instance of the section. Duplicate sections are detected +-based on the section name, so it should be unique. +- +- This directive is only supported by a few object file formats; as of +-this writing, the only object file format which supports it is the +-Portable Executable format used on Windows NT. +- +- The TYPE argument is optional. If specified, it must be one of the +-following strings. For example: +- .linkonce same_size +- Not all types may be supported on all object file formats. +- +-`discard' +- Silently discard duplicate sections. This is the default. +- +-`one_only' +- Warn if there are duplicate sections, but still keep only one copy. +- +-`same_size' +- Warn if any of the duplicates have different sizes. +- +-`same_contents' +- Warn if any of the duplicates do not have exactly the same +- contents. +- +- +-File: as.info, Node: Ln, Next: Linkonce, Prev: Line, Up: Pseudo Ops +- +-`.ln LINE-NUMBER' +-================= +- +- `.ln' is a synonym for `.line'. +- +- +-File: as.info, Node: MRI, Next: Nolist, Prev: Macro, Up: Pseudo Ops +- +-`.mri VAL' +-========== +- +- If VAL is non-zero, this tells `as' to enter MRI mode. If VAL is +-zero, this tells `as' to exit MRI mode. This change affects code +-assembled until the next `.mri' directive, or until the end of the +-file. *Note MRI mode: M. +- +- +-File: as.info, Node: List, Next: Long, Prev: Linkonce, Up: Pseudo Ops +- +-`.list' +-======= +- +- Control (in conjunction with the `.nolist' directive) whether or not +-assembly listings are generated. These two directives maintain an +-internal counter (which is zero initially). `.list' increments the +-counter, and `.nolist' decrements it. Assembly listings are generated +-whenever the counter is greater than zero. +- +- By default, listings are disabled. When you enable them (with the +-`-a' command line option; *note Command-Line Options: Invoking.), the +-initial value of the listing counter is one. +- +- +-File: as.info, Node: Long, Next: Macro, Prev: List, Up: Pseudo Ops +- +-`.long EXPRESSIONS' +-=================== +- +- `.long' is the same as `.int', *note `.int': Int.. +- +- +-File: as.info, Node: Macro, Next: MRI, Prev: Long, Up: Pseudo Ops +- +-`.macro' +-======== +- +- The commands `.macro' and `.endm' allow you to define macros that +-generate assembly output. For example, this definition specifies a +-macro `sum' that puts a sequence of numbers into memory: +- +- .macro sum from=0, to=5 +- .long \from +- .if \to-\from +- sum "(\from+1)",\to +- .endif +- .endm +- +-With that definition, `SUM 0,5' is equivalent to this assembly input: +- +- .long 0 +- .long 1 +- .long 2 +- .long 3 +- .long 4 +- .long 5 +- +-`.macro MACNAME' +-`.macro MACNAME MACARGS ...' +- Begin the definition of a macro called MACNAME. If your macro +- definition requires arguments, specify their names after the macro +- name, separated by commas or spaces. You can supply a default +- value for any macro argument by following the name with `=DEFLT'. +- For example, these are all valid `.macro' statements: +- +- `.macro comm' +- Begin the definition of a macro called `comm', which takes no +- arguments. +- +- `.macro plus1 p, p1' +- `.macro plus1 p p1' +- Either statement begins the definition of a macro called +- `plus1', which takes two arguments; within the macro +- definition, write `\p' or `\p1' to evaluate the arguments. +- +- `.macro reserve_str p1=0 p2' +- Begin the definition of a macro called `reserve_str', with two +- arguments. The first argument has a default value, but not +- the second. After the definition is complete, you can call +- the macro either as `reserve_str A,B' (with `\p1' evaluating +- to A and `\p2' evaluating to B), or as `reserve_str ,B' (with +- `\p1' evaluating as the default, in this case `0', and `\p2' +- evaluating to B). +- +- When you call a macro, you can specify the argument values either +- by position, or by keyword. For example, `sum 9,17' is equivalent +- to `sum to=17, from=9'. +- +-`.endm' +- Mark the end of a macro definition. +- +-`.exitm' +- Exit early from the current macro definition. +- +-`\@' +- `as' maintains a counter of how many macros it has executed in +- this pseudo-variable; you can copy that number to your output with +- `\@', but *only within a macro definition*. +- +- +-File: as.info, Node: Nolist, Next: Octa, Prev: MRI, Up: Pseudo Ops +- +-`.nolist' +-========= +- +- Control (in conjunction with the `.list' directive) whether or not +-assembly listings are generated. These two directives maintain an +-internal counter (which is zero initially). `.list' increments the +-counter, and `.nolist' decrements it. Assembly listings are generated +-whenever the counter is greater than zero. +- +- +-File: as.info, Node: Octa, Next: Org, Prev: Nolist, Up: Pseudo Ops +- +-`.octa BIGNUMS' +-=============== +- +- This directive expects zero or more bignums, separated by commas. +-For each bignum, it emits a 16-byte integer. +- +- The term "octa" comes from contexts in which a "word" is two bytes; +-hence *octa*-word for 16 bytes. +- +- +-File: as.info, Node: Org, Next: P2align, Prev: Octa, Up: Pseudo Ops +- +-`.org NEW-LC , FILL' +-==================== +- +- Advance the location counter of the current section to NEW-LC. +-NEW-LC is either an absolute expression or an expression with the same +-section as the current subsection. That is, you can't use `.org' to +-cross sections: if NEW-LC has the wrong section, the `.org' directive +-is ignored. To be compatible with former assemblers, if the section of +-NEW-LC is absolute, `as' issues a warning, then pretends the section of +-NEW-LC is the same as the current subsection. +- +- `.org' may only increase the location counter, or leave it +-unchanged; you cannot use `.org' to move the location counter backwards. +- +- Because `as' tries to assemble programs in one pass, NEW-LC may not +-be undefined. If you really detest this restriction we eagerly await a +-chance to share your improved assembler. +- +- Beware that the origin is relative to the start of the section, not +-to the start of the subsection. This is compatible with other people's +-assemblers. +- +- When the location counter (of the current subsection) is advanced, +-the intervening bytes are filled with FILL which should be an absolute +-expression. If the comma and FILL are omitted, FILL defaults to zero. +- +- +-File: as.info, Node: P2align, Next: Psize, Prev: Org, Up: Pseudo Ops +- +-`.p2align[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR' +-=========================================== +- +- Pad the location counter (in the current subsection) to a particular +-storage boundary. The first expression (which must be absolute) is the +-number of low-order zero bits the location counter must have after +-advancement. For example `.p2align 3' advances the location counter +-until it a multiple of 8. If the location counter is already a +-multiple of 8, no change is needed. +- +- The second expression (also absolute) gives the fill value to be +-stored in the padding bytes. It (and the comma) may be omitted. If it +-is omitted, the padding bytes are normally zero. However, on some +-systems, if the section is marked as containing code and the fill value +-is omitted, the space is filled with no-op instructions. +- +- The third expression is also absolute, and is also optional. If it +-is present, it is the maximum number of bytes that should be skipped by +-this alignment directive. If doing the alignment would require +-skipping more bytes than the specified maximum, then the alignment is +-not done at all. You can omit the fill value (the second argument) +-entirely by simply using two commas after the required alignment; this +-can be useful if you want the alignment to be filled with no-op +-instructions when appropriate. +- +- The `.p2alignw' and `.p2alignl' directives are variants of the +-`.p2align' directive. The `.p2alignw' directive treats the fill +-pattern as a two byte word value. The `.p2alignl' directives treats the +-fill pattern as a four byte longword value. For example, `.p2alignw +-2,0x368d' will align to a multiple of 4. If it skips two bytes, they +-will be filled in with the value 0x368d (the exact placement of the +-bytes depends upon the endianness of the processor). If it skips 1 or +-3 bytes, the fill value is undefined. +- +- +-File: as.info, Node: Psize, Next: Quad, Prev: P2align, Up: Pseudo Ops +- +-`.psize LINES , COLUMNS' +-======================== +- +- Use this directive to declare the number of lines--and, optionally, +-the number of columns--to use for each page, when generating listings. +- +- If you do not use `.psize', listings use a default line-count of 60. +-You may omit the comma and COLUMNS specification; the default width is +-200 columns. +- +- `as' generates formfeeds whenever the specified number of lines is +-exceeded (or whenever you explicitly request one, using `.eject'). +- +- If you specify LINES as `0', no formfeeds are generated save those +-explicitly specified with `.eject'. +- +- +-File: as.info, Node: Quad, Next: Rept, Prev: Psize, Up: Pseudo Ops +- +-`.quad BIGNUMS' +-=============== +- +- `.quad' expects zero or more bignums, separated by commas. For each +-bignum, it emits an 8-byte integer. If the bignum won't fit in 8 +-bytes, it prints a warning message; and just takes the lowest order 8 +-bytes of the bignum. +- +- The term "quad" comes from contexts in which a "word" is two bytes; +-hence *quad*-word for 8 bytes. +- +- +-File: as.info, Node: Rept, Next: Sbttl, Prev: Quad, Up: Pseudo Ops +- +-`.rept COUNT' +-============= +- +- Repeat the sequence of lines between the `.rept' directive and the +-next `.endr' directive COUNT times. +- +- For example, assembling +- +- .rept 3 +- .long 0 +- .endr +- +- is equivalent to assembling +- +- .long 0 +- .long 0 +- .long 0 +- +- +-File: as.info, Node: Sbttl, Next: Scl, Prev: Rept, Up: Pseudo Ops +- +-`.sbttl "SUBHEADING"' +-===================== +- +- Use SUBHEADING as the title (third line, immediately after the title +-line) when generating assembly listings. +- +- This directive affects subsequent pages, as well as the current page +-if it appears within ten lines of the top of a page. +- +- +-File: as.info, Node: Scl, Next: Section, Prev: Sbttl, Up: Pseudo Ops +- +-`.scl CLASS' +-============ +- +- Set the storage-class value for a symbol. This directive may only be +-used inside a `.def'/`.endef' pair. Storage class may flag whether a +-symbol is static or external, or it may record further symbolic +-debugging information. +- +- The `.scl' directive is primarily associated with COFF output; when +-configured to generate `b.out' output format, `as' accepts this +-directive but ignores it. +- +- +-File: as.info, Node: Section, Next: Set, Prev: Scl, Up: Pseudo Ops +- +-`.section NAME' +-=============== +- +- Use the `.section' directive to assemble the following code into a +-section named NAME. +- +- This directive is only supported for targets that actually support +-arbitrarily named sections; on `a.out' targets, for example, it is not +-accepted, even with a standard `a.out' section name. +- +- For COFF targets, the `.section' directive is used in one of the +-following ways: +- .section NAME[, "FLAGS"] +- .section NAME[, SUBSEGMENT] +- +- If the optional argument is quoted, it is taken as flags to use for +-the section. Each flag is a single character. The following flags are +-recognized: +-`b' +- bss section (uninitialized data) +- +-`n' +- section is not loaded +- +-`w' +- writable section +- +-`d' +- data section +- +-`r' +- read-only section +- +-`x' +- executable section +- +- If no flags are specified, the default flags depend upon the section +-name. If the section name is not recognized, the default will be for +-the section to be loaded and writable. +- +- If the optional argument to the `.section' directive is not quoted, +-it is taken as a subsegment number (*note Sub-Sections::.). +- +- For ELF targets, the `.section' directive is used like this: +- .section NAME[, "FLAGS"[, @TYPE]] +- The optional FLAGS argument is a quoted string which may contain any +-combintion of the following characters: +-`a' +- section is allocatable +- +-`w' +- section is writable +- +-`x' +- section is executable +- +- The optional TYPE argument may contain one of the following +-constants: +-`@progbits' +- section contains data +- +-`@nobits' +- section does not contain data (i.e., section only occupies space) +- +- If no flags are specified, the default flags depend upon the section +-name. If the section name is not recognized, the default will be for +-the section to have none of the above flags: it will not be allocated +-in memory, nor writable, nor executable. The section will contain data. +- +- For ELF targets, the assembler supports another type of `.section' +-directive for compatibility with the Solaris assembler: +- .section "NAME"[, FLAGS...] +- Note that the section name is quoted. There may be a sequence of +-comma separated flags: +-`#alloc' +- section is allocatable +- +-`#write' +- section is writable +- +-`#execinstr' +- section is executable +- +- +-File: as.info, Node: Set, Next: Short, Prev: Section, Up: Pseudo Ops +- +-`.set SYMBOL, EXPRESSION' +-========================= +- +- Set the value of SYMBOL to EXPRESSION. This changes SYMBOL's value +-and type to conform to EXPRESSION. If SYMBOL was flagged as external, +-it remains flagged (*note Symbol Attributes::.). +- +- You may `.set' a symbol many times in the same assembly. +- +- If you `.set' a global symbol, the value stored in the object file +-is the last value stored into it. +- +- The syntax for `set' on the HPPA is `SYMBOL .set EXPRESSION'. +- +- +-File: as.info, Node: Short, Next: Single, Prev: Set, Up: Pseudo Ops +- +-`.short EXPRESSIONS' +-==================== +- +- `.short' is normally the same as `.word'. *Note `.word': Word. +- +- In some configurations, however, `.short' and `.word' generate +-numbers of different lengths; *note Machine Dependencies::.. +- +- +-File: as.info, Node: Single, Next: Size, Prev: Short, Up: Pseudo Ops +- +-`.single FLONUMS' +-================= +- +- This directive assembles zero or more flonums, separated by commas. +-It has the same effect as `.float'. The exact kind of floating point +-numbers emitted depends on how `as' is configured. *Note Machine +-Dependencies::. +- +- +-File: as.info, Node: Size, Next: Skip, Prev: Single, Up: Pseudo Ops +- +-`.size' +-======= +- +- This directive is generated by compilers to include auxiliary +-debugging information in the symbol table. It is only permitted inside +-`.def'/`.endef' pairs. +- +- `.size' is only meaningful when generating COFF format output; when +-`as' is generating `b.out', it accepts this directive but ignores it. +- +- +-File: as.info, Node: Sleb128, Next: Space, Prev: Skip, Up: Pseudo Ops +- +-`.sleb128 EXPRESSIONS' +-====================== +- +- SLEB128 stands for "signed little endian base 128." This is a +-compact, variable length representation of numbers used by the DWARF +-symbolic debugging format. *Note `.uleb128': Uleb128. +- +- +-File: as.info, Node: Skip, Next: Sleb128, Prev: Size, Up: Pseudo Ops +- +-`.skip SIZE , FILL' +-=================== +- +- This directive emits SIZE bytes, each of value FILL. Both SIZE and +-FILL are absolute expressions. If the comma and FILL are omitted, FILL +-is assumed to be zero. This is the same as `.space'. +- +- +-File: as.info, Node: Space, Next: Stab, Prev: Sleb128, Up: Pseudo Ops +- +-`.space SIZE , FILL' +-==================== +- +- This directive emits SIZE bytes, each of value FILL. Both SIZE and +-FILL are absolute expressions. If the comma and FILL are omitted, FILL +-is assumed to be zero. This is the same as `.skip'. +- +- *Warning:* `.space' has a completely different meaning for HPPA +- targets; use `.block' as a substitute. See `HP9000 Series 800 +- Assembly Language Reference Manual' (HP 92432-90001) for the +- meaning of the `.space' directive. *Note HPPA Assembler +- Directives: HPPA Directives, for a summary. +- +- On the AMD 29K, this directive is ignored; it is accepted for +-compatibility with other AMD 29K assemblers. +- +- *Warning:* In most versions of the GNU assembler, the directive +- `.space' has the effect of `.block' *Note Machine Dependencies::. +- +- +-File: as.info, Node: Stab, Next: String, Prev: Space, Up: Pseudo Ops +- +-`.stabd, .stabn, .stabs' +-======================== +- +- There are three directives that begin `.stab'. All emit symbols +-(*note Symbols::.), for use by symbolic debuggers. The symbols are not +-entered in the `as' hash table: they cannot be referenced elsewhere in +-the source file. Up to five fields are required: +- +-STRING +- This is the symbol's name. It may contain any character except +- `\000', so is more general than ordinary symbol names. Some +- debuggers used to code arbitrarily complex structures into symbol +- names using this field. +- +-TYPE +- An absolute expression. The symbol's type is set to the low 8 +- bits of this expression. Any bit pattern is permitted, but `ld' +- and debuggers choke on silly bit patterns. +- +-OTHER +- An absolute expression. The symbol's "other" attribute is set to +- the low 8 bits of this expression. +- +-DESC +- An absolute expression. The symbol's descriptor is set to the low +- 16 bits of this expression. +- +-VALUE +- An absolute expression which becomes the symbol's value. +- +- If a warning is detected while reading a `.stabd', `.stabn', or +-`.stabs' statement, the symbol has probably already been created; you +-get a half-formed symbol in your object file. This is compatible with +-earlier assemblers! +- +-`.stabd TYPE , OTHER , DESC' +- The "name" of the symbol generated is not even an empty string. +- It is a null pointer, for compatibility. Older assemblers used a +- null pointer so they didn't waste space in object files with empty +- strings. +- +- The symbol's value is set to the location counter, relocatably. +- When your program is linked, the value of this symbol is the +- address of the location counter when the `.stabd' was assembled. +- +-`.stabn TYPE , OTHER , DESC , VALUE' +- The name of the symbol is set to the empty string `""'. +- +-`.stabs STRING , TYPE , OTHER , DESC , VALUE' +- All five fields are specified. +- +- +-File: as.info, Node: String, Next: Symver, Prev: Stab, Up: Pseudo Ops +- +-`.string' "STR" +-=============== +- +- Copy the characters in STR to the object file. You may specify more +-than one string to copy, separated by commas. Unless otherwise +-specified for a particular machine, the assembler marks the end of each +-string with a 0 byte. You can use any of the escape sequences +-described in *Note Strings: Strings. +- +- +-File: as.info, Node: Symver, Next: Tag, Prev: String, Up: Pseudo Ops +- +-`.symver' +-========= +- +- Use the `.symver' directive to bind symbols to specific version nodes +-within a source file. This is only supported on ELF platforms, and is +-typically used when assembling files to be linked into a shared library. +-There are cases where it may make sense to use this in objects to be +-bound into an application itself so as to override a versioned symbol +-from a shared library. +- +- For ELF targets, the `.symver' directive is used like this: +- .symver NAME, NAME2@NODENAME +- In this case, the symbol NAME must exist and be defined within the +-file being assembled. The `.versym' directive effectively creates a +-symbol alias with the name NAME2@NODENAME, and in fact the main reason +-that we just don't try and create a regular alias is that the @ +-character isn't permitted in symbol names. The NAME2 part of the name +-is the actual name of the symbol by which it will be externally +-referenced. The name NAME itself is merely a name of convenience that +-is used so that it is possible to have definitions for multiple +-versions of a function within a single source file, and so that the +-compiler can unambiguously know which version of a function is being +-mentioned. The NODENAME portion of the alias should be the name of a +-node specified in the version script supplied to the linker when +-building a shared library. If you are attempting to override a +-versioned symbol from a shared library, then NODENAME should correspond +-to the nodename of the symbol you are trying to override. +- +- +-File: as.info, Node: Tag, Next: Text, Prev: Symver, Up: Pseudo Ops +- +-`.tag STRUCTNAME' +-================= +- +- This directive is generated by compilers to include auxiliary +-debugging information in the symbol table. It is only permitted inside +-`.def'/`.endef' pairs. Tags are used to link structure definitions in +-the symbol table with instances of those structures. +- +- `.tag' is only used when generating COFF format output; when `as' is +-generating `b.out', it accepts this directive but ignores it. +- +- +-File: as.info, Node: Text, Next: Title, Prev: Tag, Up: Pseudo Ops +- +-`.text SUBSECTION' +-================== +- +- Tells `as' to assemble the following statements onto the end of the +-text subsection numbered SUBSECTION, which is an absolute expression. +-If SUBSECTION is omitted, subsection number zero is used. +- +- +-File: as.info, Node: Title, Next: Type, Prev: Text, Up: Pseudo Ops +- +-`.title "HEADING"' +-================== +- +- Use HEADING as the title (second line, immediately after the source +-file name and pagenumber) when generating assembly listings. +- +- This directive affects subsequent pages, as well as the current page +-if it appears within ten lines of the top of a page. +- +- +-File: as.info, Node: Type, Next: Val, Prev: Title, Up: Pseudo Ops +- +-`.type INT' +-=========== +- +- This directive, permitted only within `.def'/`.endef' pairs, records +-the integer INT as the type attribute of a symbol table entry. +- +- `.type' is associated only with COFF format output; when `as' is +-configured for `b.out' output, it accepts this directive but ignores it. +- +- +-File: as.info, Node: Val, Next: Uleb128, Prev: Type, Up: Pseudo Ops +- +-`.val ADDR' +-=========== +- +- This directive, permitted only within `.def'/`.endef' pairs, records +-the address ADDR as the value attribute of a symbol table entry. +- +- `.val' is used only for COFF output; when `as' is configured for +-`b.out', it accepts this directive but ignores it. +- +- +-File: as.info, Node: Uleb128, Next: Word, Prev: Val, Up: Pseudo Ops +- +-`.uleb128 EXPRESSIONS' +-====================== +- +- ULEB128 stands for "unsigned little endian base 128." This is a +-compact, variable length representation of numbers used by the DWARF +-symbolic debugging format. *Note `.sleb128': Sleb128. +- +- +-File: as.info, Node: Word, Next: Deprecated, Prev: Uleb128, Up: Pseudo Ops +- +-`.word EXPRESSIONS' +-=================== +- +- This directive expects zero or more EXPRESSIONS, of any section, +-separated by commas. +- +- The size of the number emitted, and its byte order, depend on what +-target computer the assembly is for. +- +- *Warning: Special Treatment to support Compilers* +- +- Machines with a 32-bit address space, but that do less than 32-bit +-addressing, require the following special treatment. If the machine of +-interest to you does 32-bit addressing (or doesn't require it; *note +-Machine Dependencies::.), you can ignore this issue. +- +- In order to assemble compiler output into something that works, `as' +-occasionlly does strange things to `.word' directives. Directives of +-the form `.word sym1-sym2' are often emitted by compilers as part of +-jump tables. Therefore, when `as' assembles a directive of the form +-`.word sym1-sym2', and the difference between `sym1' and `sym2' does +-not fit in 16 bits, `as' creates a "secondary jump table", immediately +-before the next label. This secondary jump table is preceded by a +-short-jump to the first byte after the secondary table. This +-short-jump prevents the flow of control from accidentally falling into +-the new table. Inside the table is a long-jump to `sym2'. The +-original `.word' contains `sym1' minus the address of the long-jump to +-`sym2'. +- +- If there were several occurrences of `.word sym1-sym2' before the +-secondary jump table, all of them are adjusted. If there was a `.word +-sym3-sym4', that also did not fit in sixteen bits, a long-jump to +-`sym4' is included in the secondary jump table, and the `.word' +-directives are adjusted to contain `sym3' minus the address of the +-long-jump to `sym4'; and so on, for as many entries in the original +-jump table as necessary. +- +- +-File: as.info, Node: Deprecated, Prev: Word, Up: Pseudo Ops +- +-Deprecated Directives +-===================== +- +- One day these directives won't work. They are included for +-compatibility with older assemblers. +-.abort +- +-.app-file +- +-.line +- +-File: as.info, Node: Machine Dependencies, Next: Reporting Bugs, Prev: Pseudo Ops, Up: Top +- +-Machine Dependent Features +-************************** +- +- The machine instruction sets are (almost by definition) different on +-each machine where `as' runs. Floating point representations vary as +-well, and `as' often supports a few additional directives or +-command-line options for compatibility with other assemblers on a +-particular platform. Finally, some versions of `as' support special +-pseudo-instructions for branch optimization. +- +- This chapter discusses most of these differences, though it does not +-include details on any machine's instruction set. For details on that +-subject, see the hardware manufacturer's manual. +- +-* Menu: +- +- +-* AMD29K-Dependent:: AMD 29K Dependent Features +- +-* ARC-Dependent:: ARC Dependent Features +- +-* ARM-Dependent:: ARM Dependent Features +- +-* D10V-Dependent:: D10V Dependent Features +- +-* H8/300-Dependent:: Hitachi H8/300 Dependent Features +- +-* H8/500-Dependent:: Hitachi H8/500 Dependent Features +- +-* HPPA-Dependent:: HPPA Dependent Features +- +-* i386-Dependent:: Intel 80386 Dependent Features +- +-* i960-Dependent:: Intel 80960 Dependent Features +- +-* M68K-Dependent:: M680x0 Dependent Features +- +-* MIPS-Dependent:: MIPS Dependent Features +- +-* SH-Dependent:: Hitachi SH Dependent Features +- +-* Sparc-Dependent:: SPARC Dependent Features +- +-* V850-Dependent:: V850 Dependent Features +- +-* Z8000-Dependent:: Z8000 Dependent Features +- +-* Vax-Dependent:: VAX Dependent Features +- +- +-File: as.info, Node: ARC-Dependent, Next: ARM-Dependent, Prev: AMD29K-Dependent, Up: Machine Dependencies +- +-ARC Dependent Features +-====================== +- +-* Menu: +- +-* ARC-Opts:: Options +-* ARC-Float:: Floating Point +-* ARC-Directives:: Sparc Machine Directives +- +- +-File: as.info, Node: ARC-Opts, Next: ARC-Float, Up: ARC-Dependent +- +-Options +-------- +- +- The ARC chip family includes several successive levels (or other +-variants) of chip, using the same core instruction set, but including a +-few additional instructions at each level. +- +- By default, `as' assumes the core instruction set (ARC base). The +-`.cpu' pseudo-op is intended to be used to select the variant. +- +-`-mbig-endian' +-`-mlittle-endian' +- Any ARC configuration of `as' can select big-endian or +- little-endian output at run time (unlike most other GNU development +- tools, which must be configured for one or the other). Use +- `-mbig-endian' to select big-endian output, and `-mlittle-endian' +- for little-endian. +- +- +-File: as.info, Node: ARC-Float, Next: ARC-Directives, Prev: ARC-Opts, Up: ARC-Dependent +- +-Floating Point +--------------- +- +- The ARC cpu family currently does not have hardware floating point +-support. Software floating point support is provided by `GCC' and uses +-IEEE floating-point numbers. +- +- +-File: as.info, Node: ARC-Directives, Prev: ARC-Float, Up: ARC-Dependent +- +-ARC Machine Directives +----------------------- +- +- The ARC version of `as' supports the following additional machine +-directives: +- +-`.cpu' +- This must be followed by the desired cpu. The ARC is intended to +- be customizable, `.cpu' is used to select the desired variant +- [though currently there are none]. +- +- +-File: as.info, Node: AMD29K-Dependent, Next: ARC-Dependent, Up: Machine Dependencies +- +-AMD 29K Dependent Features +-========================== +- +-* Menu: +- +-* AMD29K Options:: Options +-* AMD29K Syntax:: Syntax +-* AMD29K Floating Point:: Floating Point +-* AMD29K Directives:: AMD 29K Machine Directives +-* AMD29K Opcodes:: Opcodes +- +- +-File: as.info, Node: AMD29K Options, Next: AMD29K Syntax, Up: AMD29K-Dependent +- +-Options +-------- +- +- `as' has no additional command-line options for the AMD 29K family. +- +- +-File: as.info, Node: AMD29K Syntax, Next: AMD29K Floating Point, Prev: AMD29K Options, Up: AMD29K-Dependent +- +-Syntax +------- +- +-* Menu: +- +-* AMD29K-Macros:: Macros +-* AMD29K-Chars:: Special Characters +-* AMD29K-Regs:: Register Names +- +- +-File: as.info, Node: AMD29K-Macros, Next: AMD29K-Chars, Up: AMD29K Syntax +- +-Macros +-...... +- +- The macro syntax used on the AMD 29K is like that described in the +-AMD 29K Family Macro Assembler Specification. Normal `as' macros +-should still work. +- +- +-File: as.info, Node: AMD29K-Chars, Next: AMD29K-Regs, Prev: AMD29K-Macros, Up: AMD29K Syntax +- +-Special Characters +-.................. +- +- `;' is the line comment character. +- +- The character `?' is permitted in identifiers (but may not begin an +-identifier). +- +- +-File: as.info, Node: AMD29K-Regs, Prev: AMD29K-Chars, Up: AMD29K Syntax +- +-Register Names +-.............. +- +- General-purpose registers are represented by predefined symbols of +-the form `GRNNN' (for global registers) or `LRNNN' (for local +-registers), where NNN represents a number between `0' and `127', +-written with no leading zeros. The leading letters may be in either +-upper or lower case; for example, `gr13' and `LR7' are both valid +-register names. +- +- You may also refer to general-purpose registers by specifying the +-register number as the result of an expression (prefixed with `%%' to +-flag the expression as a register number): +- %%EXPRESSION +- +---where EXPRESSION must be an absolute expression evaluating to a +-number between `0' and `255'. The range [0, 127] refers to global +-registers, and the range [128, 255] to local registers. +- +- In addition, `as' understands the following protected +-special-purpose register names for the AMD 29K family: +- +- vab chd pc0 +- ops chc pc1 +- cps rbp pc2 +- cfg tmc mmu +- cha tmr lru +- +- These unprotected special-purpose register names are also recognized: +- ipc alu fpe +- ipa bp inte +- ipb fc fps +- q cr exop +- +- +-File: as.info, Node: AMD29K Floating Point, Next: AMD29K Directives, Prev: AMD29K Syntax, Up: AMD29K-Dependent +- +-Floating Point +--------------- +- +- The AMD 29K family uses IEEE floating-point numbers. +- +- +-File: as.info, Node: AMD29K Directives, Next: AMD29K Opcodes, Prev: AMD29K Floating Point, Up: AMD29K-Dependent +- +-AMD 29K Machine Directives +--------------------------- +- +-`.block SIZE , FILL' +- This directive emits SIZE bytes, each of value FILL. Both SIZE +- and FILL are absolute expressions. If the comma and FILL are +- omitted, FILL is assumed to be zero. +- +- In other versions of the GNU assembler, this directive is called +- `.space'. +- +-`.cputype' +- This directive is ignored; it is accepted for compatibility with +- other AMD 29K assemblers. +- +-`.file' +- This directive is ignored; it is accepted for compatibility with +- other AMD 29K assemblers. +- +- *Warning:* in other versions of the GNU assembler, `.file' is +- used for the directive called `.app-file' in the AMD 29K +- support. +- +-`.line' +- This directive is ignored; it is accepted for compatibility with +- other AMD 29K assemblers. +- +-`.sect' +- This directive is ignored; it is accepted for compatibility with +- other AMD 29K assemblers. +- +-`.use SECTION NAME' +- Establishes the section and subsection for the following code; +- SECTION NAME may be one of `.text', `.data', `.data1', or `.lit'. +- With one of the first three SECTION NAME options, `.use' is +- equivalent to the machine directive SECTION NAME; the remaining +- case, `.use .lit', is the same as `.data 200'. +- +- +-File: as.info, Node: AMD29K Opcodes, Prev: AMD29K Directives, Up: AMD29K-Dependent +- +-Opcodes +-------- +- +- `as' implements all the standard AMD 29K opcodes. No additional +-pseudo-instructions are needed on this family. +- +- For information on the 29K machine instruction set, see `Am29000 +-User's Manual', Advanced Micro Devices, Inc. +- +- +-File: as.info, Node: ARM-Dependent, Next: D10V-Dependent, Prev: ARC-Dependent, Up: Machine Dependencies +- +-ARM Dependent Features +-====================== +- +-* Menu: +- +-* ARM Options:: Options +-* ARM Syntax:: Syntax +-* ARM Floating Point:: Floating Point +-* ARM Directives:: ARM Machine Directives +-* ARM Opcodes:: Opcodes +- +- +-File: as.info, Node: ARM Options, Next: ARM Syntax, Up: ARM-Dependent +- +-Options +-------- +- +-`-marm [2|250|3|6|60|600|610|620|7|7M|7D|7DM|7DI|7DMI|70|700|700I|710|710C|7100|7500|7500FE|7TDMI|8|STRONGARM|STRONGARM110]' +- This option specifies the target processor. The assembler will +- issue an error message if an attempt is made to assemble an +- instruction which will not execute on the target processor. +- +-`-marmv [2|2A|3|3M|4|4T]' +- This option specifies the target architecture. The assembler will +- issue an error message if an attempt is made to assemble an +- instruction which will not execute on the target architecture. +- +-`-mthumb' +- This option specifies that only Thumb instructions should be +- assembled. +- +-`-mall' +- This option specifies that any Arm or Thumb instruction should be +- assembled. +- +-`-mfpa [10|11]' +- This option specifies the floating point architecture in use on the +- target processor. +- +-`-mfpe-old' +- Do not allow the assemble of floating point multiple instructions. +- +-`-mno-fpu' +- Do not allow the assembly of any floating point instructions. +- +-`-mthumb-interwork' +- This option specifies that the output generated by the assembler +- should be marked as supporting interworking. +- +-`-mapcs [26|32]' +- This option specifies that the output generated by the assembler +- should be marked as supporting the indicated version of the Arm +- Procedure. Calling Standard. +- +-`-EB' +- This option specifies that the output generated by the assembler +- should be marked as being encoded for a big-endian processor. +- +-`-EL' +- This option specifies that the output generated by the assembler +- should be marked as being encoded for a little-endian processor. +- +- +-File: as.info, Node: ARM Syntax, Next: ARM Floating Point, Prev: ARM Options, Up: ARM-Dependent +- +-Syntax +------- +- +-* Menu: +- +-* ARM-Chars:: Special Characters +-* ARM-Regs:: Register Names +- +- +-File: as.info, Node: ARM-Chars, Next: ARM-Regs, Up: ARM Syntax +- +-Special Characters +-.................. +- +- `;' is the line comment character. +- +- *TODO* Explain about /data modifier on symbols. +- +- +-File: as.info, Node: ARM-Regs, Prev: ARM-Chars, Up: ARM Syntax +- +-Register Names +-.............. +- +- *TODO* Explain about ARM register naming, and the predefined names. +- +- +-File: as.info, Node: ARM Floating Point, Next: ARM Directives, Prev: ARM Syntax, Up: ARM-Dependent +- +-Floating Point +--------------- +- +- The ARM family uses IEEE floating-point numbers. +- +- +-File: as.info, Node: ARM Directives, Next: ARM Opcodes, Prev: ARM Floating Point, Up: ARM-Dependent +- +-ARM Machine Directives +----------------------- +- +-`.code [16|32]' +- This directive selects the instruction set being generated. The +- value 16 selects Thumb, with the value 32 selecting ARM. +- +-`.thumb' +- This performs the same action as .CODE 16. +- +-`.arm' +- This performs the same action as .CODE 32. +- +-`.force_thumb' +- This directive forces the selection of Thumb instructions, even if +- the target processor does not support those instructions +- +-`.thumb_func' +- This directive specifies that the following symbol is the name of a +- Thumb encoded function. This information is necessary in order to +- allow the assembler and linker to generate correct code for +- interworking between Arm and Thumb instructions and should be used +- even if interworking is not going to be performed. +- +- +-File: as.info, Node: ARM Opcodes, Prev: ARM Directives, Up: ARM-Dependent +- +-Opcodes +-------- +- +- `as' implements all the standard ARM opcodes. +- +- *TODO* Document the pseudo-ops (adr, nop) +- +- For information on the ARM or Thumb instruction sets, see `ARM +-Software Development Toolkit Reference Manual', Advanced RISC Machines +-Ltd. +- +- +-File: as.info, Node: D10V-Dependent, Next: H8/300-Dependent, Prev: ARM-Dependent, Up: Machine Dependencies +- +-D10V Dependent Features +-======================= +- +-* Menu: +- +-* D10V-Opts:: D10V Options +-* D10V-Syntax:: Syntax +-* D10V-Float:: Floating Point +-* D10V-Opcodes:: Opcodes +- +- +-File: as.info, Node: D10V-Opts, Next: D10V-Syntax, Up: D10V-Dependent +- +-D10V Options +------------- +- +- The Mitsubishi D10V version of `as' has a few machine dependent +-options. +- +-`-O' +- The D10V can often execute two sub-instructions in parallel. When +- this option is used, `as' will attempt to optimize its output by +- detecting when instructions can be executed in parallel. +- +-`--nowarnswap' +- To optimize execution performance, `as' will sometimes swap the +- order of instructions. Normally this generates a warning. When +- this option is used, no warning will be generated when +- instructions are swapped. +- +- +-File: as.info, Node: D10V-Syntax, Next: D10V-Float, Prev: D10V-Opts, Up: D10V-Dependent +- +-Syntax +------- +- +- The D10V syntax is based on the syntax in Mitsubishi's D10V +-architecture manual. The differences are detailed below. +- +-* Menu: +- +-* D10V-Size:: Size Modifiers +-* D10V-Subs:: Sub-Instructions +-* D10V-Chars:: Special Characters +-* D10V-Regs:: Register Names +-* D10V-Addressing:: Addressing Modes +-* D10V-Word:: @WORD Modifier +- +- +-File: as.info, Node: D10V-Size, Next: D10V-Subs, Up: D10V-Syntax +- +-Size Modifiers +-.............. +- +- The D10V version of `as' uses the instruction names in the D10V +-Architecture Manual. However, the names in the manual are sometimes +-ambiguous. There are instruction names that can assemble to a short or +-long form opcode. How does the assembler pick the correct form? `as' +-will always pick the smallest form if it can. When dealing with a +-symbol that is not defined yet when a line is being assembled, it will +-always use the long form. If you need to force the assembler to use +-either the short or long form of the instruction, you can append either +-`.s' (short) or `.l' (long) to it. For example, if you are writing an +-assembly program and you want to do a branch to a symbol that is +-defined later in your program, you can write `bra.s foo'. Objdump +-and GDB will always append `.s' or `.l' to instructions which have both +-short and long forms. +- +- +-File: as.info, Node: D10V-Subs, Next: D10V-Chars, Prev: D10V-Size, Up: D10V-Syntax +- +-Sub-Instructions +-................ +- +- The D10V assembler takes as input a series of instructions, either +-one-per-line, or in the special two-per-line format described in the +-next section. Some of these instructions will be short-form or +-sub-instructions. These sub-instructions can be packed into a single +-instruction. The assembler will do this automatically. It will also +-detect when it should not pack instructions. For example, when a label +-is defined, the next instruction will never be packaged with the +-previous one. Whenever a branch and link instruction is called, it +-will not be packaged with the next instruction so the return address +-will be valid. Nops are automatically inserted when necessary. +- +- If you do not want the assembler automatically making these +-decisions, you can control the packaging and execution type (parallel +-or sequential) with the special execution symbols described in the next +-section. +- +- +-File: as.info, Node: D10V-Chars, Next: D10V-Regs, Prev: D10V-Subs, Up: D10V-Syntax +- +-Special Characters +-.................. +- +- `;' and `#' are the line comment characters. Sub-instructions may +-be executed in order, in reverse-order, or in parallel. Instructions +-listed in the standard one-per-line format will be executed +-sequentially. To specify the executing order, use the following +-symbols: +-`->' +- Sequential with instruction on the left first. +- +-`<-' +- Sequential with instruction on the right first. +- +-`||' +- Parallel The D10V syntax allows either one instruction per line, +-one instruction per line with the execution symbol, or two instructions +-per line. For example +-`abs a1 -> abs r0' +- Execute these sequentially. The instruction on the right is in +- the right container and is executed second. +- +-`abs r0 <- abs a1' +- Execute these reverse-sequentially. The instruction on the right +- is in the right container, and is executed first. +- +-`ld2w r2,@r8+ || mac a0,r0,r7' +- Execute these in parallel. +- +-`ld2w r2,@r8+ ||' +-`mac a0,r0,r7' +- Two-line format. Execute these in parallel. +- +-`ld2w r2,@r8+' +-`mac a0,r0,r7' +- Two-line format. Execute these sequentially. Assembler will put +- them in the proper containers. +- +-`ld2w r2,@r8+ ->' +-`mac a0,r0,r7' +- Two-line format. Execute these sequentially. Same as above but +- second instruction will always go into right container. Since `$' +-has no special meaning, you may use it in symbol names. +- +- +-File: as.info, Node: D10V-Regs, Next: D10V-Addressing, Prev: D10V-Chars, Up: D10V-Syntax +- +-Register Names +-.............. +- +- You can use the predefined symbols `r0' through `r15' to refer to +-the D10V registers. You can also use `sp' as an alias for `r15'. The +-accumulators are `a0' and `a1'. There are special register-pair names +-that may optionally be used in opcodes that require even-numbered +-registers. Register names are not case sensitive. +- +- Register Pairs +-`r0-r1' +- +-`r2-r3' +- +-`r4-r5' +- +-`r6-r7' +- +-`r8-r9' +- +-`r10-r11' +- +-`r12-r13' +- +-`r14-r15' +- The D10V also has predefined symbols for these control registers and +-status bits: +-`psw' +- Processor Status Word +- +-`bpsw' +- Backup Processor Status Word +- +-`pc' +- Program Counter +- +-`bpc' +- Backup Program Counter +- +-`rpt_c' +- Repeat Count +- +-`rpt_s' +- Repeat Start address +- +-`rpt_e' +- Repeat End address +- +-`mod_s' +- Modulo Start address +- +-`mod_e' +- Modulo End address +- +-`iba' +- Instruction Break Address +- +-`f0' +- Flag 0 +- +-`f1' +- Flag 1 +- +-`c' +- Carry flag +- +- +-File: as.info, Node: D10V-Addressing, Next: D10V-Word, Prev: D10V-Regs, Up: D10V-Syntax +- +-Addressing Modes +-................ +- +- `as' understands the following addressing modes for the D10V. `RN' +-in the following refers to any of the numbered registers, but *not* the +-control registers. +-`RN' +- Register direct +- +-`@RN' +- Register indirect +- +-`@RN+' +- Register indirect with post-increment +- +-`@RN-' +- Register indirect with post-decrement +- +-`@-SP' +- Register indirect with pre-decrement +- +-`@(DISP, RN)' +- Register indirect with displacement +- +-`ADDR' +- PC relative address (for branch or rep). +- +-`#IMM' +- Immediate data (the `#' is optional and ignored) +- +- +-File: as.info, Node: D10V-Word, Prev: D10V-Addressing, Up: D10V-Syntax +- +-@WORD Modifier +-.............. +- +- Any symbol followed by `@word' will be replaced by the symbol's value +-shifted right by 2. This is used in situations such as loading a +-register with the address of a function (or any other code fragment). +-For example, if you want to load a register with the location of the +-function `main' then jump to that function, you could do it as follws: +- ldi r2, main@word +- jmp r2 +- +- +-File: as.info, Node: D10V-Float, Next: D10V-Opcodes, Prev: D10V-Syntax, Up: D10V-Dependent +- +-Floating Point +--------------- +- +- The D10V has no hardware floating point, but the `.float' and +-`.double' directives generates IEEE floating-point numbers for +-compatibility with other development tools. +- +- +-File: as.info, Node: D10V-Opcodes, Prev: D10V-Float, Up: D10V-Dependent +- +-Opcodes +-------- +- +- For detailed information on the D10V machine instruction set, see +-`D10V Architecture: A VLIW Microprocessor for Multimedia Applications' +-(Mitsubishi Electric Corp.). `as' implements all the standard D10V +-opcodes. The only changes are those described in the section on size +-modifiers +- +- +-File: as.info, Node: H8/300-Dependent, Next: H8/500-Dependent, Prev: D10V-Dependent, Up: Machine Dependencies +- +-H8/300 Dependent Features +-========================= +- +-* Menu: +- +-* H8/300 Options:: Options +-* H8/300 Syntax:: Syntax +-* H8/300 Floating Point:: Floating Point +-* H8/300 Directives:: H8/300 Machine Directives +-* H8/300 Opcodes:: Opcodes +- +- +-File: as.info, Node: H8/300 Options, Next: H8/300 Syntax, Up: H8/300-Dependent +- +-Options +-------- +- +- `as' has no additional command-line options for the Hitachi H8/300 +-family. +- +- +-File: as.info, Node: H8/300 Syntax, Next: H8/300 Floating Point, Prev: H8/300 Options, Up: H8/300-Dependent +- +-Syntax +------- +- +-* Menu: +- +-* H8/300-Chars:: Special Characters +-* H8/300-Regs:: Register Names +-* H8/300-Addressing:: Addressing Modes +- +- +-File: as.info, Node: H8/300-Chars, Next: H8/300-Regs, Up: H8/300 Syntax +- +-Special Characters +-.................. +- +- `;' is the line comment character. +- +- `$' can be used instead of a newline to separate statements. +-Therefore *you may not use `$' in symbol names* on the H8/300. +- +- +-File: as.info, Node: H8/300-Regs, Next: H8/300-Addressing, Prev: H8/300-Chars, Up: H8/300 Syntax +- +-Register Names +-.............. +- +- You can use predefined symbols of the form `rNh' and `rNl' to refer +-to the H8/300 registers as sixteen 8-bit general-purpose registers. N +-is a digit from `0' to `7'); for instance, both `r0h' and `r7l' are +-valid register names. +- +- You can also use the eight predefined symbols `rN' to refer to the +-H8/300 registers as 16-bit registers (you must use this form for +-addressing). +- +- On the H8/300H, you can also use the eight predefined symbols `erN' +-(`er0' ... `er7') to refer to the 32-bit general purpose registers. +- +- The two control registers are called `pc' (program counter; a 16-bit +-register, except on the H8/300H where it is 24 bits) and `ccr' +-(condition code register; an 8-bit register). `r7' is used as the +-stack pointer, and can also be called `sp'. +- +- +-File: as.info, Node: H8/300-Addressing, Prev: H8/300-Regs, Up: H8/300 Syntax +- +-Addressing Modes +-................ +- +- as understands the following addressing modes for the H8/300: +-`rN' +- Register direct +- +-`@rN' +- Register indirect +- +-`@(D, rN)' +-`@(D:16, rN)' +-`@(D:24, rN)' +- Register indirect: 16-bit or 24-bit displacement D from register +- N. (24-bit displacements are only meaningful on the H8/300H.) +- +-`@rN+' +- Register indirect with post-increment +- +-`@-rN' +- Register indirect with pre-decrement +- +-``@'AA' +-``@'AA:8' +-``@'AA:16' +-``@'AA:24' +- Absolute address `aa'. (The address size `:24' only makes sense +- on the H8/300H.) +- +-`#XX' +-`#XX:8' +-`#XX:16' +-`#XX:32' +- Immediate data XX. You may specify the `:8', `:16', or `:32' for +- clarity, if you wish; but `as' neither requires this nor uses +- it--the data size required is taken from context. +- +-``@'`@'AA' +-``@'`@'AA:8' +- Memory indirect. You may specify the `:8' for clarity, if you +- wish; but `as' neither requires this nor uses it. +- +- +-File: as.info, Node: H8/300 Floating Point, Next: H8/300 Directives, Prev: H8/300 Syntax, Up: H8/300-Dependent +- +-Floating Point +--------------- +- +- The H8/300 family has no hardware floating point, but the `.float' +-directive generates IEEE floating-point numbers for compatibility with +-other development tools. +- +- +-File: as.info, Node: H8/300 Directives, Next: H8/300 Opcodes, Prev: H8/300 Floating Point, Up: H8/300-Dependent +- +-H8/300 Machine Directives +-------------------------- +- +- `as' has only one machine-dependent directive for the H8/300: +- +-`.h8300h' +- Recognize and emit additional instructions for the H8/300H +- variant, and also make `.int' emit 32-bit numbers rather than the +- usual (16-bit) for the H8/300 family. +- +- On the H8/300 family (including the H8/300H) `.word' directives +-generate 16-bit numbers. +- +diff -rup --new-file binutils-2.9.1/gas/doc/as.info-4 binutils-2.9.1/gas/doc/as.info-4 +--- binutils-2.9.1/gas/doc/as.info-4 Fri May 1 08:45:00 1998 ++++ binutils-2.9.1/gas/doc/as.info-4 Wed Dec 31 17:00:00 1969 +@@ -1,1273 +0,0 @@ +-This is Info file as.info, produced by Makeinfo version 1.68 from the +-input file as.texinfo. +- +-START-INFO-DIR-ENTRY +-* As: (as). The GNU assembler. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU Assembler "as". +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: as.info, Node: H8/300 Opcodes, Prev: H8/300 Directives, Up: H8/300-Dependent +- +-Opcodes +-------- +- +- For detailed information on the H8/300 machine instruction set, see +-`H8/300 Series Programming Manual' (Hitachi ADE-602-025). For +-information specific to the H8/300H, see `H8/300H Series Programming +-Manual' (Hitachi). +- +- `as' implements all the standard H8/300 opcodes. No additional +-pseudo-instructions are needed on this family. +- +- The following table summarizes the H8/300 opcodes, and their +-arguments. Entries marked `*' are opcodes used only on the H8/300H. +- +- Legend: +- Rs source register +- Rd destination register +- abs absolute address +- imm immediate data +- disp:N N-bit displacement from a register +- pcrel:N N-bit displacement relative to program counter +- +- add.b #imm,rd * andc #imm,ccr +- add.b rs,rd band #imm,rd +- add.w rs,rd band #imm,@rd +- * add.w #imm,rd band #imm,@abs:8 +- * add.l rs,rd bra pcrel:8 +- * add.l #imm,rd * bra pcrel:16 +- adds #imm,rd bt pcrel:8 +- addx #imm,rd * bt pcrel:16 +- addx rs,rd brn pcrel:8 +- and.b #imm,rd * brn pcrel:16 +- and.b rs,rd bf pcrel:8 +- * and.w rs,rd * bf pcrel:16 +- * and.w #imm,rd bhi pcrel:8 +- * and.l #imm,rd * bhi pcrel:16 +- * and.l rs,rd bls pcrel:8 +- +- * bls pcrel:16 bld #imm,rd +- bcc pcrel:8 bld #imm,@rd +- * bcc pcrel:16 bld #imm,@abs:8 +- bhs pcrel:8 bnot #imm,rd +- * bhs pcrel:16 bnot #imm,@rd +- bcs pcrel:8 bnot #imm,@abs:8 +- * bcs pcrel:16 bnot rs,rd +- blo pcrel:8 bnot rs,@rd +- * blo pcrel:16 bnot rs,@abs:8 +- bne pcrel:8 bor #imm,rd +- * bne pcrel:16 bor #imm,@rd +- beq pcrel:8 bor #imm,@abs:8 +- * beq pcrel:16 bset #imm,rd +- bvc pcrel:8 bset #imm,@rd +- * bvc pcrel:16 bset #imm,@abs:8 +- bvs pcrel:8 bset rs,rd +- * bvs pcrel:16 bset rs,@rd +- bpl pcrel:8 bset rs,@abs:8 +- * bpl pcrel:16 bsr pcrel:8 +- bmi pcrel:8 bsr pcrel:16 +- * bmi pcrel:16 bst #imm,rd +- bge pcrel:8 bst #imm,@rd +- * bge pcrel:16 bst #imm,@abs:8 +- blt pcrel:8 btst #imm,rd +- * blt pcrel:16 btst #imm,@rd +- bgt pcrel:8 btst #imm,@abs:8 +- * bgt pcrel:16 btst rs,rd +- ble pcrel:8 btst rs,@rd +- * ble pcrel:16 btst rs,@abs:8 +- bclr #imm,rd bxor #imm,rd +- bclr #imm,@rd bxor #imm,@rd +- bclr #imm,@abs:8 bxor #imm,@abs:8 +- bclr rs,rd cmp.b #imm,rd +- bclr rs,@rd cmp.b rs,rd +- bclr rs,@abs:8 cmp.w rs,rd +- biand #imm,rd cmp.w rs,rd +- biand #imm,@rd * cmp.w #imm,rd +- biand #imm,@abs:8 * cmp.l #imm,rd +- bild #imm,rd * cmp.l rs,rd +- bild #imm,@rd daa rs +- bild #imm,@abs:8 das rs +- bior #imm,rd dec.b rs +- bior #imm,@rd * dec.w #imm,rd +- bior #imm,@abs:8 * dec.l #imm,rd +- bist #imm,rd divxu.b rs,rd +- bist #imm,@rd * divxu.w rs,rd +- bist #imm,@abs:8 * divxs.b rs,rd +- bixor #imm,rd * divxs.w rs,rd +- bixor #imm,@rd eepmov +- bixor #imm,@abs:8 * eepmovw +- +- * exts.w rd mov.w rs,@abs:16 +- * exts.l rd * mov.l #imm,rd +- * extu.w rd * mov.l rs,rd +- * extu.l rd * mov.l @rs,rd +- inc rs * mov.l @(disp:16,rs),rd +- * inc.w #imm,rd * mov.l @(disp:24,rs),rd +- * inc.l #imm,rd * mov.l @rs+,rd +- jmp @rs * mov.l @abs:16,rd +- jmp abs * mov.l @abs:24,rd +- jmp @@abs:8 * mov.l rs,@rd +- jsr @rs * mov.l rs,@(disp:16,rd) +- jsr abs * mov.l rs,@(disp:24,rd) +- jsr @@abs:8 * mov.l rs,@-rd +- ldc #imm,ccr * mov.l rs,@abs:16 +- ldc rs,ccr * mov.l rs,@abs:24 +- * ldc @abs:16,ccr movfpe @abs:16,rd +- * ldc @abs:24,ccr movtpe rs,@abs:16 +- * ldc @(disp:16,rs),ccr mulxu.b rs,rd +- * ldc @(disp:24,rs),ccr * mulxu.w rs,rd +- * ldc @rs+,ccr * mulxs.b rs,rd +- * ldc @rs,ccr * mulxs.w rs,rd +- * mov.b @(disp:24,rs),rd neg.b rs +- * mov.b rs,@(disp:24,rd) * neg.w rs +- mov.b @abs:16,rd * neg.l rs +- mov.b rs,rd nop +- mov.b @abs:8,rd not.b rs +- mov.b rs,@abs:8 * not.w rs +- mov.b rs,rd * not.l rs +- mov.b #imm,rd or.b #imm,rd +- mov.b @rs,rd or.b rs,rd +- mov.b @(disp:16,rs),rd * or.w #imm,rd +- mov.b @rs+,rd * or.w rs,rd +- mov.b @abs:8,rd * or.l #imm,rd +- mov.b rs,@rd * or.l rs,rd +- mov.b rs,@(disp:16,rd) orc #imm,ccr +- mov.b rs,@-rd pop.w rs +- mov.b rs,@abs:8 * pop.l rs +- mov.w rs,@rd push.w rs +- * mov.w @(disp:24,rs),rd * push.l rs +- * mov.w rs,@(disp:24,rd) rotl.b rs +- * mov.w @abs:24,rd * rotl.w rs +- * mov.w rs,@abs:24 * rotl.l rs +- mov.w rs,rd rotr.b rs +- mov.w #imm,rd * rotr.w rs +- mov.w @rs,rd * rotr.l rs +- mov.w @(disp:16,rs),rd rotxl.b rs +- mov.w @rs+,rd * rotxl.w rs +- mov.w @abs:16,rd * rotxl.l rs +- mov.w rs,@(disp:16,rd) rotxr.b rs +- mov.w rs,@-rd * rotxr.w rs +- +- * rotxr.l rs * stc ccr,@(disp:24,rd) +- bpt * stc ccr,@-rd +- rte * stc ccr,@abs:16 +- rts * stc ccr,@abs:24 +- shal.b rs sub.b rs,rd +- * shal.w rs sub.w rs,rd +- * shal.l rs * sub.w #imm,rd +- shar.b rs * sub.l rs,rd +- * shar.w rs * sub.l #imm,rd +- * shar.l rs subs #imm,rd +- shll.b rs subx #imm,rd +- * shll.w rs subx rs,rd +- * shll.l rs * trapa #imm +- shlr.b rs xor #imm,rd +- * shlr.w rs xor rs,rd +- * shlr.l rs * xor.w #imm,rd +- sleep * xor.w rs,rd +- stc ccr,rd * xor.l #imm,rd +- * stc ccr,@rs * xor.l rs,rd +- * stc ccr,@(disp:16,rd) xorc #imm,ccr +- +- Four H8/300 instructions (`add', `cmp', `mov', `sub') are defined +-with variants using the suffixes `.b', `.w', and `.l' to specify the +-size of a memory operand. `as' supports these suffixes, but does not +-require them; since one of the operands is always a register, `as' can +-deduce the correct size. +- +- For example, since `r0' refers to a 16-bit register, +- mov r0,@foo +-is equivalent to +- mov.w r0,@foo +- +- If you use the size suffixes, `as' issues a warning when the suffix +-and the register size do not match. +- +- +-File: as.info, Node: H8/500-Dependent, Next: HPPA-Dependent, Prev: H8/300-Dependent, Up: Machine Dependencies +- +-H8/500 Dependent Features +-========================= +- +-* Menu: +- +-* H8/500 Options:: Options +-* H8/500 Syntax:: Syntax +-* H8/500 Floating Point:: Floating Point +-* H8/500 Directives:: H8/500 Machine Directives +-* H8/500 Opcodes:: Opcodes +- +- +-File: as.info, Node: H8/500 Options, Next: H8/500 Syntax, Up: H8/500-Dependent +- +-Options +-------- +- +- `as' has no additional command-line options for the Hitachi H8/500 +-family. +- +- +-File: as.info, Node: H8/500 Syntax, Next: H8/500 Floating Point, Prev: H8/500 Options, Up: H8/500-Dependent +- +-Syntax +------- +- +-* Menu: +- +-* H8/500-Chars:: Special Characters +-* H8/500-Regs:: Register Names +-* H8/500-Addressing:: Addressing Modes +- +- +-File: as.info, Node: H8/500-Chars, Next: H8/500-Regs, Up: H8/500 Syntax +- +-Special Characters +-.................. +- +- `!' is the line comment character. +- +- `;' can be used instead of a newline to separate statements. +- +- Since `$' has no special meaning, you may use it in symbol names. +- +- +-File: as.info, Node: H8/500-Regs, Next: H8/500-Addressing, Prev: H8/500-Chars, Up: H8/500 Syntax +- +-Register Names +-.............. +- +- You can use the predefined symbols `r0', `r1', `r2', `r3', `r4', +-`r5', `r6', and `r7' to refer to the H8/500 registers. +- +- The H8/500 also has these control registers: +- +-`cp' +- code pointer +- +-`dp' +- data pointer +- +-`bp' +- base pointer +- +-`tp' +- stack top pointer +- +-`ep' +- extra pointer +- +-`sr' +- status register +- +-`ccr' +- condition code register +- +- All registers are 16 bits long. To represent 32 bit numbers, use two +-adjacent registers; for distant memory addresses, use one of the segment +-pointers (`cp' for the program counter; `dp' for `r0'-`r3'; `ep' for +-`r4' and `r5'; and `tp' for `r6' and `r7'. +- +- +-File: as.info, Node: H8/500-Addressing, Prev: H8/500-Regs, Up: H8/500 Syntax +- +-Addressing Modes +-................ +- +- as understands the following addressing modes for the H8/500: +-`RN' +- Register direct +- +-`@RN' +- Register indirect +- +-`@(d:8, RN)' +- Register indirect with 8 bit signed displacement +- +-`@(d:16, RN)' +- Register indirect with 16 bit signed displacement +- +-`@-RN' +- Register indirect with pre-decrement +- +-`@RN+' +- Register indirect with post-increment +- +-`@AA:8' +- 8 bit absolute address +- +-`@AA:16' +- 16 bit absolute address +- +-`#XX:8' +- 8 bit immediate +- +-`#XX:16' +- 16 bit immediate +- +- +-File: as.info, Node: H8/500 Floating Point, Next: H8/500 Directives, Prev: H8/500 Syntax, Up: H8/500-Dependent +- +-Floating Point +--------------- +- +- The H8/500 family has no hardware floating point, but the `.float' +-directive generates IEEE floating-point numbers for compatibility with +-other development tools. +- +- +-File: as.info, Node: H8/500 Directives, Next: H8/500 Opcodes, Prev: H8/500 Floating Point, Up: H8/500-Dependent +- +-H8/500 Machine Directives +-------------------------- +- +- `as' has no machine-dependent directives for the H8/500. However, +-on this platform the `.int' and `.word' directives generate 16-bit +-numbers. +- +- +-File: as.info, Node: H8/500 Opcodes, Prev: H8/500 Directives, Up: H8/500-Dependent +- +-Opcodes +-------- +- +- For detailed information on the H8/500 machine instruction set, see +-`H8/500 Series Programming Manual' (Hitachi M21T001). +- +- `as' implements all the standard H8/500 opcodes. No additional +-pseudo-instructions are needed on this family. +- +- The following table summarizes H8/500 opcodes and their operands: +- +- Legend: +- abs8 8-bit absolute address +- abs16 16-bit absolute address +- abs24 24-bit absolute address +- crb `ccr', `br', `ep', `dp', `tp', `dp' +- disp8 8-bit displacement +- ea `rn', `@rn', `@(d:8, rn)', `@(d:16, rn)', +- `@-rn', `@rn+', `@aa:8', `@aa:16', +- `#xx:8', `#xx:16' +- ea_mem `@rn', `@(d:8, rn)', `@(d:16, rn)', +- `@-rn', `@rn+', `@aa:8', `@aa:16' +- ea_noimm `rn', `@rn', `@(d:8, rn)', `@(d:16, rn)', +- `@-rn', `@rn+', `@aa:8', `@aa:16' +- fp r6 +- imm4 4-bit immediate data +- imm8 8-bit immediate data +- imm16 16-bit immediate data +- pcrel8 8-bit offset from program counter +- pcrel16 16-bit offset from program counter +- qim `-2', `-1', `1', `2' +- rd any register +- rs a register distinct from rd +- rlist comma-separated list of registers in parentheses; +- register ranges `rd-rs' are allowed +- sp stack pointer (`r7') +- sr status register +- sz size; `.b' or `.w'. If omitted, default `.w' +- +- ldc[.b] ea,crb bcc[.w] pcrel16 +- ldc[.w] ea,sr bcc[.b] pcrel8 +- add[:q] sz qim,ea_noimm bhs[.w] pcrel16 +- add[:g] sz ea,rd bhs[.b] pcrel8 +- adds sz ea,rd bcs[.w] pcrel16 +- addx sz ea,rd bcs[.b] pcrel8 +- and sz ea,rd blo[.w] pcrel16 +- andc[.b] imm8,crb blo[.b] pcrel8 +- andc[.w] imm16,sr bne[.w] pcrel16 +- bpt bne[.b] pcrel8 +- bra[.w] pcrel16 beq[.w] pcrel16 +- bra[.b] pcrel8 beq[.b] pcrel8 +- bt[.w] pcrel16 bvc[.w] pcrel16 +- bt[.b] pcrel8 bvc[.b] pcrel8 +- brn[.w] pcrel16 bvs[.w] pcrel16 +- brn[.b] pcrel8 bvs[.b] pcrel8 +- bf[.w] pcrel16 bpl[.w] pcrel16 +- bf[.b] pcrel8 bpl[.b] pcrel8 +- bhi[.w] pcrel16 bmi[.w] pcrel16 +- bhi[.b] pcrel8 bmi[.b] pcrel8 +- bls[.w] pcrel16 bge[.w] pcrel16 +- bls[.b] pcrel8 bge[.b] pcrel8 +- +- blt[.w] pcrel16 mov[:g][.b] imm8,ea_mem +- blt[.b] pcrel8 mov[:g][.w] imm16,ea_mem +- bgt[.w] pcrel16 movfpe[.b] ea,rd +- bgt[.b] pcrel8 movtpe[.b] rs,ea_noimm +- ble[.w] pcrel16 mulxu sz ea,rd +- ble[.b] pcrel8 neg sz ea +- bclr sz imm4,ea_noimm nop +- bclr sz rs,ea_noimm not sz ea +- bnot sz imm4,ea_noimm or sz ea,rd +- bnot sz rs,ea_noimm orc[.b] imm8,crb +- bset sz imm4,ea_noimm orc[.w] imm16,sr +- bset sz rs,ea_noimm pjmp abs24 +- bsr[.b] pcrel8 pjmp @rd +- bsr[.w] pcrel16 pjsr abs24 +- btst sz imm4,ea_noimm pjsr @rd +- btst sz rs,ea_noimm prtd imm8 +- clr sz ea prtd imm16 +- cmp[:e][.b] imm8,rd prts +- cmp[:i][.w] imm16,rd rotl sz ea +- cmp[:g].b imm8,ea_noimm rotr sz ea +- cmp[:g][.w] imm16,ea_noimm rotxl sz ea +- Cmp[:g] sz ea,rd rotxr sz ea +- dadd rs,rd rtd imm8 +- divxu sz ea,rd rtd imm16 +- dsub rs,rd rts +- exts[.b] rd scb/f rs,pcrel8 +- extu[.b] rd scb/ne rs,pcrel8 +- jmp @rd scb/eq rs,pcrel8 +- jmp @(imm8,rd) shal sz ea +- jmp @(imm16,rd) shar sz ea +- jmp abs16 shll sz ea +- jsr @rd shlr sz ea +- jsr @(imm8,rd) sleep +- jsr @(imm16,rd) stc[.b] crb,ea_noimm +- jsr abs16 stc[.w] sr,ea_noimm +- ldm @sp+,(rlist) stm (rlist),@-sp +- link fp,imm8 sub sz ea,rd +- link fp,imm16 subs sz ea,rd +- mov[:e][.b] imm8,rd subx sz ea,rd +- mov[:i][.w] imm16,rd swap[.b] rd +- mov[:l][.w] abs8,rd tas[.b] ea +- mov[:l].b abs8,rd trapa imm4 +- mov[:s][.w] rs,abs8 trap/vs +- mov[:s].b rs,abs8 tst sz ea +- mov[:f][.w] @(disp8,fp),rd unlk fp +- mov[:f][.w] rs,@(disp8,fp) xch[.w] rs,rd +- mov[:f].b @(disp8,fp),rd xor sz ea,rd +- mov[:f].b rs,@(disp8,fp) xorc.b imm8,crb +- mov[:g] sz rs,ea_mem xorc.w imm16,sr +- mov[:g] sz ea,rd +- +- +-File: as.info, Node: HPPA-Dependent, Next: i386-Dependent, Prev: H8/500-Dependent, Up: Machine Dependencies +- +-HPPA Dependent Features +-======================= +- +-* Menu: +- +-* HPPA Notes:: Notes +-* HPPA Options:: Options +-* HPPA Syntax:: Syntax +-* HPPA Floating Point:: Floating Point +-* HPPA Directives:: HPPA Machine Directives +-* HPPA Opcodes:: Opcodes +- +- +-File: as.info, Node: HPPA Notes, Next: HPPA Options, Up: HPPA-Dependent +- +-Notes +------ +- +- As a back end for GNU CC `as' has been throughly tested and should +-work extremely well. We have tested it only minimally on hand written +-assembly code and no one has tested it much on the assembly output from +-the HP compilers. +- +- The format of the debugging sections has changed since the original +-`as' port (version 1.3X) was released; therefore, you must rebuild all +-HPPA objects and libraries with the new assembler so that you can debug +-the final executable. +- +- The HPPA `as' port generates a small subset of the relocations +-available in the SOM and ELF object file formats. Additional relocation +-support will be added as it becomes necessary. +- +- +-File: as.info, Node: HPPA Options, Next: HPPA Syntax, Prev: HPPA Notes, Up: HPPA-Dependent +- +-Options +-------- +- +- `as' has no machine-dependent command-line options for the HPPA. +- +- +-File: as.info, Node: HPPA Syntax, Next: HPPA Floating Point, Prev: HPPA Options, Up: HPPA-Dependent +- +-Syntax +------- +- +- The assembler syntax closely follows the HPPA instruction set +-reference manual; assembler directives and general syntax closely +-follow the HPPA assembly language reference manual, with a few +-noteworthy differences. +- +- First, a colon may immediately follow a label definition. This is +-simply for compatibility with how most assembly language programmers +-write code. +- +- Some obscure expression parsing problems may affect hand written +-code which uses the `spop' instructions, or code which makes significant +-use of the `!' line separator. +- +- `as' is much less forgiving about missing arguments and other +-similar oversights than the HP assembler. `as' notifies you of missing +-arguments as syntax errors; this is regarded as a feature, not a bug. +- +- Finally, `as' allows you to use an external symbol without +-explicitly importing the symbol. *Warning:* in the future this will be +-an error for HPPA targets. +- +- Special characters for HPPA targets include: +- +- `;' is the line comment character. +- +- `!' can be used instead of a newline to separate statements. +- +- Since `$' has no special meaning, you may use it in symbol names. +- +- +-File: as.info, Node: HPPA Floating Point, Next: HPPA Directives, Prev: HPPA Syntax, Up: HPPA-Dependent +- +-Floating Point +--------------- +- +- The HPPA family uses IEEE floating-point numbers. +- +- +-File: as.info, Node: HPPA Directives, Next: HPPA Opcodes, Prev: HPPA Floating Point, Up: HPPA-Dependent +- +-HPPA Assembler Directives +-------------------------- +- +- `as' for the HPPA supports many additional directives for +-compatibility with the native assembler. This section describes them +-only briefly. For detailed information on HPPA-specific assembler +-directives, see `HP9000 Series 800 Assembly Language Reference Manual' +-(HP 92432-90001). +- +- `as' does *not* support the following assembler directives described +-in the HP manual: +- +- .endm .liston +- .enter .locct +- .leave .macro +- .listoff +- +- Beyond those implemented for compatibility, `as' supports one +-additional assembler directive for the HPPA: `.param'. It conveys +-register argument locations for static functions. Its syntax closely +-follows the `.export' directive. +- +- These are the additional directives in `as' for the HPPA: +- +-`.block N' +-`.blockz N' +- Reserve N bytes of storage, and initialize them to zero. +- +-`.call' +- Mark the beginning of a procedure call. Only the special case +- with *no arguments* is allowed. +- +-`.callinfo [ PARAM=VALUE, ... ] [ FLAG, ... ]' +- Specify a number of parameters and flags that define the +- environment for a procedure. +- +- PARAM may be any of `frame' (frame size), `entry_gr' (end of +- general register range), `entry_fr' (end of float register range), +- `entry_sr' (end of space register range). +- +- The values for FLAG are `calls' or `caller' (proc has +- subroutines), `no_calls' (proc does not call subroutines), +- `save_rp' (preserve return pointer), `save_sp' (proc preserves +- stack pointer), `no_unwind' (do not unwind this proc), `hpux_int' +- (proc is interrupt routine). +- +-`.code' +- Assemble into the standard section called `$TEXT$', subsection +- `$CODE$'. +- +-`.copyright "STRING"' +- In the SOM object format, insert STRING into the object code, +- marked as a copyright string. +- +-`.copyright "STRING"' +- In the ELF object format, insert STRING into the object code, +- marked as a version string. +- +-`.enter' +- Not yet supported; the assembler rejects programs containing this +- directive. +- +-`.entry' +- Mark the beginning of a procedure. +- +-`.exit' +- Mark the end of a procedure. +- +-`.export NAME [ ,TYP ] [ ,PARAM=R ]' +- Make a procedure NAME available to callers. TYP, if present, must +- be one of `absolute', `code' (ELF only, not SOM), `data', `entry', +- `data', `entry', `millicode', `plabel', `pri_prog', or `sec_prog'. +- +- PARAM, if present, provides either relocation information for the +- procedure arguments and result, or a privilege level. PARAM may be +- `argwN' (where N ranges from `0' to `3', and indicates one of four +- one-word arguments); `rtnval' (the procedure's result); or +- `priv_lev' (privilege level). For arguments or the result, R +- specifies how to relocate, and must be one of `no' (not +- relocatable), `gr' (argument is in general register), `fr' (in +- floating point register), or `fu' (upper half of float register). +- For `priv_lev', R is an integer. +- +-`.half N' +- Define a two-byte integer constant N; synonym for the portable +- `as' directive `.short'. +- +-`.import NAME [ ,TYP ]' +- Converse of `.export'; make a procedure available to call. The +- arguments use the same conventions as the first two arguments for +- `.export'. +- +-`.label NAME' +- Define NAME as a label for the current assembly location. +- +-`.leave' +- Not yet supported; the assembler rejects programs containing this +- directive. +- +-`.origin LC' +- Advance location counter to LC. Synonym for the `{No Value For +- "as"}' portable directive `.org'. +- +-`.param NAME [ ,TYP ] [ ,PARAM=R ]' +- Similar to `.export', but used for static procedures. +- +-`.proc' +- Use preceding the first statement of a procedure. +- +-`.procend' +- Use following the last statement of a procedure. +- +-`LABEL .reg EXPR' +- Synonym for `.equ'; define LABEL with the absolute expression EXPR +- as its value. +- +-`.space SECNAME [ ,PARAMS ]' +- Switch to section SECNAME, creating a new section by that name if +- necessary. You may only use PARAMS when creating a new section, +- not when switching to an existing one. SECNAME may identify a +- section by number rather than by name. +- +- If specified, the list PARAMS declares attributes of the section, +- identified by keywords. The keywords recognized are `spnum=EXP' +- (identify this section by the number EXP, an absolute expression), +- `sort=EXP' (order sections according to this sort key when linking; +- EXP is an absolute expression), `unloadable' (section contains no +- loadable data), `notdefined' (this section defined elsewhere), and +- `private' (data in this section not available to other programs). +- +-`.spnum SECNAM' +- Allocate four bytes of storage, and initialize them with the +- section number of the section named SECNAM. (You can define the +- section number with the HPPA `.space' directive.) +- +-`.string "STR"' +- Copy the characters in the string STR to the object file. *Note +- Strings: Strings, for information on escape sequences you can use +- in `as' strings. +- +- *Warning!* The HPPA version of `.string' differs from the usual +- `as' definition: it does *not* write a zero byte after copying STR. +- +-`.stringz "STR"' +- Like `.string', but appends a zero byte after copying STR to object +- file. +- +-`.subspa NAME [ ,PARAMS ]' +-`.nsubspa NAME [ ,PARAMS ]' +- Similar to `.space', but selects a subsection NAME within the +- current section. You may only specify PARAMS when you create a +- subsection (in the first instance of `.subspa' for this NAME). +- +- If specified, the list PARAMS declares attributes of the +- subsection, identified by keywords. The keywords recognized are +- `quad=EXPR' ("quadrant" for this subsection), `align=EXPR' +- (alignment for beginning of this subsection; a power of two), +- `access=EXPR' (value for "access rights" field), `sort=EXPR' +- (sorting order for this subspace in link), `code_only' (subsection +- contains only code), `unloadable' (subsection cannot be loaded +- into memory), `common' (subsection is common block), `dup_comm' +- (initialized data may have duplicate names), or `zero' (subsection +- is all zeros, do not write in object file). +- +- `.nsubspa' always creates a new subspace with the given name, even +- if one with the same name already exists. +- +-`.version "STR"' +- Write STR as version identifier in object code. +- +- +-File: as.info, Node: HPPA Opcodes, Prev: HPPA Directives, Up: HPPA-Dependent +- +-Opcodes +-------- +- +- For detailed information on the HPPA machine instruction set, see +-`PA-RISC Architecture and Instruction Set Reference Manual' (HP +-09740-90039). +- +- +-File: as.info, Node: i386-Dependent, Next: i960-Dependent, Prev: HPPA-Dependent, Up: Machine Dependencies +- +-80386 Dependent Features +-======================== +- +-* Menu: +- +-* i386-Options:: Options +-* i386-Syntax:: AT&T Syntax versus Intel Syntax +-* i386-Opcodes:: Opcode Naming +-* i386-Regs:: Register Naming +-* i386-prefixes:: Opcode Prefixes +-* i386-Memory:: Memory References +-* i386-jumps:: Handling of Jump Instructions +-* i386-Float:: Floating Point +-* i386-16bit:: Writing 16-bit Code +-* i386-Notes:: Notes +- +- +-File: as.info, Node: i386-Options, Next: i386-Syntax, Up: i386-Dependent +- +-Options +-------- +- +- The 80386 has no machine dependent options. +- +- +-File: as.info, Node: i386-Syntax, Next: i386-Opcodes, Prev: i386-Options, Up: i386-Dependent +- +-AT&T Syntax versus Intel Syntax +-------------------------------- +- +- In order to maintain compatibility with the output of `gcc', `as' +-supports AT&T System V/386 assembler syntax. This is quite different +-from Intel syntax. We mention these differences because almost all +-80386 documents used only Intel syntax. Notable differences between +-the two syntaxes are: +- +- * AT&T immediate operands are preceded by `$'; Intel immediate +- operands are undelimited (Intel `push 4' is AT&T `pushl $4'). +- AT&T register operands are preceded by `%'; Intel register operands +- are undelimited. AT&T absolute (as opposed to PC relative) +- jump/call operands are prefixed by `*'; they are undelimited in +- Intel syntax. +- +- * AT&T and Intel syntax use the opposite order for source and +- destination operands. Intel `add eax, 4' is `addl $4, %eax'. The +- `source, dest' convention is maintained for compatibility with +- previous Unix assemblers. +- +- * In AT&T syntax the size of memory operands is determined from the +- last character of the opcode name. Opcode suffixes of `b', `w', +- and `l' specify byte (8-bit), word (16-bit), and long (32-bit) +- memory references. Intel syntax accomplishes this by prefixes +- memory operands (*not* the opcodes themselves) with `byte ptr', +- `word ptr', and `dword ptr'. Thus, Intel `mov al, byte ptr FOO' +- is `movb FOO, %al' in AT&T syntax. +- +- * Immediate form long jumps and calls are `lcall/ljmp $SECTION, +- $OFFSET' in AT&T syntax; the Intel syntax is `call/jmp far +- SECTION:OFFSET'. Also, the far return instruction is `lret +- $STACK-ADJUST' in AT&T syntax; Intel syntax is `ret far +- STACK-ADJUST'. +- +- * The AT&T assembler does not provide support for multiple section +- programs. Unix style systems expect all programs to be single +- sections. +- +- +-File: as.info, Node: i386-Opcodes, Next: i386-Regs, Prev: i386-Syntax, Up: i386-Dependent +- +-Opcode Naming +-------------- +- +- Opcode names are suffixed with one character modifiers which specify +-the size of operands. The letters `b', `w', and `l' specify byte, +-word, and long operands. If no suffix is specified by an instruction +-and it contains no memory operands then `as' tries to fill in the +-missing suffix based on the destination register operand (the last one +-by convention). Thus, `mov %ax, %bx' is equivalent to `movw %ax, %bx'; +-also, `mov $1, %bx' is equivalent to `movw $1, %bx'. Note that this is +-incompatible with the AT&T Unix assembler which assumes that a missing +-opcode suffix implies long operand size. (This incompatibility does +-not affect compiler output since compilers always explicitly specify +-the opcode suffix.) +- +- Almost all opcodes have the same names in AT&T and Intel format. +-There are a few exceptions. The sign extend and zero extend +-instructions need two sizes to specify them. They need a size to +-sign/zero extend *from* and a size to zero extend *to*. This is +-accomplished by using two opcode suffixes in AT&T syntax. Base names +-for sign extend and zero extend are `movs...' and `movz...' in AT&T +-syntax (`movsx' and `movzx' in Intel syntax). The opcode suffixes are +-tacked on to this base name, the *from* suffix before the *to* suffix. +-Thus, `movsbl %al, %edx' is AT&T syntax for "move sign extend *from* +-%al *to* %edx." Possible suffixes, thus, are `bl' (from byte to long), +-`bw' (from byte to word), and `wl' (from word to long). +- +- The Intel-syntax conversion instructions +- +- * `cbw' -- sign-extend byte in `%al' to word in `%ax', +- +- * `cwde' -- sign-extend word in `%ax' to long in `%eax', +- +- * `cwd' -- sign-extend word in `%ax' to long in `%dx:%ax', +- +- * `cdq' -- sign-extend dword in `%eax' to quad in `%edx:%eax', +- +-are called `cbtw', `cwtl', `cwtd', and `cltd' in AT&T naming. `as' +-accepts either naming for these instructions. +- +- Far call/jump instructions are `lcall' and `ljmp' in AT&T syntax, +-but are `call far' and `jump far' in Intel convention. +- +- +-File: as.info, Node: i386-Regs, Next: i386-prefixes, Prev: i386-Opcodes, Up: i386-Dependent +- +-Register Naming +---------------- +- +- Register operands are always prefixes with `%'. The 80386 registers +-consist of +- +- * the 8 32-bit registers `%eax' (the accumulator), `%ebx', `%ecx', +- `%edx', `%edi', `%esi', `%ebp' (the frame pointer), and `%esp' +- (the stack pointer). +- +- * the 8 16-bit low-ends of these: `%ax', `%bx', `%cx', `%dx', `%di', +- `%si', `%bp', and `%sp'. +- +- * the 8 8-bit registers: `%ah', `%al', `%bh', `%bl', `%ch', `%cl', +- `%dh', and `%dl' (These are the high-bytes and low-bytes of `%ax', +- `%bx', `%cx', and `%dx') +- +- * the 6 section registers `%cs' (code section), `%ds' (data +- section), `%ss' (stack section), `%es', `%fs', and `%gs'. +- +- * the 3 processor control registers `%cr0', `%cr2', and `%cr3'. +- +- * the 6 debug registers `%db0', `%db1', `%db2', `%db3', `%db6', and +- `%db7'. +- +- * the 2 test registers `%tr6' and `%tr7'. +- +- * the 8 floating point register stack `%st' or equivalently +- `%st(0)', `%st(1)', `%st(2)', `%st(3)', `%st(4)', `%st(5)', +- `%st(6)', and `%st(7)'. +- +- +-File: as.info, Node: i386-prefixes, Next: i386-Memory, Prev: i386-Regs, Up: i386-Dependent +- +-Opcode Prefixes +---------------- +- +- Opcode prefixes are used to modify the following opcode. They are +-used to repeat string instructions, to provide section overrides, to +-perform bus lock operations, and to give operand and address size +-(16-bit operands are specified in an instruction by prefixing what would +-normally be 32-bit operands with a "operand size" opcode prefix). +-Opcode prefixes are usually given as single-line instructions with no +-operands, and must directly precede the instruction they act upon. For +-example, the `scas' (scan string) instruction is repeated with: +- repne +- scas +- +- Here is a list of opcode prefixes: +- +- * Section override prefixes `cs', `ds', `ss', `es', `fs', `gs'. +- These are automatically added by specifying using the +- SECTION:MEMORY-OPERAND form for memory references. +- +- * Operand/Address size prefixes `data16' and `addr16' change 32-bit +- operands/addresses into 16-bit operands/addresses. Note that +- 16-bit addressing modes (i.e. 8086 and 80286 addressing modes) are +- not supported (yet). +- +- * The bus lock prefix `lock' inhibits interrupts during execution of +- the instruction it precedes. (This is only valid with certain +- instructions; see a 80386 manual for details). +- +- * The wait for coprocessor prefix `wait' waits for the coprocessor +- to complete the current instruction. This should never be needed +- for the 80386/80387 combination. +- +- * The `rep', `repe', and `repne' prefixes are added to string +- instructions to make them repeat `%ecx' times. +- +- +-File: as.info, Node: i386-Memory, Next: i386-jumps, Prev: i386-prefixes, Up: i386-Dependent +- +-Memory References +------------------ +- +- An Intel syntax indirect memory reference of the form +- +- SECTION:[BASE + INDEX*SCALE + DISP] +- +-is translated into the AT&T syntax +- +- SECTION:DISP(BASE, INDEX, SCALE) +- +-where BASE and INDEX are the optional 32-bit base and index registers, +-DISP is the optional displacement, and SCALE, taking the values 1, 2, +-4, and 8, multiplies INDEX to calculate the address of the operand. If +-no SCALE is specified, SCALE is taken to be 1. SECTION specifies the +-optional section register for the memory operand, and may override the +-default section register (see a 80386 manual for section register +-defaults). Note that section overrides in AT&T syntax *must* have be +-preceded by a `%'. If you specify a section override which coincides +-with the default section register, `as' does *not* output any section +-register override prefixes to assemble the given instruction. Thus, +-section overrides can be specified to emphasize which section register +-is used for a given memory operand. +- +- Here are some examples of Intel and AT&T style memory references: +- +-AT&T: `-4(%ebp)', Intel: `[ebp - 4]' +- BASE is `%ebp'; DISP is `-4'. SECTION is missing, and the default +- section is used (`%ss' for addressing with `%ebp' as the base +- register). INDEX, SCALE are both missing. +- +-AT&T: `foo(,%eax,4)', Intel: `[foo + eax*4]' +- INDEX is `%eax' (scaled by a SCALE 4); DISP is `foo'. All other +- fields are missing. The section register here defaults to `%ds'. +- +-AT&T: `foo(,1)'; Intel `[foo]' +- This uses the value pointed to by `foo' as a memory operand. Note +- that BASE and INDEX are both missing, but there is only *one* `,'. +- This is a syntactic exception. +- +-AT&T: `%gs:foo'; Intel `gs:foo' +- This selects the contents of the variable `foo' with section +- register SECTION being `%gs'. +- +- Absolute (as opposed to PC relative) call and jump operands must be +-prefixed with `*'. If no `*' is specified, `as' always chooses PC +-relative addressing for jump/call labels. +- +- Any instruction that has a memory operand *must* specify its size +-(byte, word, or long) with an opcode suffix (`b', `w', or `l', +-respectively). +- +- +-File: as.info, Node: i386-jumps, Next: i386-Float, Prev: i386-Memory, Up: i386-Dependent +- +-Handling of Jump Instructions +------------------------------ +- +- Jump instructions are always optimized to use the smallest possible +-displacements. This is accomplished by using byte (8-bit) displacement +-jumps whenever the target is sufficiently close. If a byte displacement +-is insufficient a long (32-bit) displacement is used. We do not support +-word (16-bit) displacement jumps (i.e. prefixing the jump instruction +-with the `addr16' opcode prefix), since the 80386 insists upon masking +-`%eip' to 16 bits after the word displacement is added. +- +- Note that the `jcxz', `jecxz', `loop', `loopz', `loope', `loopnz' +-and `loopne' instructions only come in byte displacements, so that if +-you use these instructions (`gcc' does not use them) you may get an +-error message (and incorrect code). The AT&T 80386 assembler tries to +-get around this problem by expanding `jcxz foo' to +- +- jcxz cx_zero +- jmp cx_nonzero +- cx_zero: jmp foo +- cx_nonzero: +- +- +-File: as.info, Node: i386-Float, Next: i386-16bit, Prev: i386-jumps, Up: i386-Dependent +- +-Floating Point +--------------- +- +- All 80387 floating point types except packed BCD are supported. +-(BCD support may be added without much difficulty). These data types +-are 16-, 32-, and 64- bit integers, and single (32-bit), double +-(64-bit), and extended (80-bit) precision floating point. Each +-supported type has an opcode suffix and a constructor associated with +-it. Opcode suffixes specify operand's data types. Constructors build +-these data types into memory. +- +- * Floating point constructors are `.float' or `.single', `.double', +- and `.tfloat' for 32-, 64-, and 80-bit formats. These correspond +- to opcode suffixes `s', `l', and `t'. `t' stands for temporary +- real, and that the 80387 only supports this format via the `fldt' +- (load temporary real to stack top) and `fstpt' (store temporary +- real and pop stack) instructions. +- +- * Integer constructors are `.word', `.long' or `.int', and `.quad' +- for the 16-, 32-, and 64-bit integer formats. The corresponding +- opcode suffixes are `s' (single), `l' (long), and `q' (quad). As +- with the temporary real format the 64-bit `q' format is only +- present in the `fildq' (load quad integer to stack top) and +- `fistpq' (store quad integer and pop stack) instructions. +- +- Register to register operations do not require opcode suffixes, so +-that `fst %st, %st(1)' is equivalent to `fstl %st, %st(1)'. +- +- +-File: as.info, Node: i386-16bit, Next: i386-Notes, Prev: i386-Float, Up: i386-Dependent +- +-Writing 16-bit Code +-------------------- +- +- While GAS normally writes only "pure" 32-bit i386 code, it has +-limited support for writing code to run in real mode or in 16-bit +-protected mode code segments. To do this, insert a `.code16' directive +-before the assembly language instructions to be run in 16-bit mode. +-You can switch GAS back to writing normal 32-bit code with the +-`.code32' directive. +- +- GAS understands exactly the same assembly language syntax in 16-bit +-mode as in 32-bit mode. The function of any given instruction is +-exactly the same regardless of mode, as long as the resulting object +-code is executed in the mode for which GAS wrote it. So, for example, +-the `ret' mnemonic produces a 32-bit return instruction regardless of +-whether it is to be run in 16-bit or 32-bit mode. (If GAS is in 16-bit +-mode, it will add an operand size prefix to the instruction to force it +-to be a 32-bit return.) +- +- This means, for one thing, that you can use GNU CC to write code to +-be run in real mode or 16-bit protected mode. Just insert the statement +-`asm(".code16");' at the beginning of your C source file, and while GNU +-CC will still be generating 32-bit code, GAS will automatically add all +-the necessary size prefixes to make that code run in 16-bit mode. Of +-course, since GNU CC only writes small-model code (it doesn't know how +-to attach segment selectors to pointers like native x86 compilers do), +-any 16-bit code you write with GNU CC will essentially be limited to a +-64K address space. Also, there will be a code size and performance +-penalty due to all the extra address and operand size prefixes GAS has +-to add to the instructions. +- +- Note that placing GAS in 16-bit mode does not mean that the resulting +-code will necessarily run on a 16-bit pre-80386 processor. To write +-code that runs on such a processor, you would have to refrain from using +-*any* 32-bit constructs which require GAS to output address or operand +-size prefixes. At the moment this would be rather difficult, because +-GAS currently supports *only* 32-bit addressing modes: when writing +-16-bit code, it *always* outputs address size prefixes for any +-instruction that uses a non-register addressing mode. So you can write +-code that runs on 16-bit processors, but only if that code never +-references memory. +- +- +-File: as.info, Node: i386-Notes, Prev: i386-16bit, Up: i386-Dependent +- +-Notes +------ +- +- There is some trickery concerning the `mul' and `imul' instructions +-that deserves mention. The 16-, 32-, and 64-bit expanding multiplies +-(base opcode `0xf6'; extension 4 for `mul' and 5 for `imul') can be +-output only in the one operand form. Thus, `imul %ebx, %eax' does +-*not* select the expanding multiply; the expanding multiply would +-clobber the `%edx' register, and this would confuse `gcc' output. Use +-`imul %ebx' to get the 64-bit product in `%edx:%eax'. +- +- We have added a two operand form of `imul' when the first operand is +-an immediate mode expression and the second operand is a register. +-This is just a shorthand, so that, multiplying `%eax' by 69, for +-example, can be done with `imul $69, %eax' rather than `imul $69, %eax, +-%eax'. +- +- +-File: as.info, Node: i960-Dependent, Next: M68K-Dependent, Prev: i386-Dependent, Up: Machine Dependencies +- +-Intel 80960 Dependent Features +-============================== +- +-* Menu: +- +-* Options-i960:: i960 Command-line Options +-* Floating Point-i960:: Floating Point +-* Directives-i960:: i960 Machine Directives +-* Opcodes for i960:: i960 Opcodes +- +- +-File: as.info, Node: Options-i960, Next: Floating Point-i960, Up: i960-Dependent +- +-i960 Command-line Options +-------------------------- +- +-`-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC' +- Select the 80960 architecture. Instructions or features not +- supported by the selected architecture cause fatal errors. +- +- `-ACA' is equivalent to `-ACA_A'; `-AKC' is equivalent to `-AMC'. +- Synonyms are provided for compatibility with other tools. +- +- If you do not specify any of these options, `as' generates code +- for any instruction or feature that is supported by *some* version +- of the 960 (even if this means mixing architectures!). In +- principle, `as' attempts to deduce the minimal sufficient +- processor type if none is specified; depending on the object code +- format, the processor type may be recorded in the object file. If +- it is critical that the `as' output match a specific architecture, +- specify that architecture explicitly. +- +-`-b' +- Add code to collect information about conditional branches taken, +- for later optimization using branch prediction bits. (The +- conditional branch instructions have branch prediction bits in the +- CA, CB, and CC architectures.) If BR represents a conditional +- branch instruction, the following represents the code generated by +- the assembler when `-b' is specified: +- +- call INCREMENT ROUTINE +- .word 0 # pre-counter +- Label: BR +- call INCREMENT ROUTINE +- .word 0 # post-counter +- +- The counter following a branch records the number of times that +- branch was *not* taken; the differenc between the two counters is +- the number of times the branch *was* taken. +- +- A table of every such `Label' is also generated, so that the +- external postprocessor `gbr960' (supplied by Intel) can locate all +- the counters. This table is always labelled `__BRANCH_TABLE__'; +- this is a local symbol to permit collecting statistics for many +- separate object files. The table is word aligned, and begins with +- a two-word header. The first word, initialized to 0, is used in +- maintaining linked lists of branch tables. The second word is a +- count of the number of entries in the table, which follow +- immediately: each is a word, pointing to one of the labels +- illustrated above. +- +- +------------+------------+------------+ ... +------------+ +- | | | | | | +- | *NEXT | COUNT: N | *BRLAB 1 | | *BRLAB N | +- | | | | | | +- +------------+------------+------------+ ... +------------+ +- +- __BRANCH_TABLE__ layout +- +- The first word of the header is used to locate multiple branch +- tables, since each object file may contain one. Normally the links +- are maintained with a call to an initialization routine, placed at +- the beginning of each function in the file. The GNU C compiler +- generates these calls automatically when you give it a `-b' option. +- For further details, see the documentation of `gbr960'. +- +-`-no-relax' +- Normally, Compare-and-Branch instructions with targets that require +- displacements greater than 13 bits (or that have external targets) +- are replaced with the corresponding compare (or `chkbit') and +- branch instructions. You can use the `-no-relax' option to +- specify that `as' should generate errors instead, if the target +- displacement is larger than 13 bits. +- +- This option does not affect the Compare-and-Jump instructions; the +- code emitted for them is *always* adjusted when necessary +- (depending on displacement size), regardless of whether you use +- `-no-relax'. +- +- +-File: as.info, Node: Floating Point-i960, Next: Directives-i960, Prev: Options-i960, Up: i960-Dependent +- +-Floating Point +--------------- +- +- `as' generates IEEE floating-point numbers for the directives +-`.float', `.double', `.extended', and `.single'. +- +- +-File: as.info, Node: Directives-i960, Next: Opcodes for i960, Prev: Floating Point-i960, Up: i960-Dependent +- +-i960 Machine Directives +------------------------ +- +-`.bss SYMBOL, LENGTH, ALIGN' +- Reserve LENGTH bytes in the bss section for a local SYMBOL, +- aligned to the power of two specified by ALIGN. LENGTH and ALIGN +- must be positive absolute expressions. This directive differs +- from `.lcomm' only in that it permits you to specify an alignment. +- *Note `.lcomm': Lcomm. +- +-`.extended FLONUMS' +- `.extended' expects zero or more flonums, separated by commas; for +- each flonum, `.extended' emits an IEEE extended-format (80-bit) +- floating-point number. +- +-`.leafproc CALL-LAB, BAL-LAB' +- You can use the `.leafproc' directive in conjunction with the +- optimized `callj' instruction to enable faster calls of leaf +- procedures. If a procedure is known to call no other procedures, +- you may define an entry point that skips procedure prolog code +- (and that does not depend on system-supplied saved context), and +- declare it as the BAL-LAB using `.leafproc'. If the procedure +- also has an entry point that goes through the normal prolog, you +- can specify that entry point as CALL-LAB. +- +- A `.leafproc' declaration is meant for use in conjunction with the +- optimized call instruction `callj'; the directive records the data +- needed later to choose between converting the `callj' into a `bal' +- or a `call'. +- +- CALL-LAB is optional; if only one argument is present, or if the +- two arguments are identical, the single argument is assumed to be +- the `bal' entry point. +- +-`.sysproc NAME, INDEX' +- The `.sysproc' directive defines a name for a system procedure. +- After you define it using `.sysproc', you can use NAME to refer to +- the system procedure identified by INDEX when calling procedures +- with the optimized call instruction `callj'. +- +- Both arguments are required; INDEX must be between 0 and 31 +- (inclusive). +- +- +-File: as.info, Node: Opcodes for i960, Prev: Directives-i960, Up: i960-Dependent +- +-i960 Opcodes +------------- +- +- All Intel 960 machine instructions are supported; *note i960 +-Command-line Options: Options-i960. for a discussion of selecting the +-instruction subset for a particular 960 architecture. +- +- Some opcodes are processed beyond simply emitting a single +-corresponding instruction: `callj', and Compare-and-Branch or +-Compare-and-Jump instructions with target displacements larger than 13 +-bits. +- +-* Menu: +- +-* callj-i960:: `callj' +-* Compare-and-branch-i960:: Compare-and-Branch +- +- +-File: as.info, Node: callj-i960, Next: Compare-and-branch-i960, Up: Opcodes for i960 +- +-`callj' +-....... +- +- You can write `callj' to have the assembler or the linker determine +-the most appropriate form of subroutine call: `call', `bal', or +-`calls'. If the assembly source contains enough information--a +-`.leafproc' or `.sysproc' directive defining the operand--then `as' +-translates the `callj'; if not, it simply emits the `callj', leaving it +-for the linker to resolve. +- +diff -rup --new-file binutils-2.9.1/gas/doc/as.info-5 binutils-2.9.1/gas/doc/as.info-5 +--- binutils-2.9.1/gas/doc/as.info-5 Fri May 1 08:45:01 1998 ++++ binutils-2.9.1/gas/doc/as.info-5 Wed Dec 31 17:00:00 1969 +@@ -1,1270 +0,0 @@ +-This is Info file as.info, produced by Makeinfo version 1.68 from the +-input file as.texinfo. +- +-START-INFO-DIR-ENTRY +-* As: (as). The GNU assembler. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU Assembler "as". +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: as.info, Node: Compare-and-branch-i960, Prev: callj-i960, Up: Opcodes for i960 +- +-Compare-and-Branch +-.................. +- +- The 960 architectures provide combined Compare-and-Branch +-instructions that permit you to store the branch target in the lower 13 +-bits of the instruction word itself. However, if you specify a branch +-target far enough away that its address won't fit in 13 bits, the +-assembler can either issue an error, or convert your Compare-and-Branch +-instruction into separate instructions to do the compare and the branch. +- +- Whether `as' gives an error or expands the instruction depends on +-two choices you can make: whether you use the `-no-relax' option, and +-whether you use a "Compare and Branch" instruction or a "Compare and +-Jump" instruction. The "Jump" instructions are *always* expanded if +-necessary; the "Branch" instructions are expanded when necessary +-*unless* you specify `-no-relax'--in which case `as' gives an error +-instead. +- +- These are the Compare-and-Branch instructions, their "Jump" variants, +-and the instruction pairs they may expand into: +- +- Compare and +- Branch Jump Expanded to +- ------ ------ ------------ +- bbc chkbit; bno +- bbs chkbit; bo +- cmpibe cmpije cmpi; be +- cmpibg cmpijg cmpi; bg +- cmpibge cmpijge cmpi; bge +- cmpibl cmpijl cmpi; bl +- cmpible cmpijle cmpi; ble +- cmpibno cmpijno cmpi; bno +- cmpibne cmpijne cmpi; bne +- cmpibo cmpijo cmpi; bo +- cmpobe cmpoje cmpo; be +- cmpobg cmpojg cmpo; bg +- cmpobge cmpojge cmpo; bge +- cmpobl cmpojl cmpo; bl +- cmpoble cmpojle cmpo; ble +- cmpobne cmpojne cmpo; bne +- +- +-File: as.info, Node: M68K-Dependent, Next: MIPS-Dependent, Prev: i960-Dependent, Up: Machine Dependencies +- +-M680x0 Dependent Features +-========================= +- +-* Menu: +- +-* M68K-Opts:: M680x0 Options +-* M68K-Syntax:: Syntax +-* M68K-Moto-Syntax:: Motorola Syntax +-* M68K-Float:: Floating Point +-* M68K-Directives:: 680x0 Machine Directives +-* M68K-opcodes:: Opcodes +- +- +-File: as.info, Node: M68K-Opts, Next: M68K-Syntax, Up: M68K-Dependent +- +-M680x0 Options +--------------- +- +- The Motorola 680x0 version of `as' has a few machine dependent +-options. +- +- You can use the `-l' option to shorten the size of references to +-undefined symbols. If you do not use the `-l' option, references to +-undefined symbols are wide enough for a full `long' (32 bits). (Since +-`as' cannot know where these symbols end up, `as' can only allocate +-space for the linker to fill in later. Since `as' does not know how +-far away these symbols are, it allocates as much space as it can.) If +-you use this option, the references are only one word wide (16 bits). +-This may be useful if you want the object file to be as small as +-possible, and you know that the relevant symbols are always less than +-17 bits away. +- +- For some configurations, especially those where the compiler normally +-does not prepend an underscore to the names of user variables, the +-assembler requires a `%' before any use of a register name. This is +-intended to let the assembler distinguish between C variables and +-functions named `a0' through `a7', and so on. The `%' is always +-accepted, but is not required for certain configurations, notably +-`sun3'. The `--register-prefix-optional' option may be used to permit +-omitting the `%' even for configurations for which it is normally +-required. If this is done, it will generally be impossible to refer to +-C variables and functions with the same names as register names. +- +- Normally the character `|' is treated as a comment character, which +-means that it can not be used in expressions. The `--bitwise-or' +-option turns `|' into a normal character. In this mode, you must +-either use C style comments, or start comments with a `#' character at +-the beginning of a line. +- +- If you use an addressing mode with a base register without specifying +-the size, `as' will normally use the full 32 bit value. For example, +-the addressing mode `%a0@(%d0)' is equivalent to `%a0@(%d0:l)'. You +-may use the `--base-size-default-16' option to tell `as' to default to +-using the 16 bit value. In this case, `%a0@(%d0)' is equivalent to +-`%a0@(%d0:w)'. You may use the `--base-size-default-32' option to +-restore the default behaviour. +- +- If you use an addressing mode with a displacement, and the value of +-the displacement is not known, `as' will normally assume that the value +-is 32 bits. For example, if the symbol `disp' has not been defined, +-`as' will assemble the addressing mode `%a0@(disp,%d0)' as though +-`disp' is a 32 bit value. You may use the `--disp-size-default-16' +-option to tell `as' to instead assume that the displacement is 16 bits. +-In this case, `as' will assemble `%a0@(disp,%d0)' as though `disp' is +-a 16 bit value. You may use the `--disp-size-default-32' option to +-restore the default behaviour. +- +- `as' can assemble code for several different members of the Motorola +-680x0 family. The default depends upon how `as' was configured when it +-was built; normally, the default is to assemble code for the 68020 +-microprocessor. The following options may be used to change the +-default. These options control which instructions and addressing modes +-are permitted. The members of the 680x0 family are very similar. For +-detailed information about the differences, see the Motorola manuals. +- +-`-m68000' +-`-m68ec000' +-`-m68hc000' +-`-m68hc001' +-`-m68008' +-`-m68302' +-`-m68306' +-`-m68307' +-`-m68322' +-`-m68356' +- Assemble for the 68000. `-m68008', `-m68302', and so on are +- synonyms for `-m68000', since the chips are the same from the +- point of view of the assembler. +- +-`-m68010' +- Assemble for the 68010. +- +-`-m68020' +-`-m68ec020' +- Assemble for the 68020. This is normally the default. +- +-`-m68030' +-`-m68ec030' +- Assemble for the 68030. +- +-`-m68040' +-`-m68ec040' +- Assemble for the 68040. +- +-`-m68060' +-`-m68ec060' +- Assemble for the 68060. +- +-`-mcpu32' +-`-m68330' +-`-m68331' +-`-m68332' +-`-m68333' +-`-m68334' +-`-m68336' +-`-m68340' +-`-m68341' +-`-m68349' +-`-m68360' +- Assemble for the CPU32 family of chips. +- +-`-m5200' +- Assemble for the ColdFire family of chips. +- +-`-m68881' +-`-m68882' +- Assemble 68881 floating point instructions. This is the default +- for the 68020, 68030, and the CPU32. The 68040 and 68060 always +- support floating point instructions. +- +-`-mno-68881' +- Do not assemble 68881 floating point instructions. This is the +- default for 68000 and the 68010. The 68040 and 68060 always +- support floating point instructions, even if this option is used. +- +-`-m68851' +- Assemble 68851 MMU instructions. This is the default for the +- 68020, 68030, and 68060. The 68040 accepts a somewhat different +- set of MMU instructions; `-m68851' and `-m68040' should not be used +- together. +- +-`-mno-68851' +- Do not assemble 68851 MMU instructions. This is the default for +- the 68000, 68010, and the CPU32. The 68040 accepts a somewhat +- different set of MMU instructions. +- +- +-File: as.info, Node: M68K-Syntax, Next: M68K-Moto-Syntax, Prev: M68K-Opts, Up: M68K-Dependent +- +-Syntax +------- +- +- This syntax for the Motorola 680x0 was developed at MIT. +- +- The 680x0 version of `as' uses instructions names and syntax +-compatible with the Sun assembler. Intervening periods are ignored; +-for example, `movl' is equivalent to `mov.l'. +- +- In the following table APC stands for any of the address registers +-(`%a0' through `%a7'), the program counter (`%pc'), the zero-address +-relative to the program counter (`%zpc'), a suppressed address register +-(`%za0' through `%za7'), or it may be omitted entirely. The use of +-SIZE means one of `w' or `l', and it may be omitted, along with the +-leading colon, unless a scale is also specified. The use of SCALE +-means one of `1', `2', `4', or `8', and it may always be omitted along +-with the leading colon. +- +- The following addressing modes are understood: +-"Immediate" +- `#NUMBER' +- +-"Data Register" +- `%d0' through `%d7' +- +-"Address Register" +- `%a0' through `%a7' +- `%a7' is also known as `%sp', i.e. the Stack Pointer. `%a6' is +- also known as `%fp', the Frame Pointer. +- +-"Address Register Indirect" +- `%a0@' through `%a7@' +- +-"Address Register Postincrement" +- `%a0@+' through `%a7@+' +- +-"Address Register Predecrement" +- `%a0@-' through `%a7@-' +- +-"Indirect Plus Offset" +- `APC@(NUMBER)' +- +-"Index" +- `APC@(NUMBER,REGISTER:SIZE:SCALE)' +- +- The NUMBER may be omitted. +- +-"Postindex" +- `APC@(NUMBER)@(ONUMBER,REGISTER:SIZE:SCALE)' +- +- The ONUMBER or the REGISTER, but not both, may be omitted. +- +-"Preindex" +- `APC@(NUMBER,REGISTER:SIZE:SCALE)@(ONUMBER)' +- +- The NUMBER may be omitted. Omitting the REGISTER produces the +- Postindex addressing mode. +- +-"Absolute" +- `SYMBOL', or `DIGITS', optionally followed by `:b', `:w', or `:l'. +- +- +-File: as.info, Node: M68K-Moto-Syntax, Next: M68K-Float, Prev: M68K-Syntax, Up: M68K-Dependent +- +-Motorola Syntax +---------------- +- +- The standard Motorola syntax for this chip differs from the syntax +-already discussed (*note Syntax: M68K-Syntax.). `as' can accept +-Motorola syntax for operands, even if MIT syntax is used for other +-operands in the same instruction. The two kinds of syntax are fully +-compatible. +- +- In the following table APC stands for any of the address registers +-(`%a0' through `%a7'), the program counter (`%pc'), the zero-address +-relative to the program counter (`%zpc'), or a suppressed address +-register (`%za0' through `%za7'). The use of SIZE means one of `w' or +-`l', and it may always be omitted along with the leading dot. The use +-of SCALE means one of `1', `2', `4', or `8', and it may always be +-omitted along with the leading asterisk. +- +- The following additional addressing modes are understood: +- +-"Address Register Indirect" +- `(%a0)' through `(%a7)' +- `%a7' is also known as `%sp', i.e. the Stack Pointer. `%a6' is +- also known as `%fp', the Frame Pointer. +- +-"Address Register Postincrement" +- `(%a0)+' through `(%a7)+' +- +-"Address Register Predecrement" +- `-(%a0)' through `-(%a7)' +- +-"Indirect Plus Offset" +- `NUMBER(%A0)' through `NUMBER(%A7)', or `NUMBER(%PC)'. +- +- The NUMBER may also appear within the parentheses, as in +- `(NUMBER,%A0)'. When used with the PC, the NUMBER may be omitted +- (with an address register, omitting the NUMBER produces Address +- Register Indirect mode). +- +-"Index" +- `NUMBER(APC,REGISTER.SIZE*SCALE)' +- +- The NUMBER may be omitted, or it may appear within the +- parentheses. The APC may be omitted. The REGISTER and the APC +- may appear in either order. If both APC and REGISTER are address +- registers, and the SIZE and SCALE are omitted, then the first +- register is taken as the base register, and the second as the +- index register. +- +-"Postindex" +- `([NUMBER,APC],REGISTER.SIZE*SCALE,ONUMBER)' +- +- The ONUMBER, or the REGISTER, or both, may be omitted. Either the +- NUMBER or the APC may be omitted, but not both. +- +-"Preindex" +- `([NUMBER,APC,REGISTER.SIZE*SCALE],ONUMBER)' +- +- The NUMBER, or the APC, or the REGISTER, or any two of them, may +- be omitted. The ONUMBER may be omitted. The REGISTER and the APC +- may appear in either order. If both APC and REGISTER are address +- registers, and the SIZE and SCALE are omitted, then the first +- register is taken as the base register, and the second as the +- index register. +- +- +-File: as.info, Node: M68K-Float, Next: M68K-Directives, Prev: M68K-Moto-Syntax, Up: M68K-Dependent +- +-Floating Point +--------------- +- +- Packed decimal (P) format floating literals are not supported. Feel +-free to add the code! +- +- The floating point formats generated by directives are these. +- +-`.float' +- `Single' precision floating point constants. +- +-`.double' +- `Double' precision floating point constants. +- +-`.extend' +-`.ldouble' +- `Extended' precision (`long double') floating point constants. +- +- +-File: as.info, Node: M68K-Directives, Next: M68K-opcodes, Prev: M68K-Float, Up: M68K-Dependent +- +-680x0 Machine Directives +------------------------- +- +- In order to be compatible with the Sun assembler the 680x0 assembler +-understands the following directives. +- +-`.data1' +- This directive is identical to a `.data 1' directive. +- +-`.data2' +- This directive is identical to a `.data 2' directive. +- +-`.even' +- This directive is a special case of the `.align' directive; it +- aligns the output to an even byte boundary. +- +-`.skip' +- This directive is identical to a `.space' directive. +- +- +-File: as.info, Node: M68K-opcodes, Prev: M68K-Directives, Up: M68K-Dependent +- +-Opcodes +-------- +- +-* Menu: +- +-* M68K-Branch:: Branch Improvement +-* M68K-Chars:: Special Characters +- +- +-File: as.info, Node: M68K-Branch, Next: M68K-Chars, Up: M68K-opcodes +- +-Branch Improvement +-.................. +- +- Certain pseudo opcodes are permitted for branch instructions. They +-expand to the shortest branch instruction that reach the target. +-Generally these mnemonics are made by substituting `j' for `b' at the +-start of a Motorola mnemonic. +- +- The following table summarizes the pseudo-operations. A `*' flags +-cases that are more fully described after the table: +- +- Displacement +- +------------------------------------------------- +- | 68020 68000/10 +- Pseudo-Op |BYTE WORD LONG LONG non-PC relative +- +------------------------------------------------- +- jbsr |bsrs bsr bsrl jsr jsr +- jra |bras bra bral jmp jmp +- * jXX |bXXs bXX bXXl bNXs;jmpl bNXs;jmp +- * dbXX |dbXX dbXX dbXX; bra; jmpl +- * fjXX |fbXXw fbXXw fbXXl fbNXw;jmp +- +- XX: condition +- NX: negative of condition XX +- +- `*'--see full description below +- +-`jbsr' +-`jra' +- These are the simplest jump pseudo-operations; they always map to +- one particular machine instruction, depending on the displacement +- to the branch target. +- +-`jXX' +- Here, `jXX' stands for an entire family of pseudo-operations, +- where XX is a conditional branch or condition-code test. The full +- list of pseudo-ops in this family is: +- jhi jls jcc jcs jne jeq jvc +- jvs jpl jmi jge jlt jgt jle +- +- For the cases of non-PC relative displacements and long +- displacements on the 68000 or 68010, `as' issues a longer code +- fragment in terms of NX, the opposite condition to XX. For +- example, for the non-PC relative case: +- jXX foo +- gives +- bNXs oof +- jmp foo +- oof: +- +-`dbXX' +- The full family of pseudo-operations covered here is +- dbhi dbls dbcc dbcs dbne dbeq dbvc +- dbvs dbpl dbmi dbge dblt dbgt dble +- dbf dbra dbt +- +- Other than for word and byte displacements, when the source reads +- `dbXX foo', `as' emits +- dbXX oo1 +- bra oo2 +- oo1:jmpl foo +- oo2: +- +-`fjXX' +- This family includes +- fjne fjeq fjge fjlt fjgt fjle fjf +- fjt fjgl fjgle fjnge fjngl fjngle fjngt +- fjnle fjnlt fjoge fjogl fjogt fjole fjolt +- fjor fjseq fjsf fjsne fjst fjueq fjuge +- fjugt fjule fjult fjun +- +- For branch targets that are not PC relative, `as' emits +- fbNX oof +- jmp foo +- oof: +- when it encounters `fjXX foo'. +- +- +-File: as.info, Node: M68K-Chars, Prev: M68K-Branch, Up: M68K-opcodes +- +-Special Characters +-.................. +- +- The immediate character is `#' for Sun compatibility. The +-line-comment character is `|' (unless the `--bitwise-or' option is +-used). If a `#' appears at the beginning of a line, it is treated as a +-comment unless it looks like `# line file', in which case it is treated +-normally. +- +- +-File: as.info, Node: MIPS-Dependent, Next: SH-Dependent, Prev: M68K-Dependent, Up: Machine Dependencies +- +-MIPS Dependent Features +-======================= +- +- GNU `as' for MIPS architectures supports several different MIPS +-processors, and MIPS ISA levels I through IV. For information about +-the MIPS instruction set, see `MIPS RISC Architecture', by Kane and +-Heindrich (Prentice-Hall). For an overview of MIPS assembly +-conventions, see "Appendix D: Assembly Language Programming" in the +-same work. +- +-* Menu: +- +-* MIPS Opts:: Assembler options +-* MIPS Object:: ECOFF object code +-* MIPS Stabs:: Directives for debugging information +-* MIPS ISA:: Directives to override the ISA level +-* MIPS autoextend:: Directives for extending MIPS 16 bit instructions +-* MIPS insn:: Directive to mark data as an instruction +-* MIPS option stack:: Directives to save and restore options +- +- +-File: as.info, Node: MIPS Opts, Next: MIPS Object, Up: MIPS-Dependent +- +-Assembler options +------------------ +- +- The MIPS configurations of GNU `as' support these special options: +- +-`-G NUM' +- This option sets the largest size of an object that can be +- referenced implicitly with the `gp' register. It is only accepted +- for targets that use ECOFF format. The default value is 8. +- +-`-EB' +-`-EL' +- Any MIPS configuration of `as' can select big-endian or +- little-endian output at run time (unlike the other GNU development +- tools, which must be configured for one or the other). Use `-EB' +- to select big-endian output, and `-EL' for little-endian. +- +-`-mips1' +-`-mips2' +-`-mips3' +-`-mips4' +- Generate code for a particular MIPS Instruction Set Architecture +- level. `-mips1' corresponds to the R2000 and R3000 processors, +- `-mips2' to the R6000 processor, `-mips3' to the R4000 processor, +- and `-mips4' to the R8000 and R10000 processors. You can also +- switch instruction sets during the assembly; see *Note Directives +- to override the ISA level: MIPS ISA. +- +-`-mips16' +-`-no-mips16' +- Generate code for the MIPS 16 processor. This is equivalent to +- putting `.set mips16' at the start of the assembly file. +- `-no-mips16' turns off this option. +- +-`-m4650' +-`-no-m4650' +- Generate code for the MIPS R4650 chip. This tells the assembler +- to accept the `mad' and `madu' instruction, and to not schedule +- `nop' instructions around accesses to the `HI' and `LO' registers. +- `-no-m4650' turns off this option. +- +-`-m4010' +-`-no-m4010' +- Generate code for the LSI R4010 chip. This tells the assembler to +- accept the R4010 specific instructions (`addciu', `ffc', etc.), +- and to not schedule `nop' instructions around accesses to the `HI' +- and `LO' registers. `-no-m4010' turns off this option. +- +-`-mcpu=CPU' +- Generate code for a particular MIPS cpu. This has little effect +- on the assembler, but it is passed by `gcc'. +- +-`-nocpp' +- This option is ignored. It is accepted for command-line +- compatibility with other assemblers, which use it to turn off C +- style preprocessing. With GNU `as', there is no need for +- `-nocpp', because the GNU assembler itself never runs the C +- preprocessor. +- +-`--trap' +-`--no-break' +- `as' automatically macro expands certain division and +- multiplication instructions to check for overflow and division by +- zero. This option causes `as' to generate code to take a trap +- exception rather than a break exception when an error is detected. +- The trap instructions are only supported at Instruction Set +- Architecture level 2 and higher. +- +-`--break' +-`--no-trap' +- Generate code to take a break exception rather than a trap +- exception when an error is detected. This is the default. +- +- +-File: as.info, Node: MIPS Object, Next: MIPS Stabs, Prev: MIPS Opts, Up: MIPS-Dependent +- +-MIPS ECOFF object code +----------------------- +- +- Assembling for a MIPS ECOFF target supports some additional sections +-besides the usual `.text', `.data' and `.bss'. The additional sections +-are `.rdata', used for read-only data, `.sdata', used for small data, +-and `.sbss', used for small common objects. +- +- When assembling for ECOFF, the assembler uses the `$gp' (`$28') +-register to form the address of a "small object". Any object in the +-`.sdata' or `.sbss' sections is considered "small" in this sense. For +-external objects, or for objects in the `.bss' section, you can use the +-`gcc' `-G' option to control the size of objects addressed via `$gp'; +-the default value is 8, meaning that a reference to any object eight +-bytes or smaller uses `$gp'. Passing `-G 0' to `as' prevents it from +-using the `$gp' register on the basis of object size (but the assembler +-uses `$gp' for objects in `.sdata' or `sbss' in any case). The size of +-an object in the `.bss' section is set by the `.comm' or `.lcomm' +-directive that defines it. The size of an external object may be set +-with the `.extern' directive. For example, `.extern sym,4' declares +-that the object at `sym' is 4 bytes in length, whie leaving `sym' +-otherwise undefined. +- +- Using small ECOFF objects requires linker support, and assumes that +-the `$gp' register is correctly initialized (normally done +-automatically by the startup code). MIPS ECOFF assembly code must not +-modify the `$gp' register. +- +- +-File: as.info, Node: MIPS Stabs, Next: MIPS ISA, Prev: MIPS Object, Up: MIPS-Dependent +- +-Directives for debugging information +------------------------------------- +- +- MIPS ECOFF `as' supports several directives used for generating +-debugging information which are not support by traditional MIPS +-assemblers. These are `.def', `.endef', `.dim', `.file', `.scl', +-`.size', `.tag', `.type', `.val', `.stabd', `.stabn', and `.stabs'. +-The debugging information generated by the three `.stab' directives can +-only be read by GDB, not by traditional MIPS debuggers (this +-enhancement is required to fully support C++ debugging). These +-directives are primarily used by compilers, not assembly language +-programmers! +- +- +-File: as.info, Node: MIPS ISA, Next: MIPS autoextend, Prev: MIPS Stabs, Up: MIPS-Dependent +- +-Directives to override the ISA level +------------------------------------- +- +- GNU `as' supports an additional directive to change the MIPS +-Instruction Set Architecture level on the fly: `.set mipsN'. N should +-be a number from 0 to 4. A value from 1 to 4 makes the assembler +-accept instructions for the corresponding ISA level, from that point on +-in the assembly. `.set mipsN' affects not only which instructions are +-permitted, but also how certain macros are expanded. `.set mips0' +-restores the ISA level to its original level: either the level you +-selected with command line options, or the default for your +-configuration. You can use this feature to permit specific R4000 +-instructions while assembling in 32 bit mode. Use this directive with +-care! +- +- The directive `.set mips16' puts the assembler into MIPS 16 mode, in +-which it will assemble instructions for the MIPS 16 processor. Use +-`.set nomips16' to return to normal 32 bit mode. +- +- Traditional MIPS assemblers do not support this directive. +- +- +-File: as.info, Node: MIPS autoextend, Next: MIPS insn, Prev: MIPS ISA, Up: MIPS-Dependent +- +-Directives for extending MIPS 16 bit instructions +-------------------------------------------------- +- +- By default, MIPS 16 instructions are automatically extended to 32 +-bits when necessary. The directive `.set noautoextend' will turn this +-off. When `.set noautoextend' is in effect, any 32 bit instruction +-must be explicitly extended with the `.e' modifier (e.g., `li.e +-$4,1000'). The directive `.set autoextend' may be used to once again +-automatically extend instructions when necessary. +- +- This directive is only meaningful when in MIPS 16 mode. Traditional +-MIPS assemblers do not support this directive. +- +- +-File: as.info, Node: MIPS insn, Next: MIPS option stack, Prev: MIPS autoextend, Up: MIPS-Dependent +- +-Directive to mark data as an instruction +----------------------------------------- +- +- The `.insn' directive tells `as' that the following data is actually +-instructions. This makes a difference in MIPS 16 mode: when loading +-the address of a label which precedes instructions, `as' automatically +-adds 1 to the value, so that jumping to the loaded address will do the +-right thing. +- +- +-File: as.info, Node: MIPS option stack, Prev: MIPS insn, Up: MIPS-Dependent +- +-Directives to save and restore options +--------------------------------------- +- +- The directives `.set push' and `.set pop' may be used to save and +-restore the current settings for all the options which are controlled +-by `.set'. The `.set push' directive saves the current settings on a +-stack. The `.set pop' directive pops the stack and restores the +-settings. +- +- These directives can be useful inside an macro which must change an +-option such as the ISA level or instruction reordering but does not want +-to change the state of the code which invoked the macro. +- +- Traditional MIPS assemblers do not support these directives. +- +- +-File: as.info, Node: SH-Dependent, Next: Sparc-Dependent, Prev: MIPS-Dependent, Up: Machine Dependencies +- +-Hitachi SH Dependent Features +-============================= +- +-* Menu: +- +-* SH Options:: Options +-* SH Syntax:: Syntax +-* SH Floating Point:: Floating Point +-* SH Directives:: SH Machine Directives +-* SH Opcodes:: Opcodes +- +- +-File: as.info, Node: SH Options, Next: SH Syntax, Up: SH-Dependent +- +-Options +-------- +- +- `as' has no additional command-line options for the Hitachi SH +-family. +- +- +-File: as.info, Node: SH Syntax, Next: SH Floating Point, Prev: SH Options, Up: SH-Dependent +- +-Syntax +------- +- +-* Menu: +- +-* SH-Chars:: Special Characters +-* SH-Regs:: Register Names +-* SH-Addressing:: Addressing Modes +- +- +-File: as.info, Node: SH-Chars, Next: SH-Regs, Up: SH Syntax +- +-Special Characters +-.................. +- +- `!' is the line comment character. +- +- You can use `;' instead of a newline to separate statements. +- +- Since `$' has no special meaning, you may use it in symbol names. +- +- +-File: as.info, Node: SH-Regs, Next: SH-Addressing, Prev: SH-Chars, Up: SH Syntax +- +-Register Names +-.............. +- +- You can use the predefined symbols `r0', `r1', `r2', `r3', `r4', +-`r5', `r6', `r7', `r8', `r9', `r10', `r11', `r12', `r13', `r14', and +-`r15' to refer to the SH registers. +- +- The SH also has these control registers: +- +-`pr' +- procedure register (holds return address) +- +-`pc' +- program counter +- +-`mach' +-`macl' +- high and low multiply accumulator registers +- +-`sr' +- status register +- +-`gbr' +- global base register +- +-`vbr' +- vector base register (for interrupt vectors) +- +- +-File: as.info, Node: SH-Addressing, Prev: SH-Regs, Up: SH Syntax +- +-Addressing Modes +-................ +- +- `as' understands the following addressing modes for the SH. `RN' in +-the following refers to any of the numbered registers, but *not* the +-control registers. +- +-`RN' +- Register direct +- +-`@RN' +- Register indirect +- +-`@-RN' +- Register indirect with pre-decrement +- +-`@RN+' +- Register indirect with post-increment +- +-`@(DISP, RN)' +- Register indirect with displacement +- +-`@(R0, RN)' +- Register indexed +- +-`@(DISP, GBR)' +- `GBR' offset +- +-`@(R0, GBR)' +- GBR indexed +- +-`ADDR' +-`@(DISP, PC)' +- PC relative address (for branch or for addressing memory). The +- `as' implementation allows you to use the simpler form ADDR +- anywhere a PC relative address is called for; the alternate form +- is supported for compatibility with other assemblers. +- +-`#IMM' +- Immediate data +- +- +-File: as.info, Node: SH Floating Point, Next: SH Directives, Prev: SH Syntax, Up: SH-Dependent +- +-Floating Point +--------------- +- +- The SH family has no hardware floating point, but the `.float' +-directive generates IEEE floating-point numbers for compatibility with +-other development tools. +- +- +-File: as.info, Node: SH Directives, Next: SH Opcodes, Prev: SH Floating Point, Up: SH-Dependent +- +-SH Machine Directives +---------------------- +- +-`uaword' +-`ualong' +- `as' will issue a warning when a misaligned `.word' or `.long' +- directive is used. You may use `.uaword' or `.ualong' to indicate +- that the value is intentionally misaligned. +- +- +-File: as.info, Node: SH Opcodes, Prev: SH Directives, Up: SH-Dependent +- +-Opcodes +-------- +- +- For detailed information on the SH machine instruction set, see +-`SH-Microcomputer User's Manual' (Hitachi Micro Systems, Inc.). +- +- `as' implements all the standard SH opcodes. No additional +-pseudo-instructions are needed on this family. Note, however, that +-because `as' supports a simpler form of PC-relative addressing, you may +-simply write (for example) +- +- mov.l bar,r0 +- +-where other assemblers might require an explicit displacement to `bar' +-from the program counter: +- +- mov.l @(DISP, PC) +- +- Here is a summary of SH opcodes: +- +- Legend: +- Rn a numbered register +- Rm another numbered register +- #imm immediate data +- disp displacement +- disp8 8-bit displacement +- disp12 12-bit displacement +- +- add #imm,Rn lds.l @Rn+,PR +- add Rm,Rn mac.w @Rm+,@Rn+ +- addc Rm,Rn mov #imm,Rn +- addv Rm,Rn mov Rm,Rn +- and #imm,R0 mov.b Rm,@(R0,Rn) +- and Rm,Rn mov.b Rm,@-Rn +- and.b #imm,@(R0,GBR) mov.b Rm,@Rn +- bf disp8 mov.b @(disp,Rm),R0 +- bra disp12 mov.b @(disp,GBR),R0 +- bsr disp12 mov.b @(R0,Rm),Rn +- bt disp8 mov.b @Rm+,Rn +- clrmac mov.b @Rm,Rn +- clrt mov.b R0,@(disp,Rm) +- cmp/eq #imm,R0 mov.b R0,@(disp,GBR) +- cmp/eq Rm,Rn mov.l Rm,@(disp,Rn) +- cmp/ge Rm,Rn mov.l Rm,@(R0,Rn) +- cmp/gt Rm,Rn mov.l Rm,@-Rn +- cmp/hi Rm,Rn mov.l Rm,@Rn +- cmp/hs Rm,Rn mov.l @(disp,Rn),Rm +- cmp/pl Rn mov.l @(disp,GBR),R0 +- cmp/pz Rn mov.l @(disp,PC),Rn +- cmp/str Rm,Rn mov.l @(R0,Rm),Rn +- div0s Rm,Rn mov.l @Rm+,Rn +- div0u mov.l @Rm,Rn +- div1 Rm,Rn mov.l R0,@(disp,GBR) +- exts.b Rm,Rn mov.w Rm,@(R0,Rn) +- exts.w Rm,Rn mov.w Rm,@-Rn +- extu.b Rm,Rn mov.w Rm,@Rn +- extu.w Rm,Rn mov.w @(disp,Rm),R0 +- jmp @Rn mov.w @(disp,GBR),R0 +- jsr @Rn mov.w @(disp,PC),Rn +- ldc Rn,GBR mov.w @(R0,Rm),Rn +- ldc Rn,SR mov.w @Rm+,Rn +- ldc Rn,VBR mov.w @Rm,Rn +- ldc.l @Rn+,GBR mov.w R0,@(disp,Rm) +- ldc.l @Rn+,SR mov.w R0,@(disp,GBR) +- ldc.l @Rn+,VBR mova @(disp,PC),R0 +- lds Rn,MACH movt Rn +- lds Rn,MACL muls Rm,Rn +- lds Rn,PR mulu Rm,Rn +- lds.l @Rn+,MACH neg Rm,Rn +- lds.l @Rn+,MACL negc Rm,Rn +- +- nop stc VBR,Rn +- not Rm,Rn stc.l GBR,@-Rn +- or #imm,R0 stc.l SR,@-Rn +- or Rm,Rn stc.l VBR,@-Rn +- or.b #imm,@(R0,GBR) sts MACH,Rn +- rotcl Rn sts MACL,Rn +- rotcr Rn sts PR,Rn +- rotl Rn sts.l MACH,@-Rn +- rotr Rn sts.l MACL,@-Rn +- rte sts.l PR,@-Rn +- rts sub Rm,Rn +- sett subc Rm,Rn +- shal Rn subv Rm,Rn +- shar Rn swap.b Rm,Rn +- shll Rn swap.w Rm,Rn +- shll16 Rn tas.b @Rn +- shll2 Rn trapa #imm +- shll8 Rn tst #imm,R0 +- shlr Rn tst Rm,Rn +- shlr16 Rn tst.b #imm,@(R0,GBR) +- shlr2 Rn xor #imm,R0 +- shlr8 Rn xor Rm,Rn +- sleep xor.b #imm,@(R0,GBR) +- stc GBR,Rn xtrct Rm,Rn +- stc SR,Rn +- +- +-File: as.info, Node: Sparc-Dependent, Next: V850-Dependent, Prev: SH-Dependent, Up: Machine Dependencies +- +-SPARC Dependent Features +-======================== +- +-* Menu: +- +-* Sparc-Opts:: Options +-* Sparc-Aligned-Data:: Option to enforce aligned data +-* Sparc-Float:: Floating Point +-* Sparc-Directives:: Sparc Machine Directives +- +- +-File: as.info, Node: Sparc-Opts, Next: Sparc-Aligned-Data, Up: Sparc-Dependent +- +-Options +-------- +- +- The SPARC chip family includes several successive levels, using the +-same core instruction set, but including a few additional instructions +-at each level. There are exceptions to this however. For details on +-what instructions each variant supports, please see the chip's +-architecture reference manual. +- +- By default, `as' assumes the core instruction set (SPARC v6), but +-"bumps" the architecture level as needed: it switches to successively +-higher architectures as it encounters instructions that only exist in +-the higher levels. +- +- If not configured for SPARC v9 (`sparc64-*-*') GAS will not bump +-passed sparclite by default, an option must be passed to enable the v9 +-instructions. +- +- GAS treats sparclite as being compatible with v8, unless an +-architecture is explicitly requested. SPARC v9 is always incompatible +-with sparclite. +- +-`-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite' +-`-Av8plus | -Av8plusa | -Av9 | -Av9a' +- Use one of the `-A' options to select one of the SPARC +- architectures explicitly. If you select an architecture +- explicitly, `as' reports a fatal error if it encounters an +- instruction or feature requiring an incompatible or higher level. +- +- `-Av8plus' and `-Av8plusa' select a 32 bit environment. +- +- `-Av9' and `-Av9a' select a 64 bit environment and are not +- available unless GAS is explicitly configured with 64 bit +- environment support. +- +- `-Av8plusa' and `-Av9a' enable the SPARC V9 instruction set with +- UltraSPARC extensions. +- +-`-xarch=v8plus | -xarch=v8plusa' +- For compatibility with the Solaris v9 assembler. These options are +- equivalent to -Av8plus and -Av8plusa, respectively. +- +-`-bump' +- Warn whenever it is necessary to switch to another level. If an +- architecture level is explicitly requested, GAS will not issue +- warnings until that level is reached, and will then bump the level +- as required (except between incompatible levels). +- +-`-32 | -64' +- Select the word size, either 32 bits or 64 bits. These options +- are only available with the ELF object file format, and require +- that the necessary BFD support has been included. +- +- +-File: as.info, Node: Sparc-Aligned-Data, Next: Sparc-Float, Prev: Sparc-Opts, Up: Sparc-Dependent +- +-Enforcing aligned data +----------------------- +- +- SPARC GAS normally permits data to be misaligned. For example, it +-permits the `.long' pseudo-op to be used on a byte boundary. However, +-the native SunOS and Solaris assemblers issue an error when they see +-misaligned data. +- +- You can use the `--enforce-aligned-data' option to make SPARC GAS +-also issue an error about misaligned data, just as the SunOS and Solaris +-assemblers do. +- +- The `--enforce-aligned-data' option is not the default because gcc +-issues misaligned data pseudo-ops when it initializes certain packed +-data structures (structures defined using the `packed' attribute). You +-may have to assemble with GAS in order to initialize packed data +-structures in your own code. +- +- +-File: as.info, Node: Sparc-Float, Next: Sparc-Directives, Prev: Sparc-Aligned-Data, Up: Sparc-Dependent +- +-Floating Point +--------------- +- +- The Sparc uses IEEE floating-point numbers. +- +- +-File: as.info, Node: Sparc-Directives, Prev: Sparc-Float, Up: Sparc-Dependent +- +-Sparc Machine Directives +------------------------- +- +- The Sparc version of `as' supports the following additional machine +-directives: +- +-`.align' +- This must be followed by the desired alignment in bytes. +- +-`.common' +- This must be followed by a symbol name, a positive number, and +- `"bss"'. This behaves somewhat like `.comm', but the syntax is +- different. +- +-`.half' +- This is functionally identical to `.short'. +- +-`.proc' +- This directive is ignored. Any text following it on the same line +- is also ignored. +- +-`.reserve' +- This must be followed by a symbol name, a positive number, and +- `"bss"'. This behaves somewhat like `.lcomm', but the syntax is +- different. +- +-`.seg' +- This must be followed by `"text"', `"data"', or `"data1"'. It +- behaves like `.text', `.data', or `.data 1'. +- +-`.skip' +- This is functionally identical to the `.space' directive. +- +-`.word' +- On the Sparc, the `.word' directive produces 32 bit values, +- instead of the 16 bit values it produces on many other machines. +- +-`.xword' +- On the Sparc V9 processor, the `.xword' directive produces 64 bit +- values. +- +- +-File: as.info, Node: Z8000-Dependent, Next: Vax-Dependent, Prev: V850-Dependent, Up: Machine Dependencies +- +-Z8000 Dependent Features +-======================== +- +- The Z8000 as supports both members of the Z8000 family: the +-unsegmented Z8002, with 16 bit addresses, and the segmented Z8001 with +-24 bit addresses. +- +- When the assembler is in unsegmented mode (specified with the +-`unsegm' directive), an address takes up one word (16 bit) sized +-register. When the assembler is in segmented mode (specified with the +-`segm' directive), a 24-bit address takes up a long (32 bit) register. +-*Note Assembler Directives for the Z8000: Z8000 Directives, for a list +-of other Z8000 specific assembler directives. +- +-* Menu: +- +-* Z8000 Options:: No special command-line options for Z8000 +-* Z8000 Syntax:: Assembler syntax for the Z8000 +-* Z8000 Directives:: Special directives for the Z8000 +-* Z8000 Opcodes:: Opcodes +- +- +-File: as.info, Node: Z8000 Options, Next: Z8000 Syntax, Up: Z8000-Dependent +- +-Options +-------- +- +- `as' has no additional command-line options for the Zilog Z8000 +-family. +- +- +-File: as.info, Node: Z8000 Syntax, Next: Z8000 Directives, Prev: Z8000 Options, Up: Z8000-Dependent +- +-Syntax +------- +- +-* Menu: +- +-* Z8000-Chars:: Special Characters +-* Z8000-Regs:: Register Names +-* Z8000-Addressing:: Addressing Modes +- +- +-File: as.info, Node: Z8000-Chars, Next: Z8000-Regs, Up: Z8000 Syntax +- +-Special Characters +-.................. +- +- `!' is the line comment character. +- +- You can use `;' instead of a newline to separate statements. +- +- +-File: as.info, Node: Z8000-Regs, Next: Z8000-Addressing, Prev: Z8000-Chars, Up: Z8000 Syntax +- +-Register Names +-.............. +- +- The Z8000 has sixteen 16 bit registers, numbered 0 to 15. You can +-refer to different sized groups of registers by register number, with +-the prefix `r' for 16 bit registers, `rr' for 32 bit registers and `rq' +-for 64 bit registers. You can also refer to the contents of the first +-eight (of the sixteen 16 bit registers) by bytes. They are named `rNh' +-and `rNl'. +- +-*byte registers* +- r0l r0h r1h r1l r2h r2l r3h r3l +- r4h r4l r5h r5l r6h r6l r7h r7l +-*word registers* +- r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 +-*long word registers* +- rr0 rr2 rr4 rr6 rr8 rr10 rr12 rr14 +-*quad word registers* +- rq0 rq4 rq8 rq12 +- +- +-File: as.info, Node: Z8000-Addressing, Prev: Z8000-Regs, Up: Z8000 Syntax +- +-Addressing Modes +-................ +- +- as understands the following addressing modes for the Z8000: +- +-`rN' +- Register direct +- +-`@rN' +- Indirect register +- +-`ADDR' +- Direct: the 16 bit or 24 bit address (depending on whether the +- assembler is in segmented or unsegmented mode) of the operand is +- in the instruction. +- +-`address(rN)' +- Indexed: the 16 or 24 bit address is added to the 16 bit register +- to produce the final address in memory of the operand. +- +-`rN(#IMM)' +- Base Address: the 16 or 24 bit register is added to the 16 bit sign +- extended immediate displacement to produce the final address in +- memory of the operand. +- +-`rN(rM)' +- Base Index: the 16 or 24 bit register rN is added to the sign +- extended 16 bit index register rM to produce the final address in +- memory of the operand. +- +-`#XX' +- Immediate data XX. +- +- +-File: as.info, Node: Z8000 Directives, Next: Z8000 Opcodes, Prev: Z8000 Syntax, Up: Z8000-Dependent +- +-Assembler Directives for the Z8000 +----------------------------------- +- +- The Z8000 port of as includes these additional assembler directives, +-for compatibility with other Z8000 assemblers. As shown, these do not +-begin with `.' (unlike the ordinary as directives). +- +-`segm' +- Generates code for the segmented Z8001. +- +-`unsegm' +- Generates code for the unsegmented Z8002. +- +-`name' +- Synonym for `.file' +- +-`global' +- Synonym for `.global' +- +-`wval' +- Synonym for `.word' +- +-`lval' +- Synonym for `.long' +- +-`bval' +- Synonym for `.byte' +- +-`sval' +- Assemble a string. `sval' expects one string literal, delimited by +- single quotes. It assembles each byte of the string into +- consecutive addresses. You can use the escape sequence `%XX' +- (where XX represents a two-digit hexadecimal number) to represent +- the character whose ASCII value is XX. Use this feature to +- describe single quote and other characters that may not appear in +- string literals as themselves. For example, the C statement +- `char *a = "he said \"it's 50% off\"";' is represented in Z8000 +- assembly language (shown with the assembler output in hex at the +- left) as +- +- 68652073 sval 'he said %22it%27s 50%25 off%22%00' +- 61696420 +- 22697427 +- 73203530 +- 25206F66 +- 662200 +- +-`rsect' +- synonym for `.section' +- +-`block' +- synonym for `.space' +- +-`even' +- special case of `.align'; aligns output to even byte boundary. +- +diff -rup --new-file binutils-2.9.1/gas/doc/as.info-6 binutils-2.9.1/gas/doc/as.info-6 +--- binutils-2.9.1/gas/doc/as.info-6 Fri May 1 08:45:01 1998 ++++ binutils-2.9.1/gas/doc/as.info-6 Wed Dec 31 17:00:00 1969 +@@ -1,1051 +0,0 @@ +-This is Info file as.info, produced by Makeinfo version 1.68 from the +-input file as.texinfo. +- +-START-INFO-DIR-ENTRY +-* As: (as). The GNU assembler. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU Assembler "as". +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: as.info, Node: Z8000 Opcodes, Prev: Z8000 Directives, Up: Z8000-Dependent +- +-Opcodes +-------- +- +- For detailed information on the Z8000 machine instruction set, see +-`Z8000 Technical Manual'. +- +- The following table summarizes the opcodes and their arguments: +- +- rs 16 bit source register +- rd 16 bit destination register +- rbs 8 bit source register +- rbd 8 bit destination register +- rrs 32 bit source register +- rrd 32 bit destination register +- rqs 64 bit source register +- rqd 64 bit destination register +- addr 16/24 bit address +- imm immediate data +- +- adc rd,rs clrb addr cpsir @rd,@rs,rr,cc +- adcb rbd,rbs clrb addr(rd) cpsirb @rd,@rs,rr,cc +- add rd,@rs clrb rbd dab rbd +- add rd,addr com @rd dbjnz rbd,disp7 +- add rd,addr(rs) com addr dec @rd,imm4m1 +- add rd,imm16 com addr(rd) dec addr(rd),imm4m1 +- add rd,rs com rd dec addr,imm4m1 +- addb rbd,@rs comb @rd dec rd,imm4m1 +- addb rbd,addr comb addr decb @rd,imm4m1 +- addb rbd,addr(rs) comb addr(rd) decb addr(rd),imm4m1 +- addb rbd,imm8 comb rbd decb addr,imm4m1 +- addb rbd,rbs comflg flags decb rbd,imm4m1 +- addl rrd,@rs cp @rd,imm16 di i2 +- addl rrd,addr cp addr(rd),imm16 div rrd,@rs +- addl rrd,addr(rs) cp addr,imm16 div rrd,addr +- addl rrd,imm32 cp rd,@rs div rrd,addr(rs) +- addl rrd,rrs cp rd,addr div rrd,imm16 +- and rd,@rs cp rd,addr(rs) div rrd,rs +- and rd,addr cp rd,imm16 divl rqd,@rs +- and rd,addr(rs) cp rd,rs divl rqd,addr +- and rd,imm16 cpb @rd,imm8 divl rqd,addr(rs) +- and rd,rs cpb addr(rd),imm8 divl rqd,imm32 +- andb rbd,@rs cpb addr,imm8 divl rqd,rrs +- andb rbd,addr cpb rbd,@rs djnz rd,disp7 +- andb rbd,addr(rs) cpb rbd,addr ei i2 +- andb rbd,imm8 cpb rbd,addr(rs) ex rd,@rs +- andb rbd,rbs cpb rbd,imm8 ex rd,addr +- bit @rd,imm4 cpb rbd,rbs ex rd,addr(rs) +- bit addr(rd),imm4 cpd rd,@rs,rr,cc ex rd,rs +- bit addr,imm4 cpdb rbd,@rs,rr,cc exb rbd,@rs +- bit rd,imm4 cpdr rd,@rs,rr,cc exb rbd,addr +- bit rd,rs cpdrb rbd,@rs,rr,cc exb rbd,addr(rs) +- bitb @rd,imm4 cpi rd,@rs,rr,cc exb rbd,rbs +- bitb addr(rd),imm4 cpib rbd,@rs,rr,cc ext0e imm8 +- bitb addr,imm4 cpir rd,@rs,rr,cc ext0f imm8 +- bitb rbd,imm4 cpirb rbd,@rs,rr,cc ext8e imm8 +- bitb rbd,rs cpl rrd,@rs ext8f imm8 +- bpt cpl rrd,addr exts rrd +- call @rd cpl rrd,addr(rs) extsb rd +- call addr cpl rrd,imm32 extsl rqd +- call addr(rd) cpl rrd,rrs halt +- calr disp12 cpsd @rd,@rs,rr,cc in rd,@rs +- clr @rd cpsdb @rd,@rs,rr,cc in rd,imm16 +- clr addr cpsdr @rd,@rs,rr,cc inb rbd,@rs +- clr addr(rd) cpsdrb @rd,@rs,rr,cc inb rbd,imm16 +- clr rd cpsi @rd,@rs,rr,cc inc @rd,imm4m1 +- clrb @rd cpsib @rd,@rs,rr,cc inc addr(rd),imm4m1 +- inc addr,imm4m1 ldb rbd,rs(rx) mult rrd,addr(rs) +- inc rd,imm4m1 ldb rd(imm16),rbs mult rrd,imm16 +- incb @rd,imm4m1 ldb rd(rx),rbs mult rrd,rs +- incb addr(rd),imm4m1 ldctl ctrl,rs multl rqd,@rs +- incb addr,imm4m1 ldctl rd,ctrl multl rqd,addr +- incb rbd,imm4m1 ldd @rs,@rd,rr multl rqd,addr(rs) +- ind @rd,@rs,ra lddb @rs,@rd,rr multl rqd,imm32 +- indb @rd,@rs,rba lddr @rs,@rd,rr multl rqd,rrs +- inib @rd,@rs,ra lddrb @rs,@rd,rr neg @rd +- inibr @rd,@rs,ra ldi @rd,@rs,rr neg addr +- iret ldib @rd,@rs,rr neg addr(rd) +- jp cc,@rd ldir @rd,@rs,rr neg rd +- jp cc,addr ldirb @rd,@rs,rr negb @rd +- jp cc,addr(rd) ldk rd,imm4 negb addr +- jr cc,disp8 ldl @rd,rrs negb addr(rd) +- ld @rd,imm16 ldl addr(rd),rrs negb rbd +- ld @rd,rs ldl addr,rrs nop +- ld addr(rd),imm16 ldl rd(imm16),rrs or rd,@rs +- ld addr(rd),rs ldl rd(rx),rrs or rd,addr +- ld addr,imm16 ldl rrd,@rs or rd,addr(rs) +- ld addr,rs ldl rrd,addr or rd,imm16 +- ld rd(imm16),rs ldl rrd,addr(rs) or rd,rs +- ld rd(rx),rs ldl rrd,imm32 orb rbd,@rs +- ld rd,@rs ldl rrd,rrs orb rbd,addr +- ld rd,addr ldl rrd,rs(imm16) orb rbd,addr(rs) +- ld rd,addr(rs) ldl rrd,rs(rx) orb rbd,imm8 +- ld rd,imm16 ldm @rd,rs,n orb rbd,rbs +- ld rd,rs ldm addr(rd),rs,n out @rd,rs +- ld rd,rs(imm16) ldm addr,rs,n out imm16,rs +- ld rd,rs(rx) ldm rd,@rs,n outb @rd,rbs +- lda rd,addr ldm rd,addr(rs),n outb imm16,rbs +- lda rd,addr(rs) ldm rd,addr,n outd @rd,@rs,ra +- lda rd,rs(imm16) ldps @rs outdb @rd,@rs,rba +- lda rd,rs(rx) ldps addr outib @rd,@rs,ra +- ldar rd,disp16 ldps addr(rs) outibr @rd,@rs,ra +- ldb @rd,imm8 ldr disp16,rs pop @rd,@rs +- ldb @rd,rbs ldr rd,disp16 pop addr(rd),@rs +- ldb addr(rd),imm8 ldrb disp16,rbs pop addr,@rs +- ldb addr(rd),rbs ldrb rbd,disp16 pop rd,@rs +- ldb addr,imm8 ldrl disp16,rrs popl @rd,@rs +- ldb addr,rbs ldrl rrd,disp16 popl addr(rd),@rs +- ldb rbd,@rs mbit popl addr,@rs +- ldb rbd,addr mreq rd popl rrd,@rs +- ldb rbd,addr(rs) mres push @rd,@rs +- ldb rbd,imm8 mset push @rd,addr +- ldb rbd,rbs mult rrd,@rs push @rd,addr(rs) +- ldb rbd,rs(imm16) mult rrd,addr push @rd,imm16 +- push @rd,rs set addr,imm4 subl rrd,imm32 +- pushl @rd,@rs set rd,imm4 subl rrd,rrs +- pushl @rd,addr set rd,rs tcc cc,rd +- pushl @rd,addr(rs) setb @rd,imm4 tccb cc,rbd +- pushl @rd,rrs setb addr(rd),imm4 test @rd +- res @rd,imm4 setb addr,imm4 test addr +- res addr(rd),imm4 setb rbd,imm4 test addr(rd) +- res addr,imm4 setb rbd,rs test rd +- res rd,imm4 setflg imm4 testb @rd +- res rd,rs sinb rbd,imm16 testb addr +- resb @rd,imm4 sinb rd,imm16 testb addr(rd) +- resb addr(rd),imm4 sind @rd,@rs,ra testb rbd +- resb addr,imm4 sindb @rd,@rs,rba testl @rd +- resb rbd,imm4 sinib @rd,@rs,ra testl addr +- resb rbd,rs sinibr @rd,@rs,ra testl addr(rd) +- resflg imm4 sla rd,imm8 testl rrd +- ret cc slab rbd,imm8 trdb @rd,@rs,rba +- rl rd,imm1or2 slal rrd,imm8 trdrb @rd,@rs,rba +- rlb rbd,imm1or2 sll rd,imm8 trib @rd,@rs,rbr +- rlc rd,imm1or2 sllb rbd,imm8 trirb @rd,@rs,rbr +- rlcb rbd,imm1or2 slll rrd,imm8 trtdrb @ra,@rb,rbr +- rldb rbb,rba sout imm16,rs trtib @ra,@rb,rr +- rr rd,imm1or2 soutb imm16,rbs trtirb @ra,@rb,rbr +- rrb rbd,imm1or2 soutd @rd,@rs,ra trtrb @ra,@rb,rbr +- rrc rd,imm1or2 soutdb @rd,@rs,rba tset @rd +- rrcb rbd,imm1or2 soutib @rd,@rs,ra tset addr +- rrdb rbb,rba soutibr @rd,@rs,ra tset addr(rd) +- rsvd36 sra rd,imm8 tset rd +- rsvd38 srab rbd,imm8 tsetb @rd +- rsvd78 sral rrd,imm8 tsetb addr +- rsvd7e srl rd,imm8 tsetb addr(rd) +- rsvd9d srlb rbd,imm8 tsetb rbd +- rsvd9f srll rrd,imm8 xor rd,@rs +- rsvdb9 sub rd,@rs xor rd,addr +- rsvdbf sub rd,addr xor rd,addr(rs) +- sbc rd,rs sub rd,addr(rs) xor rd,imm16 +- sbcb rbd,rbs sub rd,imm16 xor rd,rs +- sc imm8 sub rd,rs xorb rbd,@rs +- sda rd,rs subb rbd,@rs xorb rbd,addr +- sdab rbd,rs subb rbd,addr xorb rbd,addr(rs) +- sdal rrd,rs subb rbd,addr(rs) xorb rbd,imm8 +- sdl rd,rs subb rbd,imm8 xorb rbd,rbs +- sdlb rbd,rs subb rbd,rbs xorb rbd,rbs +- sdll rrd,rs subl rrd,@rs +- set @rd,imm4 subl rrd,addr +- set addr(rd),imm4 subl rrd,addr(rs) +- +- +-File: as.info, Node: Vax-Dependent, Prev: Z8000-Dependent, Up: Machine Dependencies +- +-VAX Dependent Features +-====================== +- +-* Menu: +- +-* VAX-Opts:: VAX Command-Line Options +-* VAX-float:: VAX Floating Point +-* VAX-directives:: Vax Machine Directives +-* VAX-opcodes:: VAX Opcodes +-* VAX-branch:: VAX Branch Improvement +-* VAX-operands:: VAX Operands +-* VAX-no:: Not Supported on VAX +- +- +-File: as.info, Node: VAX-Opts, Next: VAX-float, Up: Vax-Dependent +- +-VAX Command-Line Options +------------------------- +- +- The Vax version of `as' accepts any of the following options, gives +-a warning message that the option was ignored and proceeds. These +-options are for compatibility with scripts designed for other people's +-assemblers. +- +-``-D' (Debug)' +-``-S' (Symbol Table)' +-``-T' (Token Trace)' +- These are obsolete options used to debug old assemblers. +- +-``-d' (Displacement size for JUMPs)' +- This option expects a number following the `-d'. Like options +- that expect filenames, the number may immediately follow the `-d' +- (old standard) or constitute the whole of the command line +- argument that follows `-d' (GNU standard). +- +-``-V' (Virtualize Interpass Temporary File)' +- Some other assemblers use a temporary file. This option commanded +- them to keep the information in active memory rather than in a +- disk file. `as' always does this, so this option is redundant. +- +-``-J' (JUMPify Longer Branches)' +- Many 32-bit computers permit a variety of branch instructions to +- do the same job. Some of these instructions are short (and fast) +- but have a limited range; others are long (and slow) but can +- branch anywhere in virtual memory. Often there are 3 flavors of +- branch: short, medium and long. Some other assemblers would emit +- short and medium branches, unless told by this option to emit +- short and long branches. +- +-``-t' (Temporary File Directory)' +- Some other assemblers may use a temporary file, and this option +- takes a filename being the directory to site the temporary file. +- Since `as' does not use a temporary disk file, this option makes +- no difference. `-t' needs exactly one filename. +- +- The Vax version of the assembler accepts two options when compiled +-for VMS. They are `-h', and `-+'. The `-h' option prevents `as' from +-modifying the symbol-table entries for symbols that contain lowercase +-characters (I think). The `-+' option causes `as' to print warning +-messages if the FILENAME part of the object file, or any symbol name is +-larger than 31 characters. The `-+' option also inserts some code +-following the `_main' symbol so that the object file is compatible with +-Vax-11 "C". +- +- +-File: as.info, Node: VAX-float, Next: VAX-directives, Prev: VAX-Opts, Up: Vax-Dependent +- +-VAX Floating Point +------------------- +- +- Conversion of flonums to floating point is correct, and compatible +-with previous assemblers. Rounding is towards zero if the remainder is +-exactly half the least significant bit. +- +- `D', `F', `G' and `H' floating point formats are understood. +- +- Immediate floating literals (*e.g.* `S`$6.9') are rendered +-correctly. Again, rounding is towards zero in the boundary case. +- +- The `.float' directive produces `f' format numbers. The `.double' +-directive produces `d' format numbers. +- +- +-File: as.info, Node: VAX-directives, Next: VAX-opcodes, Prev: VAX-float, Up: Vax-Dependent +- +-Vax Machine Directives +----------------------- +- +- The Vax version of the assembler supports four directives for +-generating Vax floating point constants. They are described in the +-table below. +- +-`.dfloat' +- This expects zero or more flonums, separated by commas, and +- assembles Vax `d' format 64-bit floating point constants. +- +-`.ffloat' +- This expects zero or more flonums, separated by commas, and +- assembles Vax `f' format 32-bit floating point constants. +- +-`.gfloat' +- This expects zero or more flonums, separated by commas, and +- assembles Vax `g' format 64-bit floating point constants. +- +-`.hfloat' +- This expects zero or more flonums, separated by commas, and +- assembles Vax `h' format 128-bit floating point constants. +- +- +-File: as.info, Node: VAX-opcodes, Next: VAX-branch, Prev: VAX-directives, Up: Vax-Dependent +- +-VAX Opcodes +------------ +- +- All DEC mnemonics are supported. Beware that `case...' +-instructions have exactly 3 operands. The dispatch table that follows +-the `case...' instruction should be made with `.word' statements. This +-is compatible with all unix assemblers we know of. +- +- +-File: as.info, Node: VAX-branch, Next: VAX-operands, Prev: VAX-opcodes, Up: Vax-Dependent +- +-VAX Branch Improvement +----------------------- +- +- Certain pseudo opcodes are permitted. They are for branch +-instructions. They expand to the shortest branch instruction that +-reaches the target. Generally these mnemonics are made by substituting +-`j' for `b' at the start of a DEC mnemonic. This feature is included +-both for compatibility and to help compilers. If you do not need this +-feature, avoid these opcodes. Here are the mnemonics, and the code +-they can expand into. +- +-`jbsb' +- `Jsb' is already an instruction mnemonic, so we chose `jbsb'. +- (byte displacement) +- `bsbb ...' +- +- (word displacement) +- `bsbw ...' +- +- (long displacement) +- `jsb ...' +- +-`jbr' +-`jr' +- Unconditional branch. +- (byte displacement) +- `brb ...' +- +- (word displacement) +- `brw ...' +- +- (long displacement) +- `jmp ...' +- +-`jCOND' +- COND may be any one of the conditional branches `neq', `nequ', +- `eql', `eqlu', `gtr', `geq', `lss', `gtru', `lequ', `vc', `vs', +- `gequ', `cc', `lssu', `cs'. COND may also be one of the bit tests +- `bs', `bc', `bss', `bcs', `bsc', `bcc', `bssi', `bcci', `lbs', +- `lbc'. NOTCOND is the opposite condition to COND. +- (byte displacement) +- `bCOND ...' +- +- (word displacement) +- `bNOTCOND foo ; brw ... ; foo:' +- +- (long displacement) +- `bNOTCOND foo ; jmp ... ; foo:' +- +-`jacbX' +- X may be one of `b d f g h l w'. +- (word displacement) +- `OPCODE ...' +- +- (long displacement) +- OPCODE ..., foo ; +- brb bar ; +- foo: jmp ... ; +- bar: +- +-`jaobYYY' +- YYY may be one of `lss leq'. +- +-`jsobZZZ' +- ZZZ may be one of `geq gtr'. +- (byte displacement) +- `OPCODE ...' +- +- (word displacement) +- OPCODE ..., foo ; +- brb bar ; +- foo: brw DESTINATION ; +- bar: +- +- (long displacement) +- OPCODE ..., foo ; +- brb bar ; +- foo: jmp DESTINATION ; +- bar: +- +-`aobleq' +-`aoblss' +-`sobgeq' +-`sobgtr' +- +- (byte displacement) +- `OPCODE ...' +- +- (word displacement) +- OPCODE ..., foo ; +- brb bar ; +- foo: brw DESTINATION ; +- bar: +- +- (long displacement) +- OPCODE ..., foo ; +- brb bar ; +- foo: jmp DESTINATION ; +- bar: +- +- +-File: as.info, Node: VAX-operands, Next: VAX-no, Prev: VAX-branch, Up: Vax-Dependent +- +-VAX Operands +------------- +- +- The immediate character is `$' for Unix compatibility, not `#' as +-DEC writes it. +- +- The indirect character is `*' for Unix compatibility, not `@' as DEC +-writes it. +- +- The displacement sizing character is ``' (an accent grave) for Unix +-compatibility, not `^' as DEC writes it. The letter preceding ``' may +-have either case. `G' is not understood, but all other letters (`b i l +-s w') are understood. +- +- Register names understood are `r0 r1 r2 ... r15 ap fp sp pc'. Upper +-and lower case letters are equivalent. +- +- For instance +- tstb *w`$4(r5) +- +- Any expression is permitted in an operand. Operands are comma +-separated. +- +- +-File: as.info, Node: VAX-no, Prev: VAX-operands, Up: Vax-Dependent +- +-Not Supported on VAX +--------------------- +- +- Vax bit fields can not be assembled with `as'. Someone can add the +-required code if they really need it. +- +- +-File: as.info, Node: V850-Dependent, Next: Z8000-Dependent, Prev: Sparc-Dependent, Up: Machine Dependencies +- +-v850 Dependent Features +-======================= +- +-* Menu: +- +-* V850 Options:: Options +-* V850 Syntax:: Syntax +-* V850 Floating Point:: Floating Point +-* V850 Directives:: V850 Machine Directives +-* V850 Opcodes:: Opcodes +- +- +-File: as.info, Node: V850 Options, Next: V850 Syntax, Up: V850-Dependent +- +-Options +-------- +- +- `as' supports the following additional command-line options for the +-V850 processor family: +- +-`-wsigned_overflow' +- Causes warnings to be produced when signed immediate values +- overflow the space available for then within their opcodes. By +- default this option is disabled as it is possible to receive +- spurious warnings due to using exact bit patterns as immediate +- constants. +- +-`-wunsigned_overflow' +- Causes warnings to be produced when unsigned immediate values +- overflow the space available for then within their opcodes. By +- default this option is disabled as it is possible to receive +- spurious warnings due to using exact bit patterns as immediate +- constants. +- +-`-mv850' +- Specifies that the assembled code should be marked as being +- targeted at the V850 processor. This allows the linker to detect +- attempts to link such code with code assembled for other +- processors. +- +- +-File: as.info, Node: V850 Syntax, Next: V850 Floating Point, Prev: V850 Options, Up: V850-Dependent +- +-Syntax +------- +- +-* Menu: +- +-* V850-Chars:: Special Characters +-* V850-Regs:: Register Names +- +- +-File: as.info, Node: V850-Chars, Next: V850-Regs, Up: V850 Syntax +- +-Special Characters +-.................. +- +- `#' is the line comment character. +- +- +-File: as.info, Node: V850-Regs, Prev: V850-Chars, Up: V850 Syntax +- +-Register Names +-.............. +- +- `as' supports the following names for registers: +-`general register 0' +- r0, zero +- +-`general register 1' +- r1 +- +-`general register 2' +- r2, hp +- +-`general register 3' +- r3, sp +- +-`general register 4' +- r4, gp +- +-`general register 5' +- r5, tp +- +-`general register 6' +- r6 +- +-`general register 7' +- r7 +- +-`general register 8' +- r8 +- +-`general register 9' +- r9 +- +-`general register 10' +- r10 +- +-`general register 11' +- r11 +- +-`general register 12' +- r12 +- +-`general register 13' +- r13 +- +-`general register 14' +- r14 +- +-`general register 15' +- r15 +- +-`general register 16' +- r16 +- +-`general register 17' +- r17 +- +-`general register 18' +- r18 +- +-`general register 19' +- r19 +- +-`general register 20' +- r20 +- +-`general register 21' +- r21 +- +-`general register 22' +- r22 +- +-`general register 23' +- r23 +- +-`general register 24' +- r24 +- +-`general register 25' +- r25 +- +-`general register 26' +- r26 +- +-`general register 27' +- r27 +- +-`general register 28' +- r28 +- +-`general register 29' +- r29 +- +-`general register 30' +- r30, ep +- +-`general register 31' +- r31, lp +- +-`system register 0' +- eipc +- +-`system register 1' +- eipsw +- +-`system register 2' +- fepc +- +-`system register 3' +- fepsw +- +-`system register 4' +- ecr +- +-`system register 5' +- psw +- +- +-File: as.info, Node: V850 Floating Point, Next: V850 Directives, Prev: V850 Syntax, Up: V850-Dependent +- +-Floating Point +--------------- +- +- The V850 family uses IEEE floating-point numbers. +- +- +-File: as.info, Node: V850 Directives, Next: V850 Opcodes, Prev: V850 Floating Point, Up: V850-Dependent +- +-V850 Machine Directives +------------------------ +- +-`.offset ' +- Moves the offset into the current section to the specified amount. +- +-`.section "name", ' +- This is an extension to the standard .section directive. It sets +- the current section to be and creates an alias for this +- section called "name". +- +-`.v850' +- Specifies that the assembled code should be marked as being +- targeted at the V850 processor. This allows the linker to detect +- attempts to link such code with code assembled for other +- processors. +- +- +-File: as.info, Node: V850 Opcodes, Prev: V850 Directives, Up: V850-Dependent +- +-Opcodes +-------- +- +- `as' implements all the standard V850 opcodes. +- +- `as' also implements the following pseudo ops: +- +-`hi0()' +- Computes the higher 16 bits of the given expression and stores it +- into the immediate operand field of the given instruction. For +- example: +- +- `mulhi hi0(here - there), r5, r6' +- +- computes the difference between the address of labels 'here' and +- 'there', takes the upper 16 bits of this difference, shifts it +- down 16 bits and then mutliplies it by the lower 16 bits in +- register 5, putting the result into register 6. +- +-`lo()' +- Computes the lower 16 bits of the given expression and stores it +- into the immediate operand field of the given instruction. For +- example: +- +- `addi lo(here - there), r5, r6' +- +- computes the difference between the address of labels 'here' and +- 'there', takes the lower 16 bits of this difference and adds it to +- register 5, putting the result into register 6. +- +-`hi()' +- Computes the higher 16 bits of the given expression and then adds +- the value of the most significant bit of the lower 16 bits of the +- expression and stores the result into the immediate operand field +- of the given instruction. For example the following code can be +- used to compute the address of the label 'here' and store it into +- register 6: +- +- `movhi hi(here), r0, r6' `movea lo(here), r6, r6' +- +- The reason for this special behaviour is that movea performs a sign +- extention on its immediate operand. So for example if the address +- of 'here' was 0xFFFFFFFF then without the special behaviour of the +- hi() pseudo-op the movhi instruction would put 0xFFFF0000 into r6, +- then the movea instruction would takes its immediate operand, +- 0xFFFF, sign extend it to 32 bits, 0xFFFFFFFF, and then add it +- into r6 giving 0xFFFEFFFF which is wrong (the fifth nibble is E). +- With the hi() pseudo op adding in the top bit of the lo() pseudo +- op, the movhi instruction actually stores 0 into r6 (0xFFFF + 1 = +- 0x0000), so that the movea instruction stores 0xFFFFFFFF into r6 - +- the right value. +- +-`sdaoff()' +- Computes the offset of the named variable from the start of the +- Small Data Area (whoes address is held in register 4, the GP +- register) and stores the result as a 16 bit signed value in the +- immediate operand field of the given instruction. For example: +- +- `ld.w sdaoff(_a_variable)[gp],r6' +- +- loads the contents of the location pointed to by the label +- '_a_variable' into register 6, provided that the label is located +- somewhere within +/- 32K of the address held in the GP register. +- [Note the linker assumes that the GP register contains a fixed +- address set to the address of the label called '__gp'. This can +- either be set up automatically by the linker, or specifically set +- by using the `--defsym __gp=' command line option]. +- +-`tdaoff()' +- Computes the offset of the named variable from the start of the +- Tiny Data Area (whoes address is held in register 30, the EP +- register) and stores the result as a 7 or 8 bit unsigned value in +- the immediate operand field of the given instruction. For example: +- +- `sld.w tdaoff(_a_variable)[ep],r6' +- +- loads the contents of the location pointed to by the label +- '_a_variable' into register 6, provided that the label is located +- somewhere within +256 bytes of the address held in the EP +- register. [Note the linker assumes that the EP register contains +- a fixed address set to the address of the label called '__ep'. +- This can either be set up automatically by the linker, or +- specifically set by using the `--defsym __ep=' command line +- option]. +- +-`zdaoff()' +- Computes the offset of the named variable from address 0 and +- stores the result as a 16 bit signed value in the immediate +- operand field of the given instruction. For example: +- +- `movea zdaoff(_a_variable),zero,r6' +- +- puts the address of the label '_a_variable' into register 6, +- assuming that the label is somewhere within the first 32K of +- memory. (Strictly speaking it also possible to access the last +- 32K of memory as well, as the offsets are signed). +- +- For information on the V850 instruction set, see `V850 Family +-32-/16-Bit single-Chip Microcontroller Architecture Manual' from NEC. +-Ltd. +- +- +-File: as.info, Node: Reporting Bugs, Next: Acknowledgements, Prev: Machine Dependencies, Up: Top +- +-Reporting Bugs +-************** +- +- Your bug reports play an essential role in making `as' reliable. +- +- Reporting a bug may help you by bringing a solution to your problem, +-or it may not. But in any case the principal function of a bug report +-is to help the entire community by making the next version of `as' work +-better. Bug reports are your contribution to the maintenance of `as'. +- +- In order for a bug report to serve its purpose, you must include the +-information that enables us to fix the bug. +- +-* Menu: +- +-* Bug Criteria:: Have you found a bug? +-* Bug Reporting:: How to report bugs +- +- +-File: as.info, Node: Bug Criteria, Next: Bug Reporting, Up: Reporting Bugs +- +-Have you found a bug? +-===================== +- +- If you are not sure whether you have found a bug, here are some +-guidelines: +- +- * If the assembler gets a fatal signal, for any input whatever, that +- is a `as' bug. Reliable assemblers never crash. +- +- * If `as' produces an error message for valid input, that is a bug. +- +- * If `as' does not produce an error message for invalid input, that +- is a bug. However, you should note that your idea of "invalid +- input" might be our idea of "an extension" or "support for +- traditional practice". +- +- * If you are an experienced user of assemblers, your suggestions for +- improvement of `as' are welcome in any case. +- +- +-File: as.info, Node: Bug Reporting, Prev: Bug Criteria, Up: Reporting Bugs +- +-How to report bugs +-================== +- +- A number of companies and individuals offer support for GNU +-products. If you obtained `as' from a support organization, we +-recommend you contact that organization first. +- +- You can find contact information for many support companies and +-individuals in the file `etc/SERVICE' in the GNU Emacs distribution. +- +- In any event, we also recommend that you send bug reports for `as' +-to `bug-gnu-utils@gnu.org'. +- +- The fundamental principle of reporting bugs usefully is this: +-*report all the facts*. If you are not sure whether to state a fact or +-leave it out, state it! +- +- Often people omit facts because they think they know what causes the +-problem and assume that some details do not matter. Thus, you might +-assume that the name of a symbol you use in an example does not matter. +-Well, probably it does not, but one cannot be sure. Perhaps the bug +-is a stray memory reference which happens to fetch from the location +-where that name is stored in memory; perhaps, if the name were +-different, the contents of that location would fool the assembler into +-doing the right thing despite the bug. Play it safe and give a +-specific, complete example. That is the easiest thing for you to do, +-and the most helpful. +- +- Keep in mind that the purpose of a bug report is to enable us to fix +-the bug if it is new to us. Therefore, always write your bug reports +-on the assumption that the bug has not been reported previously. +- +- Sometimes people give a few sketchy facts and ask, "Does this ring a +-bell?" Those bug reports are useless, and we urge everyone to *refuse +-to respond to them* except to chide the sender to report bugs properly. +- +- To enable us to fix the bug, you should include all these things: +- +- * The version of `as'. `as' announces it if you start it with the +- `--version' argument. +- +- Without this, we will not know whether there is any point in +- looking for the bug in the current version of `as'. +- +- * Any patches you may have applied to the `as' source. +- +- * The type of machine you are using, and the operating system name +- and version number. +- +- * What compiler (and its version) was used to compile `as'--e.g. +- "`gcc-2.7'". +- +- * The command arguments you gave the assembler to assemble your +- example and observe the bug. To guarantee you will not omit +- something important, list them all. A copy of the Makefile (or +- the output from make) is sufficient. +- +- If we were to try to guess the arguments, we would probably guess +- wrong and then we might not encounter the bug. +- +- * A complete input file that will reproduce the bug. If the bug is +- observed when the assembler is invoked via a compiler, send the +- assembler source, not the high level language source. Most +- compilers will produce the assembler source when run with the `-S' +- option. If you are using `gcc', use the options `-v +- --save-temps'; this will save the assembler source in a file with +- an extension of `.s', and also show you exactly how `as' is being +- run. +- +- * A description of what behavior you observe that you believe is +- incorrect. For example, "It gets a fatal signal." +- +- Of course, if the bug is that `as' gets a fatal signal, then we +- will certainly notice it. But if the bug is incorrect output, we +- might not notice unless it is glaringly wrong. You might as well +- not give us a chance to make a mistake. +- +- Even if the problem you experience is a fatal signal, you should +- still say so explicitly. Suppose something strange is going on, +- such as, your copy of `as' is out of synch, or you have +- encountered a bug in the C library on your system. (This has +- happened!) Your copy might crash and ours would not. If you told +- us to expect a crash, then when ours fails to crash, we would know +- that the bug was not happening for us. If you had not told us to +- expect a crash, then we would not be able to draw any conclusion +- from our observations. +- +- * If you wish to suggest changes to the `as' source, send us context +- diffs, as generated by `diff' with the `-u', `-c', or `-p' option. +- Always send diffs from the old file to the new file. If you even +- discuss something in the `as' source, refer to it by context, not +- by line number. +- +- The line numbers in our development sources will not match those +- in your sources. Your line numbers would convey no useful +- information to us. +- +- Here are some things that are not necessary: +- +- * A description of the envelope of the bug. +- +- Often people who encounter a bug spend a lot of time investigating +- which changes to the input file will make the bug go away and which +- changes will not affect it. +- +- This is often time consuming and not very useful, because the way +- we will find the bug is by running a single example under the +- debugger with breakpoints, not by pure deduction from a series of +- examples. We recommend that you save your time for something else. +- +- Of course, if you can find a simpler example to report *instead* +- of the original one, that is a convenience for us. Errors in the +- output will be easier to spot, running under the debugger will take +- less time, and so on. +- +- However, simplification is not vital; if you do not want to do +- this, report the bug anyway and send us the entire test case you +- used. +- +- * A patch for the bug. +- +- A patch for the bug does help us if it is a good one. But do not +- omit the necessary information, such as the test case, on the +- assumption that a patch is all we need. We might see problems +- with your patch and decide to fix the problem another way, or we +- might not understand it at all. +- +- Sometimes with a program as complicated as `as' it is very hard to +- construct an example that will make the program follow a certain +- path through the code. If you do not send us the example, we will +- not be able to construct one, so we will not be able to verify +- that the bug is fixed. +- +- And if we cannot understand what bug you are trying to fix, or why +- your patch should be an improvement, we will not install it. A +- test case will help us to understand. +- +- * A guess about what the bug is or what it depends on. +- +- Such guesses are usually wrong. Even we cannot guess right about +- such things without first using the debugger to find the facts. +- +- +-File: as.info, Node: Acknowledgements, Next: Index, Prev: Reporting Bugs, Up: Top +- +-Acknowledgements +-**************** +- +- If you have contributed to `as' and your name isn't listed here, it +-is not meant as a slight. We just don't know about it. Send mail to +-the maintainer, and we'll correct the situation. Currently the +-maintainer is Ken Raeburn (email address `raeburn@cygnus.com'). +- +- Dean Elsner wrote the original GNU assembler for the VAX.(1) +- +- Jay Fenlason maintained GAS for a while, adding support for +-GDB-specific debug information and the 68k series machines, most of the +-preprocessing pass, and extensive changes in `messages.c', +-`input-file.c', `write.c'. +- +- K. Richard Pixley maintained GAS for a while, adding various +-enhancements and many bug fixes, including merging support for several +-processors, breaking GAS up to handle multiple object file format back +-ends (including heavy rewrite, testing, an integration of the coff and +-b.out back ends), adding configuration including heavy testing and +-verification of cross assemblers and file splits and renaming, +-converted GAS to strictly ANSI C including full prototypes, added +-support for m680[34]0 and cpu32, did considerable work on i960 +-including a COFF port (including considerable amounts of reverse +-engineering), a SPARC opcode file rewrite, DECstation, rs6000, and +-hp300hpux host ports, updated "know" assertions and made them work, +-much other reorganization, cleanup, and lint. +- +- Ken Raeburn wrote the high-level BFD interface code to replace most +-of the code in format-specific I/O modules. +- +- The original VMS support was contributed by David L. Kashtan. Eric +-Youngdale has done much work with it since. +- +- The Intel 80386 machine description was written by Eliot Dresselhaus. +- +- Minh Tran-Le at IntelliCorp contributed some AIX 386 support. +- +- The Motorola 88k machine description was contributed by Devon Bowen +-of Buffalo University and Torbjorn Granlund of the Swedish Institute of +-Computer Science. +- +- Keith Knowles at the Open Software Foundation wrote the original +-MIPS back end (`tc-mips.c', `tc-mips.h'), and contributed Rose format +-support (which hasn't been merged in yet). Ralph Campbell worked with +-the MIPS code to support a.out format. +- +- Support for the Zilog Z8k and Hitachi H8/300 and H8/500 processors +-(tc-z8k, tc-h8300, tc-h8500), and IEEE 695 object file format +-(obj-ieee), was written by Steve Chamberlain of Cygnus Support. Steve +-also modified the COFF back end to use BFD for some low-level +-operations, for use with the H8/300 and AMD 29k targets. +- +- John Gilmore built the AMD 29000 support, added `.include' support, +-and simplified the configuration of which versions accept which +-directives. He updated the 68k machine description so that Motorola's +-opcodes always produced fixed-size instructions (e.g. `jsr'), while +-synthetic instructions remained shrinkable (`jbsr'). John fixed many +-bugs, including true tested cross-compilation support, and one bug in +-relaxation that took a week and required the proverbial one-bit fix. +- +- Ian Lance Taylor of Cygnus Support merged the Motorola and MIT +-syntax for the 68k, completed support for some COFF targets (68k, i386 +-SVR3, and SCO Unix), added support for MIPS ECOFF and ELF targets, +-wrote the initial RS/6000 and PowerPC assembler, and made a few other +-minor patches. +- +- Steve Chamberlain made `as' able to generate listings. +- +- Hewlett-Packard contributed support for the HP9000/300. +- +- Jeff Law wrote GAS and BFD support for the native HPPA object format +-(SOM) along with a fairly extensive HPPA testsuite (for both SOM and +-ELF object formats). This work was supported by both the Center for +-Software Science at the University of Utah and Cygnus Support. +- +- Support for ELF format files has been worked on by Mark Eichin of +-Cygnus Support (original, incomplete implementation for SPARC), Pete +-Hoogenboom and Jeff Law at the University of Utah (HPPA mainly), +-Michael Meissner of the Open Software Foundation (i386 mainly), and Ken +-Raeburn of Cygnus Support (sparc, and some initial 64-bit support). +- +- Richard Henderson rewrote the Alpha assembler. Klaus Kaempf wrote +-GAS and BFD support for openVMS/Alpha. +- +- Several engineers at Cygnus Support have also provided many small +-bug fixes and configuration enhancements. +- +- Many others have contributed large or small bugfixes and +-enhancements. If you have contributed significant work and are not +-mentioned on this list, and want to be, let us know. Some of the +-history has been lost; we are not intentionally leaving anyone out. +- +- ---------- Footnotes ---------- +- +- (1) Any more details? +- +diff -rup --new-file binutils-2.9.1/gas/doc/as.info-7 binutils-2.9.1/gas/doc/as.info-7 +--- binutils-2.9.1/gas/doc/as.info-7 Fri May 1 08:45:01 1998 ++++ binutils-2.9.1/gas/doc/as.info-7 Wed Dec 31 17:00:00 1969 +@@ -1,941 +0,0 @@ +-This is Info file as.info, produced by Makeinfo version 1.68 from the +-input file as.texinfo. +- +-START-INFO-DIR-ENTRY +-* As: (as). The GNU assembler. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU Assembler "as". +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: as.info, Node: Index, Prev: Acknowledgements, Up: Top +- +-Index +-***** +- +-* Menu: +- +-* #: Comments. +-* #APP: Preprocessing. +-* #NO_APP: Preprocessing. +-* $ in symbol names <1>: D10V-Chars. +-* $ in symbol names <2>: H8/500-Chars. +-* $ in symbol names: SH-Chars. +-* -: Command Line. +-* -+ option, VAX/VMS: VAX-Opts. +-* --base-size-default-16: M68K-Opts. +-* --base-size-default-32: M68K-Opts. +-* --bitwise-or option, M680x0: M68K-Opts. +-* --disp-size-default-16: M68K-Opts. +-* --disp-size-default-32: M68K-Opts. +-* --register-prefix-optional option, M680x0: M68K-Opts. +-* -a: a. +-* -A options, i960: Options-i960. +-* -ac: a. +-* -ad: a. +-* -ah: a. +-* -al: a. +-* -an: a. +-* -as: a. +-* -Asparclet: Sparc-Opts. +-* -Asparclite: Sparc-Opts. +-* -Av6: Sparc-Opts. +-* -Av8: Sparc-Opts. +-* -Av9: Sparc-Opts. +-* -Av9a: Sparc-Opts. +-* -b option, i960: Options-i960. +-* -D: D. +-* -D, ignored on VAX: VAX-Opts. +-* -d, VAX option: VAX-Opts. +-* -EB command line option, ARM: ARM Options. +-* -EB option (MIPS): MIPS Opts. +-* -EL command line option, ARM: ARM Options. +-* -EL option (MIPS): MIPS Opts. +-* -enforce-aligned-data: Sparc-Aligned-Data. +-* -f: f. +-* -G option (MIPS): MIPS Opts. +-* -h option, VAX/VMS: VAX-Opts. +-* -I PATH: I. +-* -J, ignored on VAX: VAX-Opts. +-* -K: K. +-* -L: L. +-* -l option, M680x0: M68K-Opts. +-* -M: M. +-* -m68000 and related options: M68K-Opts. +-* -mall command line option, ARM: ARM Options. +-* -mapcs command line option, ARM: ARM Options. +-* -marm command line option, ARM: ARM Options. +-* -marmv command line option, ARM: ARM Options. +-* -mbig-endian option (ARC): ARC-Opts. +-* -MD: MD. +-* -mfpa command line option, ARM: ARM Options. +-* -mfpe-old command line option, ARM: ARM Options. +-* -mlittle-endian option (ARC): ARC-Opts. +-* -mno-fpu command line option, ARM: ARM Options. +-* -mthumb command line option, ARM: ARM Options. +-* -mthumb-interwork command line option, ARM: ARM Options. +-* -mv850 command line option, V850: V850 Options. +-* -no-relax option, i960: Options-i960. +-* -nocpp ignored (MIPS): MIPS Opts. +-* -o: o. +-* -R: R. +-* -S, ignored on VAX: VAX-Opts. +-* -statistics: statistics. +-* -t, ignored on VAX: VAX-Opts. +-* -T, ignored on VAX: VAX-Opts. +-* -traditional-format: traditional-format. +-* -v: v. +-* -V, redundant on VAX: VAX-Opts. +-* -version: v. +-* -W: W. +-* -wsigned_overflow command line option, V850: V850 Options. +-* -wunsigned_overflow command line option, V850: V850 Options. +-* . (symbol): Dot. +-* .insn: MIPS insn. +-* .o: Object. +-* .param on HPPA: HPPA Directives. +-* .set autoextend: MIPS autoextend. +-* .set mipsN: MIPS ISA. +-* .set noautoextend: MIPS autoextend. +-* .set pop: MIPS option stack. +-* .set push: MIPS option stack. +-* .v850 directive, V850: V850 Directives. +-* 16-bit code, i386: i386-16bit. +-* 29K support: AMD29K-Dependent. +-* : (label): Statements. +-* @word modifier, D10V: D10V-Word. +-* \" (doublequote character): Strings. +-* \\ (\ character): Strings. +-* \b (backspace character): Strings. +-* \DDD (octal character code): Strings. +-* \f (formfeed character): Strings. +-* \n (newline character): Strings. +-* \r (carriage return character): Strings. +-* \t (tab): Strings. +-* \XD... (hex character code): Strings. +-* a.out: Object. +-* a.out symbol attributes: a.out Symbols. +-* ABORT directive: ABORT. +-* abort directive: Abort. +-* absolute section: Ld Sections. +-* addition, permitted arguments: Infix Ops. +-* addresses: Expressions. +-* addresses, format of: Secs Background. +-* addressing modes, D10V: D10V-Addressing. +-* addressing modes, H8/300: H8/300-Addressing. +-* addressing modes, H8/500: H8/500-Addressing. +-* addressing modes, M680x0: M68K-Syntax. +-* addressing modes, SH: SH-Addressing. +-* addressing modes, Z8000: Z8000-Addressing. +-* advancing location counter: Org. +-* align directive: Align. +-* align directive, SPARC: Sparc-Directives. +-* altered difference tables: Word. +-* alternate syntax for the 680x0: M68K-Moto-Syntax. +-* AMD 29K floating point (IEEE): AMD29K Floating Point. +-* AMD 29K identifiers: AMD29K-Chars. +-* AMD 29K line comment character: AMD29K-Chars. +-* AMD 29K machine directives: AMD29K Directives. +-* AMD 29K macros: AMD29K-Macros. +-* AMD 29K opcodes: AMD29K Opcodes. +-* AMD 29K options (none): AMD29K Options. +-* AMD 29K protected registers: AMD29K-Regs. +-* AMD 29K register names: AMD29K-Regs. +-* AMD 29K special purpose registers: AMD29K-Regs. +-* AMD 29K support: AMD29K-Dependent. +-* app-file directive: App-File. +-* ARC architectures: ARC-Opts. +-* ARC big-endian output: ARC-Opts. +-* ARC endianness: Overview. +-* ARC floating point (IEEE): ARC-Float. +-* ARC little-endian output: ARC-Opts. +-* ARC machine directives: ARC-Directives. +-* ARC options: ARC-Opts. +-* ARC support: ARC-Dependent. +-* architecture options, i960: Options-i960. +-* architecture options, M680x0: M68K-Opts. +-* architectures, ARC: ARC-Opts. +-* architectures, SPARC: Sparc-Opts. +-* arguments for addition: Infix Ops. +-* arguments for subtraction: Infix Ops. +-* arguments in expressions: Arguments. +-* arithmetic functions: Operators. +-* arithmetic operands: Arguments. +-* arm directive, ARM: ARM Directives. +-* ARM floating point (IEEE): ARM Floating Point. +-* ARM identifiers: ARM-Chars. +-* ARM line comment character: ARM-Chars. +-* ARM machine directives: ARM Directives. +-* ARM opcodes: ARM Opcodes. +-* ARM options (none): ARM Options. +-* ARM register names: ARM-Regs. +-* ARM support: ARM-Dependent. +-* ascii directive: Ascii. +-* asciz directive: Asciz. +-* assembler bugs, reporting: Bug Reporting. +-* assembler crash: Bug Criteria. +-* assembler internal logic error: As Sections. +-* assembler version: v. +-* assembler, and linker: Secs Background. +-* assembly listings, enabling: a. +-* assigning values to symbols <1>: Setting Symbols. +-* assigning values to symbols: Equ. +-* attributes, symbol: Symbol Attributes. +-* auxiliary attributes, COFF symbols: COFF Symbols. +-* auxiliary symbol information, COFF: Dim. +-* Av7: Sparc-Opts. +-* backslash (\\): Strings. +-* backspace (\b): Strings. +-* balign directive: Balign. +-* balignl directive: Balign. +-* balignw directive: Balign. +-* big endian output, ARC: Overview. +-* big endian output, MIPS: Overview. +-* big-endian output, ARC: ARC-Opts. +-* big-endian output, MIPS: MIPS Opts. +-* bignums: Bignums. +-* binary integers: Integers. +-* bitfields, not supported on VAX: VAX-no. +-* block: Z8000 Directives. +-* block directive, AMD 29K: AMD29K Directives. +-* branch improvement, M680x0: M68K-Branch. +-* branch improvement, VAX: VAX-branch. +-* branch recording, i960: Options-i960. +-* branch statistics table, i960: Options-i960. +-* bss directive, i960: Directives-i960. +-* bss section <1>: Ld Sections. +-* bss section: bss. +-* bug criteria: Bug Criteria. +-* bug reports: Bug Reporting. +-* bugs in assembler: Reporting Bugs. +-* bus lock prefixes, i386: i386-prefixes. +-* bval: Z8000 Directives. +-* byte directive: Byte. +-* call instructions, i386: i386-Opcodes. +-* callj, i960 pseudo-opcode: callj-i960. +-* carriage return (\r): Strings. +-* character constants: Characters. +-* character escape codes: Strings. +-* character, single: Chars. +-* characters used in symbols: Symbol Intro. +-* code directive, ARM: ARM Directives. +-* code16 directive, i386: i386-16bit. +-* code32 directive, i386: i386-16bit. +-* COFF auxiliary symbol information: Dim. +-* COFF structure debugging: Tag. +-* COFF symbol attributes: COFF Symbols. +-* COFF symbol descriptor: Desc. +-* COFF symbol storage class: Scl. +-* COFF symbol type: Type. +-* COFF symbols, debugging: Def. +-* COFF value attribute: Val. +-* COMDAT: Linkonce. +-* comm directive: Comm. +-* command line conventions: Command Line. +-* command line options, V850: V850 Options. +-* command-line options ignored, VAX: VAX-Opts. +-* comments: Comments. +-* comments, M680x0: M68K-Chars. +-* comments, removed by preprocessor: Preprocessing. +-* common directive, SPARC: Sparc-Directives. +-* common sections: Linkonce. +-* common variable storage: bss. +-* compare and jump expansions, i960: Compare-and-branch-i960. +-* compare/branch instructions, i960: Compare-and-branch-i960. +-* conditional assembly: If. +-* constant, single character: Chars. +-* constants: Constants. +-* constants, bignum: Bignums. +-* constants, character: Characters. +-* constants, converted by preprocessor: Preprocessing. +-* constants, floating point: Flonums. +-* constants, integer: Integers. +-* constants, number: Numbers. +-* constants, string: Strings. +-* continuing statements: Statements. +-* conversion instructions, i386: i386-Opcodes. +-* coprocessor wait, i386: i386-prefixes. +-* cpu directive, SPARC: ARC-Directives. +-* cputype directive, AMD 29K: AMD29K Directives. +-* crash of assembler: Bug Criteria. +-* current address: Dot. +-* current address, advancing: Org. +-* D10V @word modifier: D10V-Word. +-* D10V addressing modes: D10V-Addressing. +-* D10V floating point: D10V-Float. +-* D10V line comment character: D10V-Chars. +-* D10V opcode summary: D10V-Opcodes. +-* D10V optimization: Overview. +-* D10V options: D10V-Opts. +-* D10V registers: D10V-Regs. +-* D10V size modifiers: D10V-Size. +-* D10V sub-instruction ordering: D10V-Chars. +-* D10V sub-instructions: D10V-Subs. +-* D10V support: D10V-Dependent. +-* D10V syntax: D10V-Syntax. +-* data alignment on SPARC: Sparc-Aligned-Data. +-* data and text sections, joining: R. +-* data directive: Data. +-* data section: Ld Sections. +-* data1 directive, M680x0: M68K-Directives. +-* data2 directive, M680x0: M68K-Directives. +-* debuggers, and symbol order: Symbols. +-* debugging COFF symbols: Def. +-* decimal integers: Integers. +-* def directive: Def. +-* dependency tracking: MD. +-* deprecated directives: Deprecated. +-* desc directive: Desc. +-* descriptor, of a.out symbol: Symbol Desc. +-* dfloat directive, VAX: VAX-directives. +-* difference tables altered: Word. +-* difference tables, warning: K. +-* dim directive: Dim. +-* directives and instructions: Statements. +-* directives, M680x0: M68K-Directives. +-* directives, machine independent: Pseudo Ops. +-* directives, Z8000: Z8000 Directives. +-* displacement sizing character, VAX: VAX-operands. +-* dot (symbol): Dot. +-* double directive: Double. +-* double directive, i386: i386-Float. +-* double directive, M680x0: M68K-Float. +-* double directive, VAX: VAX-float. +-* doublequote (\"): Strings. +-* ECOFF sections: MIPS Object. +-* ecr register, V850: V850-Regs. +-* eight-byte integer: Quad. +-* eipc register, V850: V850-Regs. +-* eipsw register, V850: V850-Regs. +-* eject directive: Eject. +-* else directive: Else. +-* empty expressions: Empty Exprs. +-* emulation: Overview. +-* endef directive: Endef. +-* endianness, ARC: Overview. +-* endianness, MIPS: Overview. +-* endif directive: Endif. +-* endm directive: Macro. +-* EOF, newline must precede: Statements. +-* ep register, V850: V850-Regs. +-* equ directive: Equ. +-* equiv directive: Equiv. +-* err directive: Err. +-* error messsages: Errors. +-* error on valid input: Bug Criteria. +-* errors, continuing after: Z. +-* escape codes, character: Strings. +-* even: Z8000 Directives. +-* even directive, M680x0: M68K-Directives. +-* exitm directive: Macro. +-* expr (internal section): As Sections. +-* expression arguments: Arguments. +-* expressions: Expressions. +-* expressions, empty: Empty Exprs. +-* expressions, integer: Integer Exprs. +-* extend directive M680x0: M68K-Float. +-* extended directive, i960: Directives-i960. +-* extern directive: Extern. +-* faster processing (-f): f. +-* fatal signal: Bug Criteria. +-* fepc register, V850: V850-Regs. +-* fepsw register, V850: V850-Regs. +-* ffloat directive, VAX: VAX-directives. +-* file directive: File. +-* file directive, AMD 29K: AMD29K Directives. +-* file name, logical <1>: App-File. +-* file name, logical: File. +-* files, including: Include. +-* files, input: Input Files. +-* fill directive: Fill. +-* filling memory <1>: Skip. +-* filling memory: Space. +-* float directive: Float. +-* float directive, i386: i386-Float. +-* float directive, M680x0: M68K-Float. +-* float directive, VAX: VAX-float. +-* floating point numbers: Flonums. +-* floating point numbers (double): Double. +-* floating point numbers (single) <1>: Single. +-* floating point numbers (single): Float. +-* floating point, AMD 29K (IEEE): AMD29K Floating Point. +-* floating point, ARC (IEEE): ARC-Float. +-* floating point, ARM (IEEE): ARM Floating Point. +-* floating point, D10V: D10V-Float. +-* floating point, H8/300 (IEEE): H8/300 Floating Point. +-* floating point, H8/500 (IEEE): H8/500 Floating Point. +-* floating point, HPPA (IEEE): HPPA Floating Point. +-* floating point, i386: i386-Float. +-* floating point, i960 (IEEE): Floating Point-i960. +-* floating point, M680x0: M68K-Float. +-* floating point, SH (IEEE): SH Floating Point. +-* floating point, SPARC (IEEE): Sparc-Float. +-* floating point, V850 (IEEE): V850 Floating Point. +-* floating point, VAX: VAX-float. +-* flonums: Flonums. +-* force_thumb directive, ARM: ARM Directives. +-* format of error messages: Errors. +-* format of warning messages: Errors. +-* formfeed (\f): Strings. +-* functions, in expressions: Operators. +-* gbr960, i960 postprocessor: Options-i960. +-* gfloat directive, VAX: VAX-directives. +-* global: Z8000 Directives. +-* global directive: Global. +-* gp register, MIPS: MIPS Object. +-* gp register, V850: V850-Regs. +-* grouping data: Sub-Sections. +-* H8/300 addressing modes: H8/300-Addressing. +-* H8/300 floating point (IEEE): H8/300 Floating Point. +-* H8/300 line comment character: H8/300-Chars. +-* H8/300 line separator: H8/300-Chars. +-* H8/300 machine directives (none): H8/300 Directives. +-* H8/300 opcode summary: H8/300 Opcodes. +-* H8/300 options (none): H8/300 Options. +-* H8/300 registers: H8/300-Regs. +-* H8/300 size suffixes: H8/300 Opcodes. +-* H8/300 support: H8/300-Dependent. +-* H8/300H, assembling for: H8/300 Directives. +-* H8/500 addressing modes: H8/500-Addressing. +-* H8/500 floating point (IEEE): H8/500 Floating Point. +-* H8/500 line comment character: H8/500-Chars. +-* H8/500 line separator: H8/500-Chars. +-* H8/500 machine directives (none): H8/500 Directives. +-* H8/500 opcode summary: H8/500 Opcodes. +-* H8/500 options (none): H8/500 Options. +-* H8/500 registers: H8/500-Regs. +-* H8/500 support: H8/500-Dependent. +-* half directive, SPARC: Sparc-Directives. +-* hex character code (\XD...): Strings. +-* hexadecimal integers: Integers. +-* hfloat directive, VAX: VAX-directives. +-* hi pseudo-op, V850: V850 Opcodes. +-* hi0 pseudo-op, V850: V850 Opcodes. +-* HPPA directives not supported: HPPA Directives. +-* HPPA floating point (IEEE): HPPA Floating Point. +-* HPPA Syntax: HPPA Options. +-* HPPA-only directives: HPPA Directives. +-* hword directive: hword. +-* i386 16-bit code: i386-16bit. +-* i386 conversion instructions: i386-Opcodes. +-* i386 floating point: i386-Float. +-* i386 immediate operands: i386-Syntax. +-* i386 jump optimization: i386-jumps. +-* i386 jump, call, return: i386-Syntax. +-* i386 jump/call operands: i386-Syntax. +-* i386 memory references: i386-Memory. +-* i386 mul, imul instructions: i386-Notes. +-* i386 opcode naming: i386-Opcodes. +-* i386 opcode prefixes: i386-prefixes. +-* i386 options (none): i386-Options. +-* i386 register operands: i386-Syntax. +-* i386 registers: i386-Regs. +-* i386 sections: i386-Syntax. +-* i386 size suffixes: i386-Syntax. +-* i386 source, destination operands: i386-Syntax. +-* i386 support: i386-Dependent. +-* i386 syntax compatibility: i386-Syntax. +-* i80306 support: i386-Dependent. +-* i960 architecture options: Options-i960. +-* i960 branch recording: Options-i960. +-* i960 callj pseudo-opcode: callj-i960. +-* i960 compare and jump expansions: Compare-and-branch-i960. +-* i960 compare/branch instructions: Compare-and-branch-i960. +-* i960 floating point (IEEE): Floating Point-i960. +-* i960 machine directives: Directives-i960. +-* i960 opcodes: Opcodes for i960. +-* i960 options: Options-i960. +-* i960 support: i960-Dependent. +-* ident directive: Ident. +-* identifiers, AMD 29K: AMD29K-Chars. +-* identifiers, ARM: ARM-Chars. +-* if directive: If. +-* ifdef directive: If. +-* ifndef directive: If. +-* ifnotdef directive: If. +-* immediate character, M680x0: M68K-Chars. +-* immediate character, VAX: VAX-operands. +-* immediate operands, i386: i386-Syntax. +-* imul instruction, i386: i386-Notes. +-* include directive: Include. +-* include directive search path: I. +-* indirect character, VAX: VAX-operands. +-* infix operators: Infix Ops. +-* inhibiting interrupts, i386: i386-prefixes. +-* input: Input Files. +-* input file linenumbers: Input Files. +-* instruction set, M680x0: M68K-opcodes. +-* instruction summary, D10V: D10V-Opcodes. +-* instruction summary, H8/300: H8/300 Opcodes. +-* instruction summary, H8/500: H8/500 Opcodes. +-* instruction summary, SH: SH Opcodes. +-* instruction summary, Z8000: Z8000 Opcodes. +-* instructions and directives: Statements. +-* int directive: Int. +-* int directive, H8/300: H8/300 Directives. +-* int directive, H8/500: H8/500 Directives. +-* int directive, i386: i386-Float. +-* integer expressions: Integer Exprs. +-* integer, 16-byte: Octa. +-* integer, 8-byte: Quad. +-* integers: Integers. +-* integers, 16-bit: hword. +-* integers, 32-bit: Int. +-* integers, binary: Integers. +-* integers, decimal: Integers. +-* integers, hexadecimal: Integers. +-* integers, octal: Integers. +-* integers, one byte: Byte. +-* internal assembler sections: As Sections. +-* invalid input: Bug Criteria. +-* invocation summary: Overview. +-* irp directive: Irp. +-* irpc directive: Irpc. +-* joining text and data sections: R. +-* jump instructions, i386: i386-Opcodes. +-* jump optimization, i386: i386-jumps. +-* jump/call operands, i386: i386-Syntax. +-* label (:): Statements. +-* labels: Labels. +-* lcomm directive: Lcomm. +-* ld: Object. +-* ldouble directive M680x0: M68K-Float. +-* leafproc directive, i960: Directives-i960. +-* length of symbols: Symbol Intro. +-* lflags directive (ignored): Lflags. +-* line comment character: Comments. +-* line comment character, AMD 29K: AMD29K-Chars. +-* line comment character, ARM: ARM-Chars. +-* line comment character, D10V: D10V-Chars. +-* line comment character, H8/300: H8/300-Chars. +-* line comment character, H8/500: H8/500-Chars. +-* line comment character, M680x0: M68K-Chars. +-* line comment character, SH: SH-Chars. +-* line comment character, V850: V850-Chars. +-* line comment character, Z8000: Z8000-Chars. +-* line directive: Line. +-* line directive, AMD 29K: AMD29K Directives. +-* line numbers, in input files: Input Files. +-* line numbers, in warnings/errors: Errors. +-* line separator character: Statements. +-* line separator, H8/300: H8/300-Chars. +-* line separator, H8/500: H8/500-Chars. +-* line separator, SH: SH-Chars. +-* line separator, Z8000: Z8000-Chars. +-* lines starting with #: Comments. +-* linker: Object. +-* linker, and assembler: Secs Background. +-* linkonce directive: Linkonce. +-* list directive: List. +-* listing control, turning off: Nolist. +-* listing control, turning on: List. +-* listing control: new page: Eject. +-* listing control: paper size: Psize. +-* listing control: subtitle: Sbttl. +-* listing control: title line: Title. +-* listings, enabling: a. +-* little endian output, ARC: Overview. +-* little endian output, MIPS: Overview. +-* little-endian output, ARC: ARC-Opts. +-* little-endian output, MIPS: MIPS Opts. +-* ln directive: Ln. +-* lo pseudo-op, V850: V850 Opcodes. +-* local common symbols: Lcomm. +-* local labels, retaining in output: L. +-* local symbol names: Symbol Names. +-* location counter: Dot. +-* location counter, advancing: Org. +-* logical file name <1>: File. +-* logical file name: App-File. +-* logical line number: Line. +-* logical line numbers: Comments. +-* long directive: Long. +-* long directive, i386: i386-Float. +-* lp register, V850: V850-Regs. +-* lval: Z8000 Directives. +-* M680x0 addressing modes: M68K-Syntax. +-* M680x0 architecture options: M68K-Opts. +-* M680x0 branch improvement: M68K-Branch. +-* M680x0 directives: M68K-Directives. +-* M680x0 floating point: M68K-Float. +-* M680x0 immediate character: M68K-Chars. +-* M680x0 line comment character: M68K-Chars. +-* M680x0 opcodes: M68K-opcodes. +-* M680x0 options: M68K-Opts. +-* M680x0 pseudo-opcodes: M68K-Branch. +-* M680x0 size modifiers: M68K-Syntax. +-* M680x0 support: M68K-Dependent. +-* M680x0 syntax: M68K-Syntax. +-* machine dependencies: Machine Dependencies. +-* machine directives, AMD 29K: AMD29K Directives. +-* machine directives, ARC: ARC-Directives. +-* machine directives, ARM: ARM Directives. +-* machine directives, H8/300 (none): H8/300 Directives. +-* machine directives, H8/500 (none): H8/500 Directives. +-* machine directives, i960: Directives-i960. +-* machine directives, SH: SH Directives. +-* machine directives, SPARC: Sparc-Directives. +-* machine directives, V850: V850 Directives. +-* machine directives, VAX: VAX-directives. +-* machine independent directives: Pseudo Ops. +-* machine instructions (not covered): Manual. +-* machine-independent syntax: Syntax. +-* macro directive: Macro. +-* macros: Macro. +-* Macros, AMD 29K: AMD29K-Macros. +-* macros, count executed: Macro. +-* make rules: MD. +-* manual, structure and purpose: Manual. +-* memory references, i386: i386-Memory. +-* merging text and data sections: R. +-* messages from assembler: Errors. +-* minus, permitted arguments: Infix Ops. +-* MIPS architecture options: MIPS Opts. +-* MIPS big-endian output: MIPS Opts. +-* MIPS debugging directives: MIPS Stabs. +-* MIPS ECOFF sections: MIPS Object. +-* MIPS endianness: Overview. +-* MIPS ISA: Overview. +-* MIPS ISA override: MIPS ISA. +-* MIPS little-endian output: MIPS Opts. +-* MIPS option stack: MIPS option stack. +-* MIPS processor: MIPS-Dependent. +-* MIT: M68K-Syntax. +-* mnemonics for opcodes, VAX: VAX-opcodes. +-* mnemonics, D10V: D10V-Opcodes. +-* mnemonics, H8/300: H8/300 Opcodes. +-* mnemonics, H8/500: H8/500 Opcodes. +-* mnemonics, SH: SH Opcodes. +-* mnemonics, Z8000: Z8000 Opcodes. +-* Motorola syntax for the 680x0: M68K-Moto-Syntax. +-* MRI compatibility mode: M. +-* mri directive: MRI. +-* MRI mode, temporarily: MRI. +-* mul instruction, i386: i386-Notes. +-* multi-line statements: Statements. +-* name: Z8000 Directives. +-* named section: Section. +-* named sections: Ld Sections. +-* names, symbol: Symbol Names. +-* naming object file: o. +-* new page, in listings: Eject. +-* newline (\n): Strings. +-* newline, required at file end: Statements. +-* nolist directive: Nolist. +-* null-terminated strings: Asciz. +-* number constants: Numbers. +-* number of macros executed: Macro. +-* numbered subsections: Sub-Sections. +-* numbers, 16-bit: hword. +-* numeric values: Expressions. +-* object file: Object. +-* object file format: Object Formats. +-* object file name: o. +-* object file, after errors: Z. +-* obsolescent directives: Deprecated. +-* octa directive: Octa. +-* octal character code (\DDD): Strings. +-* octal integers: Integers. +-* offset directive, V850: V850 Directives. +-* opcode mnemonics, VAX: VAX-opcodes. +-* opcode naming, i386: i386-Opcodes. +-* opcode prefixes, i386: i386-prefixes. +-* opcode suffixes, i386: i386-Syntax. +-* opcode summary, D10V: D10V-Opcodes. +-* opcode summary, H8/300: H8/300 Opcodes. +-* opcode summary, H8/500: H8/500 Opcodes. +-* opcode summary, SH: SH Opcodes. +-* opcode summary, Z8000: Z8000 Opcodes. +-* opcodes for AMD 29K: AMD29K Opcodes. +-* opcodes for ARM: ARM Opcodes. +-* opcodes for V850: V850 Opcodes. +-* opcodes, i960: Opcodes for i960. +-* opcodes, M680x0: M68K-opcodes. +-* operand delimiters, i386: i386-Syntax. +-* operand notation, VAX: VAX-operands. +-* operands in expressions: Arguments. +-* operator precedence: Infix Ops. +-* operators, in expressions: Operators. +-* operators, permitted arguments: Infix Ops. +-* optimization, D10V: Overview. +-* option summary: Overview. +-* options for AMD29K (none): AMD29K Options. +-* options for ARC: ARC-Opts. +-* options for ARM (none): ARM Options. +-* options for i386 (none): i386-Options. +-* options for SPARC: Sparc-Opts. +-* options for V850 (none): V850 Options. +-* options for VAX/VMS: VAX-Opts. +-* options, all versions of assembler: Invoking. +-* options, command line: Command Line. +-* options, D10V: D10V-Opts. +-* options, H8/300 (none): H8/300 Options. +-* options, H8/500 (none): H8/500 Options. +-* options, i960: Options-i960. +-* options, M680x0: M68K-Opts. +-* options, SH (none): SH Options. +-* options, Z8000: Z8000 Options. +-* org directive: Org. +-* other attribute, of a.out symbol: Symbol Other. +-* output file: Object. +-* p2align directive: P2align. +-* p2alignl directive: P2align. +-* p2alignw directive: P2align. +-* padding the location counter: Align. +-* padding the location counter given a power of two: P2align. +-* padding the location counter given number of bytes: Balign. +-* page, in listings: Eject. +-* paper size, for listings: Psize. +-* paths for .include: I. +-* patterns, writing in memory: Fill. +-* plus, permitted arguments: Infix Ops. +-* precedence of operators: Infix Ops. +-* precision, floating point: Flonums. +-* prefix operators: Prefix Ops. +-* prefixes, i386: i386-prefixes. +-* preprocessing: Preprocessing. +-* preprocessing, turning on and off: Preprocessing. +-* primary attributes, COFF symbols: COFF Symbols. +-* proc directive, SPARC: Sparc-Directives. +-* protected registers, AMD 29K: AMD29K-Regs. +-* pseudo-opcodes, M680x0: M68K-Branch. +-* pseudo-ops for branch, VAX: VAX-branch. +-* pseudo-ops, machine independent: Pseudo Ops. +-* psize directive: Psize. +-* psw register, V850: V850-Regs. +-* purpose of GNU assembler: GNU Assembler. +-* quad directive: Quad. +-* quad directive, i386: i386-Float. +-* real-mode code, i386: i386-16bit. +-* register names, AMD 29K: AMD29K-Regs. +-* register names, ARM: ARM-Regs. +-* register names, H8/300: H8/300-Regs. +-* register names, V850: V850-Regs. +-* register names, VAX: VAX-operands. +-* register operands, i386: i386-Syntax. +-* registers, D10V: D10V-Regs. +-* registers, H8/500: H8/500-Regs. +-* registers, i386: i386-Regs. +-* registers, SH: SH-Regs. +-* registers, Z8000: Z8000-Regs. +-* relocation: Sections. +-* relocation example: Ld Sections. +-* repeat prefixes, i386: i386-prefixes. +-* reporting bugs in assembler: Reporting Bugs. +-* rept directive: Rept. +-* reserve directive, SPARC: Sparc-Directives. +-* return instructions, i386: i386-Syntax. +-* rsect: Z8000 Directives. +-* sbttl directive: Sbttl. +-* scl directive: Scl. +-* sdaoff pseudo-op, V850: V850 Opcodes. +-* search path for .include: I. +-* sect directive, AMD 29K: AMD29K Directives. +-* section directive: Section. +-* section directive, V850: V850 Directives. +-* section override prefixes, i386: i386-prefixes. +-* section-relative addressing: Secs Background. +-* sections: Sections. +-* sections in messages, internal: As Sections. +-* sections, i386: i386-Syntax. +-* sections, named: Ld Sections. +-* seg directive, SPARC: Sparc-Directives. +-* segm: Z8000 Directives. +-* set directive: Set. +-* SH addressing modes: SH-Addressing. +-* SH floating point (IEEE): SH Floating Point. +-* SH line comment character: SH-Chars. +-* SH line separator: SH-Chars. +-* SH machine directives: SH Directives. +-* SH opcode summary: SH Opcodes. +-* SH options (none): SH Options. +-* SH registers: SH-Regs. +-* SH support: SH-Dependent. +-* short directive: Short. +-* single character constant: Chars. +-* single directive: Single. +-* single directive, i386: i386-Float. +-* sixteen bit integers: hword. +-* sixteen byte integer: Octa. +-* size directive: Size. +-* size modifiers, D10V: D10V-Size. +-* size modifiers, M680x0: M68K-Syntax. +-* size prefixes, i386: i386-prefixes. +-* size suffixes, H8/300: H8/300 Opcodes. +-* sizes operands, i386: i386-Syntax. +-* skip directive: Skip. +-* skip directive, M680x0: M68K-Directives. +-* skip directive, SPARC: Sparc-Directives. +-* sleb128 directive: Sleb128. +-* small objects, MIPS ECOFF: MIPS Object. +-* SOM symbol attributes: SOM Symbols. +-* source program: Input Files. +-* source, destination operands; i386: i386-Syntax. +-* sp register, V850: V850-Regs. +-* space directive: Space. +-* space used, maximum for assembly: statistics. +-* SPARC architectures: Sparc-Opts. +-* SPARC data alignment: Sparc-Aligned-Data. +-* SPARC floating point (IEEE): Sparc-Float. +-* SPARC machine directives: Sparc-Directives. +-* SPARC options: Sparc-Opts. +-* SPARC support: Sparc-Dependent. +-* special characters, M680x0: M68K-Chars. +-* special purpose registers, AMD 29K: AMD29K-Regs. +-* stabd directive: Stab. +-* stabn directive: Stab. +-* stabs directive: Stab. +-* stabX directives: Stab. +-* standard assembler sections: Secs Background. +-* standard input, as input file: Command Line. +-* statement on multiple lines: Statements. +-* statement separator character: Statements. +-* statement separator, H8/300: H8/300-Chars. +-* statement separator, H8/500: H8/500-Chars. +-* statement separator, SH: SH-Chars. +-* statement separator, Z8000: Z8000-Chars. +-* statements, structure of: Statements. +-* statistics, about assembly: statistics. +-* stopping the assembly: Abort. +-* string constants: Strings. +-* string directive: String. +-* string directive on HPPA: HPPA Directives. +-* string literals: Ascii. +-* string, copying to object file: String. +-* structure debugging, COFF: Tag. +-* sub-instruction ordering, D10V: D10V-Chars. +-* sub-instructions, D10V: D10V-Subs. +-* subexpressions: Arguments. +-* subtitles for listings: Sbttl. +-* subtraction, permitted arguments: Infix Ops. +-* summary of options: Overview. +-* support: HPPA-Dependent. +-* supporting files, including: Include. +-* suppressing warnings: W. +-* sval: Z8000 Directives. +-* symbol attributes: Symbol Attributes. +-* symbol attributes, a.out: a.out Symbols. +-* symbol attributes, COFF: COFF Symbols. +-* symbol attributes, SOM: SOM Symbols. +-* symbol descriptor, COFF: Desc. +-* symbol names: Symbol Names. +-* symbol names, $ in <1>: D10V-Chars. +-* symbol names, $ in <2>: H8/500-Chars. +-* symbol names, $ in: SH-Chars. +-* symbol names, local: Symbol Names. +-* symbol names, temporary: Symbol Names. +-* symbol storage class (COFF): Scl. +-* symbol type: Symbol Type. +-* symbol type, COFF: Type. +-* symbol value: Symbol Value. +-* symbol value, setting: Set. +-* symbol values, assigning: Setting Symbols. +-* symbol versioning: Symver. +-* symbol, common: Comm. +-* symbol, making visible to linker: Global. +-* symbolic debuggers, information for: Stab. +-* symbols: Symbols. +-* symbols with lowercase, VAX/VMS: VAX-Opts. +-* symbols, assigning values to: Equ. +-* symbols, local common: Lcomm. +-* symver directive: Symver. +-* syntax compatibility, i386: i386-Syntax. +-* syntax, D10V: D10V-Syntax. +-* syntax, M680x0: M68K-Syntax. +-* syntax, machine-independent: Syntax. +-* sysproc directive, i960: Directives-i960. +-* tab (\t): Strings. +-* tag directive: Tag. +-* tdaoff pseudo-op, V850: V850 Opcodes. +-* temporary symbol names: Symbol Names. +-* text and data sections, joining: R. +-* text directive: Text. +-* text section: Ld Sections. +-* tfloat directive, i386: i386-Float. +-* thumb directive, ARM: ARM Directives. +-* Thumb support: ARM-Dependent. +-* thumb_func directive, ARM: ARM Directives. +-* time, total for assembly: statistics. +-* title directive: Title. +-* tp register, V850: V850-Regs. +-* trusted compiler: f. +-* turning preprocessing on and off: Preprocessing. +-* type directive: Type. +-* type of a symbol: Symbol Type. +-* ualong directive, SH: SH Directives. +-* uaword directive, SH: SH Directives. +-* uleb128 directive: Uleb128. +-* undefined section: Ld Sections. +-* unsegm: Z8000 Directives. +-* use directive, AMD 29K: AMD29K Directives. +-* V850 command line options: V850 Options. +-* V850 floating point (IEEE): V850 Floating Point. +-* V850 line comment character: V850-Chars. +-* V850 machine directives: V850 Directives. +-* V850 opcodes: V850 Opcodes. +-* V850 options (none): V850 Options. +-* V850 register names: V850-Regs. +-* V850 support: V850-Dependent. +-* val directive: Val. +-* value attribute, COFF: Val. +-* value of a symbol: Symbol Value. +-* VAX bitfields not supported: VAX-no. +-* VAX branch improvement: VAX-branch. +-* VAX command-line options ignored: VAX-Opts. +-* VAX displacement sizing character: VAX-operands. +-* VAX floating point: VAX-float. +-* VAX immediate character: VAX-operands. +-* VAX indirect character: VAX-operands. +-* VAX machine directives: VAX-directives. +-* VAX opcode mnemonics: VAX-opcodes. +-* VAX operand notation: VAX-operands. +-* VAX register names: VAX-operands. +-* VAX support: Vax-Dependent. +-* Vax-11 C compatibility: VAX-Opts. +-* VAX/VMS options: VAX-Opts. +-* version of assembler: v. +-* versions of symbols: Symver. +-* VMS (VAX) options: VAX-Opts. +-* warning for altered difference tables: K. +-* warning messages: Errors. +-* warnings, suppressing: W. +-* whitespace: Whitespace. +-* whitespace, removed by preprocessor: Preprocessing. +-* wide floating point directives, VAX: VAX-directives. +-* word directive: Word. +-* word directive, H8/300: H8/300 Directives. +-* word directive, H8/500: H8/500 Directives. +-* word directive, i386: i386-Float. +-* word directive, SPARC: Sparc-Directives. +-* writing patterns in memory: Fill. +-* wval: Z8000 Directives. +-* xword directive, SPARC: Sparc-Directives. +-* Z800 addressing modes: Z8000-Addressing. +-* Z8000 directives: Z8000 Directives. +-* Z8000 line comment character: Z8000-Chars. +-* Z8000 line separator: Z8000-Chars. +-* Z8000 opcode summary: Z8000 Opcodes. +-* Z8000 options: Z8000 Options. +-* Z8000 registers: Z8000-Regs. +-* Z8000 support: Z8000-Dependent. +-* zdaoff pseudo-op, V850: V850 Opcodes. +-* zero register, V850: V850-Regs. +-* zero-terminated strings: Asciz. +- +- +diff -rup --new-file binutils-2.9.1/gas/doc/gasp.info binutils-2.9.1/gas/doc/gasp.info +--- binutils-2.9.1/gas/doc/gasp.info Fri May 1 08:45:01 1998 ++++ binutils-2.9.1/gas/doc/gasp.info Wed Dec 31 17:00:00 1969 +@@ -1,1086 +0,0 @@ +-This is Info file gasp.info, produced by Makeinfo version 1.68 from the +-input file gasp.texi. +- +-START-INFO-DIR-ENTRY +-* gasp: (gasp). The GNU Assembler Preprocessor +-END-INFO-DIR-ENTRY +- +- Copyright (C) 1994, 1995 Free Software Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided also +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: gasp.info, Node: Top, Next: Overview, Up: (dir) +- +-GASP +-**** +- +- GASP is a preprocessor for assembly programs. +- +- This file describes version 1 of GASP. +- +- Steve Chamberlain wrote GASP; Roland Pesch wrote this manual. +- +-* Menu: +- +-* Overview:: What is GASP? +-* Invoking GASP:: Command line options. +-* Commands:: Preprocessor commands. +-* Index:: Index. +- +- +-File: gasp.info, Node: Overview, Next: Invoking GASP, Prev: Top, Up: Top +- +-What is GASP? +-************* +- +- The primary purpose of the GNU assembler is to assemble the output of +-other programs--notably compilers. When you have to hand-code +-specialized routines in assembly, that means the GNU assembler is an +-unfriendly processor: it has no directives for macros, conditionals, or +-many other conveniences that you might expect. +- +- In some cases you can simply use the C preprocessor, or a generalized +-preprocessor like M4; but this can be awkward, since none of these +-things are designed with assembly in mind. +- +- GASP fills this need. It is expressly designed to provide the +-facilities you need with hand-coded assembly code. Implementing it as a +-preprocessor, rather than part of the assembler, allows the maximum +-flexibility: you can use it with hand-coded assembly, without paying a +-penalty of added complexity in the assembler you use for compiler +-output. +- +- Here is a small example to give the flavor of GASP. This input to +-GASP +- +- .MACRO saveregs from=8 to=14 +- count .ASSIGNA \from +- ! save r\from..r\to +- .AWHILE \&count LE \to +- mov r\&count,@-sp +- count .ASSIGNA \&count + 1 +- .AENDW +- .ENDM +- +- saveregs from=12 +- +- bar: mov #H'dead+10,r0 +- foo .SDATAC "hello"<10> +- .END +- +-generates this assembly program: +- +- ! save r12..r14 +- mov r12,@-sp +- mov r13,@-sp +- mov r14,@-sp +- +- bar: mov #57005+10,r0 +- foo: .byte 6,104,101,108,108,111,10 +- +- +-File: gasp.info, Node: Invoking GASP, Next: Commands, Prev: Overview, Up: Top +- +-Command Line Options +-******************** +- +- The simplest way to use GASP is to run it as a filter and assemble +-its output. In Unix and its ilk, you can do this, for example: +- +- $ gasp prog.asm | as -o prog.o +- +- Naturally, there are also a few command-line options to allow you to +-request variations on this basic theme. Here is the full set of +-possibilities for the GASP command line. +- +- gasp [ -a | --alternate ] +- [ -c CHAR | --commentchar CHAR ] +- [ -d | --debug ] [ -h | --help ] [ -M | --mri ] +- [ -o OUTFILE | --output OUTFILE ] +- [ -p | --print ] [ -s | --copysource ] +- [ -u | --unreasonable ] [ -v | --version ] +- INFILE ... +- +-`INFILE ...' +- The input file names. You must specify at least one input file; +- if you specify more, GASP preprocesses them all, concatenating the +- output in the order you list the INFILE arguments. +- +- Mark the end of each input file with the preprocessor command +- `.END'. *Note Miscellaneous commands: Other Commands. +- +-`-a' +-`--alternate' +- Use alternative macro syntax. *Note Alternate macro syntax: +- Alternate, for a discussion of how this syntax differs from the +- default GASP syntax. +- +-`-c 'CHAR'' +-`--commentchar 'CHAR'' +- Use CHAR as the comment character. The default comment character +- is `!'. For example, to use a semicolon as the comment character, +- specify `-c ';'' on the GASP command line. Since assembler +- command characters often have special significance to command +- shells, it is a good idea to quote or escape CHAR when you specify +- a comment character. +- +- For the sake of simplicity, all examples in this manual use the +- default comment character `!'. +- +-`-d' +-`--debug' +- Show debugging statistics. In this version of GASP, this option +- produces statistics about the string buffers that GASP allocates +- internally. For each defined buffersize S, GASP shows the number +- of strings N that it allocated, with a line like this: +- +- strings size S : N +- +- GASP displays these statistics on the standard error stream, when +- done preprocessing. +- +-`-h' +-`--help' +- Display a summary of the GASP command line options. +- +-`-M' +-`--mri' +- Use MRI compatibility mode. Using this option causes GASP to +- accept the syntax and pseudo-ops used by the Microtec Research +- `ASM68K' assembler. +- +-`-o OUTFILE' +-`--output OUTFILE' +- Write the output in a file called OUTFILE. If you do not use the +- `-o' option, GASP writes its output on the standard output stream. +- +-`-p' +-`--print' +- Print line numbers. GASP obeys this option *only* if you also +- specify `-s' to copy source lines to its output. With `-s -p', +- GASP displays the line number of each source line copied +- (immediately after the comment character at the beginning of the +- line). +- +-`-s' +-`--copysource' +- Copy the source lines to the output file. Use this option to see +- the effect of each preprocessor line on the GASP output. GASP +- places a comment character (`!' by default) at the beginning of +- each source line it copies, so that you can use this option and +- still assemble the result. +- +-`-u' +-`--unreasonable' +- Bypass "unreasonable expansion" limit. Since you can define GASP +- macros inside other macro definitions, the preprocessor normally +- includes a sanity check. If your program requires more than 1,000 +- nested expansions, GASP normally exits with an error message. Use +- this option to turn off this check, allowing unlimited nested +- expansions. +- +-`-v' +-`--version' +- Display the GASP version number. +- +- +-File: gasp.info, Node: Commands, Next: Index, Prev: Invoking GASP, Up: Top +- +-Preprocessor Commands +-********************* +- +- GASP commands have a straightforward syntax that fits in well with +-assembly conventions. In general, a command extends for a line, and may +-have up to three fields: an optional label, the command itself, and +-optional arguments to the command. You can write commands in upper or +-lower case, though this manual shows them in upper case. *Note Details +-of the GASP syntax: Syntax Details, for more information. +- +-* Menu: +- +-* Conditionals:: +-* Loops:: +-* Variables:: +-* Macros:: +-* Data:: +-* Listings:: +-* Other Commands:: +-* Syntax Details:: +-* Alternate:: +- +- +-File: gasp.info, Node: Conditionals, Next: Loops, Up: Commands +- +-Conditional assembly +-==================== +- +- The conditional-assembly directives allow you to include or exclude +-portions of an assembly depending on how a pair of expressions, or a +-pair of strings, compare. +- +- The overall structure of conditionals is familiar from many other +-contexts. `.AIF' marks the start of a conditional, and precedes +-assembly for the case when the condition is true. An optional +-`.AELSE' precedes assembly for the converse case, and an `.AENDI' marks +-the end of the condition. +- +- You may nest conditionals up to a depth of 100; GASP rejects nesting +-beyond that, because it may indicate a bug in your macro structure. +- +- Conditionals are primarily useful inside macro definitions, where you +-often need different effects depending on argument values. *Note +-Defining your own directives: Macros, for details about defining macros. +- +-`.AIF EXPRA CMP EXPRB' +-`.AIF "STRA" CMP "STRB"' +- The governing condition goes on the same line as the `.AIF' +- preprocessor command. You may compare either two strings, or two +- expressions. +- +- When you compare strings, only two conditional CMP comparison +- operators are available: `EQ' (true if STRA and STRB are +- identical), and `NE' (the opposite). +- +- When you compare two expressions, *both expressions must be +- absolute* (*note Arithmetic expressions in GASP: Expressions.). +- You can use these CMP comparison operators with expressions: +- +- `EQ' +- Are EXPRA and EXPRB equal? (For strings, are STRA and STRB +- identical?) +- +- `NE' +- Are EXPRA and EXPRB different? (For strings, are STRA and +- STRB different? +- +- `LT' +- Is EXPRA less than EXPRB? (Not allowed for strings.) +- +- `LE' +- Is EXPRA less than or equal to EXPRB? (Not allowed for +- strings.) +- +- `GT' +- Is EXPRA greater than EXPRB? (Not allowed for strings.) +- +- `GE' +- Is EXPRA greater than or equal to EXPRB? (Not allowed for +- strings.) +- +-`.AELSE' +- Marks the start of assembly code to be included if the condition +- fails. Optional, and only allowed within a conditional (between +- `.AIF' and `.AENDI'). +- +-`.AENDI' +- Marks the end of a conditional assembly. +- +- +-File: gasp.info, Node: Loops, Next: Variables, Prev: Conditionals, Up: Commands +- +-Repetitive sections of assembly +-=============================== +- +- Two preprocessor directives allow you to repeatedly issue copies of +-the same block of assembly code. +- +-`.AREPEAT AEXP' +-`.AENDR' +- If you simply need to repeat the same block of assembly over and +- over a fixed number of times, sandwich one instance of the +- repeated block between `.AREPEAT' and `.AENDR'. Specify the +- number of copies as AEXP (which must be an absolute expression). +- For example, this repeats two assembly statements three times in +- succession: +- +- .AREPEAT 3 +- rotcl r2 +- div1 r0,r1 +- .AENDR +- +-`.AWHILE EXPRA CMP EXPRB' +-`.AENDW' +-`.AWHILE STRA CMP STRB' +-`.AENDW' +- To repeat a block of assembly depending on a conditional test, +- rather than repeating it for a specific number of times, use +- `.AWHILE'. `.AENDW' marks the end of the repeated block. The +- conditional comparison works exactly the same way as for `.AIF', +- with the same comparison operators (*note Conditional assembly: +- Conditionals.). +- +- Since the terms of the comparison must be absolute expression, +- `.AWHILE' is primarily useful within macros. *Note Defining your +- own directives: Macros. +- +- You can use the `.EXITM' preprocessor directive to break out of +-loops early (as well as to break out of macros). *Note Defining your +-own directives: Macros. +- +- +-File: gasp.info, Node: Variables, Next: Macros, Prev: Loops, Up: Commands +- +-Preprocessor variables +-====================== +- +- You can use variables in GASP to represent strings, registers, or +-the results of expressions. +- +- You must distinguish two kinds of variables: +- 1. Variables defined with `.EQU' or `.ASSIGN'. To evaluate this kind +- of variable in your assembly output, simply mention its name. For +- example, these two lines define and use a variable `eg': +- +- eg .EQU FLIP-64 +- ... +- mov.l eg,r0 +- +- *Do not use* this kind of variable in conditional expressions or +- while loops; GASP only evaluates these variables when writing +- assembly output. +- +- 2. Variables for use during preprocessing. You can define these with +- `.ASSIGNC' or `.ASSIGNA'. To evaluate this kind of variable, +- write `\&' before the variable name; for example, +- +- opcit .ASSIGNA 47 +- ... +- .AWHILE \&opcit GT 0 +- ... +- .AENDW +- +- GASP treats macro arguments almost the same way, but to evaluate +- them you use the prefix `\' rather than `\&'. *Note Defining your +- own directives: Macros. +- +-`PVAR .EQU EXPR' +- Assign preprocessor variable PVAR the value of the expression +- EXPR. There are no restrictions on redefinition; use `.EQU' with +- the same PVAR as often as you find it convenient. +- +-`PVAR .ASSIGN EXPR' +- Almost the same as `.EQU', save that you may not redefine PVAR +- using `.ASSIGN' once it has a value. +- +-`PVAR .ASSIGNA AEXPR' +- Define a variable with a numeric value, for use during +- preprocessing. AEXPR must be an absolute expression. You can +- redefine variables with `.ASSIGNA' at any time. +- +-`PVAR .ASSIGNC "STR"' +- Define a variable with a string value, for use during +- preprocessing. You can redefine variables with `.ASSIGNC' at any +- time. +- +-`PVAR .REG (REGISTER)' +- Use `.REG' to define a variable that represents a register. In +- particular, REGISTER is *not evaluated* as an expression. You may +- use `.REG' at will to redefine register variables. +- +- All these directives accept the variable name in the "label" +-position, that is at the left margin. You may specify a colon after +-the variable name if you wish; the first example above could have +-started `eg:' with the same effect. +- +- +-File: gasp.info, Node: Macros, Next: Data, Prev: Variables, Up: Commands +- +-Defining your own directives +-============================ +- +- The commands `.MACRO' and `.ENDM' allow you to define macros that +-generate assembly output. You can use these macros with a syntax +-similar to built-in GASP or assembler directives. For example, this +-definition specifies a macro `SUM' that adds together a range of +-consecutive registers: +- +- .MACRO SUM FROM=0, TO=9 +- ! \FROM \TO +- mov r\FROM,r10 +- COUNT .ASSIGNA \FROM+1 +- .AWHILE \&COUNT LE \TO +- add r\&COUNT,r10 +- COUNT .ASSIGNA \&COUNT+1 +- .AENDW +- .ENDM +- +-With that definition, `SUM 0,5' generates this assembly output: +- +- ! 0 5 +- mov r0,r10 +- add r1,r10 +- add r2,r10 +- add r3,r10 +- add r4,r10 +- add r5,r10 +- +-`.MACRO MACNAME' +-`.MACRO MACNAME MACARGS ...' +- Begin the definition of a macro called MACNAME. If your macro +- definition requires arguments, specify their names after the macro +- name, separated by commas or spaces. You can supply a default +- value for any macro argument by following the name with `=DEFLT'. +- For example, these are all valid `.MACRO' statements: +- +- `.MACRO COMM' +- Begin the definition of a macro called `COMM', which takes no +- arguments. +- +- `.MACRO PLUS1 P, P1' +- `.MACRO PLUS1 P P1' +- Either statement begins the definition of a macro called +- `PLUS1', which takes two arguments; within the macro +- definition, write `\P' or `\P1' to evaluate the arguments. +- +- `.MACRO RESERVE_STR P1=0 P2' +- Begin the definition of a macro called `RESERVE_STR', with two +- arguments. The first argument has a default value, but not +- the second. After the definition is complete, you can call +- the macro either as `RESERVE_STR A,B' (with `\P1' evaluating +- to A and `\P2' evaluating to B), or as `RESERVE_STR ,B' (with +- `\P1' evaluating as the default, in this case `0', and `\P2' +- evaluating to B). +- +- When you call a macro, you can specify the argument values either +- by position, or by keyword. For example, `SUM 9,17' is equivalent +- to `SUM TO=17, FROM=9'. Macro arguments are preprocessor variables +- similar to the variables you define with `.ASSIGNA' or `.ASSIGNC'; +- in particular, you can use them in conditionals or for loop +- control. (The only difference is the prefix you write to evaluate +- the variable: for a macro argument, write `\ARGNAME', but for a +- preprocessor variable, write `\&VARNAME'.) +- +-`NAME .MACRO' +-`NAME .MACRO ( MACARGS ... )' +- An alternative form of introducing a macro definition: specify the +- macro name in the label position, and the arguments (if any) +- between parentheses after the name. Defaulting rules and usage +- work the same way as for the other macro definition syntax. +- +-`.ENDM' +- Mark the end of a macro definition. +- +-`.EXITM' +- Exit early from the current macro definition, `.AREPEAT' loop, or +- `.AWHILE' loop. +- +-`\@' +- GASP maintains a counter of how many macros it has executed in +- this pseudo-variable; you can copy that number to your output with +- `\@', but *only within a macro definition*. +- +-`LOCAL NAME [ , ... ]' +- *Warning: `LOCAL' is only available if you select "alternate macro +- syntax" with `-a' or `--alternate'.* *Note Alternate macro +- syntax: Alternate. +- +- Generate a string replacement for each of the NAME arguments, and +- replace any instances of NAME in each macro expansion. The +- replacement string is unique in the assembly, and different for +- each separate macro expansion. `LOCAL' allows you to write macros +- that define symbols, without fear of conflict between separate +- macro expansions. +- +- +-File: gasp.info, Node: Data, Next: Listings, Prev: Macros, Up: Commands +- +-Data output +-=========== +- +- In assembly code, you often need to specify working areas of memory; +-depending on the application, you may want to initialize such memory or +-not. GASP provides preprocessor directives to help you avoid +-repetitive coding for both purposes. +- +- You can use labels as usual to mark the data areas. +- +-* Menu: +- +-* Initialized:: +-* Uninitialized:: +- +- +-File: gasp.info, Node: Initialized, Next: Uninitialized, Up: Data +- +-Initialized data +----------------- +- +- These are the GASP directives for initialized data, and the standard +-GNU assembler directives they expand to: +- +-`.DATA EXPR, EXPR, ...' +-`.DATA.B EXPR, EXPR, ...' +-`.DATA.W EXPR, EXPR, ...' +-`.DATA.L EXPR, EXPR, ...' +- Evaluate arithmetic expressions EXPR, and emit the corresponding +- `as' directive (labelled with LAB). The unqualified `.DATA' emits +- `.long'; `.DATA.B' emits `.byte'; `.DATA.W' emits `.short'; and +- `.DATA.L' emits `.long'. +- +- For example, `foo .DATA 1,2,3' emits `foo: .long 1,2,3'. +- +-`.DATAB REPEAT, EXPR' +-`.DATAB.B REPEAT, EXPR' +-`.DATAB.W REPEAT, EXPR' +-`.DATAB.L REPEAT, EXPR' +- Make `as' emit REPEAT copies of the value of the expression EXPR +- (using the `as' directive `.fill'). `.DATAB.B' repeats one-byte +- values; `.DATAB.W' repeats two-byte values; and `.DATAB.L' repeats +- four-byte values. `.DATAB' without a suffix repeats four-byte +- values, just like `.DATAB.L'. +- +- REPEAT must be an absolute expression with a positive value. +- +-`.SDATA "STR" ...' +- String data. Emits a concatenation of bytes, precisely as you +- specify them (in particular, *nothing is added to mark the end* of +- the string). *Note String and numeric constants: Constants, for +- details about how to write strings. `.SDATA' concatenates multiple +- arguments, making it easy to switch between string +- representations. You can use commas to separate the individual +- arguments for clarity, if you choose. +- +-`.SDATAB REPEAT, "STR" ...' +- Repeated string data. The first argument specifies how many +- copies of the string to emit; the remaining arguments specify the +- string, in the same way as the arguments to `.SDATA'. +- +-`.SDATAZ "STR" ...' +- Zero-terminated string data. Just like `.SDATA', except that +- `.SDATAZ' writes a zero byte at the end of the string. +- +-`.SDATAC "STR" ...' +- Count-prefixed string data. Just like `.SDATA', except that GASP +- precedes the string with a leading one-byte count. For example, +- `.SDATAC "HI"' generates `.byte 2,72,73'. Since the count field +- is only one byte, you can only use `.SDATAC' for strings less than +- 256 bytes in length. +- +- +-File: gasp.info, Node: Uninitialized, Prev: Initialized, Up: Data +- +-Uninitialized data +------------------- +- +- Use the `.RES', `.SRES', `.SRESC', and `.SRESZ' directives to +-reserve memory and leave it uninitialized. GASP resolves these +-directives to appropriate calls of the GNU `as' `.space' directive. +- +-`.RES COUNT' +-`.RES.B COUNT' +-`.RES.W COUNT' +-`.RES.L COUNT' +- Reserve room for COUNT uninitialized elements of data. The suffix +- specifies the size of each element: `.RES.B' reserves COUNT bytes, +- `.RES.W' reserves COUNT pairs of bytes, and `.RES.L' reserves +- COUNT quartets. `.RES' without a suffix is equivalent to `.RES.L'. +- +-`.SRES COUNT' +-`.SRES.B COUNT' +-`.SRES.W COUNT' +-`.SRES.L COUNT' +- `.SRES' is a synonym for `.RES'. +- +-`.SRESC COUNT' +-`.SRESC.B COUNT' +-`.SRESC.W COUNT' +-`.SRESC.L COUNT' +- Like `.SRES', but reserves space for `COUNT+1' elements. +- +-`.SRESZ COUNT' +-`.SRESZ.B COUNT' +-`.SRESZ.W COUNT' +-`.SRESZ.L COUNT' +- Like `.SRES', but reserves space for `COUNT+1' elements. +- +- +-File: gasp.info, Node: Listings, Next: Other Commands, Prev: Data, Up: Commands +- +-Assembly listing control +-======================== +- +- The GASP listing-control directives correspond to related GNU `as' +-directives. +- +-`.PRINT LIST' +-`.PRINT NOLIST' +- Print control. This directive emits the GNU `as' directive +- `.list' or `.nolist', according to its argument. *Note `.list': +- (as.info)List, for details on how these directives interact. +- +-`.FORM LIN=LN' +-`.FORM COL=COLS' +-`.FORM LIN=LN COL=COLS' +- Specify the page size for assembly listings: LN represents the +- number of lines, and COLS the number of columns. You may specify +- either page dimension independently, or both together. If you do +- not specify the number of lines, GASP assumes 60 lines; if you do +- not specify the number of columns, GASP assumes 132 columns. (Any +- values you may have specified in previous instances of `.FORM' do +- *not* carry over as defaults.) Emits the `.psize' assembler +- directive. +- +-`.HEADING STRING' +- Specify STRING as the title of your assembly listings. Emits +- `.title "STRING"'. +- +-`.PAGE' +- Force a new page in assembly listings. Emits `.eject'. +- +- +-File: gasp.info, Node: Other Commands, Next: Syntax Details, Prev: Listings, Up: Commands +- +-Miscellaneous commands +-====================== +- +-`.ALTERNATE' +- Use the alternate macro syntax henceforth in the assembly. *Note +- Alternate macro syntax: Alternate. +- +-`.ORG' +- This command is recognized, but not yet implemented. GASP +- generates an error message for programs that use `.ORG'. +- +-`.RADIX S' +- GASP understands numbers in any of base two, eight, ten, or +- sixteen. You can encode the base explicitly in any numeric +- constant (*note String and numeric constants: Constants.). If you +- write numbers without an explicit indication of the base, the most +- recent `.RADIX S' command determines how they are interpreted. S +- is a single letter, one of the following: +- +- `.RADIX B' +- Base 2. +- +- `.RADIX Q' +- Base 8. +- +- `.RADIX D' +- Base 10. This is the original default radix. +- +- `.RADIX H' +- Base 16. +- +- You may specify the argument S in lower case (any of `bqdh') with +- the same effects. +- +-`.EXPORT NAME' +-`.GLOBAL NAME' +- Declare NAME global (emits `.global NAME'). The two directives +- are synonymous. +- +-`.PROGRAM' +- No effect: GASP accepts this directive, and silently ignores it. +- +-`.END' +- Mark end of each preprocessor file. GASP issues a warning if it +- reaches end of file without seeing this command. +- +-`.INCLUDE "STR"' +- Preprocess the file named by STR, as if its contents appeared +- where the `.INCLUDE' directive does. GASP imposes a maximum limit +- of 30 stacked include files, as a sanity check. +- +-`.ALIGN SIZE' +- Evaluate the absolute expression SIZE, and emit the assembly +- instruction `.align SIZE' using the result. +- +- +-File: gasp.info, Node: Syntax Details, Next: Alternate, Prev: Other Commands, Up: Commands +- +-Details of the GASP syntax +-========================== +- +- Since GASP is meant to work with assembly code, its statement syntax +-has no surprises for the assembly programmer. +- +- *Whitespace* (blanks or tabs; *not* newline) is partially +-significant, in that it delimits up to three fields in a line. The +-amount of whitespace does not matter; you may line up fields in separate +-lines if you wish, but GASP does not require that. +- +- The *first field*, an optional "label", must be flush left in a line +-(with no leading whitespace) if it appears at all. You may use a colon +-after the label if you wish; GASP neither requires the colon nor +-objects to it (but will not include it as part of the label name). +- +- The *second field*, which must appear after some whitespace, +-contains a GASP or assembly "directive". +- +- Any *further fields* on a line are "arguments" to the directive; you +-can separate them from one another using either commas or whitespace. +- +-* Menu: +- +-* Markers:: +-* Constants:: +-* Symbols:: +-* Expressions:: +-* String Builtins:: +- +- +-File: gasp.info, Node: Markers, Next: Constants, Up: Syntax Details +- +-Special syntactic markers +-------------------------- +- +- GASP recognizes a few special markers: to delimit comments, to +-continue a statement on the next line, to separate symbols from other +-characters, and to copy text to the output literally. (One other +-special marker, `\@', works only within macro definitions; *note +-Defining your own directives: Macros..) +- +- The trailing part of any GASP source line may be a "comment". A +-comment begins with the first unquoted comment character (`!' by +-default), or an escaped or doubled comment character (`\!' or `!!' by +-default), and extends to the end of a line. You can specify what +-comment character to use with the `-c' option (*note Command Line +-Options: Invoking GASP.). The two kinds of comment markers lead to +-slightly different treatment: +- +-`!' +- A single, un-escaped comment character generates an assembly +- comment in the GASP output. GASP evaluates any preprocessor +- variables (macro arguments, or variables defined with `.ASSIGNA' or +- `.ASSIGNC') present. For example, a macro that begins like this +- +- .MACRO SUM FROM=0, TO=9 +- ! \FROM \TO +- +- issues as the first line of output a comment that records the +- values you used to call the macro. +- +-`\!' +-`!!' +- Either an escaped comment character, or a double comment character, +- marks a GASP source comment. GASP does not copy such comments to +- the assembly output. +- +- To *continue a statement* on the next line of the file, begin the +-second line with the character `+'. +- +- Occasionally you may want to prevent GASP from preprocessing some +-particular bit of text. To *copy literally* from the GASP source to +-its output, place `\(' before the string to copy, and `)' at the end. +-For example, write `\(\!)' if you need the characters `\!' in your +-assembly output. +- +- To *separate a preprocessor variable* from text to appear +-immediately after its value, write a single quote (`''). For example, +-`.SDATA "\P'1"' writes a string built by concatenating the value of `P' +-and the digit `1'. (You cannot achieve this by writing just `\P1', +-since `P1' is itself a valid name for a preprocessor variable.) +- +- +-File: gasp.info, Node: Constants, Next: Symbols, Prev: Markers, Up: Syntax Details +- +-String and numeric constants +----------------------------- +- +- There are two ways of writing "string constants" in GASP: as literal +-text, and by numeric byte value. Specify a string literal between +-double quotes (`"STR"'). Specify an individual numeric byte value as +-an absolute expression between angle brackets (`'. Directives +-that output strings allow you to specify any number of either kind of +-value, in whatever order is convenient, and concatenate the result. +-(Alternate syntax mode introduces a number of alternative string +-notations; *note Alternate macro syntax: Alternate..) +- +- You can write "numeric constants" either in a specific base, or in +-whatever base is currently selected (either 10, or selected by the most +-recent `.RADIX'). +- +- To write a number in a *specific base*, use the pattern `S'DDD': a +-base specifier character S, followed by a single quote followed by +-digits DDD. The base specifier character matches those you can specify +-with `.RADIX': `B' for base 2, `Q' for base 8, `D' for base 10, and `H' +-for base 16. (You can write this character in lower case if you +-prefer.) +- +- +-File: gasp.info, Node: Symbols, Next: Expressions, Prev: Constants, Up: Syntax Details +- +-Symbols +-------- +- +- GASP recognizes symbol names that start with any alphabetic +-character, `_', or `$', and continue with any of the same characters or +-with digits. Label names follow the same rules. +- +- +-File: gasp.info, Node: Expressions, Next: String Builtins, Prev: Symbols, Up: Syntax Details +- +-Arithmetic expressions in GASP +------------------------------- +- +- There are two kinds of expressions, depending on their result: +-"absolute" expressions, which resolve to a constant (that is, they do +-not involve any values unknown to GASP), and "relocatable" expressions, +-which must reduce to the form +- +- ADDSYM+CONST-SUBSYM +- +-where ADDSYM and SUBSYM are assembly symbols of unknown value, and +-CONST is a constant. +- +- Arithmetic for GASP expressions follows very similar rules to C. +-You can use parentheses to change precedence; otherwise, arithmetic +-primitives have decreasing precedence in the order of the following +-list. +- +- 1. Single-argument `+' (identity), `-' (arithmetic opposite), or `~' +- (bitwise negation). *The argument must be an absolute expression.* +- +- 2. `*' (multiplication) and `/' (division). *Both arguments must be +- absolute expressions.* +- +- 3. `+' (addition) and `-' (subtraction). *At least one argument must +- be absolute.* +- +- 4. `&' (bitwise and). *Both arguments must be absolute.* +- +- 5. `|' (bitwise or) and `~' (bitwise exclusive or; `^' in C). *Both +- arguments must be absolute.* +- +- +-File: gasp.info, Node: String Builtins, Prev: Expressions, Up: Syntax Details +- +-String primitives +------------------ +- +- You can use these primitives to manipulate strings (in the argument +-field of GASP statements): +- +-`.LEN("STR")' +- Calculate the length of string `"STR"', as an absolute expression. +- For example, `.RES.B .LEN("sample")' reserves six bytes of memory. +- +-`.INSTR("STRING", "SEG", IX)' +- Search for the first occurrence of SEG after position IX of +- STRING. For example, `.INSTR("ABCDEFG", "CDE", 0)' evaluates to +- the absolute result `2'. +- +- The result is `-1' if SEG does not occur in STRING after position +- IX. +- +-`.SUBSTR("STRING",START,LEN)' +- The substring of STRING beginning at byte number START and +- extending for LEN bytes. +- +- +-File: gasp.info, Node: Alternate, Prev: Syntax Details, Up: Commands +- +-Alternate macro syntax +-====================== +- +- If you specify `-a' or `--alternate' on the GASP command line, the +-preprocessor uses somewhat different syntax. This syntax is +-reminiscent of the syntax of Phar Lap macro assembler, but it is *not* +-meant to be a full emulation of Phar Lap or similar assemblers. In +-particular, GASP does not support directives such as `DB' and `IRP', +-even in alternate syntax mode. +- +- In particular, `-a' (or `--alternate') elicits these differences: +- +-*Preprocessor directives* +- You can use GASP preprocessor directives without a leading `.' +- dot. For example, you can write `SDATA' with the same effect as +- `.SDATA'. +- +-*LOCAL* +- One additional directive, `LOCAL', is available. *Note Defining +- your own directives: Macros, for an explanation of how to use +- `LOCAL'. +- +-*String delimiters* +- You can write strings delimited in these other ways besides +- `"STRING"': +- +- `'STRING'' +- You can delimit strings with single-quote charaters. +- +- `' +- You can delimit strings with matching angle brackets. +- +-*single-character string escape* +- To include any single character literally in a string (even if the +- character would otherwise have some special meaning), you can +- prefix the character with `!' (an exclamation mark). For example, +- you can write `<4.3 !> 5.4!!>' to get the literal text `4.3 > +- 5.4!'. +- +-*Expression results as strings* +- You can write `%EXPR' to evaluate the expression EXPR and use the +- result as a string. +- +- +-File: gasp.info, Node: Index, Prev: Commands, Up: Top +- +-Index +-***** +- +-* Menu: +- +-* ! default comment char: Invoking GASP. +-* +: Markers. +-* --alternate: Invoking GASP. +-* --commentchar 'CHAR': Invoking GASP. +-* --copysource: Invoking GASP. +-* --debug: Invoking GASP. +-* --help: Invoking GASP. +-* --mri: Invoking GASP. +-* --output OUTFILE: Invoking GASP. +-* --print: Invoking GASP. +-* --unreasonable: Invoking GASP. +-* --version: Invoking GASP. +-* -a: Invoking GASP. +-* -c 'CHAR': Invoking GASP. +-* -d: Invoking GASP. +-* -h: Invoking GASP. +-* -M: Invoking GASP. +-* -o OUTFILE: Invoking GASP. +-* -p: Invoking GASP. +-* -s: Invoking GASP. +-* -u: Invoking GASP. +-* -v: Invoking GASP. +-* .AELSE: Conditionals. +-* .AENDI: Conditionals. +-* .AENDR: Loops. +-* .AENDW: Loops. +-* .AIF "STRA" CMP "STRB": Conditionals. +-* .AIF EXPRA CMP EXPRB: Conditionals. +-* .ALIGN SIZE: Other Commands. +-* .ALTERNATE: Other Commands. +-* .AREPEAT AEXP: Loops. +-* .AWHILE EXPRA CMP EXPRB: Loops. +-* .AWHILE STRA CMP STRB: Loops. +-* .DATA EXPR, EXPR, ...: Initialized. +-* .DATA.B EXPR, EXPR, ...: Initialized. +-* .DATA.L EXPR, EXPR, ...: Initialized. +-* .DATA.W EXPR, EXPR, ...: Initialized. +-* .DATAB REPEAT, EXPR: Initialized. +-* .DATAB.B REPEAT, EXPR: Initialized. +-* .DATAB.L REPEAT, EXPR: Initialized. +-* .DATAB.W REPEAT, EXPR: Initialized. +-* .END: Other Commands. +-* .ENDM: Macros. +-* .EXITM: Macros. +-* .EXPORT NAME: Other Commands. +-* .FORM COL=COLS: Listings. +-* .FORM LIN=LN: Listings. +-* .FORM LIN=LN COL=COLS: Listings. +-* .GLOBAL NAME: Other Commands. +-* .HEADING STRING: Listings. +-* .INCLUDE "STR": Other Commands. +-* .INSTR("STRING", "SEG", IX): String Builtins. +-* .LEN("STR"): String Builtins. +-* .MACRO MACNAME: Macros. +-* .MACRO MACNAME MACARGS ...: Macros. +-* .ORG: Other Commands. +-* .PAGE: Listings. +-* .PRINT LIST: Listings. +-* .PRINT NOLIST: Listings. +-* .PROGRAM: Other Commands. +-* .RADIX S: Other Commands. +-* .RES COUNT: Uninitialized. +-* .RES.B COUNT: Uninitialized. +-* .RES.L COUNT: Uninitialized. +-* .RES.W COUNT: Uninitialized. +-* .SDATA "STR" ...: Initialized. +-* .SDATAB REPEAT, "STR" ...: Initialized. +-* .SDATAC "STR" ...: Initialized. +-* .SDATAZ "STR" ...: Initialized. +-* .SRES COUNT: Uninitialized. +-* .SRES.B COUNT: Uninitialized. +-* .SRES.L COUNT: Uninitialized. +-* .SRES.W COUNT: Uninitialized. +-* .SRESC COUNT: Uninitialized. +-* .SRESC.B COUNT: Uninitialized. +-* .SRESC.L COUNT: Uninitialized. +-* .SRESC.W COUNT: Uninitialized. +-* .SRESZ COUNT: Uninitialized. +-* .SRESZ.B COUNT: Uninitialized. +-* .SRESZ.L COUNT: Uninitialized. +-* .SRESZ.W COUNT: Uninitialized. +-* .SUBSTR("STRING",START,LEN): String Builtins. +-* ; as comment char: Invoking GASP. +-* \@: Macros. +-* absolute expressions: Expressions. +-* argument fields: Syntax Details. +-* avoiding preprocessing: Markers. +-* bang, as comment: Invoking GASP. +-* breaking out of loops: Loops. +-* comment character, changing: Invoking GASP. +-* comments: Markers. +-* continuation character: Markers. +-* copying literally to output: Markers. +-* directive field: Syntax Details. +-* EQ: Conditionals. +-* exclamation mark, as comment: Invoking GASP. +-* fields of GASP source line: Syntax Details. +-* GE: Conditionals. +-* GT: Conditionals. +-* INFILE ...: Invoking GASP. +-* label field: Syntax Details. +-* LE: Conditionals. +-* literal copy to output: Markers. +-* LOCAL NAME [ , ... ]: Macros. +-* loops, breaking out of: Loops. +-* LT: Conditionals. +-* macros, count executed: Macros. +-* NAME .MACRO: Macros. +-* NAME .MACRO ( MACARGS ... ): Macros. +-* NE: Conditionals. +-* number of macros executed: Macros. +-* preprocessing, avoiding: Markers. +-* PVAR .ASSIGN EXPR: Variables. +-* PVAR .ASSIGNA AEXPR: Variables. +-* PVAR .ASSIGNC "STR": Variables. +-* PVAR .EQU EXPR: Variables. +-* PVAR .REG (REGISTER): Variables. +-* relocatable expressions: Expressions. +-* semicolon, as comment: Invoking GASP. +-* shriek, as comment: Invoking GASP. +-* symbol separator: Markers. +-* symbols, separating from text: Markers. +-* text, separating from symbols: Markers. +-* whitespace: Syntax Details. +- +- +- +-Tag Table: +-Node: Top834 +-Node: Overview1268 +-Node: Invoking GASP2934 +-Node: Commands6670 +-Node: Conditionals7346 +-Node: Loops9638 +-Node: Variables11163 +-Node: Macros13558 +-Node: Data17520 +-Node: Initialized17968 +-Node: Uninitialized20247 +-Node: Listings21258 +-Node: Other Commands22454 +-Node: Syntax Details24206 +-Node: Markers25342 +-Node: Constants27590 +-Node: Symbols28792 +-Node: Expressions29088 +-Node: String Builtins30320 +-Node: Alternate31101 +-Node: Index32719 +- +-End Tag Table +diff -rup --new-file binutils-2.9.1/gas/itbl-parse.c binutils-2.9.1/gas/itbl-parse.c +--- binutils-2.9.1/gas/itbl-parse.c Fri May 1 08:45:18 1998 ++++ binutils-2.9.1/gas/itbl-parse.c Sun Aug 23 00:00:00 1998 +@@ -455,10 +455,10 @@ static const short yycheck[] = { 0, + in version 1.24 of Bison. */ + + #ifndef alloca +-#ifdef __GNUC__ ++#if defined (__GNUC__) && !defined (C_ALLOCA) + #define alloca __builtin_alloca + #else /* not GNU C. */ +-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) ++#if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA) + #include + #else /* not sparc */ + #if defined (MSDOS) && !defined (__TURBOC__) +diff -rup --new-file binutils-2.9.1/gas/m68k-parse.c binutils-2.9.1/gas/m68k-parse.c +--- binutils-2.9.1/gas/m68k-parse.c Fri May 1 08:47:44 1998 ++++ binutils-2.9.1/gas/m68k-parse.c Wed Dec 31 17:00:00 1969 +@@ -1,1998 +0,0 @@ +- +-/* A Bison parser, made from /5g/ian/binutils/release/copy/gas/./config/m68k-parse.y +- by GNU Bison version 1.25 +- */ +- +-#define YYBISON 1 /* Identify Bison output. */ +- +-#define DR 258 +-#define AR 259 +-#define FPR 260 +-#define FPCR 261 +-#define LPC 262 +-#define ZAR 263 +-#define ZDR 264 +-#define LZPC 265 +-#define CREG 266 +-#define INDEXREG 267 +-#define EXPR 268 +- +-#line 27 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +- +- +-#include "as.h" +-#include "tc-m68k.h" +-#include "m68k-parse.h" +- +-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, +- etc), as well as gratuitiously global symbol names If other parser +- generators (bison, byacc, etc) produce additional global names that +- conflict at link time, then those parser generators need to be +- fixed instead of adding those names to this list. */ +- +-#define yymaxdepth m68k_maxdepth +-#define yyparse m68k_parse +-#define yylex m68k_lex +-#define yyerror m68k_error +-#define yylval m68k_lval +-#define yychar m68k_char +-#define yydebug m68k_debug +-#define yypact m68k_pact +-#define yyr1 m68k_r1 +-#define yyr2 m68k_r2 +-#define yydef m68k_def +-#define yychk m68k_chk +-#define yypgo m68k_pgo +-#define yyact m68k_act +-#define yyexca m68k_exca +-#define yyerrflag m68k_errflag +-#define yynerrs m68k_nerrs +-#define yyps m68k_ps +-#define yypv m68k_pv +-#define yys m68k_s +-#define yy_yys m68k_yys +-#define yystate m68k_state +-#define yytmp m68k_tmp +-#define yyv m68k_v +-#define yy_yyv m68k_yyv +-#define yyval m68k_val +-#define yylloc m68k_lloc +-#define yyreds m68k_reds /* With YYDEBUG defined */ +-#define yytoks m68k_toks /* With YYDEBUG defined */ +-#define yylhs m68k_yylhs +-#define yylen m68k_yylen +-#define yydefred m68k_yydefred +-#define yydgoto m68k_yydgoto +-#define yysindex m68k_yysindex +-#define yyrindex m68k_yyrindex +-#define yygindex m68k_yygindex +-#define yytable m68k_yytable +-#define yycheck m68k_yycheck +- +-#ifndef YYDEBUG +-#define YYDEBUG 1 +-#endif +- +-/* Internal functions. */ +- +-static enum m68k_register m68k_reg_parse PARAMS ((char **)); +-static int yylex PARAMS ((void)); +-static void yyerror PARAMS ((const char *)); +- +-/* The parser sets fields pointed to by this global variable. */ +-static struct m68k_op *op; +- +- +-#line 93 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-typedef union +-{ +- struct m68k_indexreg indexreg; +- enum m68k_register reg; +- struct m68k_exp exp; +- unsigned long mask; +- int onereg; +-} YYSTYPE; +-#include +- +-#ifndef __cplusplus +-#ifndef __STDC__ +-#define const +-#endif +-#endif +- +- +- +-#define YYFINAL 173 +-#define YYFLAG -32768 +-#define YYNTBASE 25 +- +-#define YYTRANSLATE(x) ((unsigned)(x) <= 268 ? yytranslate[x] : 44) +- +-static const char yytranslate[] = { 0, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 14, 2, 2, 15, 2, 16, +- 17, 2, 18, 20, 19, 2, 24, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 23, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 21, 2, 22, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, +- 6, 7, 8, 9, 10, 11, 12, 13 +-}; +- +-#if YYDEBUG != 0 +-static const short yyprhs[] = { 0, +- 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, +- 21, 24, 26, 30, 35, 40, 46, 52, 57, 61, +- 65, 69, 77, 85, 92, 98, 105, 111, 118, 124, +- 130, 135, 145, 153, 162, 169, 180, 189, 200, 209, +- 218, 221, 225, 229, 235, 242, 253, 263, 274, 276, +- 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, +- 298, 300, 302, 303, 305, 307, 309, 310, 313, 314, +- 317, 318, 321, 323, 327, 331, 333, 335, 339, 343, +- 347, 349, 351, 353 +-}; +- +-static const short yyrhs[] = { 26, +- 0, 27, 0, 28, 0, 3, 0, 4, 0, 5, +- 0, 6, 0, 11, 0, 13, 0, 14, 13, 0, +- 15, 13, 0, 40, 0, 16, 4, 17, 0, 16, +- 4, 17, 18, 0, 19, 16, 4, 17, 0, 16, +- 13, 20, 34, 17, 0, 16, 34, 20, 13, 17, +- 0, 13, 16, 34, 17, 0, 16, 7, 17, 0, +- 16, 8, 17, 0, 16, 10, 17, 0, 16, 13, +- 20, 34, 20, 29, 17, 0, 16, 13, 20, 34, +- 20, 36, 17, 0, 16, 13, 20, 30, 37, 17, +- 0, 16, 30, 20, 13, 17, 0, 13, 16, 34, +- 20, 29, 17, 0, 16, 34, 20, 29, 17, 0, +- 13, 16, 34, 20, 36, 17, 0, 16, 34, 20, +- 36, 17, 0, 13, 16, 30, 37, 17, 0, 16, +- 30, 37, 17, 0, 16, 21, 13, 37, 22, 20, +- 29, 38, 17, 0, 16, 21, 13, 37, 22, 38, +- 17, 0, 16, 21, 34, 22, 20, 29, 38, 17, +- 0, 16, 21, 34, 22, 38, 17, 0, 16, 21, +- 13, 20, 34, 20, 29, 22, 38, 17, 0, 16, +- 21, 34, 20, 29, 22, 38, 17, 0, 16, 21, +- 13, 20, 34, 20, 36, 22, 38, 17, 0, 16, +- 21, 34, 20, 36, 22, 38, 17, 0, 16, 21, +- 39, 30, 37, 22, 38, 17, 0, 35, 23, 0, +- 35, 23, 18, 0, 35, 23, 19, 0, 35, 23, +- 16, 13, 17, 0, 35, 23, 16, 39, 29, 17, +- 0, 35, 23, 16, 13, 17, 23, 16, 39, 29, +- 17, 0, 35, 23, 16, 13, 17, 23, 16, 13, +- 17, 0, 35, 23, 16, 39, 29, 17, 23, 16, +- 13, 17, 0, 12, 0, 31, 0, 12, 0, 32, +- 0, 32, 0, 4, 0, 8, 0, 3, 0, 9, +- 0, 4, 0, 7, 0, 33, 0, 10, 0, 8, +- 0, 0, 34, 0, 7, 0, 10, 0, 0, 20, +- 34, 0, 0, 20, 13, 0, 0, 13, 20, 0, +- 42, 0, 42, 24, 41, 0, 43, 24, 41, 0, +- 43, 0, 42, 0, 42, 24, 41, 0, 43, 24, +- 41, 0, 43, 19, 43, 0, 3, 0, 4, 0, +- 5, 0, 6, 0 +-}; +- +-#endif +- +-#if YYDEBUG != 0 +-static const short yyrline[] = { 0, +- 116, 118, 119, 124, 130, 135, 140, 145, 150, 155, +- 160, 165, 177, 183, 188, 193, 203, 213, 223, 228, +- 233, 238, 245, 256, 263, 269, 276, 282, 293, 303, +- 310, 316, 324, 331, 338, 344, 352, 359, 371, 382, +- 394, 403, 411, 419, 429, 436, 444, 451, 464, 466, +- 478, 480, 491, 493, 494, 499, 501, 506, 508, 514, +- 516, 517, 522, 527, 532, 534, 539, 544, 552, 558, +- 566, 572, 580, 582, 586, 597, 602, 603, 607, 613, +- 623, 628, 632, 636 +-}; +-#endif +- +- +-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) +- +-static const char * const yytname[] = { "$","error","$undefined.","DR","AR", +-"FPR","FPCR","LPC","ZAR","ZDR","LZPC","CREG","INDEXREG","EXPR","'#'","'&'","'('", +-"')'","'+'","'-'","','","'['","']'","'@'","'/'","operand","generic_operand", +-"motorola_operand","mit_operand","zireg","zdireg","zadr","zdr","apc","zapc", +-"optzapc","zpc","optczapc","optcexpr","optexprc","reglist","ireglist","reglistpair", +-"reglistreg", NULL +-}; +-#endif +- +-static const short yyr1[] = { 0, +- 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, +- 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, +- 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +- 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +- 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, +- 30, 30, 31, 31, 31, 32, 32, 33, 33, 34, +- 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, +- 39, 39, 40, 40, 40, 41, 41, 41, 41, 42, +- 43, 43, 43, 43 +-}; +- +-static const short yyr2[] = { 0, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, +- 2, 1, 3, 4, 4, 5, 5, 4, 3, 3, +- 3, 7, 7, 6, 5, 6, 5, 6, 5, 5, +- 4, 9, 7, 8, 6, 10, 8, 10, 8, 8, +- 2, 3, 3, 5, 6, 10, 9, 10, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 0, 1, 1, 1, 0, 2, 0, 2, +- 0, 2, 1, 3, 3, 1, 1, 3, 3, 3, +- 1, 1, 1, 1 +-}; +- +-static const short yydefact[] = { 63, +- 81, 82, 83, 84, 59, 62, 61, 8, 9, 0, +- 0, 0, 0, 1, 2, 3, 60, 64, 0, 12, +- 73, 0, 0, 10, 11, 56, 58, 59, 62, 57, +- 61, 51, 0, 71, 67, 52, 0, 0, 41, 0, +- 0, 0, 58, 67, 0, 13, 19, 20, 21, 0, +- 67, 0, 0, 0, 0, 0, 0, 71, 42, 43, +- 81, 82, 83, 84, 74, 77, 76, 80, 75, 0, +- 0, 18, 0, 14, 67, 0, 72, 0, 0, 69, +- 67, 0, 68, 31, 54, 65, 55, 66, 49, 0, +- 0, 50, 53, 0, 15, 0, 0, 0, 0, 30, +- 0, 0, 0, 16, 0, 68, 69, 0, 0, 0, +- 0, 0, 25, 17, 27, 29, 44, 72, 0, 78, +- 79, 26, 28, 24, 0, 0, 0, 0, 0, 69, +- 69, 70, 69, 35, 69, 0, 45, 22, 23, 0, +- 0, 69, 33, 0, 0, 0, 0, 0, 71, 0, +- 69, 69, 0, 37, 39, 34, 40, 0, 0, 0, +- 0, 0, 32, 47, 0, 0, 36, 38, 46, 48, +- 0, 0, 0 +-}; +- +-static const short yydefgoto[] = { 171, +- 14, 15, 16, 91, 35, 92, 93, 17, 83, 19, +- 94, 55, 111, 53, 20, 65, 66, 67 +-}; +- +-static const short yypact[] = { 89, +- 10, 11, 19, 23,-32768,-32768,-32768,-32768, 13, -4, +- 22, 57, 36,-32768,-32768,-32768,-32768,-32768, 18,-32768, +- 33, -2, 114,-32768,-32768,-32768, 46, 62, 66,-32768, +- 67,-32768, 68, 131, 69,-32768, 70, 105, 147, 156, +- 156, 156,-32768, 94, 25, 101,-32768,-32768,-32768, 114, +- 100, 53, 9, 138, 108, 103, 112, 117,-32768,-32768, +--32768,-32768,-32768,-32768,-32768, 119, 12,-32768,-32768, 64, +- 130,-32768, 124,-32768, 94, 81, 64, 135, 124, 132, +- 94, 150,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 151, +- 152,-32768,-32768, 153,-32768, 120, 146, 156, 156,-32768, +- 154, 155, 157,-32768, 124, 144, 158, 159, 160, 73, +- 162, 161,-32768,-32768,-32768,-32768, 163,-32768, 167,-32768, +--32768,-32768,-32768,-32768, 168, 170, 124, 73, 171, 169, +- 169,-32768, 169,-32768, 169, 164, 172,-32768,-32768, 174, +- 175, 169,-32768, 177, 176, 181, 182, 183, 178, 185, +- 169, 169, 186,-32768,-32768,-32768,-32768, 136, 146, 179, +- 187, 188,-32768,-32768, 189, 190,-32768,-32768,-32768,-32768, +- 173, 194,-32768 +-}; +- +-static const short yypgoto[] = {-32768, +--32768,-32768,-32768, -72, 1,-32768, -7,-32768, 3,-32768, +- -65, -31, -103, -58,-32768, -40, 202, 6 +-}; +- +- +-#define YYLAST 207 +- +- +-static const short yytable[] = { 97, +- 101, 69, 18, 129, 36, 22, 108, 102, 24, -4, +- -5, 26, 71, 109, 37, 36, 41, 30, -6, 78, +- 32, 42, -7, 44, 119, 45, 145, 146, 23, 147, +- 41, 148, 125, -58, 25, 99, 52, 133, 153, 126, +- 39, 72, 36, 103, 73, 36, 68, 161, 162, 112, +- 75, 38, 76, 81, 140, 142, 40, 120, 121, 26, +- 27, 141, 46, 28, 29, 30, 31, 43, 32, 33, +- 5, 6, 79, 7, 80, 26, 85, 34, 47, 106, +- 87, 30, 48, 49, 89, 132, 165, 50, 54, 56, +- 159, 1, 2, 3, 4, 5, 6, 104, 7, 8, +- 105, 9, 10, 11, 12, 26, 85, 13, 57, 86, +- 87, 30, 88, 70, 89, 90, 26, 43, 74, 77, +- 5, 6, 30, 7, 84, 32, 26, 85, 95, 96, +- 86, 87, 30, 88, 43, 89, 117, 5, 6, 118, +- 7, 43, 98, 51, 5, 6, 100, 7, 26, 85, +- 82, 110, 164, 87, 30, 118, 107, 89, 61, 62, +- 63, 64, 58, 127, 59, 60, 113, 114, 115, 116, +- 122, 123, 172, 124, 0, 0, 0, 128, 134, 149, +- 130, 131, 135, 137, 138, 136, 139, 143, 144, 132, +- 158, 166, 154, 173, 150, 151, 152, 155, 156, 157, +- 160, 21, 163, 167, 168, 169, 170 +-}; +- +-static const short yycheck[] = { 58, +- 73, 42, 0, 107, 12, 0, 79, 73, 13, 0, +- 0, 3, 44, 79, 12, 23, 19, 9, 0, 51, +- 12, 24, 0, 23, 97, 23, 130, 131, 16, 133, +- 19, 135, 105, 23, 13, 24, 34, 110, 142, 105, +- 23, 17, 50, 75, 20, 53, 41, 151, 152, 81, +- 50, 16, 50, 53, 127, 128, 24, 98, 99, 3, +- 4, 127, 17, 7, 8, 9, 10, 4, 12, 13, +- 7, 8, 20, 10, 22, 3, 4, 21, 17, 77, +- 8, 9, 17, 17, 12, 13, 159, 20, 20, 20, +- 149, 3, 4, 5, 6, 7, 8, 17, 10, 11, +- 20, 13, 14, 15, 16, 3, 4, 19, 4, 7, +- 8, 9, 10, 20, 12, 13, 3, 4, 18, 20, +- 7, 8, 9, 10, 17, 12, 3, 4, 17, 13, +- 7, 8, 9, 10, 4, 12, 17, 7, 8, 20, +- 10, 4, 24, 13, 7, 8, 17, 10, 3, 4, +- 13, 20, 17, 8, 9, 20, 22, 12, 3, 4, +- 5, 6, 16, 20, 18, 19, 17, 17, 17, 17, +- 17, 17, 0, 17, -1, -1, -1, 20, 17, 16, +- 22, 22, 22, 17, 17, 23, 17, 17, 20, 13, +- 13, 13, 17, 0, 23, 22, 22, 17, 17, 17, +- 16, 0, 17, 17, 17, 17, 17 +-}; +-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +-#line 3 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* Skeleton output parser for bison, +- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. +- +- 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +- +-/* As a special exception, when this file is copied by Bison into a +- Bison output file, you may use that output file without restriction. +- This special exception was added by the Free Software Foundation +- in version 1.24 of Bison. */ +- +-#ifndef alloca +-#ifdef __GNUC__ +-#define alloca __builtin_alloca +-#else /* not GNU C. */ +-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +-#include +-#else /* not sparc */ +-#if defined (MSDOS) && !defined (__TURBOC__) +-#include +-#else /* not MSDOS, or __TURBOC__ */ +-#if defined(_AIX) +-#include +- #pragma alloca +-#else /* not MSDOS, __TURBOC__, or _AIX */ +-#ifdef __hpux +-#ifdef __cplusplus +-extern "C" { +-void *alloca (unsigned int); +-}; +-#else /* not __cplusplus */ +-void *alloca (); +-#endif /* not __cplusplus */ +-#endif /* __hpux */ +-#endif /* not _AIX */ +-#endif /* not MSDOS, or __TURBOC__ */ +-#endif /* not sparc. */ +-#endif /* not GNU C. */ +-#endif /* alloca not defined. */ +- +-/* This is the parser code that is written into each bison parser +- when the %semantic_parser declaration is not specified in the grammar. +- It was written by Richard Stallman by simplifying the hairy parser +- used when %semantic_parser is specified. */ +- +-/* Note: there must be only one dollar sign in this file. +- It is replaced by the list of actions, each action +- as one case of the switch. */ +- +-#define yyerrok (yyerrstatus = 0) +-#define yyclearin (yychar = YYEMPTY) +-#define YYEMPTY -2 +-#define YYEOF 0 +-#define YYACCEPT return(0) +-#define YYABORT return(1) +-#define YYERROR goto yyerrlab1 +-/* Like YYERROR except do call yyerror. +- This remains here temporarily to ease the +- transition to the new meaning of YYERROR, for GCC. +- Once GCC version 2 has supplanted version 1, this can go. */ +-#define YYFAIL goto yyerrlab +-#define YYRECOVERING() (!!yyerrstatus) +-#define YYBACKUP(token, value) \ +-do \ +- if (yychar == YYEMPTY && yylen == 1) \ +- { yychar = (token), yylval = (value); \ +- yychar1 = YYTRANSLATE (yychar); \ +- YYPOPSTACK; \ +- goto yybackup; \ +- } \ +- else \ +- { yyerror ("syntax error: cannot back up"); YYERROR; } \ +-while (0) +- +-#define YYTERROR 1 +-#define YYERRCODE 256 +- +-#ifndef YYPURE +-#define YYLEX yylex() +-#endif +- +-#ifdef YYPURE +-#ifdef YYLSP_NEEDED +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval, &yylloc) +-#endif +-#else /* not YYLSP_NEEDED */ +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval) +-#endif +-#endif /* not YYLSP_NEEDED */ +-#endif +- +-/* If nonreentrant, generate the variables here */ +- +-#ifndef YYPURE +- +-int yychar; /* the lookahead symbol */ +-YYSTYPE yylval; /* the semantic value of the */ +- /* lookahead symbol */ +- +-#ifdef YYLSP_NEEDED +-YYLTYPE yylloc; /* location data for the lookahead */ +- /* symbol */ +-#endif +- +-int yynerrs; /* number of parse errors so far */ +-#endif /* not YYPURE */ +- +-#if YYDEBUG != 0 +-int yydebug; /* nonzero means print parse trace */ +-/* Since this is uninitialized, it does not stop multiple parsers +- from coexisting. */ +-#endif +- +-/* YYINITDEPTH indicates the initial size of the parser's stacks */ +- +-#ifndef YYINITDEPTH +-#define YYINITDEPTH 200 +-#endif +- +-/* YYMAXDEPTH is the maximum size the stacks can grow to +- (effective only if the built-in stack extension method is used). */ +- +-#if YYMAXDEPTH == 0 +-#undef YYMAXDEPTH +-#endif +- +-#ifndef YYMAXDEPTH +-#define YYMAXDEPTH 10000 +-#endif +- +-/* Prevent warning if -Wstrict-prototypes. */ +-#ifdef __GNUC__ +-int yyparse (void); +-#endif +- +-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +-#else /* not GNU C or C++ */ +-#ifndef __cplusplus +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (to, from, count) +- char *to; +- char *from; +- int count; +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#else /* __cplusplus */ +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (char *to, char *from, int count) +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#endif +-#endif +- +-#line 196 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* The user can define YYPARSE_PARAM as the name of an argument to be passed +- into yyparse. The argument should have type void *. +- It should actually point to an object. +- Grammar actions can access the variable by casting it +- to the proper pointer type. */ +- +-#ifdef YYPARSE_PARAM +-#ifdef __cplusplus +-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL +-#else /* not __cplusplus */ +-#define YYPARSE_PARAM_ARG YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +-#endif /* not __cplusplus */ +-#else /* not YYPARSE_PARAM */ +-#define YYPARSE_PARAM_ARG +-#define YYPARSE_PARAM_DECL +-#endif /* not YYPARSE_PARAM */ +- +-int +-yyparse(YYPARSE_PARAM_ARG) +- YYPARSE_PARAM_DECL +-{ +- register int yystate; +- register int yyn; +- register short *yyssp; +- register YYSTYPE *yyvsp; +- int yyerrstatus; /* number of tokens to shift before error messages enabled */ +- int yychar1 = 0; /* lookahead token as an internal (translated) token number */ +- +- short yyssa[YYINITDEPTH]; /* the state stack */ +- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ +- +- short *yyss = yyssa; /* refer to the stacks thru separate pointers */ +- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ +- +-#ifdef YYLSP_NEEDED +- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ +- YYLTYPE *yyls = yylsa; +- YYLTYPE *yylsp; +- +-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +-#else +-#define YYPOPSTACK (yyvsp--, yyssp--) +-#endif +- +- int yystacksize = YYINITDEPTH; +- +-#ifdef YYPURE +- int yychar; +- YYSTYPE yylval; +- int yynerrs; +-#ifdef YYLSP_NEEDED +- YYLTYPE yylloc; +-#endif +-#endif +- +- YYSTYPE yyval; /* the variable used to return */ +- /* semantic values from the action */ +- /* routines */ +- +- int yylen; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Starting parse\n"); +-#endif +- +- yystate = 0; +- yyerrstatus = 0; +- yynerrs = 0; +- yychar = YYEMPTY; /* Cause a token to be read. */ +- +- /* Initialize stack pointers. +- Waste one element of value and location stack +- so that they stay on the same level as the state stack. +- The wasted elements are never initialized. */ +- +- yyssp = yyss - 1; +- yyvsp = yyvs; +-#ifdef YYLSP_NEEDED +- yylsp = yyls; +-#endif +- +-/* Push a new state, which is found in yystate . */ +-/* In all cases, when you get here, the value and location stacks +- have just been pushed. so pushing a state here evens the stacks. */ +-yynewstate: +- +- *++yyssp = yystate; +- +- if (yyssp >= yyss + yystacksize - 1) +- { +- /* Give user a chance to reallocate the stack */ +- /* Use copies of these so that the &'s don't force the real ones into memory. */ +- YYSTYPE *yyvs1 = yyvs; +- short *yyss1 = yyss; +-#ifdef YYLSP_NEEDED +- YYLTYPE *yyls1 = yyls; +-#endif +- +- /* Get the current used size of the three stacks, in elements. */ +- int size = yyssp - yyss + 1; +- +-#ifdef yyoverflow +- /* Each stack pointer address is followed by the size of +- the data in use in that stack, in bytes. */ +-#ifdef YYLSP_NEEDED +- /* This used to be a conditional around just the two extra args, +- but that might be undefined if yyoverflow is a macro. */ +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yyls1, size * sizeof (*yylsp), +- &yystacksize); +-#else +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yystacksize); +-#endif +- +- yyss = yyss1; yyvs = yyvs1; +-#ifdef YYLSP_NEEDED +- yyls = yyls1; +-#endif +-#else /* no yyoverflow */ +- /* Extend the stack our own way. */ +- if (yystacksize >= YYMAXDEPTH) +- { +- yyerror("parser stack overflow"); +- return 2; +- } +- yystacksize *= 2; +- if (yystacksize > YYMAXDEPTH) +- yystacksize = YYMAXDEPTH; +- yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); +- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); +- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); +- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); +-#ifdef YYLSP_NEEDED +- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); +- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); +-#endif +-#endif /* no yyoverflow */ +- +- yyssp = yyss + size - 1; +- yyvsp = yyvs + size - 1; +-#ifdef YYLSP_NEEDED +- yylsp = yyls + size - 1; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Stack size increased to %d\n", yystacksize); +-#endif +- +- if (yyssp >= yyss + yystacksize - 1) +- YYABORT; +- } +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Entering state %d\n", yystate); +-#endif +- +- goto yybackup; +- yybackup: +- +-/* Do appropriate processing given the current state. */ +-/* Read a lookahead token if we need one and don't already have one. */ +-/* yyresume: */ +- +- /* First try to decide what to do without reference to lookahead token. */ +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yydefault; +- +- /* Not known => get a lookahead token if don't already have one. */ +- +- /* yychar is either YYEMPTY or YYEOF +- or a valid token in external form. */ +- +- if (yychar == YYEMPTY) +- { +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Reading a token: "); +-#endif +- yychar = YYLEX; +- } +- +- /* Convert token to internal form (in yychar1) for indexing tables with */ +- +- if (yychar <= 0) /* This means end of input. */ +- { +- yychar1 = 0; +- yychar = YYEOF; /* Don't call YYLEX any more */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Now at end of input.\n"); +-#endif +- } +- else +- { +- yychar1 = YYTRANSLATE(yychar); +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); +- /* Give the individual parser a way to print the precise meaning +- of a token, for further debugging info. */ +-#ifdef YYPRINT +- YYPRINT (stderr, yychar, yylval); +-#endif +- fprintf (stderr, ")\n"); +- } +-#endif +- } +- +- yyn += yychar1; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) +- goto yydefault; +- +- yyn = yytable[yyn]; +- +- /* yyn is what to do for this token type in this state. +- Negative => reduce, -yyn is rule number. +- Positive => shift, yyn is new state. +- New state is final state => don't bother to shift, +- just return success. +- 0, or most negative number => error. */ +- +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrlab; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrlab; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +- /* Shift the lookahead token. */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +-#endif +- +- /* Discard the token being shifted unless it is eof. */ +- if (yychar != YYEOF) +- yychar = YYEMPTY; +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- /* count tokens shifted since error; after three, turn off error status. */ +- if (yyerrstatus) yyerrstatus--; +- +- yystate = yyn; +- goto yynewstate; +- +-/* Do the default action for the current state. */ +-yydefault: +- +- yyn = yydefact[yystate]; +- if (yyn == 0) +- goto yyerrlab; +- +-/* Do a reduction. yyn is the number of a rule to reduce with. */ +-yyreduce: +- yylen = yyr2[yyn]; +- if (yylen > 0) +- yyval = yyvsp[1-yylen]; /* implement default value of the action */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- int i; +- +- fprintf (stderr, "Reducing via rule %d (line %d), ", +- yyn, yyrline[yyn]); +- +- /* Print the symbols being reduced, and their result. */ +- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) +- fprintf (stderr, "%s ", yytname[yyrhs[i]]); +- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); +- } +-#endif +- +- +- switch (yyn) { +- +-case 4: +-#line 126 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = DREG; +- op->reg = yyvsp[0].reg; +- ; +- break;} +-case 5: +-#line 131 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = AREG; +- op->reg = yyvsp[0].reg; +- ; +- break;} +-case 6: +-#line 136 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = FPREG; +- op->reg = yyvsp[0].reg; +- ; +- break;} +-case 7: +-#line 141 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = CONTROL; +- op->reg = yyvsp[0].reg; +- ; +- break;} +-case 8: +-#line 146 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = CONTROL; +- op->reg = yyvsp[0].reg; +- ; +- break;} +-case 9: +-#line 151 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = ABSL; +- op->disp = yyvsp[0].exp; +- ; +- break;} +-case 10: +-#line 156 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = IMMED; +- op->disp = yyvsp[0].exp; +- ; +- break;} +-case 11: +-#line 161 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = IMMED; +- op->disp = yyvsp[0].exp; +- ; +- break;} +-case 12: +-#line 166 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = REGLST; +- op->mask = yyvsp[0].mask; +- ; +- break;} +-case 13: +-#line 179 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = AINDR; +- op->reg = yyvsp[-1].reg; +- ; +- break;} +-case 14: +-#line 184 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = AINC; +- op->reg = yyvsp[-2].reg; +- ; +- break;} +-case 15: +-#line 189 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = ADEC; +- op->reg = yyvsp[-1].reg; +- ; +- break;} +-case 16: +-#line 194 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->reg = yyvsp[-1].reg; +- op->disp = yyvsp[-3].exp; +- if ((yyvsp[-1].reg >= ZADDR0 && yyvsp[-1].reg <= ZADDR7) +- || yyvsp[-1].reg == ZPC) +- op->mode = BASE; +- else +- op->mode = DISP; +- ; +- break;} +-case 17: +-#line 204 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->reg = yyvsp[-3].reg; +- op->disp = yyvsp[-1].exp; +- if ((yyvsp[-3].reg >= ZADDR0 && yyvsp[-3].reg <= ZADDR7) +- || yyvsp[-3].reg == ZPC) +- op->mode = BASE; +- else +- op->mode = DISP; +- ; +- break;} +-case 18: +-#line 214 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->reg = yyvsp[-1].reg; +- op->disp = yyvsp[-3].exp; +- if ((yyvsp[-1].reg >= ZADDR0 && yyvsp[-1].reg <= ZADDR7) +- || yyvsp[-1].reg == ZPC) +- op->mode = BASE; +- else +- op->mode = DISP; +- ; +- break;} +-case 19: +-#line 224 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = DISP; +- op->reg = yyvsp[-1].reg; +- ; +- break;} +-case 20: +-#line 229 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->reg = yyvsp[-1].reg; +- ; +- break;} +-case 21: +-#line 234 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->reg = yyvsp[-1].reg; +- ; +- break;} +-case 22: +-#line 239 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->reg = yyvsp[-3].reg; +- op->disp = yyvsp[-5].exp; +- op->index = yyvsp[-1].indexreg; +- ; +- break;} +-case 23: +-#line 246 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- if (yyvsp[-3].reg == PC || yyvsp[-3].reg == ZPC) +- yyerror ("syntax error"); +- op->mode = BASE; +- op->reg = yyvsp[-1].reg; +- op->disp = yyvsp[-5].exp; +- op->index.reg = yyvsp[-3].reg; +- op->index.size = SIZE_UNSPEC; +- op->index.scale = 1; +- ; +- break;} +-case 24: +-#line 257 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->reg = yyvsp[-1].reg; +- op->disp = yyvsp[-4].exp; +- op->index = yyvsp[-2].indexreg; +- ; +- break;} +-case 25: +-#line 264 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->disp = yyvsp[-1].exp; +- op->index = yyvsp[-3].indexreg; +- ; +- break;} +-case 26: +-#line 270 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->reg = yyvsp[-3].reg; +- op->disp = yyvsp[-5].exp; +- op->index = yyvsp[-1].indexreg; +- ; +- break;} +-case 27: +-#line 277 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->reg = yyvsp[-3].reg; +- op->index = yyvsp[-1].indexreg; +- ; +- break;} +-case 28: +-#line 283 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- if (yyvsp[-3].reg == PC || yyvsp[-3].reg == ZPC) +- yyerror ("syntax error"); +- op->mode = BASE; +- op->reg = yyvsp[-1].reg; +- op->disp = yyvsp[-5].exp; +- op->index.reg = yyvsp[-3].reg; +- op->index.size = SIZE_UNSPEC; +- op->index.scale = 1; +- ; +- break;} +-case 29: +-#line 294 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- if (yyvsp[-3].reg == PC || yyvsp[-3].reg == ZPC) +- yyerror ("syntax error"); +- op->mode = BASE; +- op->reg = yyvsp[-1].reg; +- op->index.reg = yyvsp[-3].reg; +- op->index.size = SIZE_UNSPEC; +- op->index.scale = 1; +- ; +- break;} +-case 30: +-#line 304 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->reg = yyvsp[-1].reg; +- op->disp = yyvsp[-4].exp; +- op->index = yyvsp[-2].indexreg; +- ; +- break;} +-case 31: +-#line 311 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->reg = yyvsp[-1].reg; +- op->index = yyvsp[-2].indexreg; +- ; +- break;} +-case 32: +-#line 317 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = POST; +- op->reg = yyvsp[-5].reg; +- op->disp = yyvsp[-6].exp; +- op->index = yyvsp[-2].indexreg; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 33: +-#line 325 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = POST; +- op->reg = yyvsp[-3].reg; +- op->disp = yyvsp[-4].exp; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 34: +-#line 332 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = POST; +- op->reg = yyvsp[-5].reg; +- op->index = yyvsp[-2].indexreg; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 35: +-#line 339 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = POST; +- op->reg = yyvsp[-3].reg; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 36: +-#line 345 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = PRE; +- op->reg = yyvsp[-5].reg; +- op->disp = yyvsp[-7].exp; +- op->index = yyvsp[-3].indexreg; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 37: +-#line 353 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = PRE; +- op->reg = yyvsp[-5].reg; +- op->index = yyvsp[-3].indexreg; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 38: +-#line 360 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- if (yyvsp[-5].reg == PC || yyvsp[-5].reg == ZPC) +- yyerror ("syntax error"); +- op->mode = PRE; +- op->reg = yyvsp[-3].reg; +- op->disp = yyvsp[-7].exp; +- op->index.reg = yyvsp[-5].reg; +- op->index.size = SIZE_UNSPEC; +- op->index.scale = 1; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 39: +-#line 372 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- if (yyvsp[-5].reg == PC || yyvsp[-5].reg == ZPC) +- yyerror ("syntax error"); +- op->mode = PRE; +- op->reg = yyvsp[-3].reg; +- op->index.reg = yyvsp[-5].reg; +- op->index.size = SIZE_UNSPEC; +- op->index.scale = 1; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 40: +-#line 383 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = PRE; +- op->reg = yyvsp[-3].reg; +- op->disp = yyvsp[-5].exp; +- op->index = yyvsp[-4].indexreg; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 41: +-#line 396 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- /* We use optzapc to avoid a shift/reduce conflict. */ +- if (yyvsp[-1].reg < ADDR0 || yyvsp[-1].reg > ADDR7) +- yyerror ("syntax error"); +- op->mode = AINDR; +- op->reg = yyvsp[-1].reg; +- ; +- break;} +-case 42: +-#line 404 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- /* We use optzapc to avoid a shift/reduce conflict. */ +- if (yyvsp[-2].reg < ADDR0 || yyvsp[-2].reg > ADDR7) +- yyerror ("syntax error"); +- op->mode = AINC; +- op->reg = yyvsp[-2].reg; +- ; +- break;} +-case 43: +-#line 412 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- /* We use optzapc to avoid a shift/reduce conflict. */ +- if (yyvsp[-2].reg < ADDR0 || yyvsp[-2].reg > ADDR7) +- yyerror ("syntax error"); +- op->mode = ADEC; +- op->reg = yyvsp[-2].reg; +- ; +- break;} +-case 44: +-#line 420 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->reg = yyvsp[-4].reg; +- op->disp = yyvsp[-1].exp; +- if ((yyvsp[-4].reg >= ZADDR0 && yyvsp[-4].reg <= ZADDR7) +- || yyvsp[-4].reg == ZPC) +- op->mode = BASE; +- else +- op->mode = DISP; +- ; +- break;} +-case 45: +-#line 430 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = BASE; +- op->reg = yyvsp[-5].reg; +- op->disp = yyvsp[-2].exp; +- op->index = yyvsp[-1].indexreg; +- ; +- break;} +-case 46: +-#line 437 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = POST; +- op->reg = yyvsp[-9].reg; +- op->disp = yyvsp[-6].exp; +- op->index = yyvsp[-1].indexreg; +- op->odisp = yyvsp[-2].exp; +- ; +- break;} +-case 47: +-#line 445 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = POST; +- op->reg = yyvsp[-8].reg; +- op->disp = yyvsp[-5].exp; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 48: +-#line 452 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- op->mode = PRE; +- op->reg = yyvsp[-9].reg; +- op->disp = yyvsp[-6].exp; +- op->index = yyvsp[-5].indexreg; +- op->odisp = yyvsp[-1].exp; +- ; +- break;} +-case 50: +-#line 467 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.indexreg.reg = yyvsp[0].reg; +- yyval.indexreg.size = SIZE_UNSPEC; +- yyval.indexreg.scale = 1; +- ; +- break;} +-case 52: +-#line 481 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.indexreg.reg = yyvsp[0].reg; +- yyval.indexreg.size = SIZE_UNSPEC; +- yyval.indexreg.scale = 1; +- ; +- break;} +-case 63: +-#line 524 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.reg = ZADDR0; +- ; +- break;} +-case 67: +-#line 541 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.reg = ZADDR0; +- ; +- break;} +-case 68: +-#line 545 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.reg = yyvsp[0].reg; +- ; +- break;} +-case 69: +-#line 554 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.exp.exp.X_op = O_absent; +- yyval.exp.size = SIZE_UNSPEC; +- ; +- break;} +-case 70: +-#line 559 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.exp = yyvsp[0].exp; +- ; +- break;} +-case 71: +-#line 568 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.exp.exp.X_op = O_absent; +- yyval.exp.size = SIZE_UNSPEC; +- ; +- break;} +-case 72: +-#line 573 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.exp = yyvsp[-1].exp; +- ; +- break;} +-case 74: +-#line 583 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.mask = yyvsp[-2].mask | yyvsp[0].mask; +- ; +- break;} +-case 75: +-#line 587 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.mask = (1 << yyvsp[-2].onereg) | yyvsp[0].mask; +- ; +- break;} +-case 76: +-#line 599 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.mask = 1 << yyvsp[0].onereg; +- ; +- break;} +-case 78: +-#line 604 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.mask = yyvsp[-2].mask | yyvsp[0].mask; +- ; +- break;} +-case 79: +-#line 608 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.mask = (1 << yyvsp[-2].onereg) | yyvsp[0].mask; +- ; +- break;} +-case 80: +-#line 615 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- if (yyvsp[-2].onereg <= yyvsp[0].onereg) +- yyval.mask = (1 << (yyvsp[0].onereg + 1)) - 1 - ((1 << yyvsp[-2].onereg) - 1); +- else +- yyval.mask = (1 << (yyvsp[-2].onereg + 1)) - 1 - ((1 << yyvsp[0].onereg) - 1); +- ; +- break;} +-case 81: +-#line 625 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.onereg = yyvsp[0].reg - DATA0; +- ; +- break;} +-case 82: +-#line 629 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.onereg = yyvsp[0].reg - ADDR0 + 8; +- ; +- break;} +-case 83: +-#line 633 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- yyval.onereg = yyvsp[0].reg - FP0 + 16; +- ; +- break;} +-case 84: +-#line 637 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +-{ +- if (yyvsp[0].reg == FPI) +- yyval.onereg = 24; +- else if (yyvsp[0].reg == FPS) +- yyval.onereg = 25; +- else +- yyval.onereg = 26; +- ; +- break;} +-} +- /* the action file gets copied in in place of this dollarsign */ +-#line 498 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +- yyvsp -= yylen; +- yyssp -= yylen; +-#ifdef YYLSP_NEEDED +- yylsp -= yylen; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +- *++yyvsp = yyval; +- +-#ifdef YYLSP_NEEDED +- yylsp++; +- if (yylen == 0) +- { +- yylsp->first_line = yylloc.first_line; +- yylsp->first_column = yylloc.first_column; +- yylsp->last_line = (yylsp-1)->last_line; +- yylsp->last_column = (yylsp-1)->last_column; +- yylsp->text = 0; +- } +- else +- { +- yylsp->last_line = (yylsp+yylen-1)->last_line; +- yylsp->last_column = (yylsp+yylen-1)->last_column; +- } +-#endif +- +- /* Now "shift" the result of the reduction. +- Determine what state that goes to, +- based on the state we popped back to +- and the rule number reduced by. */ +- +- yyn = yyr1[yyn]; +- +- yystate = yypgoto[yyn - YYNTBASE] + *yyssp; +- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) +- yystate = yytable[yystate]; +- else +- yystate = yydefgoto[yyn - YYNTBASE]; +- +- goto yynewstate; +- +-yyerrlab: /* here on detecting error */ +- +- if (! yyerrstatus) +- /* If not already recovering from an error, report this error. */ +- { +- ++yynerrs; +- +-#ifdef YYERROR_VERBOSE +- yyn = yypact[yystate]; +- +- if (yyn > YYFLAG && yyn < YYLAST) +- { +- int size = 0; +- char *msg; +- int x, count; +- +- count = 0; +- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- size += strlen(yytname[x]) + 15, count++; +- msg = (char *) malloc(size + 15); +- if (msg != 0) +- { +- strcpy(msg, "parse error"); +- +- if (count < 5) +- { +- count = 0; +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- { +- strcat(msg, count == 0 ? ", expecting `" : " or `"); +- strcat(msg, yytname[x]); +- strcat(msg, "'"); +- count++; +- } +- } +- yyerror(msg); +- free(msg); +- } +- else +- yyerror ("parse error; also virtual memory exceeded"); +- } +- else +-#endif /* YYERROR_VERBOSE */ +- yyerror("parse error"); +- } +- +- goto yyerrlab1; +-yyerrlab1: /* here on error raised explicitly by an action */ +- +- if (yyerrstatus == 3) +- { +- /* if just tried and failed to reuse lookahead token after an error, discard it. */ +- +- /* return failure if at end of input */ +- if (yychar == YYEOF) +- YYABORT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +-#endif +- +- yychar = YYEMPTY; +- } +- +- /* Else will try to reuse lookahead token +- after shifting the error token. */ +- +- yyerrstatus = 3; /* Each real token shifted decrements this */ +- +- goto yyerrhandle; +- +-yyerrdefault: /* current state does not do anything special for the error token. */ +- +-#if 0 +- /* This is wrong; only states that explicitly want error tokens +- should shift them. */ +- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ +- if (yyn) goto yydefault; +-#endif +- +-yyerrpop: /* pop the current state because it cannot handle the error token */ +- +- if (yyssp == yyss) YYABORT; +- yyvsp--; +- yystate = *--yyssp; +-#ifdef YYLSP_NEEDED +- yylsp--; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "Error: state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +-yyerrhandle: +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yyerrdefault; +- +- yyn += YYTERROR; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) +- goto yyerrdefault; +- +- yyn = yytable[yyn]; +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrpop; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrpop; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting error token, "); +-#endif +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- yystate = yyn; +- goto yynewstate; +-} +-#line 647 "/5g/ian/binutils/release/copy/gas/./config/m68k-parse.y" +- +- +-/* The string to parse is stored here, and modified by yylex. */ +- +-static char *str; +- +-/* The original string pointer. */ +- +-static char *strorig; +- +-/* If *CCP could be a register, return the register number and advance +- *CCP. Otherwise don't change *CCP, and return 0. */ +- +-static enum m68k_register +-m68k_reg_parse (ccp) +- register char **ccp; +-{ +- char *start = *ccp; +- char c; +- char *p; +- symbolS *symbolp; +- +- if (flag_reg_prefix_optional) +- { +- if (*start == REGISTER_PREFIX) +- start++; +- p = start; +- } +- else +- { +- if (*start != REGISTER_PREFIX) +- return 0; +- p = start + 1; +- } +- +- if (! is_name_beginner (*p)) +- return 0; +- +- p++; +- while (is_part_of_name (*p) && *p != '.' && *p != ':' && *p != '*') +- p++; +- +- c = *p; +- *p = 0; +- symbolp = symbol_find (start); +- *p = c; +- +- if (symbolp != NULL && S_GET_SEGMENT (symbolp) == reg_section) +- { +- *ccp = p; +- return S_GET_VALUE (symbolp); +- } +- +- /* In MRI mode, something like foo.bar can be equated to a register +- name. */ +- while (flag_mri && c == '.') +- { +- ++p; +- while (is_part_of_name (*p) && *p != '.' && *p != ':' && *p != '*') +- p++; +- c = *p; +- *p = '\0'; +- symbolp = symbol_find (start); +- *p = c; +- if (symbolp != NULL && S_GET_SEGMENT (symbolp) == reg_section) +- { +- *ccp = p; +- return S_GET_VALUE (symbolp); +- } +- } +- +- return 0; +-} +- +-/* The lexer. */ +- +-static int +-yylex () +-{ +- enum m68k_register reg; +- char *s; +- int parens; +- int c = 0; +- int tail = 0; +- char *hold; +- +- if (*str == ' ') +- ++str; +- +- if (*str == '\0') +- return 0; +- +- /* Various special characters are just returned directly. */ +- switch (*str) +- { +- case '@': +- /* In MRI mode, this can be the start of an octal number. */ +- if (flag_mri) +- { +- if (isdigit (str[1]) +- || ((str[1] == '+' || str[1] == '-') +- && isdigit (str[2]))) +- break; +- } +- /* Fall through. */ +- case '#': +- case '&': +- case ',': +- case ')': +- case '/': +- case '[': +- case ']': +- return *str++; +- case '+': +- /* It so happens that a '+' can only appear at the end of an +- operand. If it appears anywhere else, it must be a unary +- plus on an expression. */ +- if (str[1] == '\0') +- return *str++; +- break; +- case '-': +- /* A '-' can only appear in -(ar), rn-rn, or ar@-. If it +- appears anywhere else, it must be a unary minus on an +- expression. */ +- if (str[1] == '\0') +- return *str++; +- s = str + 1; +- if (*s == '(') +- ++s; +- if (m68k_reg_parse (&s) != 0) +- return *str++; +- break; +- case '(': +- /* A '(' can only appear in `(reg)', `(expr,...', `([', `@(', or +- `)('. If it appears anywhere else, it must be starting an +- expression. */ +- if (str[1] == '[' +- || (str > strorig +- && (str[-1] == '@' +- || str[-1] == ')'))) +- return *str++; +- s = str + 1; +- if (m68k_reg_parse (&s) != 0) +- return *str++; +- /* Check for the case of '(expr,...' by scanning ahead. If we +- find a comma outside of balanced parentheses, we return '('. +- If we find an unbalanced right parenthesis, then presumably +- the '(' really starts an expression. */ +- parens = 0; +- for (s = str + 1; *s != '\0'; s++) +- { +- if (*s == '(') +- ++parens; +- else if (*s == ')') +- { +- if (parens == 0) +- break; +- --parens; +- } +- else if (*s == ',' && parens == 0) +- { +- /* A comma can not normally appear in an expression, so +- this is a case of '(expr,...'. */ +- return *str++; +- } +- } +- } +- +- /* See if it's a register. */ +- +- reg = m68k_reg_parse (&str); +- if (reg != 0) +- { +- int ret; +- +- yylval.reg = reg; +- +- if (reg >= DATA0 && reg <= DATA7) +- ret = DR; +- else if (reg >= ADDR0 && reg <= ADDR7) +- ret = AR; +- else if (reg >= FP0 && reg <= FP7) +- return FPR; +- else if (reg == FPI +- || reg == FPS +- || reg == FPC) +- return FPCR; +- else if (reg == PC) +- return LPC; +- else if (reg >= ZDATA0 && reg <= ZDATA7) +- ret = ZDR; +- else if (reg >= ZADDR0 && reg <= ZADDR7) +- ret = ZAR; +- else if (reg == ZPC) +- return LZPC; +- else +- return CREG; +- +- /* If we get here, we have a data or address register. We +- must check for a size or scale; if we find one, we must +- return INDEXREG. */ +- +- s = str; +- +- if (*s != '.' && *s != ':' && *s != '*') +- return ret; +- +- yylval.indexreg.reg = reg; +- +- if (*s != '.' && *s != ':') +- yylval.indexreg.size = SIZE_UNSPEC; +- else +- { +- ++s; +- switch (*s) +- { +- case 'w': +- case 'W': +- yylval.indexreg.size = SIZE_WORD; +- ++s; +- break; +- case 'l': +- case 'L': +- yylval.indexreg.size = SIZE_LONG; +- ++s; +- break; +- default: +- yyerror ("illegal size specification"); +- yylval.indexreg.size = SIZE_UNSPEC; +- break; +- } +- } +- +- yylval.indexreg.scale = 1; +- +- if (*s == '*' || *s == ':') +- { +- expressionS scale; +- +- ++s; +- +- hold = input_line_pointer; +- input_line_pointer = s; +- expression (&scale); +- s = input_line_pointer; +- input_line_pointer = hold; +- +- if (scale.X_op != O_constant) +- yyerror ("scale specification must resolve to a number"); +- else +- { +- switch (scale.X_add_number) +- { +- case 1: +- case 2: +- case 4: +- case 8: +- yylval.indexreg.scale = scale.X_add_number; +- break; +- default: +- yyerror ("invalid scale value"); +- break; +- } +- } +- } +- +- str = s; +- +- return INDEXREG; +- } +- +- /* It must be an expression. Before we call expression, we need to +- look ahead to see if there is a size specification. We must do +- that first, because otherwise foo.l will be treated as the symbol +- foo.l, rather than as the symbol foo with a long size +- specification. The grammar requires that all expressions end at +- the end of the operand, or with ',', '(', ']', ')'. */ +- +- parens = 0; +- for (s = str; *s != '\0'; s++) +- { +- if (*s == '(') +- { +- if (parens == 0 +- && s > str +- && (s[-1] == ')' || isalnum ((unsigned char) s[-1]))) +- break; +- ++parens; +- } +- else if (*s == ')') +- { +- if (parens == 0) +- break; +- --parens; +- } +- else if (parens == 0 +- && (*s == ',' || *s == ']')) +- break; +- } +- +- yylval.exp.size = SIZE_UNSPEC; +- if (s <= str + 2 +- || (s[-2] != '.' && s[-2] != ':')) +- tail = 0; +- else +- { +- switch (s[-1]) +- { +- case 's': +- case 'S': +- case 'b': +- case 'B': +- yylval.exp.size = SIZE_BYTE; +- break; +- case 'w': +- case 'W': +- yylval.exp.size = SIZE_WORD; +- break; +- case 'l': +- case 'L': +- yylval.exp.size = SIZE_LONG; +- break; +- default: +- break; +- } +- if (yylval.exp.size != SIZE_UNSPEC) +- tail = 2; +- } +- +-#ifdef OBJ_ELF +- { +- /* Look for @PLTPC, etc. */ +- char *cp; +- +- yylval.exp.pic_reloc = pic_none; +- cp = s - tail; +- if (cp - 6 > str && cp[-6] == '@') +- { +- if (strncmp (cp - 6, "@PLTPC", 6) == 0) +- { +- yylval.exp.pic_reloc = pic_plt_pcrel; +- tail += 6; +- } +- else if (strncmp (cp - 6, "@GOTPC", 6) == 0) +- { +- yylval.exp.pic_reloc = pic_got_pcrel; +- tail += 6; +- } +- } +- else if (cp - 4 > str && cp[-4] == '@') +- { +- if (strncmp (cp - 4, "@PLT", 4) == 0) +- { +- yylval.exp.pic_reloc = pic_plt_off; +- tail += 4; +- } +- else if (strncmp (cp - 4, "@GOT", 4) == 0) +- { +- yylval.exp.pic_reloc = pic_got_off; +- tail += 4; +- } +- } +- } +-#endif +- +- if (tail != 0) +- { +- c = s[-tail]; +- s[-tail] = 0; +- } +- +- hold = input_line_pointer; +- input_line_pointer = str; +- expression (&yylval.exp.exp); +- str = input_line_pointer; +- input_line_pointer = hold; +- +- if (tail != 0) +- { +- s[-tail] = c; +- str = s; +- } +- +- return EXPR; +-} +- +-/* Parse an m68k operand. This is the only function which is called +- from outside this file. */ +- +-int +-m68k_ip_op (s, oparg) +- char *s; +- struct m68k_op *oparg; +-{ +- memset (oparg, 0, sizeof *oparg); +- oparg->error = NULL; +- oparg->index.reg = ZDATA0; +- oparg->index.scale = 1; +- oparg->disp.exp.X_op = O_absent; +- oparg->odisp.exp.X_op = O_absent; +- +- str = strorig = s; +- op = oparg; +- +- return yyparse (); +-} +- +-/* The error handler. */ +- +-static void +-yyerror (s) +- const char *s; +-{ +- op->error = s; +-} +diff -rup --new-file binutils-2.9.1/gas/read.c binutils-2.9.1/gas/read.c +--- binutils-2.9.1/gas/read.c Fri May 1 08:45:16 1998 ++++ binutils-2.9.1/gas/read.c Sun Aug 23 00:00:00 1998 +@@ -53,6 +53,10 @@ Software Foundation, 59 Temple Place - S + #define TC_START_LABEL(x,y) (x==':') + #endif + ++#ifdef OBJ_AMIGAHUNK ++extern segT data_chip_section, bss_chip_section; ++#endif ++ + /* The NOP_OPCODE is for the alignment fill value. + * fill it a nop instruction so that the disassembler does not choke + * on it +@@ -260,6 +264,9 @@ static const pseudo_typeS potable[] = + {"common", s_mri_common, 0}, + {"common.s", s_mri_common, 1}, + {"data", s_data, 0}, ++#ifdef OBJ_AMIGAHUNK ++ {"datachip", s_data_chip, 0}, ++#endif + {"dc", cons, 2}, + {"dc.b", cons, 1}, + {"dc.d", float_cons, 'd'}, +@@ -1540,6 +1547,17 @@ s_data (ignore) + demand_empty_rest_of_line (); + } + ++#ifdef OBJ_AMIGAHUNK ++void ++s_data_chip (ignore) ++ int ignore; ++{ ++ int temp = get_absolute_expression (); ++ subseg_set (data_chip_section, (subsegT) temp); ++ demand_empty_rest_of_line (); ++} ++#endif ++ + /* Handle the .appfile pseudo-op. This is automatically generated by + do_scrub_chars when a preprocessor # line comment is seen with a + file name. This default definition may be overridden by the object +@@ -3582,7 +3600,7 @@ emit_expr (exp, nbytes) + + #ifdef BFD_ASSEMBLER + #ifdef TC_CONS_FIX_NEW +- TC_CONS_FIX_NEW (frag_now, p - frag_now->fr_literal, nbytes, exp); ++ TC_CONS_FIX_NEW (frag_now, p - frag_now->fr_literal, nbytes, exp, 0); + #else + { + bfd_reloc_code_real_type r; +@@ -3607,12 +3625,12 @@ emit_expr (exp, nbytes) + break; + } + fix_new_exp (frag_now, p - frag_now->fr_literal, (int) nbytes, exp, +- 0, r); ++ 0, r, 0); + } + #endif + #else + #ifdef TC_CONS_FIX_NEW +- TC_CONS_FIX_NEW (frag_now, p - frag_now->fr_literal, nbytes, exp); ++ TC_CONS_FIX_NEW (frag_now, p - frag_now->fr_literal, nbytes, exp, 0); + #else + /* Figure out which reloc number to use. Use TC_CONS_RELOC if + it is defined, otherwise use NO_RELOC if it is defined, +@@ -3625,7 +3643,7 @@ emit_expr (exp, nbytes) + #endif + #endif + fix_new_exp (frag_now, p - frag_now->fr_literal, (int) nbytes, exp, 0, +- TC_CONS_RELOC); ++ TC_CONS_RELOC, 0); + #endif /* TC_CONS_FIX_NEW */ + #endif /* BFD_ASSEMBLER */ + } +@@ -4111,7 +4129,7 @@ sizeof_uleb128 (value) + return size; + } + +-inline int ++int + sizeof_leb128 (value, sign) + valueT value; + int sign; +@@ -4175,7 +4193,7 @@ output_uleb128 (p, value) + return p - orig; + } + +-inline int ++int + output_leb128 (p, value, sign) + char *p; + valueT value; +diff -rup --new-file binutils-2.9.1/gas/read.h binutils-2.9.1/gas/read.h +--- binutils-2.9.1/gas/read.h Fri May 1 08:45:16 1998 ++++ binutils-2.9.1/gas/read.h Sun Aug 23 00:00:00 1998 +@@ -117,6 +117,9 @@ extern void s_app_file PARAMS ((int)); + extern void s_app_line PARAMS ((int)); + extern void s_comm PARAMS ((int)); + extern void s_data PARAMS ((int)); ++#ifdef OBJ_AMIGAHUNK ++extern void s_data_chip PARAMS ((int)); ++#endif + extern void s_desc PARAMS ((int)); + extern void s_else PARAMS ((int arg)); + extern void s_end PARAMS ((int arg)); +diff -rup --new-file binutils-2.9.1/gas/write.c binutils-2.9.1/gas/write.c +--- binutils-2.9.1/gas/write.c Fri May 1 08:45:18 1998 ++++ binutils-2.9.1/gas/write.c Sun Aug 23 00:00:00 1998 +@@ -101,12 +101,12 @@ static int n_fixups; + static fixS *fix_new_internal PARAMS ((fragS *, int where, int size, + symbolS *add, symbolS *sub, + offsetT offset, int pcrel, +- bfd_reloc_code_real_type r_type)); ++ bfd_reloc_code_real_type r_type, int baserel)); + #else + static fixS *fix_new_internal PARAMS ((fragS *, int where, int size, + symbolS *add, symbolS *sub, + offsetT offset, int pcrel, +- int r_type)); ++ int r_type, int baserel)); + #endif + #if defined (BFD_ASSEMBLER) || (!defined (BFD) && !defined (OBJ_VMS)) + static long fixup_segment PARAMS ((fixS * fixP, segT this_segment_type)); +@@ -140,7 +140,7 @@ static void relax_and_size_all_segments + */ + static fixS * + fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel, +- r_type) ++ r_type, baserel) + fragS *frag; /* Which frag? */ + int where; /* Where in that frag? */ + int size; /* 1, 2, or 4 usually. */ +@@ -153,6 +153,7 @@ fix_new_internal (frag, where, size, add + #else + int r_type; /* Relocation type */ + #endif ++ int baserel; /* TRUE if base-relative data */ + { + fixS *fixP; + +@@ -187,6 +188,7 @@ fix_new_internal (frag, where, size, add + fixP->fx_signed = 0; + + #ifdef TC_FIX_TYPE ++ fixP->tc_fix_data = baserel; + TC_INIT_FIX_DATA(fixP); + #endif + +@@ -233,7 +235,7 @@ fix_new_internal (frag, where, size, add + /* Create a fixup relative to a symbol (plus a constant). */ + + fixS * +-fix_new (frag, where, size, add_symbol, offset, pcrel, r_type) ++fix_new (frag, where, size, add_symbol, offset, pcrel, r_type, baserel) + fragS *frag; /* Which frag? */ + int where; /* Where in that frag? */ + int size; /* 1, 2, or 4 usually. */ +@@ -245,9 +247,10 @@ fix_new (frag, where, size, add_symbol, + #else + int r_type; /* Relocation type */ + #endif ++ int baserel; + { + return fix_new_internal (frag, where, size, add_symbol, +- (symbolS *) NULL, offset, pcrel, r_type); ++ (symbolS *) NULL, offset, pcrel, r_type, baserel); + } + + /* Create a fixup for an expression. Currently we only support fixups +@@ -255,7 +258,7 @@ fix_new (frag, where, size, add_symbol, + file formats support anyhow. */ + + fixS * +-fix_new_exp (frag, where, size, exp, pcrel, r_type) ++fix_new_exp (frag, where, size, exp, pcrel, r_type, baserel) + fragS *frag; /* Which frag? */ + int where; /* Where in that frag? */ + int size; /* 1, 2, or 4 usually. */ +@@ -266,6 +269,7 @@ fix_new_exp (frag, where, size, exp, pcr + #else + int r_type; /* Relocation type */ + #endif ++ int baserel; + { + symbolS *add = NULL; + symbolS *sub = NULL; +@@ -285,7 +289,7 @@ fix_new_exp (frag, where, size, exp, pcr + exp->X_op_symbol = 0; + exp->X_add_symbol = stmp; + exp->X_add_number = 0; +- return fix_new_exp (frag, where, size, exp, pcrel, r_type); ++ return fix_new_exp (frag, where, size, exp, pcrel, r_type, baserel); + } + + case O_symbol_rva: +@@ -324,7 +328,7 @@ fix_new_exp (frag, where, size, exp, pcr + } + + return fix_new_internal (frag, where, size, add, sub, off, +- pcrel, r_type); ++ pcrel, r_type, baserel); + } + + /* Append a string onto another string, bumping the pointer along. */ +@@ -1134,7 +1138,7 @@ write_contents (abfd, sec, xxx) + if (fill_size == 1) + { + n_per_buf = sizeof (buf); +- memset (buf, *fill_literal, n_per_buf); ++ memset (buf, *fill_literal & 0xFF, n_per_buf); /* fnf - work around BeOS memset bug */ + } + else + { +@@ -1530,17 +1534,17 @@ write_object_file () + #ifdef TC_CONS_FIX_NEW + TC_CONS_FIX_NEW (lie->frag, + lie->word_goes_here - lie->frag->fr_literal, +- 2, &exp); ++ 2, &exp, 0); + #else + fix_new_exp (lie->frag, + lie->word_goes_here - lie->frag->fr_literal, +- 2, &exp, 0, BFD_RELOC_16); ++ 2, &exp, 0, BFD_RELOC_16, 0); + #endif + #else + #if defined(TC_SPARC) || defined(TC_A29K) || defined(NEED_FX_R_TYPE) + fix_new_exp (lie->frag, + lie->word_goes_here - lie->frag->fr_literal, +- 2, &exp, 0, NO_RELOC); ++ 2, &exp, 0, NO_RELOC, 0); + #else + #ifdef TC_NS32K + fix_new_ns32k_exp (lie->frag, +@@ -1549,7 +1553,7 @@ write_object_file () + #else + fix_new_exp (lie->frag, + lie->word_goes_here - lie->frag->fr_literal, +- 2, &exp, 0, 0); ++ 2, &exp, 0, 0, 0); + #endif /* TC_NS32K */ + #endif /* TC_SPARC|TC_A29K|NEED_FX_R_TYPE */ + #endif /* BFD_ASSEMBLER */ +@@ -2392,6 +2396,7 @@ fixup_segment (fixP, this_segment_type) + char *place; + long where; + int pcrel, plt; ++ char baserel = 0; + fragS *fragP; + segT add_symbol_segment = absolute_section; + +@@ -2430,6 +2435,9 @@ fixup_segment (fixP, this_segment_type) + add_number = fixP->fx_offset; + pcrel = fixP->fx_pcrel; + plt = fixP->fx_plt; ++#ifdef TC_FIX_TYPE ++ baserel = fixP->tc_fix_data; ++#endif + + if (add_symbolP != NULL + && add_symbolP->sy_mri_common) +@@ -2556,7 +2564,6 @@ fixup_segment (fixP, this_segment_type) + } + } + } +- + if (add_symbolP) + { + if (add_symbol_segment == this_segment_type && pcrel && !plt +@@ -2668,6 +2675,11 @@ fixup_segment (fixP, this_segment_type) + ++seg_reloc_count; + } + } ++ ++#if !defined(BFD_ASSEMBLER) && !defined(MANY_SEGMENTS) ++ if (baserel && add_number) ++ add_number -= text_last_frag->fr_address; ++#endif + + if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && size > 0) + { +diff -rup --new-file binutils-2.9.1/gas/write.h binutils-2.9.1/gas/write.h +--- binutils-2.9.1/gas/write.h Fri May 1 08:45:18 1998 ++++ binutils-2.9.1/gas/write.h Sun Aug 23 00:00:00 1998 +@@ -177,17 +177,18 @@ extern void number_to_chars_bigendian + #ifdef BFD_ASSEMBLER + extern fixS *fix_new + PARAMS ((fragS * frag, int where, int size, symbolS * add_symbol, +- offsetT offset, int pcrel, bfd_reloc_code_real_type r_type)); ++ offsetT offset, int pcrel, bfd_reloc_code_real_type r_type, ++ int baserel)); + extern fixS *fix_new_exp + PARAMS ((fragS * frag, int where, int size, expressionS *exp, int pcrel, +- bfd_reloc_code_real_type r_type)); ++ bfd_reloc_code_real_type r_type, int baserel)); + #else + extern fixS *fix_new + PARAMS ((fragS * frag, int where, int size, symbolS * add_symbol, +- offsetT offset, int pcrel, int r_type)); ++ offsetT offset, int pcrel, int r_type, int baserel)); + extern fixS *fix_new_exp + PARAMS ((fragS * frag, int where, int size, expressionS *exp, int pcrel, +- int r_type)); ++ int r_type, int baserel)); + #endif + + extern void write_print_statistics PARAMS ((FILE *)); +diff -rup --new-file binutils-2.9.1/gprof/ChangeLog binutils-2.9.1/gprof/ChangeLog +--- binutils-2.9.1/gprof/ChangeLog Fri May 1 08:49:41 1998 ++++ binutils-2.9.1/gprof/ChangeLog Sun Aug 23 00:00:00 1998 +@@ -188,6 +188,12 @@ Mon Dec 29 14:17:08 1997 Ian Lance Tayl + * core.c (core_sym_class): Treat weak symbols as text symbols. + From Dean Gaudet . + ++Tue Oct 28 09:05:21 1997 Fred Fish ++ ++ * configure.in (BFDLIB): For BeOS hosts, directly ++ include libraries rather than using -L search paths. ++ * configure: Regenerated. ++ + Wed Sep 24 11:35:43 1997 Ian Lance Taylor + + * aclocal.m4: Rebuild with new libtool. +diff -rup --new-file binutils-2.9.1/gprof/Makefile.am binutils-2.9.1/gprof/Makefile.am +--- binutils-2.9.1/gprof/Makefile.am Fri May 1 08:49:41 1998 ++++ binutils-2.9.1/gprof/Makefile.am Sun Aug 23 00:00:00 1998 +@@ -25,7 +25,7 @@ EXTRA_DIST = flat_bl.c bsd_callg_bl.c fs + + BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c + +-diststuff: $(BUILT_SOURCES) info ++diststuff: $(BUILT_SOURCES) info guide + + .m.c: + awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \ +diff -rup --new-file binutils-2.9.1/gprof/Makefile.in binutils-2.9.1/gprof/Makefile.in +--- binutils-2.9.1/gprof/Makefile.in Fri May 1 08:49:41 1998 ++++ binutils-2.9.1/gprof/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -1,4 +1,4 @@ +-# Makefile.in generated automatically by automake 1.2e from Makefile.am ++# Makefile.in generated automatically by automake 1.3 from Makefile.am + + # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation +@@ -11,7 +11,7 @@ + # PARTICULAR PURPOSE. + + +-SHELL = @SHELL@ ++SHELL = /bin/sh + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -28,10 +28,16 @@ sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ ++guidedir = @guidedir@ ++htmldir = @htmldir@ ++dvidir = @dvidir@ ++psdir = @psdir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + ++DISTDIR = ++ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +@@ -126,7 +132,14 @@ TEXINFO_TEX = $(top_srcdir)/../texinfo/t + INFO_DEPS = gprof.info + DVIS = gprof.dvi + TEXINFOS = gprof.texi +-MANS = gprof.1 ++GUIDES = gprof.guide ++GUIDE_DEPS = gprof.guide ++HTMLS = gprof.html ++HTML_DEPS = gprof.html ++PS_S = gprof.ps ++PS_DEPS = gprof.ps ++man1dir = $(mandir)/man1 ++MANS = $(man_MANS) + + NROFF = nroff + HEADERS = $(noinst_HEADERS) +@@ -135,21 +148,21 @@ DIST_COMMON = ChangeLog Makefile.am Mak + aclocal.m4 configure configure.in gconfig.in stamp-h.in + + +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +- ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) \ ++ $(INFOS) $(GUIDES) $(HTMLS) $(MANS) + TAR = tar + GZIP = --best + SOURCES = $(gprof_SOURCES) + OBJECTS = $(gprof_OBJECTS) + +-default: all ++all: Makefile $(PROGRAMS) $(MANS) $(HEADERS) gconfig.h + + .SUFFIXES: +-.SUFFIXES: .S .c .dvi .info .lo .m .o .ps .s .texi .texinfo +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile ++.SUFFIXES: .S .c .dvi .guide .html .info .lo .m .o .ps .s .texi .texinfo .txi ++$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus --include-deps Makefile + +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +@@ -193,18 +206,18 @@ maintainer-clean-binPROGRAMS: + + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(bindir) ++ $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ +- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \ +- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ ++ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ ++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; \ + done + + uninstall-binPROGRAMS: +- $(NORMAL_UNINSTALL) ++ @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ +- rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ ++ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + done + + .c.o: +@@ -250,6 +263,9 @@ gprof$(EXEEXT): $(gprof_OBJECTS) $(gprof + $(LINK) $(gprof_LDFLAGS) $(gprof_OBJECTS) $(gprof_LDADD) $(LIBS) + + gprof.info: gprof.texi ++gprof.guide: gprof.texi ++gprof.html: gprof.texi ++gprof.ps: gprof.dvi + gprof.dvi: gprof.texi + + +@@ -257,7 +273,7 @@ DVIPS = dvips + + .texi.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I$(srcdir) $< --output=$@ + + .texi.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ +@@ -265,39 +281,51 @@ DVIPS = dvips + + .texi: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi.info: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< ++ ++.txi.dvi: ++ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ ++ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< + .dvi.ps: + $(DVIPS) $< -o $@ + + install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(infodir) ++ $(mkinstalldirs) $(DESTDIR)$(infodir) + @for file in $(INFO_DEPS); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + if test -f $$d/$$ifile; then \ +- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \ +- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ + else : ; fi; \ + done; \ + done + @$(POST_INSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + for file in $(INFO_DEPS); do \ +- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\ +- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\ ++ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ ++ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ + done; \ + else : ; fi + +@@ -308,11 +336,11 @@ uninstall-info: + else ii=; fi; \ + for file in $(INFO_DEPS); do \ + test -z "$ii" \ +- || install-info --info-dir=$(infodir) --remove $$file; \ ++ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ + done +- $(NORMAL_UNINSTALL) ++ @$(NORMAL_UNINSTALL) + for file in $(INFO_DEPS); do \ +- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ ++ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + done + + dist-info: $(INFO_DEPS) +@@ -325,11 +353,145 @@ dist-info: $(INFO_DEPS) + done; \ + done + ++MAKEGUIDE= $(MAKEINFO) --amiga ++ ++MAKEHTML = texi2html -number -split_chapter ++ ++.texi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texinfo.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.txi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texi.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++.texinfo.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++install-guide: $(GUIDE_DEPS) ++ $(mkinstalldirs) $(guidedir) ++ for file in $(GUIDE_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(guidedir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-guide: ++ for file in *.guide*; do \ ++ rm -f $(guidedir)/$$file; \ ++ done ++ ++install-ps: $(PS_S) ++ $(mkinstalldirs) $(psdir) ++ for file in $(PS_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(psdir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-ps: ++ for file in *.ps*; do \ ++ rm -f $(psdir)/$$file; \ ++ done ++ ++install-dvi: $(DVIS) ++ $(mkinstalldirs) $(dvidir) ++ for file in $(DVIS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(dvidir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-dvi: ++ for file in *.dvi*; do \ ++ rm -f $(dvidir)/$$file; \ ++ done ++ ++install-html: $(HTML_DEPS) ++ $(mkinstalldirs) $(htmldir) ++ @touch $(HTML_DEPS) ++ @for file in $(HTML_DEPS); do \ ++ if test -f $$file; then d=.; else d=$(srcdir); fi; \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $$d && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ if test -f $$d/$$ifile; then \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile; \ ++ else : ; fi; \ ++ done; \ ++ done ++ @rm -f $(htmldir)/$(HTML_DEPS) ++ ++uninstall-html: ++ @for file in $(HTML_DEPS); do \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $(htmldir) && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ echo "removing: $(htmldir)/$$ifile"; \ ++ rm -f $(htmldir)/$$ifile; \ ++ done; \ ++ done ++ ++mostlyclean-guide: ++ rm -f gprof.aux gprof.cp gprof.cps gprof.dvi gprof.fn gprof.fns \ ++ gprof.ky gprof.kys gprof.ps gprof.log gprof.pg gprof.toc \ ++ gprof.tp gprof.tps gprof.vr gprof.vrs gprof.op gprof.tr \ ++ gprof.cv gprof.cn gprof.guide gprof.html gprof.ps ++ ++clean-guide: ++ ++distclean-guide: ++ ++maintainer-clean-guide: ++ rm -f $(GUIDES) ++ ++mostlyclean-html: ++ rm -f gprof.aux gprof.cp gprof.cps gprof.dvi gprof.fn gprof.fns \ ++ gprof.ky gprof.kys gprof.ps gprof.log gprof.pg gprof.toc \ ++ gprof.tp gprof.tps gprof.vr gprof.vrs gprof.op gprof.tr \ ++ gprof.cv gprof.cn gprof.guide gprof.html gprof.ps ++ ++clean-html: ++ ++distclean-html: ++ ++maintainer-clean-html: ++ rm -f $(HTMLS) ++ ++mostlyclean-ps: ++ rm -f gprof.aux gprof.cp gprof.cps gprof.dvi gprof.fn gprof.fns \ ++ gprof.ky gprof.kys gprof.ps gprof.log gprof.pg gprof.toc \ ++ gprof.tp gprof.tps gprof.vr gprof.vrs gprof.op gprof.tr \ ++ gprof.cv gprof.cn gprof.guide gprof.html gprof.ps ++ ++clean-ps: ++ ++distclean-ps: ++ ++maintainer-clean-ps: ++ rm -f $(PS_S) ++ ++mostlyclean-dvi: ++ rm -f gprof.aux gprof.cp gprof.cps gprof.dvi gprof.fn gprof.fns \ ++ gprof.ky gprof.kys gprof.ps gprof.log gprof.pg gprof.toc \ ++ gprof.tp gprof.tps gprof.vr gprof.vrs gprof.op gprof.tr \ ++ gprof.cv gprof.cn gprof.guide gprof.html gprof.ps ++ ++clean-dvi: ++ ++distclean-dvi: ++ ++maintainer-clean-dvi: ++ rm -f $(DVIS) ++ + mostlyclean-aminfo: + -rm -f gprof.aux gprof.cp gprof.cps gprof.dvi gprof.fn gprof.fns \ + gprof.ky gprof.kys gprof.ps gprof.log gprof.pg gprof.toc \ + gprof.tp gprof.tps gprof.vr gprof.vrs gprof.op gprof.tr \ +- gprof.cv gprof.cn ++ gprof.cv gprof.cn gprof.guide gprof.html gprof.ps + + clean-aminfo: + +@@ -343,21 +505,45 @@ maintainer-clean-aminfo: + fi; \ + done + clean-info: mostlyclean-aminfo +-install-man: $(MANS) +- $(NORMAL_INSTALL) +- $(mkinstalldirs) $(mandir)/man1 +- @sect=1; \ +- inst=`echo "gprof" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/gprof.1; then file=$(srcdir)/gprof.1; \ +- else file=gprof.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst + +-uninstall-man: +- $(NORMAL_UNINSTALL) +- -inst=`echo "gprof" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst ++install-man1: ++ $(mkinstalldirs) $(DESTDIR)$(man1dir) ++ @list='$(man1_MANS)'; \ ++ l2='$(man_MANS)'; for i in $$l2; do \ ++ case "$$i" in \ ++ *.1*) list="$$list $$i" ;; \ ++ esac; \ ++ done; \ ++ for i in $$list; do \ ++ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ ++ else file=$$i; fi; \ ++ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ ++ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ ++ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ ++ done + ++uninstall-man1: ++ @list='$(man1_MANS)'; \ ++ l2='$(man_MANS)'; for i in $$l2; do \ ++ case "$$i" in \ ++ *.1*) list="$$list $$i" ;; \ ++ esac; \ ++ done; \ ++ for i in $$list; do \ ++ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ ++ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ ++ rm -f $(DESTDIR)$(man1dir)/$$inst; \ ++ done ++install-man: $(MANS) ++ @$(NORMAL_INSTALL) ++ $(MAKE) install-man1 ++uninstall-man: ++ @$(NORMAL_UNINSTALL) ++ $(MAKE) uninstall-man1 + + tags: TAGS + +@@ -428,6 +614,9 @@ distdir: $(DISTFILES) + done + $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info + info: $(INFO_DEPS) ++guide: $(GUIDE_DEPS) ++html: $(HTML_DEPS) ++ps: $(PS_DEPS) + dvi: $(DVIS) + check: + $(MAKE) +@@ -444,12 +633,10 @@ install: install-exec install-data all + + uninstall: uninstall-binPROGRAMS uninstall-man + +-all: Makefile $(PROGRAMS) $(MANS) $(HEADERS) gconfig.h +- + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: +- $(mkinstalldirs) $(bindir) $(mandir)/man1 ++ $(mkinstalldirs) $(DATADIR)$(bindir) $(DESTDIR)$(mandir)/man1 + + + mostlyclean-generic: +@@ -468,40 +655,52 @@ maintainer-clean-generic: + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + mostlyclean: mostlyclean-hdr mostlyclean-binPROGRAMS \ + mostlyclean-compile mostlyclean-libtool \ +- mostlyclean-aminfo mostlyclean-tags mostlyclean-generic ++ mostlyclean-aminfo mostlyclean-guide mostlyclean-html \ ++ mostlyclean-dvi mostlyclean-ps mostlyclean-tags \ ++ mostlyclean-generic + + clean: clean-hdr clean-binPROGRAMS clean-compile clean-libtool \ +- clean-aminfo clean-tags clean-generic mostlyclean ++ clean-aminfo clean-guide clean-html clean-dvi clean-ps \ ++ clean-tags clean-generic mostlyclean + + distclean: distclean-hdr distclean-binPROGRAMS distclean-compile \ +- distclean-libtool distclean-aminfo distclean-tags \ +- distclean-generic clean ++ distclean-libtool distclean-aminfo distclean-guide \ ++ distclean-html distclean-dvi distclean-ps \ ++ distclean-tags distclean-generic clean + -rm -f config.status + -rm -f libtool + + maintainer-clean: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ + maintainer-clean-compile maintainer-clean-libtool \ +- maintainer-clean-aminfo maintainer-clean-tags \ ++ maintainer-clean-aminfo maintainer-clean-guide \ ++ maintainer-clean-html maintainer-clean-dvi \ ++ maintainer-clean-ps maintainer-clean-tags \ + maintainer-clean-generic distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + -rm -f config.status + +-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ +-maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \ +-clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \ +-install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \ ++.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ ++mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ ++maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ ++mostlyclean-compile distclean-compile clean-compile \ + maintainer-clean-compile mostlyclean-libtool distclean-libtool \ + clean-libtool maintainer-clean-libtool install-info-am uninstall-info \ +-mostlyclean-aminfo distclean-aminfo clean-aminfo \ +-maintainer-clean-aminfo install-man uninstall-man tags mostlyclean-tags \ +-distclean-tags clean-tags maintainer-clean-tags distdir info dvi \ ++install-guide uninstall-guide install-ps uninstall-ps install-html \ ++uninstall-html install-dvi uninstall-dvi mostlyclean-guide \ ++distclean-guide clean-guide maintainer-clean-guide mostlyclean-html \ ++distclean-html clean-html maintainer-clean-html mostlyclean-ps \ ++distclean-ps clean-ps maintainer-clean-ps mostlyclean-dvi distclean-dvi \ ++clean-dvi maintainer-clean-dvi mostlyclean-aminfo distclean-aminfo \ ++clean-aminfo maintainer-clean-aminfo install-man1 uninstall-man1 \ ++install-man uninstall-man tags mostlyclean-tags distclean-tags \ ++clean-tags maintainer-clean-tags distdir info guide html ps dvi \ + installcheck install-info install-exec install-data install uninstall \ + all installdirs mostlyclean-generic distclean-generic clean-generic \ + maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +-diststuff: $(BUILT_SOURCES) info ++diststuff: $(BUILT_SOURCES) info guide + + .m.c: + awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \ +diff -rup --new-file binutils-2.9.1/gprof/bsd_callg_bl.c binutils-2.9.1/gprof/bsd_callg_bl.c +--- binutils-2.9.1/gprof/bsd_callg_bl.c Fri May 1 08:49:42 1998 ++++ binutils-2.9.1/gprof/bsd_callg_bl.c Wed Dec 31 17:00:00 1969 +@@ -1,118 +0,0 @@ +-/* ==> Do not modify this file!! It is created automatically +- from bsd_callg_bl.m using the gen-c-prog.awk script. <== */ +- +-#include +- +-void +-bsd_callg_blurb (file) +- FILE *file; +-{ +- fputs ("\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs ("call graph profile:\n", file); +- fputs (" The sum of self and descendents is the major sort\n", file); +- fputs (" for this listing.\n", file); +- fputs ("\n", file); +- fputs (" function entries:\n", file); +- fputs ("\n", file); +- fputs ("index the index of the function in the call graph\n", file); +- fputs (" listing, as an aid to locating it (see below).\n", file); +- fputs ("\n", file); +- fputs ("%time the percentage of the total time of the program\n", file); +- fputs (" accounted for by this function and its\n", file); +- fputs (" descendents.\n", file); +- fputs ("\n", file); +- fputs ("self the number of seconds spent in this function\n", file); +- fputs (" itself.\n", file); +- fputs ("\n", file); +- fputs ("descendents\n", file); +- fputs (" the number of seconds spent in the descendents of\n", file); +- fputs (" this function on behalf of this function.\n", file); +- fputs ("\n", file); +- fputs ("called the number of times this function is called (other\n", file); +- fputs (" than recursive calls).\n", file); +- fputs ("\n", file); +- fputs ("self the number of times this function calls itself\n", file); +- fputs (" recursively.\n", file); +- fputs ("\n", file); +- fputs ("name the name of the function, with an indication of\n", file); +- fputs (" its membership in a cycle, if any.\n", file); +- fputs ("\n", file); +- fputs ("index the index of the function in the call graph\n", file); +- fputs (" listing, as an aid to locating it.\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs (" parent listings:\n", file); +- fputs ("\n", file); +- fputs ("self* the number of seconds of this function's self time\n", file); +- fputs (" which is due to calls from this parent.\n", file); +- fputs ("\n", file); +- fputs ("descendents*\n", file); +- fputs (" the number of seconds of this function's\n", file); +- fputs (" descendent time which is due to calls from this\n", file); +- fputs (" parent.\n", file); +- fputs ("\n", file); +- fputs ("called** the number of times this function is called by\n", file); +- fputs (" this parent. This is the numerator of the\n", file); +- fputs (" fraction which divides up the function's time to\n", file); +- fputs (" its parents.\n", file); +- fputs ("\n", file); +- fputs ("total* the number of times this function was called by\n", file); +- fputs (" all of its parents. This is the denominator of\n", file); +- fputs (" the propagation fraction.\n", file); +- fputs ("\n", file); +- fputs ("parents the name of this parent, with an indication of the\n", file); +- fputs (" parent's membership in a cycle, if any.\n", file); +- fputs ("\n", file); +- fputs ("index the index of this parent in the call graph\n", file); +- fputs (" listing, as an aid in locating it.\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs (" children listings:\n", file); +- fputs ("\n", file); +- fputs ("self* the number of seconds of this child's self time\n", file); +- fputs (" which is due to being called by this function.\n", file); +- fputs ("\n", file); +- fputs ("descendent*\n", file); +- fputs (" the number of seconds of this child's descendent's\n", file); +- fputs (" time which is due to being called by this\n", file); +- fputs (" function.\n", file); +- fputs ("\n", file); +- fputs ("called** the number of times this child is called by this\n", file); +- fputs (" function. This is the numerator of the\n", file); +- fputs (" propagation fraction for this child.\n", file); +- fputs ("\n", file); +- fputs ("total* the number of times this child is called by all\n", file); +- fputs (" functions. This is the denominator of the\n", file); +- fputs (" propagation fraction.\n", file); +- fputs ("\n", file); +- fputs ("children the name of this child, and an indication of its\n", file); +- fputs (" membership in a cycle, if any.\n", file); +- fputs ("\n", file); +- fputs ("index the index of this child in the call graph listing,\n", file); +- fputs (" as an aid to locating it.\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs (" * these fields are omitted for parents (or\n", file); +- fputs (" children) in the same cycle as the function. If\n", file); +- fputs (" the function (or child) is a member of a cycle,\n", file); +- fputs (" the propagated times and propagation denominator\n", file); +- fputs (" represent the self time and descendent time of the\n", file); +- fputs (" cycle as a whole.\n", file); +- fputs ("\n", file); +- fputs (" ** static-only parents and children are indicated\n", file); +- fputs (" by a call count of 0.\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs (" cycle listings:\n", file); +- fputs (" the cycle as a whole is listed with the same\n", file); +- fputs (" fields as a function entry. Below it are listed\n", file); +- fputs (" the members of the cycle, and their contributions\n", file); +- fputs (" to the time and call counts of the cycle.\n", file); +- fputs (" \n", file); +-} +diff -rup --new-file binutils-2.9.1/gprof/configure binutils-2.9.1/gprof/configure +--- binutils-2.9.1/gprof/configure Fri May 1 08:49:42 1998 ++++ binutils-2.9.1/gprof/configure Thu Jan 21 19:39:59 1999 +@@ -1,7 +1,7 @@ + #! /bin/sh + + # Guess values for system-dependent variables and create Makefiles. +-# Generated automatically using autoconf version 2.12.1 ++# Generated automatically using autoconf version 2.13 + # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation +@@ -57,6 +57,10 @@ libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' ++guidedir='${prefix}/guide' ++htmldir='${prefix}/html' ++psdir='${prefix}/ps' ++dvidir='${prefix}/dvi' + mandir='${prefix}/man' + + # Initialize some other variables. +@@ -174,6 +178,10 @@ Directory and file names: + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] ++ --guidedir=DIR Amigaguide documentation in DIR [PREFIX/guide] ++ --htmldir=DIR HTML documentation in DIR [PREFIX/html] ++ --psdir=DIR postscript documentation in DIR [PREFIX/ps] ++ --dvidir=DIR TeX dvi documentation in DIR [PREFIX/dvi] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names +@@ -216,6 +224,22 @@ EOF + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + ++ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui) ++ ac_prev=guidedir ;; ++ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+ guidedir="$ac_optarg" ;; ++ ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+ htmldir="$ac_optarg" ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+ psdir="$ac_optarg" ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+ dvidir="$ac_optarg" ;; ++ + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) +@@ -346,7 +370,7 @@ EOF + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) +- echo "configure generated by autoconf version 2.12.1" ++ echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) +@@ -516,9 +540,11 @@ ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + ++ac_exeext= ++ac_objext=o + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then +@@ -580,7 +606,7 @@ else { echo "configure: error: can not r + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 +-echo "configure:584: checking host system type" >&5 ++echo "configure:610: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in +@@ -601,7 +627,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- + echo "$ac_t""$host" 1>&6 + + echo $ac_n "checking target system type""... $ac_c" 1>&6 +-echo "configure:605: checking target system type" >&5 ++echo "configure:631: checking target system type" >&5 + + target_alias=$target + case "$target_alias" in +@@ -619,7 +645,7 @@ target_os=`echo $target | sed 's/^\([^-] + echo "$ac_t""$target" 1>&6 + + echo $ac_n "checking build system type""... $ac_c" 1>&6 +-echo "configure:623: checking build system type" >&5 ++echo "configure:649: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in +@@ -649,21 +675,22 @@ test "$host_alias" != "$target_alias" && + # SunOS /usr/etc/install + # IRIX /sbin/install + # AIX /bin/install ++# AmigaOS /c/install + # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:658: checking for a BSD compatible install" >&5 ++echo "configure:685: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in +- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root +@@ -702,13 +729,15 @@ echo "$ac_t""$INSTALL" 1>&6 + # It thinks the first close brace ends the variable substitution. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + + echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +-echo "configure:712: checking whether build environment is sane" >&5 ++echo "configure:741: checking whether build environment is sane" >&5 + # Just in case + sleep 1 + echo timestamp > conftestfile +@@ -765,7 +794,7 @@ test "$program_suffix" != NONE && + test "$program_transform_name" = "" && program_transform_name="s,x,x," + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-echo "configure:769: checking whether ${MAKE-make} sets \${MAKE}" >&5 ++echo "configure:798: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -811,7 +840,7 @@ EOF + + missing_dir=`cd $ac_aux_dir && pwd` + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +-echo "configure:815: checking for working aclocal" >&5 ++echo "configure:844: checking for working aclocal" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -824,7 +853,7 @@ else + fi + + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +-echo "configure:828: checking for working autoconf" >&5 ++echo "configure:857: checking for working autoconf" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -837,7 +866,7 @@ else + fi + + echo $ac_n "checking for working automake""... $ac_c" 1>&6 +-echo "configure:841: checking for working automake" >&5 ++echo "configure:870: checking for working automake" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -850,7 +879,7 @@ else + fi + + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +-echo "configure:854: checking for working autoheader" >&5 ++echo "configure:883: checking for working autoheader" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -863,7 +892,7 @@ else + fi + + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +-echo "configure:867: checking for working makeinfo" >&5 ++echo "configure:896: checking for working makeinfo" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -926,15 +955,16 @@ fi + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:930: checking for $ac_word" >&5 ++echo "configure:959: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" +@@ -955,15 +985,16 @@ fi + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:959: checking for $ac_word" >&5 ++echo "configure:989: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -981,19 +1012,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1019: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1052: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1081: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:988: checking for $ac_word" >&5 ++echo "configure:1114: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1028,25 +1155,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:1166: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1036: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:1197: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 1208 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:1213: \"$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 +@@ -1060,18 +1223,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1070: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:1239: 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:1075: checking whether we are using GNU C" >&5 ++echo "configure:1244: 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 +@@ -1080,7 +1249,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1084: \"$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:1253: \"$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 +@@ -1091,11 +1260,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1099: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:1272: 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 +@@ -1110,18 +1283,45 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + # Check whether --with-gnu-ld or --without-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" +@@ -1135,7 +1335,7 @@ ac_prog=ld + if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +-echo "configure:1139: checking for ld used by GCC" >&5 ++echo "configure:1339: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. +@@ -1153,10 +1353,10 @@ echo "configure:1139: checking for ld us + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +-echo "configure:1157: checking for GNU ld" >&5 ++echo "configure:1357: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +-echo "configure:1160: checking for non-GNU ld" >&5 ++echo "configure:1360: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1192,7 +1392,7 @@ fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +-echo "configure:1196: checking if the linker ($LD) is GNU ld" >&5 ++echo "configure:1396: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1208,7 +1408,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +-echo "configure:1212: checking for BSD-compatible nm" >&5 ++echo "configure:1412: checking for BSD-compatible nm" >&5 + if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1245,7 +1445,7 @@ echo "$ac_t""$NM" 1>&6 + + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:1249: checking whether ln -s works" >&5 ++echo "configure:1449: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1255,14 +1455,24 @@ then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" + else +- ac_cv_prog_LN_S=ln ++ if ln X conftestdata 2>/dev/null ++ then ++ rm -f conftestdata ++ ac_cv_prog_LN_S=ln ++ else ++ ac_cv_prog_LN_S=cp ++ fi + fi + fi + LN_S="$ac_cv_prog_LN_S" + if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 + else +- echo "$ac_t""no" 1>&6 ++ if test "$ac_cv_prog_LN_S" = "ln"; then ++ echo "$ac_t""no, using ln" 1>&6 ++ else ++ echo "$ac_t""no, and neither does ln, so using cp" 1>&6 ++ fi + fi + + # Always use our own libtool. +@@ -1281,8 +1491,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libto + case "$host" in + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 1285 "configure"' > conftest.$ac_ext +- if { (eval echo configure:1286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ echo '#line 1495 "configure"' > conftest.$ac_ext ++ if { (eval echo configure:1496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" +@@ -1319,15 +1529,16 @@ $libtool_flags --no-verify $ac_aux_dir/l + # 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:1323: checking for $ac_word" >&5 ++echo "configure:1533: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -1345,19 +1556,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1563: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1596: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1625: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:1352: checking for $ac_word" >&5 ++echo "configure:1658: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1392,25 +1699,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:1710: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1400: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:1741: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 1752 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:1757: \"$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 +@@ -1424,18 +1767,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1434: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:1783: 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:1439: checking whether we are using GNU C" >&5 ++echo "configure:1788: 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 +@@ -1444,7 +1793,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1448: \"$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:1797: \"$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 +@@ -1455,11 +1804,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1463: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:1816: 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 +@@ -1474,24 +1827,51 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + + + echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +-echo "configure:1495: checking for POSIXized ISC" >&5 ++echo "configure:1875: checking for POSIXized ISC" >&5 + if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 + then +@@ -1521,8 +1901,20 @@ EOF + ;; + esac + ++### begin-GG-local ++# Check for additional host specific CFLAGS. ++echo $ac_n "checking for host dependent CFLAGS""... $ac_c" 1>&6 ++echo "configure:1908: checking for host dependent CFLAGS" >&5 ++other_host_cflags="" ++case "${host}" in ++ m68*-*-amigaos*) other_host_cflags="-mstackextend" ;; ++esac ++test -n "$other_host_cflags" && CFLAGS="$CFLAGS $other_host_cflags" ++echo "$ac_t""$other_host_cflags" 1>&6 ++### end-GG-local ++ + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +-echo "configure:1526: checking whether to enable maintainer-specific portions of Makefiles" >&5 ++echo "configure:1918: 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" +@@ -1540,19 +1932,19 @@ fi + + + echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 +-echo "configure:1544: checking for Cygwin32 environment" >&5 ++echo "configure:1936: checking for Cygwin32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_cygwin32'+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:1948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_cygwin32=yes + else +@@ -1569,19 +1961,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 + CYGWIN32= + test "$am_cv_cygwin32" = yes && CYGWIN32=yes + echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 +-echo "configure:1573: checking for Mingw32 environment" >&5 ++echo "configure:1965: checking for Mingw32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_mingw32=yes + else +@@ -1600,7 +1992,7 @@ test "$am_cv_mingw32" = yes && MINGW32=y + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +-echo "configure:1604: checking for executable suffix" >&5 ++echo "configure:1996: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1647,7 +2039,7 @@ EOF + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. + (set) 2>&1 | +- case `(ac_space=' '; set) 2>&1 | grep ac_space` in ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). +@@ -1693,7 +2085,9 @@ DEFS=-DHAVE_CONFIG_H + : ${CONFIG_STATUS=./config.status} + + echo creating $CONFIG_STATUS +-rm -f $CONFIG_STATUS ++# Some systems, like AmigaOS, won't allow you to remove a script that is ++# being executed, so just move it out of the way instead. ++if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi + cat > $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h +@@ -2008,6 +2410,7 @@ test -z "$CONFIG_HEADERS" || echo timest + exit 0 + EOF + chmod +x $CONFIG_STATUS ++rm -f CONFIG.STATUS.old + rm -fr confdefs* $ac_clean_files + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +diff -rup --new-file binutils-2.9.1/gprof/configure.in binutils-2.9.1/gprof/configure.in +--- binutils-2.9.1/gprof/configure.in Fri May 1 08:49:42 1998 ++++ binutils-2.9.1/gprof/configure.in Sun Aug 23 00:00:00 1998 +@@ -28,6 +28,17 @@ case "${target}" in + ;; + esac + ++### begin-GG-local ++# Check for additional host specific CFLAGS. ++AC_MSG_CHECKING(for host dependent CFLAGS) ++other_host_cflags="" ++case "${host}" in ++ m68*-*-amigaos*) other_host_cflags="-mstackextend" ;; ++esac ++test -n "$other_host_cflags" && CFLAGS="$CFLAGS $other_host_cflags" ++AC_MSG_RESULT($other_host_cflags) ++### end-GG-local ++ + AM_MAINTAINER_MODE + AM_CYGWIN32 + AM_EXEEXT +diff -rup --new-file binutils-2.9.1/gprof/fsf_callg_bl.c binutils-2.9.1/gprof/fsf_callg_bl.c +--- binutils-2.9.1/gprof/fsf_callg_bl.c Fri May 1 08:49:44 1998 ++++ binutils-2.9.1/gprof/fsf_callg_bl.c Wed Dec 31 17:00:00 1969 +@@ -1,93 +0,0 @@ +-/* ==> Do not modify this file!! It is created automatically +- from fsf_callg_bl.m using the gen-c-prog.awk script. <== */ +- +-#include +- +-void +-fsf_callg_blurb (file) +- FILE *file; +-{ +- fputs ("\n", file); +- fputs (" This table describes the call tree of the program, and was sorted by\n", file); +- fputs (" the total amount of time spent in each function and its children.\n", file); +- fputs ("\n", file); +- fputs (" Each entry in this table consists of several lines. The line with the\n", file); +- fputs (" index number at the left hand margin lists the current function.\n", file); +- fputs (" The lines above it list the functions that called this function,\n", file); +- fputs (" and the lines below it list the functions this one called.\n", file); +- fputs (" This line lists:\n", file); +- fputs (" index A unique number given to each element of the table.\n", file); +- fputs (" Index numbers are sorted numerically.\n", file); +- fputs (" The index number is printed next to every function name so\n", file); +- fputs (" it is easier to look up where the function in the table.\n", file); +- fputs ("\n", file); +- fputs (" % time This is the percentage of the `total' time that was spent\n", file); +- fputs (" in this function and its children. Note that due to\n", file); +- fputs (" different viewpoints, functions excluded by options, etc,\n", file); +- fputs (" these numbers will NOT add up to 100%.\n", file); +- fputs ("\n", file); +- fputs (" self This is the total amount of time spent in this function.\n", file); +- fputs ("\n", file); +- fputs (" children This is the total amount of time propagated into this\n", file); +- fputs (" function by its children.\n", file); +- fputs ("\n", file); +- fputs (" called This is the number of times the function was called.\n", file); +- fputs (" If the function called itself recursively, the number\n", file); +- fputs (" only includes non-recursive calls, and is followed by\n", file); +- fputs (" a `+' and the number of recursive calls.\n", file); +- fputs ("\n", file); +- fputs (" name The name of the current function. The index number is\n", file); +- fputs (" printed after it. If the function is a member of a\n", file); +- fputs (" cycle, the cycle number is printed between the\n", file); +- fputs (" function's name and the index number.\n", file); +- fputs ("\n", file); +- fputs ("\n", file); +- fputs (" For the function's parents, the fields have the following meanings:\n", file); +- fputs ("\n", file); +- fputs (" self This is the amount of time that was propagated directly\n", file); +- fputs (" from the function into this parent.\n", file); +- fputs ("\n", file); +- fputs (" children This is the amount of time that was propagated from\n", file); +- fputs (" the function's children into this parent.\n", file); +- fputs ("\n", file); +- fputs (" called This is the number of times this parent called the\n", file); +- fputs (" function `/' the total number of times the function\n", file); +- fputs (" was called. Recursive calls to the function are not\n", file); +- fputs (" included in the number after the `/'.\n", file); +- fputs ("\n", file); +- fputs (" name This is the name of the parent. The parent's index\n", file); +- fputs (" number is printed after it. If the parent is a\n", file); +- fputs (" member of a cycle, the cycle number is printed between\n", file); +- fputs (" the name and the index number.\n", file); +- fputs ("\n", file); +- fputs (" If the parents of the function cannot be determined, the word\n", file); +- fputs (" `' is printed in the `name' field, and all the other\n", file); +- fputs (" fields are blank.\n", file); +- fputs ("\n", file); +- fputs (" For the function's children, the fields have the following meanings:\n", file); +- fputs ("\n", file); +- fputs (" self This is the amount of time that was propagated directly\n", file); +- fputs (" from the child into the function.\n", file); +- fputs ("\n", file); +- fputs (" children This is the amount of time that was propagated from the\n", file); +- fputs (" child's children to the function.\n", file); +- fputs ("\n", file); +- fputs (" called This is the number of times the function called\n", file); +- fputs (" this child `/' the total number of times the child\n", file); +- fputs (" was called. Recursive calls by the child are not\n", file); +- fputs (" listed in the number after the `/'.\n", file); +- fputs ("\n", file); +- fputs (" name This is the name of the child. The child's index\n", file); +- fputs (" number is printed after it. If the child is a\n", file); +- fputs (" member of a cycle, the cycle number is printed\n", file); +- fputs (" between the name and the index number.\n", file); +- fputs ("\n", file); +- fputs (" If there are any cycles (circles) in the call graph, there is an\n", file); +- fputs (" entry for the cycle-as-a-whole. This entry shows who called the\n", file); +- fputs (" cycle (as parents) and the members of the cycle (as children.)\n", file); +- fputs (" The `+' recursive calls entry shows the number of function calls that\n", file); +- fputs (" were internal to the cycle, and the calls entry for each member shows,\n", file); +- fputs (" for that member, how many times it was called from other members of\n", file); +- fputs (" the cycle.\n", file); +- fputs ("\n", file); +-} +diff -rup --new-file binutils-2.9.1/gprof/gprof.info binutils-2.9.1/gprof/gprof.info +--- binutils-2.9.1/gprof/gprof.info Fri May 1 08:49:44 1998 ++++ binutils-2.9.1/gprof/gprof.info Wed Dec 31 17:00:00 1969 +@@ -1,62 +0,0 @@ +-This is Info file gprof.info, produced by Makeinfo version 1.68 from +-the input file gprof.texi. +- +-START-INFO-DIR-ENTRY +-* gprof: (gprof). Profiling your program's execution +-END-INFO-DIR-ENTRY +- +- This file documents the gprof profiler of the GNU system. +- +- Copyright (C) 1988, 1992, 1997, 1998 Free Software Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided that +-the entire resulting derived work is distributed under the terms of a +-permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-Indirect: +-gprof.info-1: 906 +-gprof.info-2: 47222 +- +-Tag Table: +-(Indirect) +-Node: Top906 +-Node: Introduction1958 +-Node: Compiling4287 +-Node: Executing6948 +-Node: Invoking9312 +-Node: Output Options10726 +-Node: Analysis Options17037 +-Node: Miscellaneous Options20230 +-Node: Depricated Options21381 +-Node: Symspecs23451 +-Node: Output24849 +-Node: Flat Profile25874 +-Node: Call Graph30802 +-Node: Primary34019 +-Node: Callers36552 +-Node: Subroutines38659 +-Node: Cycles40458 +-Node: Line-by-line47222 +-Node: Annotated Source51020 +-Node: Inaccuracy53881 +-Node: Sampling Error54135 +-Node: Assumptions56700 +-Node: How do I?58168 +-Node: Incompatibilities59386 +-Node: Details60853 +-Node: Implementation61202 +-Node: File Format67096 +-Node: Internals71349 +-Node: Debugging79716 +- +-End Tag Table +diff -rup --new-file binutils-2.9.1/include/coff/ChangeLog binutils-2.9.1/include/coff/ChangeLog +--- binutils-2.9.1/include/coff/ChangeLog Fri May 1 08:48:26 1998 ++++ binutils-2.9.1/include/coff/ChangeLog Sun Aug 23 00:00:00 1998 +@@ -1,3 +1,12 @@ ++Tue Jun 30 11:43:05 1998 Fred Fish ++ ++ * internal.h (BEOS_DLL_IMAGE_BASE): Change to 0x80000000. ++ ++Mon Jun 1 18:37:34 1998 Fred Fish ++ ++ * internal.h (BEOS_EXE_IMAGE_BASE, BEOS_DLL_IMAGE_BASE): ++ Define values for BeOS prefered loading addresses. ++ + Fri Mar 27 17:16:57 1998 Ian Lance Taylor + + * internal.h (ISPTR, ISFCN, ISARY): Add casts to unsigned long. +diff -rup --new-file binutils-2.9.1/include/coff/internal.h binutils-2.9.1/include/coff/internal.h +--- binutils-2.9.1/include/coff/internal.h Fri May 1 08:48:27 1998 ++++ binutils-2.9.1/include/coff/internal.h Sun Aug 23 00:00:00 1998 +@@ -92,6 +92,10 @@ typedef struct _IMAGE_DATA_DIRECTORY + #define NT_EXE_IMAGE_BASE 0x400000 + #define NT_DLL_IMAGE_BASE 0x10000000 + ++/* default image base for BeOS */ ++#define BEOS_EXE_IMAGE_BASE 0x80000000 ++#define BEOS_DLL_IMAGE_BASE 0x80000000 ++ + /* Extra stuff in a PE aouthdr */ + + #define PE_DEF_SECTION_ALIGNMENT 0x1000 +diff -rup --new-file binutils-2.9.1/ld/ChangeLog binutils-2.9.1/ld/ChangeLog +--- binutils-2.9.1/ld/ChangeLog Fri May 1 08:48:47 1998 ++++ binutils-2.9.1/ld/ChangeLog Sun Aug 23 00:00:00 1998 +@@ -1,3 +1,89 @@ ++Thu Jun 18 10:09:36 1998 Mumit Khan ++ ++ pei-i386 changes from Mikey . ++ ++ * emultempl/pe.em (set_pe_subsystem): Add new --subsystem args ++ -wwindows and -wconsole to allow easier use of Unicode objs. ++ Delete call to ldlang_add_undef() and move undef of entry point to ++ ldlang.c so that it works globally. ++ (sort_by_filename): Terminate HNT and IAT properly for .LIB files. ++ (sort_by_section): Sort .stab and .stabstr to end of output to ++ allow stripping of relocatable execs and DLLs. ++ ++ * scripttempl/pe.sc (__fltused, __ldused): New global headers at ++ end to correctly initialize floating point for MSVC and to resolve ++ all undefs in output. ++ (SECTIONS): Add explicit references to .CRT$X{CA,CZ,IA,IZ} to force ++ linking in .CRT$XXX sections for _initterm. ++ Add explicit .reloc terminator. ++ ++ * ldcref.c (output_cref): Cast cref_symcount to get elimiate compiler ++ warning. ++ ++ * ldlang.c (sectin_already_linked): Handle PE comdat. ++ (ldlang_switch_undef_entry): New function to exchange an older ++ undefined entry point for a newer one. ++ (lang_add_entry): Use when entry_symbol already defined. This avoids ++ pulling in the wrong startups from msvcrt.lib. ++ ++ * ldfile.c (ldfile_open_file): Search for XXX.lib as well on a ++ pei-i386 target. ++ ++Wed Jun 17 23:11:36 1998 Fred Fish ++ ++ * ldlang.c (section_already_linked): Guard against pe_comdat_info ++ being NULL. ++ ++Sat Jun 13 10:06:06 1998 Fred Fish ++ ++ * scripttempl/i386beos.sc: Add symbols __text_start__ and ++ __text_end__ to mark start and end of .text section. ++ ++Fri Jun 5 21:41:11 1998 Fred Fish ++ ++ * ldfile.c (ldfile_open_file): When searching for libraries ++ specified with -lfoo, prepend "lib" and append ".so.LIB". ++ * configure.host: Add entry for i[3456]86-*-beos* and set ++ NATIVE_LIB_DIRS to /boot/develop/lib/x86. ++ ++Mon Jun 1 17:39:25 1998 Fred Fish ++ ++ Integrate PE changes from jeffdb@goodnet.com and adapt to use ++ on BeOS: ++ * Makefile.am (ALL_EMULATIONS): Add ei386beos.o. ++ (ei386beos.c): Add rule to build. ++ * Makefile.in: Regenerated. ++ * emulparms/i386beos.sh: New file for x86 BeOS, based on i386pe.sh. ++ * emultempl/beos.em: New file, for x86 BeOS. Modified version ++ of pe.em, with changes to init array, added code to mark dll's ++ correctly as dll's, changed set_pe_subsystem, added wconsole & ++ wwindows to --subsystem arg to allow easier use of UNICODE ++ startup obj's, move undef of entry point into ldlang.c, so ++ it works globally, modified sort_by_file_name to sort the tail ++ .idata$4/5's to the end of each .lib's idata$4/5 section to ++ terminate the HNT and IAT properly for .lib files, modified ++ sort_by_section_name to sort .stab and .stabstr to the end of ++ the output sections so strip dosen't have to recalc vma for ++ .reloc sections in relocatable dll/exe's (FIXME ld.exe needs to ++ call res2coff.exe or winres.exe to convert res files to .o files ++ directly, otherwise debugging information won't be last and exe's ++ with .rsrc sections won't load/be debugable on NT. ++ * scripttempl/i386beos.sc: New file, for x86 BeOS. Modified copy ++ of pe.sc, added globals header __fltused __ldused end to correct ++ init of floating point for vc++ and resolve all undefs in output ++ sorted sections in output order to make finding them easier, ++ explicit reference to .CRT\$XXX to force linking in .CRT$XXX ++ sections for _initterm, added explicit .idata$3 terminator from ++ gas-971123 pe.sc, added explicit .reloc terminator. ++ * configure.tgt (i[3456]98-*-beos*): Target emulation is i386beos. ++ * ldfile.c (ldfile_open_file): Look for .lib file on BeOS or ++ CYGWIN32. ++ * ldlang.c (section_already_linked): Use asection->pe_comdat_info ++ to determine whether to link in a given section. ++ (ldlang_switch_undef_entry): New function. ++ (lang_add_entry): Use ldlang_switch_undef_entry when entry_symbol ++ already defined, avoids pulling in wrong startups from msvcrt.lib ++ + Mon Apr 27 11:56:21 1998 Ian Lance Taylor + + * configure.in: Set version number to 2.9.1. +@@ -126,6 +212,11 @@ Sun Mar 8 23:34:14 1998 Stan Cox ++ ++ * ldlang.c (new_afile): Remove obsolete references to ++ amiga_attribute. ++ + Mon Mar 2 19:24:08 1998 Michael Meissner + + * ldlang.c (lang_size_sections): If the default memory region is +@@ -363,6 +454,32 @@ Sat Nov 22 15:23:19 1997 Ian Lance Tayl + correctly. Pass 0 rather than hex_mode to bfd_scan_vma. + * ldlex.h (hex_mode): Don't declare. + ++Wed Nov 19 08:15:36 1997 Fred Fish ++ ++ * configure.in (CROSS_LINKER): Define this when configuring ++ a cross linker. ++ * configure: Regenerate with autoconf. ++ * acconfig.h (CROSS_LINKER): Add new possible define. ++ * config.in: Regenerate with current autoheader. ++ * beos-ld.c (CROSS_LINKER): Define to 0 if not defined. ++ (RUN_MWLD): Remove and replace with CROSS_LINKER tests. ++ (LD_COFF): Renamed to LDNAME. ++ (TARGET_ALIAS): Define as empty string if not defined. ++ (main): Add ldname, build by concatenating TARGET_ALIAS ++ and LDNAME, and use to set name of GNU linker to exec. ++ (BEOS_STUBS): Rework hack for cross environment configs ++ to use this environment variable. ++ (mapfile): Fix bug in computation of file name length. ++ * Makefile.in (beos-ld): Define LDNAME and TARGET_ALIAS at ++ compile time. ++ (install-beos-ld): Use INSTALL_XFORM to install linker ++ frontend in bindir. Install linker frontend in tooldir ++ as just "ld". ++ ++Sat Nov 15 09:24:13 1997 Fred Fish ++ ++ * configure.tgt (i[3456]86-*-beos*): New config for x86 BeOS. ++ + Thu Nov 13 13:45:00 1997 Andrew Cagney + + * configure.tgt (targ_extra_emuls): Make FreeBSD a i386bsd +@@ -383,6 +500,21 @@ Thu Oct 30 12:25:55 1997 Ian Lance Tayl + mismatched input files. + * ld.texinfo, ld.1: Document new option. + ++Tue Oct 28 09:01:02 1997 Fred Fish ++ ++ * configure.in (BFDLIB): For BeOS hosts, directly include ++ libbfd.a rather than using -L search paths. ++ * configure: Regenerated. ++ * Makefile.in (EXTRA_PROGS): Add new macro, set by configure. ++ (EXTRA_INSTALL): Ditto. ++ (LDNAME): Ditto. ++ (all): Depends upon $(EXTRA_PROGS) ++ (install-beos-ld): New target and rules to install the BeOS ld ++ frontend in place of the real GNU ld, which becomes ld-coff. ++ (install): Use LDNAME to set basename of installed GNU ld, to ++ either just "ld" (default) or "ld-coff" (for BeOS). Other normal ++ name transformations still apply. ++ + Thu Oct 23 14:38:18 1997 Nick Clifton + + * scripttempl/v850.sc: Rename linker symbol '_stack' to '__stack' +@@ -405,21 +537,42 @@ Wed Oct 22 11:29:25 1997 Ian Lance Tayl + + * scripttempl/pe.sc: Put .eh_frame in .rdata. + ++Mon Oct 20 11:15:13 1997 Fred Fish ++ ++ * Makefile.in (AR, ARFLAGS): Remove, not used. ++ + Fri Oct 17 00:00:13 1997 Richard Henderson + + * ldlang.c (lang_register_vers_node): Only check globals<=>locals, + since we need to be able to export different versions of the same + symbol. + ++Thu Oct 16 13:21:14 1997 Fred Fish ++ ++ * ldlang.c (new_afile): Only reference amiga_attribute when ++ the target is AmigaOS. ++ + Wed Oct 15 14:52:36 1997 Ian Lance Taylor + + * scripttempl/pe.sc: Put .stab and .stabstr sections at end. + ++Sat Oct 11 17:41:24 1997 Fred Fish ++ ++ * beos-ld.c (gflag): Add static flag variable. ++ (main): Set gflag if we find -g input arg. ++ (main): Pass -g option on to mwld if gflag set. ++ (main): Add code to create and pass -map arg to ++ mwld if also passing -g arg. ++ + Wed Oct 8 12:37:05 1997 Richard Henderson + + * configure.tgt, configure.host: Change alpha-*-* to alpha*-*-*; + config.guess now recognizes alphaev5 etc. + ++Mon Oct 6 09:28:18 1997 Fred Fish ++ ++ * configdoc.texi: Remove file created at build time. ++ + Fri Oct 3 14:23:02 1997 Ian Lance Taylor + + * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Don't treat +@@ -1033,6 +1186,10 @@ Mon Dec 30 13:55:57 1996 Michael Meissn + + * scripttempl/v850.sc (.tdata) Add .tbss and .tbyte sections. + ++Sun Dec 22 10:45:58 1996 Fred Fish ++ ++ * configure.tgt: Treat BeOS just like AIX. ++ + Wed Dec 18 22:57:35 1996 Stan Shebs + + * mpw-make.sed: Use NewFolderRecursive for installation. +@@ -1078,6 +1235,11 @@ Mon Dec 2 11:43:50 1996 Ian Lance Tayl + * emulparams/*.sh: Make sure that each set of parameters which + uses the elf.sc script sets MACHINE. + ++Sat Nov 30 01:33:26 1996 Fred Fish ++ ++ From KUNISAWA Ryota : ++ * genscripts.sh: Avoid bug with some shells for $10 and up. ++ + Wed Nov 27 03:22:05 1996 Jason Merrill + + * scripttempl/elf{,mips,ppc}.sc: Add the remaining DWARF sections. +@@ -1494,6 +1656,12 @@ Mon Aug 5 16:26:14 1996 Ian Lance Tayl + * ldcref.c (check_nocrossref): Skip symbols with no output + sections. + ++Sun Aug 4 22:15:56 1996 Fred Fish ++ ++ * ldfile.c (ldfile_open_file_search): Use alloca to allocate ++ dynamically sized array, rather than using a GNU C extension that ++ is not portable. ++ + Fri Aug 2 14:57:49 1996 Ian Lance Taylor + + * ldgram.y (LOADADDR): New terminal. +@@ -1719,6 +1887,10 @@ Mon Jun 24 12:00:32 1996 Ian Lance Tayl + * configure.in: On alpha*-*-osf*, link against libbfd.a if not + using shared libraries. + * configure: Rebuild with autoconf 2.10. ++ ++Sat Jun 22 21:41:37 1996 Daniel Verite ++ ++ * ldfile.c, lexsup.c: Sort the flavors. + + Fri Jun 21 17:40:56 1996 Joel Sherrill + +diff -rup --new-file binutils-2.9.1/ld/Makefile.am binutils-2.9.1/ld/Makefile.am +--- binutils-2.9.1/ld/Makefile.am Fri May 1 08:48:47 1998 ++++ binutils-2.9.1/ld/Makefile.am Sun Aug 23 00:00:00 1998 +@@ -93,6 +93,8 @@ ALL_EMULATIONS = \ + ea29k.o \ + eaixppc.o \ + eaixrs6.o \ ++ eamiga.o \ ++ eamiga_bss.o \ + ealpha.o \ + earcelf.o \ + earmaoutb.o \ +@@ -128,6 +130,7 @@ ALL_EMULATIONS = \ + ehp3hpux.o \ + ehppaelf.o \ + ei386aout.o \ ++ ei386beos.o \ + ei386bsd.o \ + ei386coff.o \ + ei386go32.o \ +@@ -159,6 +162,8 @@ ALL_EMULATIONS = \ + enews.o \ + ens32knbsd.o \ + epc532macha.o \ ++ eppcamiga.o \ ++ eppcamiga_bss.o \ + eppcmacos.o \ + eppcnw.o \ + eppcpe.o \ +@@ -225,10 +230,22 @@ ldemul-list.h: Makefile + + # These all start with e so 'make clean' can find them. + +-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@" ++GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@" "$(LIB_PATH)" + GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed + @TDIRS@ + ++eamiga.c: $(srcdir)/emulparams/amiga.sh\ ++ $(srcdir)/emultempl/amiga.em $(srcdir)/scripttempl/amiga.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} amiga "$(tdir_amiga)" ++eamiga_bss.c: $(srcdir)/emulparams/amiga_bss.sh\ ++ $(srcdir)/emultempl/amiga.em $(srcdir)/scripttempl/amiga_bss.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} amiga_bss "$(tdir_amiga_bss)" ++eppcamiga.c: $(srcdir)/emulparams/ppcamiga.sh\ ++ $(srcdir)/emultempl/amiga.em $(srcdir)/scripttempl/amiga.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} ppcamiga "$(tdir_ppcamiga)" ++eppcamiga_bss.c: $(srcdir)/emulparams/ppcamiga_bss.sh\ ++ $(srcdir)/emultempl/amiga.em $(srcdir)/scripttempl/amiga_bss.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} ppcamiga_bss "$(tdir_ppcamiga_bss)" + ea29k.c: $(srcdir)/emulparams/a29k.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS} + ${GENSCRIPTS} a29k "$(tdir_a29k)" +@@ -358,6 +375,9 @@ ehppaelf.c: $(srcdir)/emulparams/hppaelf + ei386aout.c: $(srcdir)/emulparams/i386aout.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} + ${GENSCRIPTS} i386aout "$(tdir_i386aout)" ++ei386beos.c: $(srcdir)/emulparams/i386beos.sh \ ++ $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} i386beos "$(tdir_i386beos)" + ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} + ${GENSCRIPTS} i386bsd "$(tdir_i386bsd)" +@@ -542,6 +562,16 @@ ld_new_LDADD = $(EMULATION_OFILES) $(BFD + $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \ + ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \ + ldctor.h ldexp.h ldlang.h ldgram.h ++ ++# GG-local: For BeOS, we use a fake ld that calls GNU ld and then mwld. ++beos-ld: beos-ld.c ++ $(CC) -I. -I$(INCDIR) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -DLDNAME='"@LDNAME@"' -DTARGET_ALIAS='"@target_alias@"' -o $@ $(srcdir)/beos-ld.c ++ ++install-beos-ld: ++ test -d $(tooldir) || mkdir $(tooldir) ++ test -d $(tooldir)/bin || mkdir $(tooldir)/bin ++ $(INSTALL_XFORM) beos-ld $(bindir)/ld ++ $(INSTALL_PROGRAM) beos-ld $(tooldir)/bin/ld + + # This is the real libbfd.a created by libtool. + TESTBFDLIB = @TESTBFDLIB@ +diff -rup --new-file binutils-2.9.1/ld/Makefile.in binutils-2.9.1/ld/Makefile.in +--- binutils-2.9.1/ld/Makefile.in Fri May 1 08:48:47 1998 ++++ binutils-2.9.1/ld/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -1,4 +1,4 @@ +-# Makefile.in generated automatically by automake 1.2e from Makefile.am ++# Makefile.in generated automatically by automake 1.3 from Makefile.am + + # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation +@@ -11,7 +11,7 @@ + # PARTICULAR PURPOSE. + + +-SHELL = @SHELL@ ++SHELL = /bin/sh + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -28,10 +28,16 @@ sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ ++guidedir = @guidedir@ ++htmldir = @htmldir@ ++dvidir = @dvidir@ ++psdir = @psdir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + ++DISTDIR = ++ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +@@ -62,19 +68,17 @@ host_triplet = @host@ + target_alias = @target_alias@ + target_triplet = @target@ + CC = @CC@ ++CC_FOR_BUILD = @CC_FOR_BUILD@ + EXEEXT = @EXEEXT@ ++EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ ++EXTRA_INSTALL = @EXTRA_INSTALL@ ++EXTRA_PROGS = @EXTRA_PROGS@ + HDEFINES = @HDEFINES@ +-LD = @LD@ ++LDNAME = @LDNAME@ + LIBTOOL = @LIBTOOL@ +-LN_S = @LN_S@ +-MAINT = @MAINT@ +-MAKEINFO = @MAKEINFO@ + NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@ +-NM = @NM@ +-PACKAGE = @PACKAGE@ + RANLIB = @RANLIB@ + TDIRS = @TDIRS@ +-VERSION = @VERSION@ + + AUTOMAKE_OPTIONS = cygnus dejagnu + +@@ -169,6 +173,8 @@ ALL_EMULATIONS = \ + ea29k.o \ + eaixppc.o \ + eaixrs6.o \ ++ eamiga.o \ ++ eamiga_bss.o \ + ealpha.o \ + earcelf.o \ + earmaoutb.o \ +@@ -204,6 +210,7 @@ ALL_EMULATIONS = \ + ehp3hpux.o \ + ehppaelf.o \ + ei386aout.o \ ++ ei386beos.o \ + ei386bsd.o \ + ei386coff.o \ + ei386go32.o \ +@@ -235,6 +242,8 @@ ALL_EMULATIONS = \ + enews.o \ + ens32knbsd.o \ + epc532macha.o \ ++ eppcamiga.o \ ++ eppcamiga_bss.o \ + eppcmacos.o \ + eppcnw.o \ + eppcpe.o \ +@@ -283,7 +292,7 @@ STAGESTUFF = *.o ldscripts/* e*.c + + # These all start with e so 'make clean' can find them. + +-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@" ++GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@" "$(LIB_PATH)" + GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed + + ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \ +@@ -324,12 +333,20 @@ CFLAGS = @CFLAGS@ + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) + LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) + LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ++MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then echo $(top_builddir)/../texinfo/makeinfo/makeinfo; else echo makeinfo; fi` + TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi` + TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex + INFO_DEPS = ld.info + DVIS = ld.dvi + TEXINFOS = ld.texinfo +-MANS = ld.1 ++GUIDES = ld.guide ++GUIDE_DEPS = ld.guide ++HTMLS = ld.html ++HTML_DEPS = ld.html ++PS_S = ld.ps ++PS_DEPS = ld.ps ++man1dir = $(mandir)/man1 ++MANS = $(man_MANS) + + NROFF = nroff + DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS TODO \ +@@ -337,21 +354,24 @@ acconfig.h acinclude.m4 aclocal.m4 confi + ldgram.c ldlex.c stamp-h.in + + +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ++PACKAGE = @PACKAGE@ ++VERSION = @VERSION@ + ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) \ ++ $(INFOS) $(GUIDES) $(HTMLS) $(MANS) + TAR = tar + GZIP = --best + SOURCES = $(ld_new_SOURCES) + OBJECTS = $(ld_new_OBJECTS) + +-default: all ++all: Makefile $(PROGRAMS) $(MANS) config.h + + .SUFFIXES: +-.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .y +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile ++.SUFFIXES: .S .c .dvi .guide .html .info .l .lo .o .ps .s .texi .texinfo .txi .y ++$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus --include-deps Makefile + +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +@@ -445,6 +465,9 @@ ldgram.h: ldgram.c + $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@ + + ld.info: ld.texinfo ++ld.guide: ld.texinfo ++ld.html: ld.texinfo ++ld.ps: ld.dvi + ld.dvi: ld.texinfo + + +@@ -452,7 +475,7 @@ DVIPS = dvips + + .texi.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I$(srcdir) $< --output=$@ + + .texi.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ +@@ -460,39 +483,51 @@ DVIPS = dvips + + .texi: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.info: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo: + @rm -f $@ $@-[0-9] $@-[0-9][0-9] +- $(MAKEINFO) -I $(srcdir) $< ++ $(MAKEINFO) -I $(srcdir) $< --output=$@ + + .texinfo.dvi: + TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi.info: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< ++ ++.txi.dvi: ++ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ ++ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< ++ ++.txi: ++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] ++ $(MAKEINFO) -I $(srcdir) $< + .dvi.ps: + $(DVIPS) $< -o $@ + + install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(infodir) ++ $(mkinstalldirs) $(DESTDIR)$(infodir) + @for file in $(INFO_DEPS); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + if test -f $$d/$$ifile; then \ +- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \ +- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ + else : ; fi; \ + done; \ + done + @$(POST_INSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + for file in $(INFO_DEPS); do \ +- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\ +- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\ ++ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ ++ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ + done; \ + else : ; fi + +@@ -503,11 +538,11 @@ uninstall-info: + else ii=; fi; \ + for file in $(INFO_DEPS); do \ + test -z "$ii" \ +- || install-info --info-dir=$(infodir) --remove $$file; \ ++ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ + done +- $(NORMAL_UNINSTALL) ++ @$(NORMAL_UNINSTALL) + for file in $(INFO_DEPS); do \ +- (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ ++ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + done + + dist-info: $(INFO_DEPS) +@@ -520,10 +555,140 @@ dist-info: $(INFO_DEPS) + done; \ + done + ++MAKEGUIDE= $(MAKEINFO) --amiga ++ ++MAKEHTML = texi2html -number -split_chapter ++ ++.texi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texinfo.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.txi.guide: ++ $(MAKEGUIDE) -I$(srcdir) $< -o $@ ++ ++.texi.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++.texinfo.html: ++ $(MAKEHTML) -I$(srcdir) $< ++ ++install-guide: $(GUIDE_DEPS) ++ $(mkinstalldirs) $(guidedir) ++ for file in $(GUIDE_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(guidedir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-guide: ++ for file in *.guide*; do \ ++ rm -f $(guidedir)/$$file; \ ++ done ++ ++install-ps: $(PS_S) ++ $(mkinstalldirs) $(psdir) ++ for file in $(PS_DEPS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(psdir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-ps: ++ for file in *.ps*; do \ ++ rm -f $(psdir)/$$file; \ ++ done ++ ++install-dvi: $(DVIS) ++ $(mkinstalldirs) $(dvidir) ++ for file in $(DVIS); do \ ++ for ifile in `echo $$file*`; do \ ++ $(INSTALL_DATA) $$ifile $(dvidir)/$$ifile; \ ++ done; \ ++ done ++ ++uninstall-dvi: ++ for file in *.dvi*; do \ ++ rm -f $(dvidir)/$$file; \ ++ done ++ ++install-html: $(HTML_DEPS) ++ $(mkinstalldirs) $(htmldir) ++ @touch $(HTML_DEPS) ++ @for file in $(HTML_DEPS); do \ ++ if test -f $$file; then d=.; else d=$(srcdir); fi; \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $$d && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ if test -f $$d/$$ifile; then \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(htmldir)/$$ifile; \ ++ else : ; fi; \ ++ done; \ ++ done ++ @rm -f $(htmldir)/$(HTML_DEPS) ++ ++uninstall-html: ++ @for file in $(HTML_DEPS); do \ ++ bfile=`basename $$file .html`; \ ++ for ifile in `cd $(htmldir) && echo $$file $$bfile'_toc.html' $$bfile'_foot.html' $$bfile'_[0-9].html' $$bfile'_[0-9][0-9].html'`; do \ ++ echo "removing: $(htmldir)/$$ifile"; \ ++ rm -f $(htmldir)/$$ifile; \ ++ done; \ ++ done ++ ++mostlyclean-guide: ++ rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps ld.log \ ++ ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr ld.cv \ ++ ld.cn ld.guide ld.html ld.ps ++ ++clean-guide: ++ ++distclean-guide: ++ ++maintainer-clean-guide: ++ rm -f $(GUIDES) ++ ++mostlyclean-html: ++ rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps ld.log \ ++ ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr ld.cv \ ++ ld.cn ld.guide ld.html ld.ps ++ ++clean-html: ++ ++distclean-html: ++ ++maintainer-clean-html: ++ rm -f $(HTMLS) ++ ++mostlyclean-ps: ++ rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps ld.log \ ++ ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr ld.cv \ ++ ld.cn ld.guide ld.html ld.ps ++ ++clean-ps: ++ ++distclean-ps: ++ ++maintainer-clean-ps: ++ rm -f $(PS_S) ++ ++mostlyclean-dvi: ++ rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps ld.log \ ++ ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr ld.cv \ ++ ld.cn ld.guide ld.html ld.ps ++ ++clean-dvi: ++ ++distclean-dvi: ++ ++maintainer-clean-dvi: ++ rm -f $(DVIS) ++ + mostlyclean-aminfo: + -rm -f ld.aux ld.cp ld.cps ld.dvi ld.fn ld.fns ld.ky ld.kys ld.ps \ + ld.log ld.pg ld.toc ld.tp ld.tps ld.vr ld.vrs ld.op ld.tr \ +- ld.cv ld.cn ++ ld.cv ld.cn ld.guide ld.html ld.ps + + clean-aminfo: + +@@ -537,21 +702,45 @@ maintainer-clean-aminfo: + fi; \ + done + clean-info: mostlyclean-aminfo +-install-man: $(MANS) +- $(NORMAL_INSTALL) +- $(mkinstalldirs) $(mandir)/man1 +- @sect=1; \ +- inst=`echo "ld" | sed '$(transform)'`.1; \ +- if test -f $(srcdir)/ld.1; then file=$(srcdir)/ld.1; \ +- else file=ld.1; fi; \ +- echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ +- $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst + +-uninstall-man: +- $(NORMAL_UNINSTALL) +- -inst=`echo "ld" | sed '$(transform)'`.1; \ +- rm -f $(mandir)/man1/$$inst ++install-man1: ++ $(mkinstalldirs) $(DESTDIR)$(man1dir) ++ @list='$(man1_MANS)'; \ ++ l2='$(man_MANS)'; for i in $$l2; do \ ++ case "$$i" in \ ++ *.1*) list="$$list $$i" ;; \ ++ esac; \ ++ done; \ ++ for i in $$list; do \ ++ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ ++ else file=$$i; fi; \ ++ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ ++ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ ++ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ ++ done + ++uninstall-man1: ++ @list='$(man1_MANS)'; \ ++ l2='$(man_MANS)'; for i in $$l2; do \ ++ case "$$i" in \ ++ *.1*) list="$$list $$i" ;; \ ++ esac; \ ++ done; \ ++ for i in $$list; do \ ++ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ ++ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ ++ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ ++ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ ++ rm -f $(DESTDIR)$(man1dir)/$$inst; \ ++ done ++install-man: $(MANS) ++ @$(NORMAL_INSTALL) ++ $(MAKE) install-man1 ++uninstall-man: ++ @$(NORMAL_UNINSTALL) ++ $(MAKE) uninstall-man1 + + tags: TAGS + +@@ -645,6 +834,9 @@ site.exp: Makefile + -@mv site.exp site.bak + @mv $@-t site.exp + info: $(INFO_DEPS) ++guide: $(GUIDE_DEPS) ++html: $(HTML_DEPS) ++ps: $(PS_DEPS) + dvi: $(DVIS) + check: + $(MAKE) check-DEJAGNU +@@ -661,12 +853,10 @@ install: install-exec install-data all + + uninstall: uninstall-man + +-all: Makefile $(PROGRAMS) $(MANS) config.h +- + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: +- $(mkinstalldirs) $(mandir)/man1 ++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 + + + mostlyclean-generic: +@@ -685,39 +875,50 @@ maintainer-clean-generic: + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + mostlyclean: mostlyclean-hdr mostlyclean-noinstPROGRAMS \ + mostlyclean-compile mostlyclean-libtool \ +- mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \ +- mostlyclean-local ++ mostlyclean-aminfo mostlyclean-guide mostlyclean-html \ ++ mostlyclean-dvi mostlyclean-ps mostlyclean-tags \ ++ mostlyclean-generic mostlyclean-local + + clean: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \ +- clean-aminfo clean-tags clean-generic mostlyclean ++ clean-aminfo clean-guide clean-html clean-dvi clean-ps \ ++ clean-tags clean-generic mostlyclean + + distclean: distclean-hdr distclean-noinstPROGRAMS distclean-compile \ +- distclean-libtool distclean-aminfo distclean-tags \ +- distclean-generic clean distclean-local ++ distclean-libtool distclean-aminfo distclean-guide \ ++ distclean-html distclean-dvi distclean-ps \ ++ distclean-tags distclean-generic clean distclean-local + -rm -f config.status + -rm -f libtool + + maintainer-clean: maintainer-clean-hdr maintainer-clean-noinstPROGRAMS \ + maintainer-clean-compile maintainer-clean-libtool \ +- maintainer-clean-aminfo maintainer-clean-tags \ ++ maintainer-clean-aminfo maintainer-clean-guide \ ++ maintainer-clean-html maintainer-clean-dvi \ ++ maintainer-clean-ps maintainer-clean-tags \ + maintainer-clean-generic distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + -rm -f config.status + +-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ +-maintainer-clean-hdr mostlyclean-noinstPROGRAMS \ +-distclean-noinstPROGRAMS clean-noinstPROGRAMS \ +-maintainer-clean-noinstPROGRAMS mostlyclean-compile distclean-compile \ +-clean-compile maintainer-clean-compile mostlyclean-libtool \ +-distclean-libtool clean-libtool maintainer-clean-libtool \ +-install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \ +-clean-aminfo maintainer-clean-aminfo install-man uninstall-man tags \ +-mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ +-distdir check-DEJAGNU info dvi installcheck install-info install-exec \ +-install-data install uninstall all installdirs mostlyclean-generic \ +-distclean-generic clean-generic maintainer-clean-generic clean \ +-mostlyclean distclean maintainer-clean ++.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ ++mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ ++clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ ++mostlyclean-compile distclean-compile clean-compile \ ++maintainer-clean-compile mostlyclean-libtool distclean-libtool \ ++clean-libtool maintainer-clean-libtool install-info-am uninstall-info \ ++install-guide uninstall-guide install-ps uninstall-ps install-html \ ++uninstall-html install-dvi uninstall-dvi mostlyclean-guide \ ++distclean-guide clean-guide maintainer-clean-guide mostlyclean-html \ ++distclean-html clean-html maintainer-clean-html mostlyclean-ps \ ++distclean-ps clean-ps maintainer-clean-ps mostlyclean-dvi distclean-dvi \ ++clean-dvi maintainer-clean-dvi mostlyclean-aminfo distclean-aminfo \ ++clean-aminfo maintainer-clean-aminfo install-man1 uninstall-man1 \ ++install-man uninstall-man tags mostlyclean-tags distclean-tags \ ++clean-tags maintainer-clean-tags distdir check-DEJAGNU info guide html \ ++ps dvi installcheck install-info install-exec install-data install \ ++uninstall all installdirs mostlyclean-generic distclean-generic \ ++clean-generic maintainer-clean-generic clean mostlyclean distclean \ ++maintainer-clean + + + ldmain.o: ldmain.c config.status +@@ -739,6 +940,18 @@ ldemul-list.h: Makefile + mv ldemul-tmp.h ldemul-list.h + @TDIRS@ + ++eamiga.c: $(srcdir)/emulparams/amiga.sh\ ++ $(srcdir)/emultempl/amiga.em $(srcdir)/scripttempl/amiga.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} amiga "$(tdir_amiga)" ++eamiga_bss.c: $(srcdir)/emulparams/amiga_bss.sh\ ++ $(srcdir)/emultempl/amiga.em $(srcdir)/scripttempl/amiga_bss.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} amiga_bss "$(tdir_amiga_bss)" ++eppcamiga.c: $(srcdir)/emulparams/ppcamiga.sh\ ++ $(srcdir)/emultempl/amiga.em $(srcdir)/scripttempl/amiga.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} ppcamiga "$(tdir_ppcamiga)" ++eppcamiga_bss.c: $(srcdir)/emulparams/ppcamiga_bss.sh\ ++ $(srcdir)/emultempl/amiga.em $(srcdir)/scripttempl/amiga_bss.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} ppcamiga_bss "$(tdir_ppcamiga_bss)" + ea29k.c: $(srcdir)/emulparams/a29k.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS} + ${GENSCRIPTS} a29k "$(tdir_a29k)" +@@ -868,6 +1081,9 @@ ehppaelf.c: $(srcdir)/emulparams/hppaelf + ei386aout.c: $(srcdir)/emulparams/i386aout.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} + ${GENSCRIPTS} i386aout "$(tdir_i386aout)" ++ei386beos.c: $(srcdir)/emulparams/i386beos.sh \ ++ $(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} i386beos "$(tdir_i386beos)" + ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} + ${GENSCRIPTS} i386bsd "$(tdir_i386bsd)" +@@ -1047,6 +1263,16 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh + $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \ + ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \ + ldctor.h ldexp.h ldlang.h ldgram.h ++ ++# GG-local: For BeOS, we use a fake ld that calls GNU ld and then mwld. ++beos-ld: beos-ld.c ++ $(CC) -I. -I$(INCDIR) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -DLDNAME='"@LDNAME@"' -DTARGET_ALIAS='"@target_alias@"' -o $@ $(srcdir)/beos-ld.c ++ ++install-beos-ld: ++ test -d $(tooldir) || mkdir $(tooldir) ++ test -d $(tooldir)/bin || mkdir $(tooldir)/bin ++ $(INSTALL_XFORM) beos-ld $(bindir)/ld ++ $(INSTALL_PROGRAM) beos-ld $(tooldir)/bin/ld + + check-DEJAGNU: site.exp + srcroot=`cd $(srcdir) && pwd`; export srcroot; \ +diff -rup --new-file binutils-2.9.1/ld/acconfig.h binutils-2.9.1/ld/acconfig.h +--- binutils-2.9.1/ld/acconfig.h Fri May 1 08:48:47 1998 ++++ binutils-2.9.1/ld/acconfig.h Sun Aug 23 00:00:00 1998 +@@ -20,3 +20,6 @@ + + /* Do we need to use the b modifier when opening binary files? */ + #undef USE_BINARY_FOPEN ++ ++/* Are we building a cross linker */ ++#undef CROSS_LINKER +diff -rup --new-file binutils-2.9.1/ld/beos-ld.c binutils-2.9.1/ld/beos-ld.c +--- binutils-2.9.1/ld/beos-ld.c Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/ld/beos-ld.c Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,395 @@ ++/* Linker front end for BeOS. ++ ++ Copyright (C) 1997 Free Software Foundation, Inc. ++ ++ BeOS uses a proprietary Apple executable format called PEF. However the ++ Metrowerks linker that is supplied with the system also reads XCOFF so ++ the gcc port generates XCOFF object files, which can be linked together, ++ along with other XCOFF objects from libraries, using the GNU linker with ++ the "-r" option to generate a single relocatable object file. That file ++ can then be passed to the Metrowerks linker to add the BeOS runtime ++ support and generate a PEF executable. ++ ++ This front end is compiled and installed in place of the regular GNU ++ linker, which is moved to ld-coff. It first runs ld-coff with the args ++ that it is given, except that -o options are redirected to a temporary ++ file, and then it runs mwld to covert the relocatable temporary file ++ into a PEF executable in the file specified by the -o option (or "a.out" ++ as the default). ++ ++ This front end was written by Fred Fish (fnf@cygnus.com) using various ++ pieces from gcc's "collect2.c". Contributers to collect2.c include ++ Chris Smith (csmith@convex.com), Michael Meissner (meissner@cygnus.com), ++ Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com). ++ ++ This is expected to be only a temporary solution. I have formally ++ requested (9/96) a license from Apple to incorporate PEF support into ++ BFD using information from their licensed PEF documentation, and to have ++ that code covered *only* by the GNU General Public License. That ++ request is still pending. If PEF support is installed, then this useful ++ hack will go away. Or perhaps Be will migrate to more open standards ++ first. ++ ++This file is part of GLD, the Gnu Linker. ++ ++GLD is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GLD 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 GLD; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#include ++#include ++#include ++#include ++ ++#include "ansidecl.h" ++#include "config.h" ++ ++#ifndef CROSS_LINKER ++#define CROSS_LINKER 0 ++#endif ++ ++#define TEMP_FILE_TEMPLATE "/tmp/ldhackXXXXXX" ++ ++#ifndef LDNAME ++#define LDNAME "ld-coff" /* The renamed GNU linker */ ++#endif ++ ++#ifndef TARGET_ALIAS ++#define TARGET_ALIAS "" ++#endif ++ ++#define MW_LD "mwld" /* The Metrowerks linker */ ++#define DEFAULT_OFILE "a.out" /* Default output file name */ ++ ++static int gflag = 0; /* Non-zero if user specified -g flag */ ++static int vflag = 0; /* Non-zero if user specified -v flag */ ++static int rflag = 0; /* Non-zero if user specified -r flag or we are a cross linker */ ++static char *ofile = NULL; /* Output file name */ ++static char *scratchfile; /* Temporary file name */ ++ ++static void do_wait PARAMS ((char *)); ++static void fork_execute PARAMS ((char *, char **)); ++static void collect_exit PARAMS ((int)); ++ ++extern void *malloc (); ++extern char *getenv (); ++ ++ ++/* Die when sys call fails. */ ++ ++static void ++fatal_perror (string, arg1, arg2, arg3) ++ char *string, *arg1, *arg2, *arg3; ++{ ++ int e = errno; ++ ++ fprintf (stderr, "ld: "); ++ fprintf (stderr, string, arg1, arg2, arg3); ++ fprintf (stderr, ": %s\n", strerror (e)); ++ collect_exit (1); ++} ++ ++/* Just die. */ ++ ++static void ++fatal (string, arg1, arg2, arg3) ++ char *string, *arg1, *arg2, *arg3; ++{ ++ fprintf (stderr, "ld: "); ++ fprintf (stderr, string, arg1, arg2, arg3); ++ fprintf (stderr, "\n"); ++ collect_exit (1); ++} ++ ++/* Write error message. */ ++ ++static void ++error (string, arg1, arg2, arg3, arg4) ++ char *string, *arg1, *arg2, *arg3, *arg4; ++{ ++ fprintf (stderr, "ld: "); ++ fprintf (stderr, string, arg1, arg2, arg3, arg4); ++ fprintf (stderr, "\n"); ++} ++ ++main (argc, argv) ++ int argc; ++ char *argv[]; ++{ ++ char **argp; ++ char **ldargs; ++ char **ldargp; ++ char **tmp_ofile; ++ char *ldname; ++ int offset; ++ ++ argp = &argv[1]; ++ ++ /* Find the GNU linker. */ ++ ++ ldname = malloc (strlen (TARGET_ALIAS) + strlen (LDNAME) + 2); ++ if (strlen (TARGET_ALIAS) > 0) ++ { ++ sprintf (ldname, "%s-%s", TARGET_ALIAS, LDNAME); ++ } ++ else ++ { ++ strcpy (ldname, LDNAME); ++ } ++ ++ /* Build the temporary file name, being careful to ensure that the ++ template is writable and not in const data. */ ++ ++ scratchfile = malloc (strlen (TEMP_FILE_TEMPLATE)); ++ strcpy (scratchfile, TEMP_FILE_TEMPLATE); ++ mktemp (scratchfile); ++ ++ /* Just add enough slop that we don't have to worry about being ++ off a little bit. */ ++ ldargs = malloc ((argc + 16) * sizeof (char *)); ++ ldargp = ldargs; ++ ++ /* The first arg is the name of the GNU linker */ ++ ++ *ldargp++ = ldname; ++ ++ while (*argp) ++ { ++ if (strcmp ("-g", *argp) == 0) ++ { ++ gflag = 1; ++ } ++ else if (strcmp ("-v", *argp) == 0) ++ { ++ vflag = 1; ++ } ++ else if (strcmp ("-r", *argp) == 0) ++ { ++ /* Always pass explicit -r option on to GNU linker */ ++ rflag = 1; ++ *ldargp++ = "-r"; ++ } ++ else if (strcmp ("-o", *argp) == 0) ++ { ++ /* Save the real output filename in ofile and ++ substitute our temporary file name. */ ++ *ldargp++ = *argp++; ++ ofile = *argp++; ++ tmp_ofile = ldargp; ++ *ldargp++ = scratchfile; ++ /* Already handled args, skip to next */ ++ continue; ++ } ++ *ldargp++ = *argp++; ++ } ++ ++ /* Now check to see if we saw an explicit -o option. If so, it currently ++ points to the temporary file. Leave it alone unless we also saw a -r ++ option, in which case redirect it back to the real output file since ++ we won't be running mwld. If no explicit -o, need to add one unless ++ we are only running the GNU linker and not mwld. */ ++ ++ if (ofile == NULL) ++ { ++ /* No explicit -o option. If not generating a relocatable ++ file then need to use the temporary file between passes. */ ++ if (!rflag && !CROSS_LINKER) ++ { ++ *ldargp++ = "-o"; ++ *ldargp++ = scratchfile; ++ } ++ } ++ else ++ { ++ /* Got explicit -o option so it currently points to our scratch file. ++ If also got -r option, need to point it back to our real output ++ file. */ ++ if (rflag || CROSS_LINKER) ++ { ++ *tmp_ofile = ofile; ++ } ++ } ++ ++ /* Generally we always want to supply a "-r" option to the GNU linker, ++ unless we either got one on the input command line and thus already ++ have one, or else the environment variable BEOS_STUBS is given ++ which means that we are probably trying to find out what symbols are ++ undefined in the BeOS runtime by supplying a stub object that defines ++ the ones that are, and thus we don't want to supply "-r". */ ++ ++ if (!rflag) ++ { ++ char *stubs = getenv ("BEOS_STUBS"); ++ *ldargp++ = stubs ? stubs : "-r"; ++ } ++ ++ /* Terminate the arg list to the GNU ld and run it. */ ++ ++ *ldargp++ = NULL; ++ fork_execute (ldargs[0], ldargs); ++ ++ /* If we are not generating a relocatable output file, then we need ++ to run the Metrowerks linker to generate the final executable. */ ++ ++ if (!rflag && !CROSS_LINKER) ++ { ++ char *mapfile; ++ ldargp = ldargs; ++ *ldargp++ = MW_LD; ++ *ldargp++ = "-o"; ++ *ldargp++ = ofile; ++ if (gflag) ++ { ++ *ldargp++ = "-g"; ++ mapfile = malloc (strlen (ofile) + 6); ++ sprintf (mapfile, "%s.xMAP", ofile); ++ *ldargp++ = "-map"; ++ *ldargp++ = mapfile; ++ } ++ *ldargp++ = "-nodup"; ++ *ldargp++ = scratchfile; ++ *ldargp++ = NULL; ++ fork_execute (ldargs[0], ldargs); ++ ++ /* Since mwld doesn't make a file executable, we need to do that ourselves. */ ++ ldargp = ldargs; ++ *ldargp++ = "chmod"; ++ *ldargp++ = "+x"; ++ *ldargp++ = ofile; ++ *ldargp++ = NULL; ++ fork_execute (ldargs[0], ldargs); ++ } ++ ++ collect_exit (0); ++} ++ ++/* Wait for a process to finish, and exit if a non-zero status is found. */ ++ ++int ++collect_wait (prog) ++ char *prog; ++{ ++ int status; ++ ++ wait (&status); ++ if (status) ++ { ++ if (WIFSIGNALED (status)) ++ { ++ int sig = WTERMSIG (status); ++ error ("%s terminated with signal %d %s", ++ prog, ++ sig, ++ (status & 0200) ? ", core dumped" : ""); ++ collect_exit (127); ++ } ++ ++ if (WIFEXITED (status)) ++ return WEXITSTATUS (status); ++ } ++ return 0; ++} ++ ++static void ++do_wait (prog) ++ char *prog; ++{ ++ int ret = collect_wait (prog); ++ if (ret != 0) ++ { ++ error ("%s returned %d exit status", prog, ret); ++ collect_exit (ret); ++ } ++} ++ ++/* Fork and execute a program, and wait for the reply. */ ++ ++static void ++collect_execute (prog, argv, redir) ++ char *prog; ++ char **argv; ++ char *redir; ++{ ++ int pid; ++ ++ if (vflag) ++ { ++ char **p_argv; ++ char *str; ++ ++ if (argv[0]) ++ fprintf (stderr, "%s", argv[0]); ++ else ++ fprintf (stderr, "[cannot find %s]", prog); ++ ++ for (p_argv = &argv[1]; (str = *p_argv) != (char *) 0; p_argv++) ++ fprintf (stderr, " %s", str); ++ ++ fprintf (stderr, "\n"); ++ } ++ ++ fflush (stdout); ++ fflush (stderr); ++ ++ /* If we can't find a program we need, complain error. Do this here ++ since we might not end up needing something that we couldn't find. */ ++ ++ if (argv[0] == 0) ++ fatal ("cannot find `%s'", prog); ++ ++ pid = fork (); ++ if (pid == -1) ++ { ++ fatal_perror ("fork"); ++ } ++ ++ if (pid == 0) /* child context */ ++ { ++ if (redir) ++ { ++ unlink (redir); ++ if (freopen (redir, "a", stdout) == NULL) ++ fatal_perror ("redirecting stdout"); ++ if (freopen (redir, "a", stderr) == NULL) ++ fatal_perror ("redirecting stderr"); ++ } ++ ++ execvp (argv[0], argv); ++ fatal_perror ("executing %s", prog); ++ } ++} ++ ++static void ++fork_execute (prog, argv) ++ char *prog; ++ char **argv; ++{ ++ collect_execute (prog, argv, NULL); ++ do_wait (prog); ++} ++ ++/* Delete tempfiles and exit function. */ ++ ++void ++collect_exit (status) ++ int status; ++{ ++ if (status > 0) ++ { ++ unlink (ofile); ++ } ++ unlink (scratchfile); ++ exit (status); ++} ++ +diff -rup --new-file binutils-2.9.1/ld/config.in binutils-2.9.1/ld/config.in +--- binutils-2.9.1/ld/config.in Fri May 1 08:48:48 1998 ++++ binutils-2.9.1/ld/config.in Sun Aug 23 00:00:00 1998 +@@ -24,6 +24,9 @@ + /* Do we need to use the b modifier when opening binary files? */ + #undef USE_BINARY_FOPEN + ++/* Are we building a cross linker */ ++#undef CROSS_LINKER ++ + /* Define if you have the sbrk function. */ + #undef HAVE_SBRK + +diff -rup --new-file binutils-2.9.1/ld/configdoc.texi binutils-2.9.1/ld/configdoc.texi +--- binutils-2.9.1/ld/configdoc.texi Fri May 1 08:48:49 1998 ++++ binutils-2.9.1/ld/configdoc.texi Wed Dec 31 17:00:00 1969 +@@ -1,13 +0,0 @@ +-@c ------------------------------ CONFIGURATION VARS: +-@c 1. Inclusiveness of this manual +-@set GENERIC +- +-@c 2. Specific target machines +-@set H8300 +-@set I960 +- +-@c 3. Properties of this configuration +-@clear SingleFormat +-@set UsesEnvVars +-@c ------------------------------ end CONFIGURATION VARS +- +diff -rup --new-file binutils-2.9.1/ld/configure binutils-2.9.1/ld/configure +--- binutils-2.9.1/ld/configure Fri May 1 08:48:48 1998 ++++ binutils-2.9.1/ld/configure Thu Jan 21 19:40:06 1999 +@@ -1,7 +1,7 @@ + #! /bin/sh + + # Guess values for system-dependent variables and create Makefiles. +-# Generated automatically using autoconf version 2.12.1 ++# Generated automatically using autoconf version 2.13 + # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation +@@ -61,6 +61,10 @@ libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' ++guidedir='${prefix}/guide' ++htmldir='${prefix}/html' ++psdir='${prefix}/ps' ++dvidir='${prefix}/dvi' + mandir='${prefix}/man' + + # Initialize some other variables. +@@ -178,6 +182,10 @@ Directory and file names: + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] ++ --guidedir=DIR Amigaguide documentation in DIR [PREFIX/guide] ++ --htmldir=DIR HTML documentation in DIR [PREFIX/html] ++ --psdir=DIR postscript documentation in DIR [PREFIX/ps] ++ --dvidir=DIR TeX dvi documentation in DIR [PREFIX/dvi] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names +@@ -220,6 +228,22 @@ EOF + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + ++ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui) ++ ac_prev=guidedir ;; ++ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+ guidedir="$ac_optarg" ;; ++ ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+ htmldir="$ac_optarg" ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+ psdir="$ac_optarg" ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+ dvidir="$ac_optarg" ;; ++ + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) +@@ -350,7 +374,7 @@ EOF + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) +- echo "configure generated by autoconf version 2.12.1" ++ echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) +@@ -520,9 +544,11 @@ ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + ++ac_exeext= ++ac_objext=o + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then +@@ -584,7 +610,7 @@ else { echo "configure: error: can not r + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 +-echo "configure:588: checking host system type" >&5 ++echo "configure:614: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in +@@ -605,7 +631,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- + echo "$ac_t""$host" 1>&6 + + echo $ac_n "checking target system type""... $ac_c" 1>&6 +-echo "configure:609: checking target system type" >&5 ++echo "configure:635: checking target system type" >&5 + + target_alias=$target + case "$target_alias" in +@@ -623,7 +649,7 @@ target_os=`echo $target | sed 's/^\([^-] + echo "$ac_t""$target" 1>&6 + + echo $ac_n "checking build system type""... $ac_c" 1>&6 +-echo "configure:627: checking build system type" >&5 ++echo "configure:653: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in +@@ -653,21 +679,22 @@ test "$host_alias" != "$target_alias" && + # SunOS /usr/etc/install + # IRIX /sbin/install + # AIX /bin/install ++# AmigaOS /c/install + # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:662: checking for a BSD compatible install" >&5 ++echo "configure:689: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in +- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root +@@ -706,13 +733,15 @@ echo "$ac_t""$INSTALL" 1>&6 + # It thinks the first close brace ends the variable substitution. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + + echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +-echo "configure:716: checking whether build environment is sane" >&5 ++echo "configure:745: checking whether build environment is sane" >&5 + # Just in case + sleep 1 + echo timestamp > conftestfile +@@ -769,7 +798,7 @@ test "$program_suffix" != NONE && + test "$program_transform_name" = "" && program_transform_name="s,x,x," + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5 ++echo "configure:802: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -815,7 +844,7 @@ EOF + + missing_dir=`cd $ac_aux_dir && pwd` + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +-echo "configure:819: checking for working aclocal" >&5 ++echo "configure:848: checking for working aclocal" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -828,7 +857,7 @@ else + fi + + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +-echo "configure:832: checking for working autoconf" >&5 ++echo "configure:861: checking for working autoconf" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -841,7 +870,7 @@ else + fi + + echo $ac_n "checking for working automake""... $ac_c" 1>&6 +-echo "configure:845: checking for working automake" >&5 ++echo "configure:874: checking for working automake" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -854,7 +883,7 @@ else + fi + + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +-echo "configure:858: checking for working autoheader" >&5 ++echo "configure:887: checking for working autoheader" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -867,7 +896,7 @@ else + fi + + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +-echo "configure:871: checking for working makeinfo" >&5 ++echo "configure:900: checking for working makeinfo" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -930,15 +959,16 @@ fi + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:934: checking for $ac_word" >&5 ++echo "configure:963: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" +@@ -959,15 +989,16 @@ fi + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:963: checking for $ac_word" >&5 ++echo "configure:993: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -985,19 +1016,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1023: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1056: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1085: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:992: checking for $ac_word" >&5 ++echo "configure:1118: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1032,25 +1159,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:1170: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:1201: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 1212 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:1217: \"$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 +@@ -1064,18 +1227,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1074: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:1243: 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:1079: checking whether we are using GNU C" >&5 ++echo "configure:1248: 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 +@@ -1084,7 +1253,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1088: \"$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:1257: \"$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 +@@ -1095,11 +1264,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1103: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:1276: 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 +@@ -1114,18 +1287,45 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + # Check whether --with-gnu-ld or --without-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" +@@ -1139,7 +1339,7 @@ ac_prog=ld + if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +-echo "configure:1143: checking for ld used by GCC" >&5 ++echo "configure:1343: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. +@@ -1157,10 +1357,10 @@ echo "configure:1143: checking for ld us + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +-echo "configure:1161: checking for GNU ld" >&5 ++echo "configure:1361: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +-echo "configure:1164: checking for non-GNU ld" >&5 ++echo "configure:1364: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1196,7 +1396,7 @@ fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +-echo "configure:1200: checking if the linker ($LD) is GNU ld" >&5 ++echo "configure:1400: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1212,7 +1412,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +-echo "configure:1216: checking for BSD-compatible nm" >&5 ++echo "configure:1416: checking for BSD-compatible nm" >&5 + if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1249,7 +1449,7 @@ echo "$ac_t""$NM" 1>&6 + + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:1253: checking whether ln -s works" >&5 ++echo "configure:1453: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1259,14 +1459,24 @@ then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" + else +- ac_cv_prog_LN_S=ln ++ if ln X conftestdata 2>/dev/null ++ then ++ rm -f conftestdata ++ ac_cv_prog_LN_S=ln ++ else ++ ac_cv_prog_LN_S=cp ++ fi + fi + fi + LN_S="$ac_cv_prog_LN_S" + if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 + else +- echo "$ac_t""no" 1>&6 ++ if test "$ac_cv_prog_LN_S" = "ln"; then ++ echo "$ac_t""no, using ln" 1>&6 ++ else ++ echo "$ac_t""no, and neither does ln, so using cp" 1>&6 ++ fi + fi + + # Always use our own libtool. +@@ -1285,8 +1495,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libto + case "$host" in + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 1289 "configure"' > conftest.$ac_ext +- if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ echo '#line 1499 "configure"' > conftest.$ac_ext ++ if { (eval echo configure:1500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" +@@ -1354,15 +1564,16 @@ fi + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1358: checking for $ac_word" >&5 ++echo "configure:1568: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -1380,19 +1591,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1598: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1631: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1660: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:1387: checking for $ac_word" >&5 ++echo "configure:1693: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1427,25 +1734,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:1745: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1435: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:1776: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 1787 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:1792: \"$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 +@@ -1459,18 +1802,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1469: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:1818: 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:1474: checking whether we are using GNU C" >&5 ++echo "configure:1823: 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 +@@ -1479,7 +1828,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1483: \"$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:1832: \"$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 +@@ -1490,11 +1839,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1498: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:1851: 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 +@@ -1509,35 +1862,62 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + + echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 +-echo "configure:1529: checking for Cygwin32 environment" >&5 ++echo "configure:1909: checking for Cygwin32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_cygwin32'+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:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_cygwin32=yes + else +@@ -1554,19 +1934,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 + CYGWIN32= + test "$am_cv_cygwin32" = yes && CYGWIN32=yes + echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 +-echo "configure:1558: checking for Mingw32 environment" >&5 ++echo "configure:1938: checking for Mingw32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_mingw32=yes + else +@@ -1585,7 +1965,7 @@ test "$am_cv_mingw32" = yes && MINGW32=y + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +-echo "configure:1589: checking for executable suffix" >&5 ++echo "configure:1969: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1614,15 +1994,16 @@ 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:1618: checking for $ac_word" >&5 ++echo "configure:1998: 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 + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_YACC="$ac_prog" +@@ -1646,15 +2027,16 @@ test -n "$YACC" || YACC="yacc" + # 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:1650: checking for $ac_word" >&5 ++echo "configure:2031: 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 + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LEX="flex" +@@ -1679,7 +2061,7 @@ then + *) ac_lib=l ;; + esac + echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 +-echo "configure:1683: checking for yywrap in -l$ac_lib" >&5 ++echo "configure:2065: 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 +@@ -1687,7 +2069,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-l$ac_lib $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2084: \"$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 +@@ -1721,7 +2103,7 @@ fi + fi + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1725: checking how to run the C preprocessor" >&5 ++echo "configure:2107: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -1736,14 +2118,14 @@ 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:1746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2128: \"$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 + : + else +@@ -1753,14 +2135,31 @@ 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:1763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2145: \"$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 ++ : ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ 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:2162: \"$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 + : + else +@@ -1773,6 +2172,8 @@ fi + rm -f conftest* + fi + rm -f conftest* ++fi ++rm -f conftest* + ac_cv_prog_CPP="$CPP" + fi + CPP="$ac_cv_prog_CPP" +@@ -1782,7 +2183,7 @@ fi + echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking lex output file root""... $ac_c" 1>&6 +-echo "configure:1786: checking lex output file root" >&5 ++echo "configure:2187: 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 +@@ -1803,7 +2204,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:1807: checking whether yytext is a pointer" >&5 ++echo "configure:2208: 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 +@@ -1815,14 +2216,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; then ++if { (eval echo configure:2227: \"$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 +@@ -1844,8 +2245,23 @@ EOF + fi + + ++# begin-GG-local ++echo $ac_n "checking whether compiling a cross-linker""... $ac_c" 1>&6 ++echo "configure:2251: checking whether compiling a cross-linker" >&5 ++if test "${host}" = "${target}"; then ++ cross_linker=no ++else ++ cross_linker=yes ++ cat >> confdefs.h <<\EOF ++#define CROSS_LINKER 1 ++EOF ++ ++fi ++echo "$ac_t""$cross_linker" 1>&6 ++# end-GG-local ++ + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +-echo "configure:1849: checking whether to enable maintainer-specific portions of Makefiles" >&5 ++echo "configure:2265: 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" +@@ -1874,18 +2290,18 @@ for ac_hdr in string.h strings.h stdlib. + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1878: checking for $ac_hdr" >&5 ++echo "configure:2294: 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:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2304: \"$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* + eval "ac_cv_header_$ac_safe=yes" +@@ -1913,12 +2329,12 @@ done + for ac_func in sbrk + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:1917: checking for $ac_func" >&5 ++echo "configure:2333: 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; then ++if { (eval echo configure:2361: \"$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 +@@ -1970,12 +2386,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/di + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +-echo "configure:1974: checking for $ac_hdr that defines DIR" >&5 ++echo "configure:2390: checking for $ac_hdr that defines DIR" >&5 + if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +@@ -1983,7 +2399,7 @@ int main() { + DIR *dirp = 0; + ; return 0; } + EOF +-if { (eval echo configure:1987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" + else +@@ -2008,7 +2424,7 @@ done + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then + echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +-echo "configure:2012: checking for opendir in -ldir" >&5 ++echo "configure:2428: checking for opendir in -ldir" >&5 + ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2016,7 +2432,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-ldir $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2447: \"$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 +@@ -2049,7 +2465,7 @@ fi + + else + echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +-echo "configure:2053: checking for opendir in -lx" >&5 ++echo "configure:2469: checking for opendir in -lx" >&5 + ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2057,7 +2473,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lx $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2488: \"$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 +@@ -2101,12 +2517,12 @@ EOF + esac + + echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 +-echo "configure:2105: checking whether strstr must be declared" >&5 ++echo "configure:2521: checking whether strstr must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2127,7 +2543,7 @@ int main() { + char *(*pfn) = (char *(*)) strstr + ; return 0; } + EOF +-if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_strstr=no + else +@@ -2149,12 +2565,12 @@ EOF + fi + + echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 +-echo "configure:2153: checking whether free must be declared" >&5 ++echo "configure:2569: checking whether free must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2175,7 +2591,7 @@ int main() { + char *(*pfn) = (char *(*)) free + ; return 0; } + EOF +-if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_free=no + else +@@ -2197,12 +2613,12 @@ EOF + fi + + echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 +-echo "configure:2201: checking whether sbrk must be declared" >&5 ++echo "configure:2617: checking whether sbrk must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2223,7 +2639,7 @@ int main() { + char *(*pfn) = (char *(*)) sbrk + ; return 0; } + EOF +-if { (eval echo configure:2227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_sbrk=no + else +@@ -2245,12 +2661,12 @@ EOF + fi + + echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 +-echo "configure:2249: checking whether getenv must be declared" >&5 ++echo "configure:2665: checking whether getenv must be declared" >&5 + if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -2271,7 +2687,7 @@ int main() { + char *(*pfn) = (char *(*)) getenv + ; return 0; } + EOF +-if { (eval echo configure:2275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_decl_needed_getenv=no + else +@@ -2337,6 +2753,9 @@ done + + + ++ ++ ++ + if test x${all_targets} = xtrue; then + if test x${want64} = xtrue; then + EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)' +@@ -2378,7 +2797,7 @@ EOF + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. + (set) 2>&1 | +- case `(ac_space=' '; set) 2>&1 | grep ac_space` in ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). +@@ -2424,7 +2843,9 @@ DEFS=-DHAVE_CONFIG_H + : ${CONFIG_STATUS=./config.status} + + echo creating $CONFIG_STATUS +-rm -f $CONFIG_STATUS ++# Some systems, like AmigaOS, won't allow you to remove a script that is ++# being executed, so just move it out of the way instead. ++if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi + cat > $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h +@@ -2752,6 +3184,7 @@ test -z "$CONFIG_HEADERS" || echo timest + exit 0 + EOF + chmod +x $CONFIG_STATUS ++rm -f CONFIG.STATUS.old + rm -fr confdefs* $ac_clean_files + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +diff -rup --new-file binutils-2.9.1/ld/configure.host binutils-2.9.1/ld/configure.host +--- binutils-2.9.1/ld/configure.host Fri May 1 08:48:48 1998 ++++ binutils-2.9.1/ld/configure.host Sun Aug 23 00:00:00 1998 +@@ -35,6 +35,10 @@ alpha*-*-*) + NATIVE_LIB_DIRS=/usr/ccs/lib + ;; + ++i[3456]86-*-beos*) ++ NATIVE_LIB_DIRS=/boot/develop/lib/x86 ++ ;; ++ + i[3456]86-*-bsd* | i[3456]86-*-freebsd* | i[3456]86-*-netbsd*) + # The new BSD `make' has a bug: it doesn't pass empty arguments in + # shell commands. So we need to make this value non-empty in order +@@ -112,6 +116,10 @@ mips*-sgi-irix4*) + mips*-sgi-irix[56]*) + HOSTING_CRT0=/usr/lib/crt1.o + HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o' ++ ;; ++ ++m68*-*-amigaos*) ++ HDEFINES=-mstackextend + ;; + + m68*-*-linux*aout*) +diff -rup --new-file binutils-2.9.1/ld/configure.in binutils-2.9.1/ld/configure.in +--- binutils-2.9.1/ld/configure.in Fri May 1 08:48:48 1998 ++++ binutils-2.9.1/ld/configure.in Sun Aug 23 00:00:00 1998 +@@ -45,6 +45,17 @@ AC_PROG_YACC + AC_PROG_LEX + AC_DECL_YYTEXT + ++# begin-GG-local ++AC_MSG_CHECKING(whether compiling a cross-linker) ++if test "${host}" = "${target}"; then ++ cross_linker=no ++else ++ cross_linker=yes ++ AC_DEFINE(CROSS_LINKER) ++fi ++AC_MSG_RESULT($cross_linker) ++# end-GG-local ++ + AM_MAINTAINER_MODE + + . ${srcdir}/configure.host +@@ -108,6 +119,9 @@ done + + AC_SUBST(EMUL) + AC_SUBST(TDIRS) ++AC_SUBST(LDNAME) ++AC_SUBST(EXTRA_PROGS) ++AC_SUBST(EXTRA_INSTALL) + + dnl FIXME: We will build a 64 bit BFD for a 64 bit host or a 64 bit + dnl target, and in those cases we should also build the 64 bit +diff -rup --new-file binutils-2.9.1/ld/configure.tgt binutils-2.9.1/ld/configure.tgt +--- binutils-2.9.1/ld/configure.tgt Fri May 1 08:48:48 1998 ++++ binutils-2.9.1/ld/configure.tgt Sun Aug 23 00:00:00 1998 +@@ -97,6 +97,7 @@ i[3456]86-*-winnt*) targ_emul=i386pe ;; + i[3456]86-*-pe) targ_emul=i386pe ;; + i[3456]86-*-cygwin32*) targ_emul=i386pe ;; + i[3456]86-*-mingw32*) targ_emul=i386pe ;; ++i[3456]86-*-beos*) targ_emul=i386beos ;; + m8*-*-*) targ_emul=m88kbcs ;; + a29k-*-udi) targ_emul=sa29200 ;; + a29k-*-ebmon) targ_emul=ebmon29k ;; +@@ -119,6 +120,7 @@ sh-*-*|sh-*-rtems*) targ_emul=sh; targ_e + m68k-sony-*) targ_emul=news ;; + m68k-hp-bsd*) targ_emul=hp300bsd ;; + m68*-motorola-sysv*) targ_emul=delta68 ;; ++m68*-*-amigaos*) targ_emul=amiga ; targ_extra_emuls=amiga_bss;; + m68*-*-aout) targ_emul=m68kaout ;; + m68*-*-coff) targ_emul=m68kcoff ;; + m68*-*-elf) targ_emul=m68kelf ;; +@@ -180,6 +182,8 @@ alpha*-*-netbsd*) targ_emul=elf64alpha ; + z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;; + ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;; + ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;; ++powerpc-*-amigaos*) targ_emul=elf32ppc ;; ++powerpc-*-amigaoshunk*) targ_emul=ppcamiga ; targ_extra_emuls=ppcamiga_bss;; + powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-linux-gnu* | powerpc-*-sysv* \ + | powerpc-*-netbsd*) + targ_emul=elf32ppc ;; +@@ -208,3 +212,24 @@ w65-*-*) targ_emul=w65 ;; + exit 1 + + esac ++ ++# Begin GG local change ++# ++# Note that you might think we could override program_transform_name in order to ++# force the installed GNU ld binary to be ld-coff for BeOS. This actually does ++# work, until you configure and build the linker as part of a larger source ++# tree and INSTALL_XFORM is passed down from above and wipes out your change. ++# So we need an out-of-band method of renaming the installed binary that is ++# not affected by any other name transformation rules. ++ ++case "${targ}" in ++powerpc-*-beos*) LDNAME=ld-coff ++ EXTRA_PROGS=beos-ld ++ EXTRA_INSTALL=install-beos-ld ++ ;; ++*) LDNAME=ld ++ EXTRA_PROGS= ++ EXTRA_INSTALL= ++ ;; ++esac ++# End GG local change +diff -rup --new-file binutils-2.9.1/ld/emulparams/amiga.sh binutils-2.9.1/ld/emulparams/amiga.sh +--- binutils-2.9.1/ld/emulparams/amiga.sh Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/ld/emulparams/amiga.sh Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,8 @@ ++SCRIPT_NAME=amiga ++OUTPUT_FORMAT="amiga" ++TEXT_START_ADDR=0x0 ++PAGE_SIZE=0x0 ++SEGMENT_SIZE=0x0 ++NONPAGED_TEXT_START_ADDR=0x0 ++TEMPLATE_NAME=amiga ++ARCH=m68k +diff -rup --new-file binutils-2.9.1/ld/emulparams/amiga_bss.sh binutils-2.9.1/ld/emulparams/amiga_bss.sh +--- binutils-2.9.1/ld/emulparams/amiga_bss.sh Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/ld/emulparams/amiga_bss.sh Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,8 @@ ++SCRIPT_NAME=amiga_bss ++OUTPUT_FORMAT="amiga" ++TEXT_START_ADDR=0x0 ++PAGE_SIZE=0x0 ++SEGMENT_SIZE=0x0 ++NONPAGED_TEXT_START_ADDR=0x0 ++TEMPLATE_NAME=amiga ++ARCH=m68k +diff -rup --new-file binutils-2.9.1/ld/emulparams/i386beos.sh binutils-2.9.1/ld/emulparams/i386beos.sh +--- binutils-2.9.1/ld/emulparams/i386beos.sh Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/ld/emulparams/i386beos.sh Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,5 @@ ++ARCH=i386 ++SCRIPT_NAME=i386beos ++OUTPUT_FORMAT="pei-i386" ++RELOCATEABLE_OUTPUT_FORMAT="pe-i386" ++TEMPLATE_NAME=beos +diff -rup --new-file binutils-2.9.1/ld/emulparams/ppcamiga.sh binutils-2.9.1/ld/emulparams/ppcamiga.sh +--- binutils-2.9.1/ld/emulparams/ppcamiga.sh Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/ld/emulparams/ppcamiga.sh Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,8 @@ ++SCRIPT_NAME=amiga ++OUTPUT_FORMAT="amiga" ++TEXT_START_ADDR=0x400 ++PAGE_SIZE=0x400 ++SEGMENT_SIZE=0x400 ++NONPAGED_TEXT_START_ADDR=0x400 ++TEMPLATE_NAME=amiga ++ARCH=powerpc +diff -rup --new-file binutils-2.9.1/ld/emulparams/ppcamiga_bss.sh binutils-2.9.1/ld/emulparams/ppcamiga_bss.sh +--- binutils-2.9.1/ld/emulparams/ppcamiga_bss.sh Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/ld/emulparams/ppcamiga_bss.sh Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,8 @@ ++SCRIPT_NAME=amiga_bss ++OUTPUT_FORMAT="amiga" ++TEXT_START_ADDR=0x400 ++PAGE_SIZE=0x400 ++SEGMENT_SIZE=0x400 ++NONPAGED_TEXT_START_ADDR=0x400 ++TEMPLATE_NAME=amiga ++ARCH=powerpc +diff -rup --new-file binutils-2.9.1/ld/emultempl/amiga.em binutils-2.9.1/ld/emultempl/amiga.em +--- binutils-2.9.1/ld/emultempl/amiga.em Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/ld/emultempl/amiga.em Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,290 @@ ++# This shell script emits a C file. -*- C -*- ++# It does some substitutions. ++cat >e${EMULATION_NAME}.c <the_bfd->xvec->flavour==bfd_target_amiga_flavour) ++ { ++ for (s=inp->the_bfd->sections;s!=NULL;s=s->next) ++ amiga_per_section(s)->attribute=inp->amiga_attribute; ++ } ++ ++} ++#else ++extern void ++amiga_after_allocation(); ++#endif ++ ++static char * ++gld${EMULATION_NAME}_get_script(isfile) ++ int *isfile; ++EOF ++ ++if test -n "$COMPILE_IN" ++then ++# Scripts compiled in. ++ ++# sed commands to quote an ld script as a C string. ++sc="-f ${srcdir}/emultempl/stringify.sed" ++ ++cat >>e${EMULATION_NAME}.c <> e${EMULATION_NAME}.c ++echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c ++sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c ++echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c ++sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c ++echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c ++sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c ++echo ' ; else return' >> e${EMULATION_NAME}.c ++sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c ++echo '; }' >> e${EMULATION_NAME}.c ++ ++else ++# Scripts read from the filesystem. ++ ++cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <e${EMULATION_NAME}.c <children); ++ ++ for (j = 0; init[j].ptr; j++) ++ { ++ long val = init[j].value; ++ lang_add_assignment (exp_assop ('=' ,init[j].symbol, exp_intop (val))); ++ if (init[j].size == sizeof(short)) ++ *(short *)init[j].ptr = val; ++ else if (init[j].size == sizeof(int)) ++ *(int *)init[j].ptr = val; ++ else if (init[j].size == sizeof(long)) ++ *(long *)init[j].ptr = val; ++ /* This might be a long long or other special type. */ ++ else if (init[j].size == sizeof(bfd_vma)) ++ *(bfd_vma *)init[j].ptr = val; ++ else abort(); ++ } ++ /* Restore the pointer. */ ++ stat_ptr = save; ++ ++ if (pe.FileAlignment > ++ pe.SectionAlignment) ++ { ++ einfo ("%P: warning, file alignment > section alignment.\n"); ++ } ++} ++ ++static void ++gld_${EMULATION_NAME}_after_open() ++{ ++ /* Pass the wacky PE command line options into the output bfd. ++ FIXME: This should be done via a function, rather than by ++ including an internal BFD header. */ ++ if (!coff_data(output_bfd)->pe) ++ { ++ einfo ("%F%P: PE operations on non PE file.\n"); ++ } ++ ++ pe_data(output_bfd)->pe_opthdr = pe; ++ pe_data(output_bfd)->dll = init[DLLOFF].value; ++ ++} ++ ++/* Callback functions for qsort in sort_sections. */ ++ ++static int ++sort_by_file_name (a, b) ++ void *a; ++ void *b; ++{ ++ lang_statement_union_type **ra = a; ++ lang_statement_union_type **rb = b; ++ int i, a_sec, b_sec; ++ ++ i = strcmp ((*ra)->input_section.ifile->the_bfd->my_archive->filename, ++ (*rb)->input_section.ifile->the_bfd->my_archive->filename); ++ if (i != 0) ++ return i; ++ ++ i = strcmp ((*ra)->input_section.ifile->filename, ++ (*rb)->input_section.ifile->filename); ++ if (i != 0) ++ return i; ++ /* the tail idata4/5 are the only ones without relocs to an ++ idata$6 section unless we are importing by ordinal, ++ so sort them to last to terminate the IAT ++ and HNT properly. if no reloc this one is import by ordinal ++ so we have to sort by section contents */ ++ ++ if ( ((*ra)->input_section.section->reloc_count + (*rb)->input_section.section->reloc_count) ) ++ { ++ i = (((*ra)->input_section.section->reloc_count > ++ (*rb)->input_section.section->reloc_count) ? -1 : 0); ++ if ( i != 0) ++ return i; ++ ++ return (((*ra)->input_section.section->reloc_count > ++ (*rb)->input_section.section->reloc_count) ? 0 : 1); ++ } ++ else ++ { ++ if ( (strcmp( (*ra)->input_section.section->name, ".idata$6") == 0) ) ++ return 0; /* don't sort .idata$6 or .idata$7 FIXME dlltool eliminate .idata$7 */ ++ ++ if (! bfd_get_section_contents ((*ra)->input_section.ifile->the_bfd, ++ (*ra)->input_section.section, &a_sec, (file_ptr) 0, (bfd_size_type)sizeof(a_sec))) ++ einfo ("%F%B: Can't read contents of section .idata: %E\n", ++ (*ra)->input_section.ifile->the_bfd); ++ ++ if (! bfd_get_section_contents ((*rb)->input_section.ifile->the_bfd, ++ (*rb)->input_section.section, &b_sec, (file_ptr) 0, (bfd_size_type)sizeof(b_sec) )) ++ einfo ("%F%B: Can't read contents of section .idata: %E\n", ++ (*rb)->input_section.ifile->the_bfd); ++ ++ i = ((a_sec < b_sec) ? -1 : 0); ++ if ( i != 0) ++ return i; ++ return ((a_sec < b_sec) ? 0 : 1); ++ } ++return 0; ++} ++ ++static int ++sort_by_section_name (a, b) ++ void *a; ++ void *b; ++{ ++ lang_statement_union_type **ra = a; ++ lang_statement_union_type **rb = b; ++ int i; ++ i = strcmp ((*ra)->input_section.section->name, ++ (*rb)->input_section.section->name); ++/* this is a hack to make .stab and .stabstr last, so we don't have ++ to fix strip/objcopy for .reloc sections. ++ FIXME stripping images with a .rsrc section still needs to be fixed */ ++ if ( i != 0) ++ { ++ if ((strncmp ((*ra)->input_section.section->name, ".stab", 5) == 0) ++ && (strncmp ((*rb)->input_section.section->name, ".stab", 5) != 0)) ++ return 1; ++ return i; ++ } ++ return i; ++} ++ ++/* Subroutine of sort_sections to a contiguous subset of a list of sections. ++ NEXT_AFTER is the element after the last one to sort. ++ The result is a pointer to the last element's "next" pointer. */ ++ ++static lang_statement_union_type ** ++sort_sections_1 (startptr, next_after, count, sort_func) ++ lang_statement_union_type **startptr,*next_after; ++ int count; ++ int (*sort_func) (); ++{ ++ lang_statement_union_type **vec; ++ lang_statement_union_type *p; ++ int i; ++ lang_statement_union_type **ret; ++ ++ if (count == 0) ++ return startptr; ++ ++ vec = ((lang_statement_union_type **) ++ xmalloc (count * sizeof (lang_statement_union_type *))); ++ ++ for (p = *startptr, i = 0; i < count; i++, p = p->next) ++ vec[i] = p; ++ ++ qsort (vec, count, sizeof (vec[0]), sort_func); ++ ++ /* Fill in the next pointers again. */ ++ *startptr = vec[0]; ++ for (i = 0; i < count - 1; i++) ++ vec[i]->header.next = vec[i + 1]; ++ vec[i]->header.next = next_after; ++ ret = &vec[i]->header.next; ++ free (vec); ++ return ret; ++} ++ ++/* Sort the .idata\$foo input sections of archives into filename order. ++ The reason is so dlltool can arrange to have the pe dll import information ++ generated correctly - the head of the list goes into dh.o, the tail into ++ dt.o, and the guts into ds[nnnn].o. Note that this is only needed for the ++ .idata section. ++ FIXME: This may no longer be necessary with grouped sections. Instead of ++ sorting on dh.o, ds[nnnn].o, dt.o, one could, for example, have dh.o use ++ .idata\$4h, have ds[nnnn].o use .idata\$4s[nnnn], and have dt.o use .idata\$4t. ++ This would have to be elaborated upon to handle multiple dll's ++ [assuming such an eloboration is possible of course]. ++ ++ We also sort sections in '\$' wild statements. These are created by the ++ place_orphans routine to implement grouped sections. */ ++ ++static void ++sort_sections (s) ++ lang_statement_union_type *s; ++{ ++ for (; s ; s = s->next) ++ switch (s->header.type) ++ { ++ case lang_output_section_statement_enum: ++ sort_sections (s->output_section_statement.children.head); ++ break; ++ case lang_wild_statement_enum: ++ { ++ lang_statement_union_type **p = &s->wild_statement.children.head; ++ ++ /* Is this the .idata section? */ ++ if (s->wild_statement.section_name != NULL ++ && strncmp (s->wild_statement.section_name, ".idata", 6) == 0) ++ { ++ /* Sort the children. We want to sort any objects in ++ the same archive. In order to handle the case of ++ including a single archive multiple times, we sort ++ all the children by archive name and then by object ++ name. After sorting them, we re-thread the pointer ++ chain. */ ++ ++ while (*p) ++ { ++ lang_statement_union_type *start = *p; ++ if (start->header.type != lang_input_section_enum ++ || !start->input_section.ifile->the_bfd->my_archive) ++ p = &(start->header.next); ++ else ++ { ++ lang_statement_union_type *end; ++ int count; ++ ++ for (end = start, count = 0; ++ end && end->header.type == lang_input_section_enum; ++ end = end->next) ++ count++; ++ ++ p = sort_sections_1 (p, end, count, sort_by_file_name); ++ } ++ } ++ break; ++ } ++ ++ /* If this is a collection of grouped sections, sort them. ++ The linker script must explicitly mention "*(.foo\$)" or ++ "*(.foo\$*)". Don't sort them if \$ is not the last ++ character (not sure if this is really useful, but it ++ allows explicitly mentioning some \$ sections and letting ++ the linker handle the rest). */ ++ if (s->wild_statement.section_name != NULL) ++ { ++ char *q = strchr (s->wild_statement.section_name, '\$'); ++ ++ if (q != NULL ++ && (q[1] == '\0' ++ || (q[1] == '*' && q[2] == '\0'))) ++ { ++ lang_statement_union_type *end; ++ int count; ++ ++ for (end = *p, count = 0; end; end = end->next) ++ { ++ if (end->header.type != lang_input_section_enum) ++ abort (); ++ count++; ++ } ++ (void) sort_sections_1 (p, end, count, sort_by_section_name); ++ } ++ break; ++ } ++ } ++ break; ++ default: ++ break; ++ } ++} ++ ++static void ++gld_${EMULATION_NAME}_before_allocation() ++{ ++ extern lang_statement_list_type *stat_ptr; ++ ++#ifdef TARGET_IS_ppcpe ++ /* Here we rummage through the found bfds to collect toc information */ ++ { ++ LANG_FOR_EACH_INPUT_STATEMENT (is) ++ { ++ if (!ppc_process_before_allocation(is->the_bfd, &link_info)) ++ { ++ einfo("Errors encountered processing file %s\n", is->filename); ++ } ++ } ++ } ++ ++ /* We have seen it all. Allocate it, and carry on */ ++ ppc_allocate_toc_section (&link_info); ++#else ++#ifdef TARGET_IS_armpe ++ /* FIXME: we should be able to set the size of the interworking stub ++ section. ++ ++ Here we rummage through the found bfds to collect glue ++ information. FIXME: should this be based on a command line ++ option? krk@cygnus.com */ ++ { ++ LANG_FOR_EACH_INPUT_STATEMENT (is) ++ { ++ if (!arm_process_before_allocation (is->the_bfd, & link_info)) ++ { ++ einfo ("Errors encountered processing file %s", is->filename); ++ } ++ } ++ } ++ ++ /* We have seen it all. Allocate it, and carry on */ ++ arm_allocate_interworking_sections (& link_info); ++#endif /* TARGET_IS_armpe */ ++#endif /* TARGET_IS_ppcpe */ ++ ++ sort_sections (stat_ptr->head); ++} ++ ++/* Place an orphan section. We use this to put sections with a '\$' in them ++ into the right place. Any section with a '\$' in them (e.g. .text\$foo) ++ gets mapped to the output section with everything from the '\$' on stripped ++ (e.g. .text). ++ See the Microsoft Portable Executable and Common Object File Format ++ Specification 4.1, section 4.2, Grouped Sections. ++ ++ FIXME: This is now handled by the linker script using wildcards, ++ but I'm leaving this here in case we want to enable it for sections ++ which are not mentioned in the linker script. */ ++ ++/*ARGSUSED*/ ++static boolean ++gld${EMULATION_NAME}_place_orphan (file, s) ++ lang_input_statement_type *file; ++ asection *s; ++{ ++ const char *secname; ++ char *output_secname, *ps; ++ lang_output_section_statement_type *os; ++ lang_statement_union_type *l; ++ ++ if ((s->flags & SEC_ALLOC) == 0) ++ return false; ++ ++ /* Don't process grouped sections unless doing a final link. ++ If they're marked as COMDAT sections, we don't want .text\$foo to ++ end up in .text and then have .text disappear because it's marked ++ link-once-discard. */ ++ if (link_info.relocateable) ++ return false; ++ ++ secname = bfd_get_section_name (s->owner, s); ++ ++ /* Everything from the '\$' on gets deleted so don't allow '\$' as the ++ first character. */ ++ if (*secname == '\$') ++ einfo ("%P%F: section %s has '\$' as first character\n", secname); ++ if (strchr (secname + 1, '\$') == NULL) ++ return false; ++ ++ /* Look up the output section. The Microsoft specs say sections names in ++ image files never contain a '\$'. Fortunately, lang_..._lookup creates ++ the section if it doesn't exist. */ ++ output_secname = buystring (secname); ++ ps = strchr (output_secname + 1, '\$'); ++ *ps = 0; ++ os = lang_output_section_statement_lookup (output_secname); ++ ++ /* Find the '\$' wild statement for this section. We currently require the ++ linker script to explicitly mention "*(.foo\$)". ++ FIXME: ppcpe.sc has .CRT\$foo in the .rdata section. According to the ++ Microsoft docs this isn't correct so it's not (currently) handled. */ ++ ++ ps[0] = '\$'; ++ ps[1] = 0; ++ for (l = os->children.head; l; l = l->next) ++ { ++ if (l->header.type == lang_wild_statement_enum ++ && strcmp (l->wild_statement.section_name, output_secname) == 0) ++ break; ++ } ++ ps[0] = 0; ++ if (l == NULL) ++#if 1 ++ einfo ("%P%F: *(%s\$) missing from linker script\n", output_secname); ++#else /* FIXME: This block is untried. It exists to convey the intent, ++ should one decide to not require *(.foo\$) to appear in the linker ++ script. */ ++ { ++ lang_wild_statement_type *new = new_stat (lang_wild_statement, ++ &os->children); ++ new->section_name = xmalloc (strlen (output_secname) + 2); ++ sprintf (new->section_name, "%s\$", output_secname); ++ new->filename = NULL; ++ lang_list_init (&new->children); ++ l = new; ++ } ++#endif ++ ++ /* Link the input section in and we're done for now. ++ The sections still have to be sorted, but that has to wait until ++ all such sections have been processed by us. The sorting is done by ++ sort_sections. */ ++ wild_doit (&l->wild_statement.children, s, os, file); ++ ++ return true; ++} ++ ++static char * ++gld_${EMULATION_NAME}_get_script(isfile) ++ int *isfile; ++EOF ++# Scripts compiled in. ++# sed commands to quote an ld script as a C string. ++sc="-f ${srcdir}/emultempl/stringify.sed" ++ ++cat >>e${EMULATION_NAME}.c <> e${EMULATION_NAME}.c ++echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c ++sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c ++echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c ++sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c ++echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c ++sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c ++echo ' ; else return' >> e${EMULATION_NAME}.c ++sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c ++echo '; }' >> e${EMULATION_NAME}.c ++ ++cat >>e${EMULATION_NAME}.c <input_section.ifile->the_bfd->my_archive->filename, + (*rb)->input_section.ifile->the_bfd->my_archive->filename); + if (i != 0) + return i; + +- return strcmp ((*ra)->input_section.ifile->filename, ++ i = strcmp ((*ra)->input_section.ifile->filename, + (*rb)->input_section.ifile->filename); ++ if (i != 0) ++ return i; ++ /* the tail idata4/5 are the only ones without relocs to an ++ idata$6 section unless we are importing by ordinal, ++ so sort them to last to terminate the IAT ++ and HNT properly. if no reloc this one is import by ordinal ++ so we have to sort by section contents */ ++ ++ if ( ((*ra)->input_section.section->reloc_count + (*rb)->input_section.section->reloc_count) ) ++ { ++ i = (((*ra)->input_section.section->reloc_count > ++ (*rb)->input_section.section->reloc_count) ? -1 : 0); ++ if ( i != 0) ++ return i; ++ ++ return (((*ra)->input_section.section->reloc_count > ++ (*rb)->input_section.section->reloc_count) ? 0 : 1); ++ } ++ else ++ { ++ if ( (strcmp( (*ra)->input_section.section->name, ".idata$6") == 0) ) ++ return 0; /* don't sort .idata$6 or .idata$7 FIXME dlltool eliminate .idata$7 */ ++ ++ if (! bfd_get_section_contents ((*ra)->input_section.ifile->the_bfd, ++ (*ra)->input_section.section, &a_sec, (file_ptr) 0, (bfd_size_type)sizeof(a_sec))) ++ einfo ("%F%B: Can't read contents of section .idata: %E\n", ++ (*ra)->input_section.ifile->the_bfd); ++ ++ if (! bfd_get_section_contents ((*rb)->input_section.ifile->the_bfd, ++ (*rb)->input_section.section, &b_sec, (file_ptr) 0, (bfd_size_type)sizeof(b_sec) )) ++ einfo ("%F%B: Can't read contents of section .idata: %E\n", ++ (*rb)->input_section.ifile->the_bfd); ++ ++ i = ((a_sec < b_sec) ? -1 : 0); ++ if ( i != 0) ++ return i; ++ return ((a_sec < b_sec) ? 0 : 1); ++ } ++return 0; + } + + static int +@@ -462,8 +503,20 @@ sort_by_section_name (a, b) + { + lang_statement_union_type **ra = a; + lang_statement_union_type **rb = b; +- return strcmp ((*ra)->input_section.section->name, ++ int i; ++ i = strcmp ((*ra)->input_section.section->name, + (*rb)->input_section.section->name); ++/* this is a hack to make .stab and .stabstr last, so we don't have ++ to fix strip/objcopy for .reloc sections. ++ FIXME stripping images with a .rsrc section still needs to be fixed */ ++ if ( i != 0) ++ { ++ if ((strncmp ((*ra)->input_section.section->name, ".stab", 5) == 0) ++ && (strncmp ((*rb)->input_section.section->name, ".stab", 5) != 0)) ++ return 1; ++ return i; ++ } ++ return i; + } + + /* Subroutine of sort_sections to a contiguous subset of a list of sections. +diff -rup --new-file binutils-2.9.1/ld/genscripts.sh binutils-2.9.1/ld/genscripts.sh +--- binutils-2.9.1/ld/genscripts.sh Fri May 1 08:48:48 1998 ++++ binutils-2.9.1/ld/genscripts.sh Sun Aug 23 00:00:00 1998 +@@ -16,7 +16,9 @@ target=$4 + target_alias=$5 + DEFAULT_EMULATION=$6 + NATIVE_LIB_DIRS=$7 +-EMULATION_NAME=$8 ++LIB_PATH=$8 ++EMULATION_NAME=$9 ++shift + tool_lib=`echo ${libdir} | sed -e 's|/lib$||'`/${9-$target_alias}/lib + + # Include the emulation-specific parameters: +diff -rup --new-file binutils-2.9.1/ld/ld.info binutils-2.9.1/ld/ld.info +--- binutils-2.9.1/ld/ld.info Fri May 1 08:48:55 1998 ++++ binutils-2.9.1/ld/ld.info Wed Dec 31 17:00:00 1969 +@@ -1,75 +0,0 @@ +-This is Info file ld.info, produced by Makeinfo version 1.68 from the +-input file ./ld.texinfo. +- +-START-INFO-DIR-ENTRY +-* Ld: (ld). The GNU linker. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU linker LD. +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided also +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-Indirect: +-ld.info-1: 885 +-ld.info-2: 50016 +-ld.info-3: 95553 +-ld.info-4: 128011 +- +-Tag Table: +-(Indirect) +-Node: Top885 +-Node: Overview1391 +-Node: Invocation2504 +-Node: Options2912 +-Node: Environment40868 +-Node: Commands42256 +-Node: Scripts43603 +-Node: Expressions44701 +-Node: Integers45676 +-Node: Symbols46516 +-Node: Location Counter47262 +-Node: Operators48410 +-Node: Evaluation49321 +-Node: Assignment50016 +-Node: Arithmetic Functions53547 +-Node: Semicolons57465 +-Node: MEMORY57914 +-Node: SECTIONS61097 +-Node: Section Definition62716 +-Node: Section Placement64712 +-Node: Section Data Expressions70869 +-Node: Section Options74977 +-Node: Overlays79288 +-Node: PHDRS83074 +-Node: Entry Point87896 +-Node: Version Script89437 +-Node: Option Commands95553 +-Node: Machine Dependent102740 +-Node: H8/300103160 +-Node: i960103956 +-Node: BFD105624 +-Node: BFD outline107078 +-Node: BFD information loss108363 +-Node: Canonical format110871 +-Node: Reporting Bugs115217 +-Node: Bug Criteria115910 +-Node: Bug Reporting116604 +-Node: MRI123395 +-Node: Index128011 +- +-End Tag Table +diff -rup --new-file binutils-2.9.1/ld/ld.info-1 binutils-2.9.1/ld/ld.info-1 +--- binutils-2.9.1/ld/ld.info-1 Fri May 1 08:49:27 1998 ++++ binutils-2.9.1/ld/ld.info-1 Wed Dec 31 17:00:00 1969 +@@ -1,1181 +0,0 @@ +-This is Info file ld.info, produced by Makeinfo version 1.68 from the +-input file ./ld.texinfo. +- +-START-INFO-DIR-ENTRY +-* Ld: (ld). The GNU linker. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU linker LD. +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided also +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: ld.info, Node: Top, Next: Overview, Up: (dir) +- +-Using ld +-******** +- +- This file documents the GNU linker ld. +- +-* Menu: +- +-* Overview:: Overview +-* Invocation:: Invocation +-* Commands:: Command Language +- +-* Machine Dependent:: Machine Dependent Features +- +-* BFD:: BFD +- +-* Reporting Bugs:: Reporting Bugs +-* MRI:: MRI Compatible Script Files +-* Index:: Index +- +- +-File: ld.info, Node: Overview, Next: Invocation, Prev: Top, Up: Top +- +-Overview +-******** +- +- `ld' combines a number of object and archive files, relocates their +-data and ties up symbol references. Usually the last step in compiling +-a program is to run `ld'. +- +- `ld' accepts Linker Command Language files written in a superset of +-AT&T's Link Editor Command Language syntax, to provide explicit and +-total control over the linking process. +- +- This version of `ld' uses the general purpose BFD libraries to +-operate on object files. This allows `ld' to read, combine, and write +-object files in many different formats--for example, COFF or `a.out'. +-Different formats may be linked together to produce any available kind +-of object file. *Note BFD::, for more information. +- +- Aside from its flexibility, the GNU linker is more helpful than other +-linkers in providing diagnostic information. Many linkers abandon +-execution immediately upon encountering an error; whenever possible, +-`ld' continues executing, allowing you to identify other errors (or, in +-some cases, to get an output file in spite of the error). +- +- +-File: ld.info, Node: Invocation, Next: Commands, Prev: Overview, Up: Top +- +-Invocation +-********** +- +- The GNU linker `ld' is meant to cover a broad range of situations, +-and to be as compatible as possible with other linkers. As a result, +-you have many choices to control its behavior. +- +-* Menu: +- +-* Options:: Command Line Options +-* Environment:: Environment Variables +- +- +-File: ld.info, Node: Options, Next: Environment, Up: Invocation +- +-Command Line Options +-==================== +- +- The linker supports a plethora of command-line options, but in actual +-practice few of them are used in any particular context. For instance, +-a frequent use of `ld' is to link standard Unix object files on a +-standard, supported Unix system. On such a system, to link a file +-`hello.o': +- +- ld -o OUTPUT /lib/crt0.o hello.o -lc +- +- This tells `ld' to produce a file called OUTPUT as the result of +-linking the file `/lib/crt0.o' with `hello.o' and the library `libc.a', +-which will come from the standard search directories. (See the +-discussion of the `-l' option below.) +- +- The command-line options to `ld' may be specified in any order, and +-may be repeated at will. Repeating most options with a different +-argument will either have no further effect, or override prior +-occurrences (those further to the left on the command line) of that +-option. Options which may be meaningfully specified more than once are +-noted in the descriptions below. +- +- Non-option arguments are objects files which are to be linked +-together. They may follow, precede, or be mixed in with command-line +-options, except that an object file argument may not be placed between +-an option and its argument. +- +- Usually the linker is invoked with at least one object file, but you +-can specify other forms of binary input files using `-l', `-R', and the +-script command language. If *no* binary input files at all are +-specified, the linker does not produce any output, and issues the +-message `No input files'. +- +- If the linker can not recognize the format of an object file, it will +-assume that it is a linker script. A script specified in this way +-augments the main linker script used for the link (either the default +-linker script or the one specified by using `-T'). This feature +-permits the linker to link against a file which appears to be an object +-or an archive, but actually merely defines some symbol values, or uses +-`INPUT' or `GROUP' to load other objects. Note that specifying a +-script in this way should only be used to augment the main linker +-script; if you want to use some command that logically can only appear +-once, such as the `SECTIONS' or `MEMORY' command, you must replace the +-default linker script using the `-T' option. *Note Commands::. +- +- For options whose names are a single letter, option arguments must +-either follow the option letter without intervening whitespace, or be +-given as separate arguments immediately following the option that +-requires them. +- +- For options whose names are multiple letters, either one dash or two +-can precede the option name; for example, `--oformat' and `--oformat' +-are equivalent. Arguments to multiple-letter options must either be +-separated from the option name by an equals sign, or be given as +-separate arguments immediately following the option that requires them. +-For example, `--oformat srec' and `--oformat=srec' are equivalent. +-Unique abbreviations of the names of multiple-letter options are +-accepted. +- +-`-aKEYWORD' +- This option is supported for HP/UX compatibility. The KEYWORD +- argument must be one of the strings `archive', `shared', or +- `default'. `-aarchive' is functionally equivalent to `-Bstatic', +- and the other two keywords are functionally equivalent to +- `-Bdynamic'. This option may be used any number of times. +- +-`-AARCHITECTURE' +-`--architecture=ARCHITECTURE' +- In the current release of `ld', this option is useful only for the +- Intel 960 family of architectures. In that `ld' configuration, the +- ARCHITECTURE argument identifies the particular architecture in +- the 960 family, enabling some safeguards and modifying the +- archive-library search path. *Note `ld' and the Intel 960 family: +- i960, for details. +- +- Future releases of `ld' may support similar functionality for +- other architecture families. +- +-`-b INPUT-FORMAT' +-`--format=INPUT-FORMAT' +- `ld' may be configured to support more than one kind of object +- file. If your `ld' is configured this way, you can use the `-b' +- option to specify the binary format for input object files that +- follow this option on the command line. Even when `ld' is +- configured to support alternative object formats, you don't +- usually need to specify this, as `ld' should be configured to +- expect as a default input format the most usual format on each +- machine. INPUT-FORMAT is a text string, the name of a particular +- format supported by the BFD libraries. (You can list the +- available binary formats with `objdump -i'.) *Note BFD::. +- +- You may want to use this option if you are linking files with an +- unusual binary format. You can also use `-b' to switch formats +- explicitly (when linking object files of different formats), by +- including `-b INPUT-FORMAT' before each group of object files in a +- particular format. +- +- The default format is taken from the environment variable +- `GNUTARGET'. *Note Environment::. You can also define the input +- format from a script, using the command `TARGET'; see *Note Option +- Commands::. +- +-`-c MRI-COMMANDFILE' +-`--mri-script=MRI-COMMANDFILE' +- For compatibility with linkers produced by MRI, `ld' accepts script +- files written in an alternate, restricted command language, +- described in *Note MRI Compatible Script Files: MRI. Introduce +- MRI script files with the option `-c'; use the `-T' option to run +- linker scripts written in the general-purpose `ld' scripting +- language. If MRI-CMDFILE does not exist, `ld' looks for it in the +- directories specified by any `-L' options. +- +-`-d' +-`-dc' +-`-dp' +- These three options are equivalent; multiple forms are supported +- for compatibility with other linkers. They assign space to common +- symbols even if a relocatable output file is specified (with +- `-r'). The script command `FORCE_COMMON_ALLOCATION' has the same +- effect. *Note Option Commands::. +- +-`-e ENTRY' +-`--entry=ENTRY' +- Use ENTRY as the explicit symbol for beginning execution of your +- program, rather than the default entry point. *Note Entry Point::, +- for a discussion of defaults and other ways of specifying the +- entry point. +- +-`-E' +-`--export-dynamic' +- When creating a dynamically linked executable, add all symbols to +- the dynamic symbol table. The dynamic symbol table is the set of +- symbols which are visible from dynamic objects at run time. +- +- If you do not use this option, the dynamic symbol table will +- normally contain only those symbols which are referenced by some +- dynamic object mentioned in the link. +- +- If you use `dlopen' to load a dynamic object which needs to refer +- back to the symbols defined by the program, rather than some other +- dynamic object, then you will probably need to use this option when +- linking the program itself. +- +-`-f' +-`--auxiliary NAME' +- When creating an ELF shared object, set the internal DT_AUXILIARY +- field to the specified name. This tells the dynamic linker that +- the symbol table of the shared object should be used as an +- auxiliary filter on the symbol table of the shared object NAME. +- +- If you later link a program against this filter object, then, when +- you run the program, the dynamic linker will see the DT_AUXILIARY +- field. If the dynamic linker resolves any symbols from the filter +- object, it will first check whether there is a definition in the +- shared object NAME. If there is one, it will be used instead of +- the definition in the filter object. The shared object NAME need +- not exist. Thus the shared object NAME may be used to provide an +- alternative implementation of certain functions, perhaps for +- debugging or for machine specific performance. +- +- This option may be specified more than once. The DT_AUXILIARY +- entries will be created in the order in which they appear on the +- command line. +- +-`-F NAME' +-`--filter NAME' +- When creating an ELF shared object, set the internal DT_FILTER +- field to the specified name. This tells the dynamic linker that +- the symbol table of the shared object which is being created +- should be used as a filter on the symbol table of the shared +- object NAME. +- +- If you later link a program against this filter object, then, when +- you run the program, the dynamic linker will see the DT_FILTER +- field. The dynamic linker will resolve symbols according to the +- symbol table of the filter object as usual, but it will actually +- link to the definitions found in the shared object NAME. Thus the +- filter object can be used to select a subset of the symbols +- provided by the object NAME. +- +- Some older linkers used the `-F' option throughout a compilation +- toolchain for specifying object-file format for both input and +- output object files. The GNU linker uses other mechanisms for this +- purpose: the `-b', `--format', `--oformat' options, the `TARGET' +- command in linker scripts, and the `GNUTARGET' environment +- variable. The GNU linker will ignore the `-F' option when not +- creating an ELF shared object. +- +-`--force-exe-suffix' +- Make sure that an output file has a .exe suffix. +- +- If a successfully built fully linked output file does not have a +- `.exe' or `.dll' suffix, this option forces the linker to copy the +- output file to one of the same name with a `.exe' suffix. This +- option is useful when using unmodified Unix makefiles on a +- Microsoft Windows host, since some versions of Windows won't run +- an image unless it ends in a `.exe' suffix. +- +-`-g' +- Ignored. Provided for compatibility with other tools. +- +-`-GVALUE' +-`--gpsize=VALUE' +- Set the maximum size of objects to be optimized using the GP +- register to SIZE. This is only meaningful for object file formats +- such as MIPS ECOFF which supports putting large and small objects +- into different sections. This is ignored for other object file +- formats. +- +-`-hNAME' +-`-soname=NAME' +- When creating an ELF shared object, set the internal DT_SONAME +- field to the specified name. When an executable is linked with a +- shared object which has a DT_SONAME field, then when the +- executable is run the dynamic linker will attempt to load the +- shared object specified by the DT_SONAME field rather than the +- using the file name given to the linker. +- +-`-i' +- Perform an incremental link (same as option `-r'). +- +-`-lARCHIVE' +-`--library=ARCHIVE' +- Add archive file ARCHIVE to the list of files to link. This +- option may be used any number of times. `ld' will search its +- path-list for occurrences of `libARCHIVE.a' for every ARCHIVE +- specified. +- +- On systems which support shared libraries, `ld' may also search for +- libraries with extensions other than `.a'. Specifically, on ELF +- and SunOS systems, `ld' will search a directory for a library with +- an extension of `.so' before searching for one with an extension of +- `.a'. By convention, a `.so' extension indicates a shared library. +- +- The linker will search an archive only once, at the location where +- it is specified on the command line. If the archive defines a +- symbol which was undefined in some object which appeared before +- the archive on the command line, the linker will include the +- appropriate file(s) from the archive. However, an undefined +- symbol in an object appearing later on the command line will not +- cause the linker to search the archive again. +- +- See the `-(' option for a way to force the linker to search +- archives multiple times. +- +- You may list the same archive multiple times on the command line. +- +- This type of archive searching is standard for Unix linkers. +- However, if you are using `ld' on AIX, note that it is different +- from the behaviour of the AIX linker. +- +-`-LSEARCHDIR' +-`--library-path=SEARCHDIR' +- Add path SEARCHDIR to the list of paths that `ld' will search for +- archive libraries and `ld' control scripts. You may use this +- option any number of times. The directories are searched in the +- order in which they are specified on the command line. +- Directories specified on the command line are searched before the +- default directories. All `-L' options apply to all `-l' options, +- regardless of the order in which the options appear. +- +- The default set of paths searched (without being specified with +- `-L') depends on which emulation mode `ld' is using, and in some +- cases also on how it was configured. *Note Environment::. +- +- The paths can also be specified in a link script with the +- `SEARCH_DIR' command. Directories specified this way are searched +- at the point in which the linker script appears in the command +- line. +- +-`-mEMULATION' +- Emulate the EMULATION linker. You can list the available +- emulations with the `--verbose' or `-V' options. +- +- If the `-m' option is not used, the emulation is taken from the +- `LDEMULATION' environment variable, if that is defined. +- +- Otherwise, the default emulation depends upon how the linker was +- configured. +- +-`-M' +-`--print-map' +- Print a link map to the standard output. A link map provides +- information about the link, including the following: +- +- * Where object files and symbols are mapped into memory. +- +- * How common symbols are allocated. +- +- * All archive members included in the link, with a mention of +- the symbol which caused the archive member to be brought in. +- +-`-n' +-`--nmagic' +- Set the text segment to be read only, and mark the output as +- `NMAGIC' if possible. +- +-`-N' +-`--omagic' +- Set the text and data sections to be readable and writable. Also, +- do not page-align the data segment. If the output format supports +- Unix style magic numbers, mark the output as `OMAGIC'. +- +-`-o OUTPUT' +-`--output=OUTPUT' +- Use OUTPUT as the name for the program produced by `ld'; if this +- option is not specified, the name `a.out' is used by default. The +- script command `OUTPUT' can also specify the output file name. +- +-`-r' +-`--relocateable' +- Generate relocatable output--i.e., generate an output file that +- can in turn serve as input to `ld'. This is often called "partial +- linking". As a side effect, in environments that support standard +- Unix magic numbers, this option also sets the output file's magic +- number to `OMAGIC'. If this option is not specified, an absolute +- file is produced. When linking C++ programs, this option *will +- not* resolve references to constructors; to do that, use `-Ur'. +- +- This option does the same thing as `-i'. +- +-`-R FILENAME' +-`--just-symbols=FILENAME' +- Read symbol names and their addresses from FILENAME, but do not +- relocate it or include it in the output. This allows your output +- file to refer symbolically to absolute locations of memory defined +- in other programs. You may use this option more than once. +- +- For compatibility with other ELF linkers, if the `-R' option is +- followed by a directory name, rather than a file name, it is +- treated as the `-rpath' option. +- +-`-s' +-`--strip-all' +- Omit all symbol information from the output file. +- +-`-S' +-`--strip-debug' +- Omit debugger symbol information (but not all symbols) from the +- output file. +- +-`-t' +-`--trace' +- Print the names of the input files as `ld' processes them. +- +-`-T COMMANDFILE' +-`--script=COMMANDFILE' +- Read link commands from the file COMMANDFILE. These commands +- replace `ld''s default link script (rather than adding to it), so +- COMMANDFILE must specify everything necessary to describe the +- target format. You must use this option if you want to use a +- command which can only appear once in a linker script, such as the +- `SECTIONS' or `MEMORY' command. *Note Commands::. If COMMANDFILE +- does not exist, `ld' looks for it in the directories specified by +- any preceding `-L' options. Multiple `-T' options accumulate. +- +-`-u SYMBOL' +-`--undefined=SYMBOL' +- Force SYMBOL to be entered in the output file as an undefined +- symbol. Doing this may, for example, trigger linking of +- additional modules from standard libraries. `-u' may be repeated +- with different option arguments to enter additional undefined +- symbols. +- +-`-v' +-`--version' +-`-V' +- Display the version number for `ld'. The `-V' option also lists +- the supported emulations. +- +-`-x' +-`--discard-all' +- Delete all local symbols. +- +-`-X' +-`--discard-locals' +- Delete all temporary local symbols. For most targets, this is all +- local symbols whose names begin with `L'. +- +-`-y SYMBOL' +-`--trace-symbol=SYMBOL' +- Print the name of each linked file in which SYMBOL appears. This +- option may be given any number of times. On many systems it is +- necessary to prepend an underscore. +- +- This option is useful when you have an undefined symbol in your +- link but don't know where the reference is coming from. +- +-`-Y PATH' +- Add PATH to the default library search path. This option exists +- for Solaris compatibility. +- +-`-z KEYWORD' +- This option is ignored for Solaris compatibility. +- +-`-( ARCHIVES -)' +-`--start-group ARCHIVES --end-group' +- The ARCHIVES should be a list of archive files. They may be +- either explicit file names, or `-l' options. +- +- The specified archives are searched repeatedly until no new +- undefined references are created. Normally, an archive is +- searched only once in the order that it is specified on the +- command line. If a symbol in that archive is needed to resolve an +- undefined symbol referred to by an object in an archive that +- appears later on the command line, the linker would not be able to +- resolve that reference. By grouping the archives, they all be +- searched repeatedly until all possible references are resolved. +- +- Using this option has a significant performance cost. It is best +- to use it only when there are unavoidable circular references +- between two or more archives. +- +-`-assert KEYWORD' +- This option is ignored for SunOS compatibility. +- +-`-Bdynamic' +-`-dy' +-`-call_shared' +- Link against dynamic libraries. This is only meaningful on +- platforms for which shared libraries are supported. This option +- is normally the default on such platforms. The different variants +- of this option are for compatibility with various systems. You +- may use this option multiple times on the command line: it affects +- library searching for `-l' options which follow it. +- +-`-Bstatic' +-`-dn' +-`-non_shared' +-`-static' +- Do not link against shared libraries. This is only meaningful on +- platforms for which shared libraries are supported. The different +- variants of this option are for compatibility with various +- systems. You may use this option multiple times on the command +- line: it affects library searching for `-l' options which follow +- it. +- +-`-Bsymbolic' +- When creating a shared library, bind references to global symbols +- to the definition within the shared library, if any. Normally, it +- is possible for a program linked against a shared library to +- override the definition within the shared library. This option is +- only meaningful on ELF platforms which support shared libraries. +- +-`--cref' +- Output a cross reference table. If a linker map file is being +- generated, the cross reference table is printed to the map file. +- Otherwise, it is printed on the standard output. +- +- The format of the table is intentionally simple, so that it may be +- easily processed by a script if necessary. The symbols are +- printed out, sorted by name. For each symbol, a list of file +- names is given. If the symbol is defined, the first file listed +- is the location of the definition. The remaining files contain +- references to the symbol. +- +-`--defsym SYMBOL=EXPRESSION' +- Create a global symbol in the output file, containing the absolute +- address given by EXPRESSION. You may use this option as many +- times as necessary to define multiple symbols in the command line. +- A limited form of arithmetic is supported for the EXPRESSION in +- this context: you may give a hexadecimal constant or the name of +- an existing symbol, or use `+' and `-' to add or subtract +- hexadecimal constants or symbols. If you need more elaborate +- expressions, consider using the linker command language from a +- script (*note Assignment: Symbol Definitions: Assignment.). +- *Note:* there should be no white space between SYMBOL, the equals +- sign ("<=>"), and EXPRESSION. +- +-`--dynamic-linker FILE' +- Set the name of the dynamic linker. This is only meaningful when +- generating dynamically linked ELF executables. The default dynamic +- linker is normally correct; don't use this unless you know what +- you are doing. +- +-`-EB' +- Link big-endian objects. This affects the default output format. +- +-`-EL' +- Link little-endian objects. This affects the default output +- format. +- +-`--embedded-relocs' +- This option is only meaningful when linking MIPS embedded PIC code, +- generated by the -membedded-pic option to the GNU compiler and +- assembler. It causes the linker to create a table which may be +- used at runtime to relocate any data which was statically +- initialized to pointer values. See the code in testsuite/ld-empic +- for details. +- +-`--help' +- Print a summary of the command-line options on the standard output +- and exit. +- +-`-Map MAPFILE' +- Print a link map to the file MAPFILE. See the description of the +- `-M' option, above. +- +-`--no-keep-memory' +- `ld' normally optimizes for speed over memory usage by caching the +- symbol tables of input files in memory. This option tells `ld' to +- instead optimize for memory usage, by rereading the symbol tables +- as necessary. This may be required if `ld' runs out of memory +- space while linking a large executable. +- +-`--no-warn-mismatch' +- Normally `ld' will give an error if you try to link together input +- files that are mismatched for some reason, perhaps because they +- have been compiled for different processors or for different +- endiannesses. This option tells `ld' that it should silently +- permit such possible errors. This option should only be used with +- care, in cases when you have taken some special action that +- ensures that the linker errors are inappropriate. +- +-`--no-whole-archive' +- Turn off the effect of the `--whole-archive' option for subsequent +- archive files. +- +-`--noinhibit-exec' +- Retain the executable output file whenever it is still usable. +- Normally, the linker will not produce an output file if it +- encounters errors during the link process; it exits without +- writing an output file when it issues any error whatsoever. +- +-`--oformat OUTPUT-FORMAT' +- `ld' may be configured to support more than one kind of object +- file. If your `ld' is configured this way, you can use the +- `--oformat' option to specify the binary format for the output +- object file. Even when `ld' is configured to support alternative +- object formats, you don't usually need to specify this, as `ld' +- should be configured to produce as a default output format the most +- usual format on each machine. OUTPUT-FORMAT is a text string, the +- name of a particular format supported by the BFD libraries. (You +- can list the available binary formats with `objdump -i'.) The +- script command `OUTPUT_FORMAT' can also specify the output format, +- but this option overrides it. *Note BFD::. +- +-`-qmagic' +- This option is ignored for Linux compatibility. +- +-`-Qy' +- This option is ignored for SVR4 compatibility. +- +-`--relax' +- An option with machine dependent effects. This option is only +- supported on a few targets. *Note `ld' and the H8/300: H8/300. +- *Note `ld' and the Intel 960 family: i960. +- +- On some platforms, the `--relax' option performs global +- optimizations that become possible when the linker resolves +- addressing in the program, such as relaxing address modes and +- synthesizing new instructions in the output object file. +- +- On platforms where this is not supported, `--relax' is accepted, +- but ignored. +- +-`--retain-symbols-file FILENAME' +- Retain *only* the symbols listed in the file FILENAME, discarding +- all others. FILENAME is simply a flat file, with one symbol name +- per line. This option is especially useful in environments (such +- as VxWorks) where a large global symbol table is accumulated +- gradually, to conserve run-time memory. +- +- `--retain-symbols-file' does *not* discard undefined symbols, or +- symbols needed for relocations. +- +- You may only specify `--retain-symbols-file' once in the command +- line. It overrides `-s' and `-S'. +- +-`-rpath DIR' +- Add a directory to the runtime library search path. This is used +- when linking an ELF executable with shared objects. All `-rpath' +- arguments are concatenated and passed to the runtime linker, which +- uses them to locate shared objects at runtime. The `-rpath' +- option is also used when locating shared objects which are needed +- by shared objects explicitly included in the link; see the +- description of the `-rpath-link' option. If `-rpath' is not used +- when linking an ELF executable, the contents of the environment +- variable `LD_RUN_PATH' will be used if it is defined. +- +- The `-rpath' option may also be used on SunOS. By default, on +- SunOS, the linker will form a runtime search patch out of all the +- `-L' options it is given. If a `-rpath' option is used, the +- runtime search path will be formed exclusively using the `-rpath' +- options, ignoring the `-L' options. This can be useful when using +- gcc, which adds many `-L' options which may be on NFS mounted +- filesystems. +- +- For compatibility with other ELF linkers, if the `-R' option is +- followed by a directory name, rather than a file name, it is +- treated as the `-rpath' option. +- +-`-rpath-link DIR' +- When using ELF or SunOS, one shared library may require another. +- This happens when an `ld -shared' link includes a shared library +- as one of the input files. +- +- When the linker encounters such a dependency when doing a +- non-shared, non-relocateable link, it will automatically try to +- locate the required shared library and include it in the link, if +- it is not included explicitly. In such a case, the `-rpath-link' +- option specifies the first set of directories to search. The +- `-rpath-link' option may specify a sequence of directory names +- either by specifying a list of names separated by colons, or by +- appearing multiple times. +- +- The linker uses the following search paths to locate required +- shared libraries. +- 1. Any directories specified by `-rpath-link' options. +- +- 2. Any directories specified by `-rpath' options. The difference +- between `-rpath' and `-rpath-link' is that directories +- specified by `-rpath' options are included in the executable +- and used at runtime, whereas the `-rpath-link' option is only +- effective at link time. +- +- 3. On an ELF system, if the `-rpath' and `rpath-link' options +- were not used, search the contents of the environment variable +- `LD_RUN_PATH'. +- +- 4. On SunOS, if the `-rpath' option was not used, search any +- directories specified using `-L' options. +- +- 5. For a native linker, the contents of the environment variable +- `LD_LIBRARY_PATH'. +- +- 6. The default directories, normally `/lib' and `/usr/lib'. +- +- If the required shared library is not found, the linker will issue +- a warning and continue with the link. +- +-`-shared' +-`-Bshareable' +- Create a shared library. This is currently only supported on ELF, +- XCOFF and SunOS platforms. On SunOS, the linker will +- automatically create a shared library if the `-e' option is not +- used and there are undefined symbols in the link. +- +-`--sort-common' +- This option tells `ld' to sort the common symbols by size when it +- places them in the appropriate output sections. First come all +- the one byte symbols, then all the two bytes, then all the four +- bytes, and then everything else. This is to prevent gaps between +- symbols due to alignment constraints. +- +-`--split-by-file' +- Similar to `--split-by-reloc' but creates a new output section for +- each input file. +- +-`--split-by-reloc COUNT' +- Trys to creates extra sections in the output file so that no single +- output section in the file contains more than COUNT relocations. +- This is useful when generating huge relocatable for downloading +- into certain real time kernels with the COFF object file format; +- since COFF cannot represent more than 65535 relocations in a +- single section. Note that this will fail to work with object file +- formats which do not support arbitrary sections. The linker will +- not split up individual input sections for redistribution, so if a +- single input section contains more than COUNT relocations one +- output section will contain that many relocations. +- +-`--stats' +- Compute and display statistics about the operation of the linker, +- such as execution time and memory usage. +- +-`--traditional-format' +- For some targets, the output of `ld' is different in some ways from +- the output of some existing linker. This switch requests `ld' to +- use the traditional format instead. +- +- For example, on SunOS, `ld' combines duplicate entries in the +- symbol string table. This can reduce the size of an output file +- with full debugging information by over 30 percent. +- Unfortunately, the SunOS `dbx' program can not read the resulting +- program (`gdb' has no trouble). The `--traditional-format' switch +- tells `ld' to not combine duplicate entries. +- +-`-Tbss ORG' +-`-Tdata ORG' +-`-Ttext ORG' +- Use ORG as the starting address for--respectively--the `bss', +- `data', or the `text' segment of the output file. ORG must be a +- single hexadecimal integer; for compatibility with other linkers, +- you may omit the leading `0x' usually associated with hexadecimal +- values. +- +-`-Ur' +- For anything other than C++ programs, this option is equivalent to +- `-r': it generates relocatable output--i.e., an output file that +- can in turn serve as input to `ld'. When linking C++ programs, +- `-Ur' *does* resolve references to constructors, unlike `-r'. It +- does not work to use `-Ur' on files that were themselves linked +- with `-Ur'; once the constructor table has been built, it cannot +- be added to. Use `-Ur' only for the last partial link, and `-r' +- for the others. +- +-`--verbose' +- Display the version number for `ld' and list the linker emulations +- supported. Display which input files can and cannot be opened. +- Display the linker script if using a default builtin script. +- +-`--version-script=VERSION-SCRIPTFILE' +- Specify the name of a version script to the linker. This is +- typically used when creating shared libraries to specify +- additional information about the version heirarchy for the library +- being created. This option is only meaningful on ELF platforms +- which support shared libraries. *Note Version Script::. +- +-`--warn-common' +- Warn when a common symbol is combined with another common symbol +- or with a symbol definition. Unix linkers allow this somewhat +- sloppy practice, but linkers on some other operating systems do +- not. This option allows you to find potential problems from +- combining global symbols. Unfortunately, some C libraries use +- this practice, so you may get some warnings about symbols in the +- libraries as well as in your programs. +- +- There are three kinds of global symbols, illustrated here by C +- examples: +- +- `int i = 1;' +- A definition, which goes in the initialized data section of +- the output file. +- +- `extern int i;' +- An undefined reference, which does not allocate space. There +- must be either a definition or a common symbol for the +- variable somewhere. +- +- `int i;' +- A common symbol. If there are only (one or more) common +- symbols for a variable, it goes in the uninitialized data +- area of the output file. The linker merges multiple common +- symbols for the same variable into a single symbol. If they +- are of different sizes, it picks the largest size. The +- linker turns a common symbol into a declaration, if there is +- a definition of the same variable. +- +- The `--warn-common' option can produce five kinds of warnings. +- Each warning consists of a pair of lines: the first describes the +- symbol just encountered, and the second describes the previous +- symbol encountered with the same name. One or both of the two +- symbols will be a common symbol. +- +- 1. Turning a common symbol into a reference, because there is +- already a definition for the symbol. +- FILE(SECTION): warning: common of `SYMBOL' +- overridden by definition +- FILE(SECTION): warning: defined here +- +- 2. Turning a common symbol into a reference, because a later +- definition for the symbol is encountered. This is the same +- as the previous case, except that the symbols are encountered +- in a different order. +- FILE(SECTION): warning: definition of `SYMBOL' +- overriding common +- FILE(SECTION): warning: common is here +- +- 3. Merging a common symbol with a previous same-sized common +- symbol. +- FILE(SECTION): warning: multiple common +- of `SYMBOL' +- FILE(SECTION): warning: previous common is here +- +- 4. Merging a common symbol with a previous larger common symbol. +- FILE(SECTION): warning: common of `SYMBOL' +- overridden by larger common +- FILE(SECTION): warning: larger common is here +- +- 5. Merging a common symbol with a previous smaller common +- symbol. This is the same as the previous case, except that +- the symbols are encountered in a different order. +- FILE(SECTION): warning: common of `SYMBOL' +- overriding smaller common +- FILE(SECTION): warning: smaller common is here +- +-`--warn-constructors' +- Warn if any global constructors are used. This is only useful for +- a few object file formats. For formats like COFF or ELF, the +- linker can not detect the use of global constructors. +- +-`--warn-multiple-gp' +- Warn if multiple global pointer values are required in the output +- file. This is only meaningful for certain processors, such as the +- Alpha. Specifically, some processors put large-valued constants +- in a special section. A special register (the global pointer) +- points into the middle of this section, so that constants can be +- loaded efficiently via a base-register relative addressing mode. +- Since the offset in base-register relative mode is fixed and +- relatively small (e.g., 16 bits), this limits the maximum size of +- the constant pool. Thus, in large programs, it is often necessary +- to use multiple global pointer values in order to be able to +- address all possible constants. This option causes a warning to +- be issued whenever this case occurs. +- +-`--warn-once' +- Only warn once for each undefined symbol, rather than once per +- module which refers to it. +- +-`--warn-section-align' +- Warn if the address of an output section is changed because of +- alignment. Typically, the alignment will be set by an input +- section. The address will only be changed if it not explicitly +- specified; that is, if the `SECTIONS' command does not specify a +- start address for the section (*note SECTIONS::.). +- +-`--whole-archive' +- For each archive mentioned on the command line after the +- `--whole-archive' option, include every object file in the archive +- in the link, rather than searching the archive for the required +- object files. This is normally used to turn an archive file into +- a shared library, forcing every object to be included in the +- resulting shared library. This option may be used more than once. +- +-`--wrap SYMBOL' +- Use a wrapper function for SYMBOL. Any undefined reference to +- SYMBOL will be resolved to `__wrap_SYMBOL'. Any undefined +- reference to `__real_SYMBOL' will be resolved to SYMBOL. +- +- This can be used to provide a wrapper for a system function. The +- wrapper function should be called `__wrap_SYMBOL'. If it wishes +- to call the system function, it should call `__real_SYMBOL'. +- +- Here is a trivial example: +- +- void * +- __wrap_malloc (int c) +- { +- printf ("malloc called with %ld\n", c); +- return __real_malloc (c); +- } +- +- If you link other code with this file using `--wrap malloc', then +- all calls to `malloc' will call the function `__wrap_malloc' +- instead. The call to `__real_malloc' in `__wrap_malloc' will call +- the real `malloc' function. +- +- You may wish to provide a `__real_malloc' function as well, so that +- links without the `--wrap' option will succeed. If you do this, +- you should not put the definition of `__real_malloc' in the same +- file as `__wrap_malloc'; if you do, the assembler may resolve the +- call before the linker has a chance to wrap it to `malloc'. +- +- +-File: ld.info, Node: Environment, Prev: Options, Up: Invocation +- +-Environment Variables +-===================== +- +- You can change the behavior of `ld' with the environment variables +-`GNUTARGET' and `LDEMULATION'. +- +- `GNUTARGET' determines the input-file object format if you don't use +-`-b' (or its synonym `--format'). Its value should be one of the BFD +-names for an input format (*note BFD::.). If there is no `GNUTARGET' +-in the environment, `ld' uses the natural format of the target. If +-`GNUTARGET' is set to `default' then BFD attempts to discover the input +-format by examining binary input files; this method often succeeds, but +-there are potential ambiguities, since there is no method of ensuring +-that the magic number used to specify object-file formats is unique. +-However, the configuration procedure for BFD on each system places the +-conventional format for that system first in the search-list, so +-ambiguities are resolved in favor of convention. +- +- `LDEMULATION' determines the default emulation if you don't use the +-`-m' option. The emulation can affect various aspects of linker +-behaviour, particularly the default linker script. You can list the +-available emulations with the `--verbose' or `-V' options. If the `-m' +-option is not used, and the `LDEMULATION' environment variable is not +-defined, the default emulation depends upon how the linker was +-configured. +- +- +-File: ld.info, Node: Commands, Next: Machine Dependent, Prev: Invocation, Up: Top +- +-Command Language +-**************** +- +- The command language provides explicit control over the link process, +-allowing complete specification of the mapping between the linker's +-input files and its output. It controls: +- * input files +- +- * file formats +- +- * output file layout +- +- * addresses of sections +- +- * placement of common blocks +- +- You may supply a command file (also known as a linker script) to the +-linker either explicitly through the `-T' option, or implicitly as an +-ordinary file. Normally you should use the `-T' option. An implicit +-linker script should only be used when you want to augment, rather than +-replace, the default linker script; typically an implicit linker script +-would consist only of `INPUT' or `GROUP' commands. +- +- If the linker opens a file which it cannot recognize as a supported +-object or archive format, nor as a linker script, it reports an error. +- +-* Menu: +- +-* Scripts:: Linker Scripts +-* Expressions:: Expressions +-* MEMORY:: MEMORY Command +-* SECTIONS:: SECTIONS Command +-* PHDRS:: PHDRS Command +-* Entry Point:: The Entry Point +-* Version Script:: Version Script +-* Option Commands:: Option Commands +- +- +-File: ld.info, Node: Scripts, Next: Expressions, Up: Commands +- +-Linker Scripts +-============== +- +- The `ld' command language is a collection of statements; some are +-simple keywords setting a particular option, some are used to select and +-group input files or name output files; and two statement types have a +-fundamental and pervasive impact on the linking process. +- +- The most fundamental command of the `ld' command language is the +-`SECTIONS' command (*note SECTIONS::.). Every meaningful command +-script must have a `SECTIONS' command: it specifies a "picture" of the +-output file's layout, in varying degrees of detail. No other command +-is required in all cases. +- +- The `MEMORY' command complements `SECTIONS' by describing the +-available memory in the target architecture. This command is optional; +-if you don't use a `MEMORY' command, `ld' assumes sufficient memory is +-available in a contiguous block for all output. *Note MEMORY::. +- +- You may include comments in linker scripts just as in C: delimited +-by `/*' and `*/'. As in C, comments are syntactically equivalent to +-whitespace. +- +- +-File: ld.info, Node: Expressions, Next: MEMORY, Prev: Scripts, Up: Commands +- +-Expressions +-=========== +- +- Many useful commands involve arithmetic expressions. The syntax for +-expressions in the command language is identical to that of C +-expressions, with the following features: +- * All expressions evaluated as integers and are of "long" or +- "unsigned long" type. +- +- * All constants are integers. +- +- * All of the C arithmetic operators are provided. +- +- * You may reference, define, and create global variables. +- +- * You may call special purpose built-in functions. +- +-* Menu: +- +-* Integers:: Integers +-* Symbols:: Symbol Names +-* Location Counter:: The Location Counter +-* Operators:: Operators +-* Evaluation:: Evaluation +-* Assignment:: Assignment: Defining Symbols +-* Arithmetic Functions:: Built-In Functions +-* Semicolons:: Semicolon Usage +- +- +-File: ld.info, Node: Integers, Next: Symbols, Up: Expressions +- +-Integers +--------- +- +- An octal integer is `0' followed by zero or more of the octal digits +-(`01234567'). +- _as_octal = 0157255; +- +- A decimal integer starts with a non-zero digit followed by zero or +-more digits (`0123456789'). +- _as_decimal = 57005; +- +- A hexadecimal integer is `0x' or `0X' followed by one or more +-hexadecimal digits chosen from `0123456789abcdefABCDEF'. +- _as_hex = 0xdead; +- +- To write a negative integer, use the prefix operator `-' (*note +-Operators::.). +- _as_neg = -57005; +- +- Additionally the suffixes `K' and `M' may be used to scale a +-constant by `1024' or `1024*1024' respectively. For example, the +-following all refer to the same quantity: +- +- _fourk_1 = 4K; +- _fourk_2 = 4096; +- _fourk_3 = 0x1000; +- +- +-File: ld.info, Node: Symbols, Next: Location Counter, Prev: Integers, Up: Expressions +- +-Symbol Names +------------- +- +- Unless quoted, symbol names start with a letter, underscore, or point +-and may include any letters, underscores, digits, points, and hyphens. +-Unquoted symbol names must not conflict with any keywords. You can +-specify a symbol which contains odd characters or has the same name as +-a keyword, by surrounding the symbol name in double quotes: +- "SECTION" = 9; +- "with a space" = "also with a space" + 10; +- +- Since symbols can contain many non-alphabetic characters, it is +-safest to delimit symbols with spaces. For example, `A-B' is one +-symbol, whereas `A - B' is an expression involving subtraction. +- +- +-File: ld.info, Node: Location Counter, Next: Operators, Prev: Symbols, Up: Expressions +- +-The Location Counter +--------------------- +- +- The special linker variable "dot" `.' always contains the current +-output location counter. Since the `.' always refers to a location in +-an output section, it must always appear in an expression within a +-`SECTIONS' command. The `.' symbol may appear anywhere that an ordinary +-symbol is allowed in an expression, but its assignments have a side +-effect. Assigning a value to the `.' symbol will cause the location +-counter to be moved. This may be used to create holes in the output +-section. The location counter may never be moved backwards. +- SECTIONS +- { +- output : +- { +- file1(.text) +- . = . + 1000; +- file2(.text) +- . += 1000; +- file3(.text) +- } = 0x1234; +- } +- +-In the previous example, `file1' is located at the beginning of the +-output section, then there is a 1000 byte gap. Then `file2' appears, +-also with a 1000 byte gap following before `file3' is loaded. The +-notation `= 0x1234' specifies what data to write in the gaps (*note +-Section Options::.). +- +- +-File: ld.info, Node: Operators, Next: Evaluation, Prev: Location Counter, Up: Expressions +- +-Operators +---------- +- +- The linker recognizes the standard C set of arithmetic operators, +-with the standard bindings and precedence levels: +- precedence associativity Operators Notes +- (highest) +- 1 left ! - ~ (1) +- 2 left * / % +- 3 left + - +- 4 left >> << +- 5 left == != > < <= >= +- 6 left & +- 7 left | +- 8 left && +- 9 left || +- 10 right ? : +- 11 right &= += -= *= /= (2) +- (lowest) +- Notes: (1) Prefix operators (2) *Note Assignment::. +- +- +-File: ld.info, Node: Evaluation, Next: Assignment, Prev: Operators, Up: Expressions +- +-Evaluation +----------- +- +- The linker uses "lazy evaluation" for expressions; it only calculates +-an expression when absolutely necessary. The linker needs the value of +-the start address, and the lengths of memory regions, in order to do any +-linking at all; these values are computed as soon as possible when the +-linker reads in the command file. However, other values (such as symbol +-values) are not known or needed until after storage allocation. Such +-values are evaluated later, when other information (such as the sizes of +-output sections) is available for use in the symbol assignment +-expression. +- +diff -rup --new-file binutils-2.9.1/ld/ld.info-2 binutils-2.9.1/ld/ld.info-2 +--- binutils-2.9.1/ld/ld.info-2 Fri May 1 08:49:27 1998 ++++ binutils-2.9.1/ld/ld.info-2 Wed Dec 31 17:00:00 1969 +@@ -1,1189 +0,0 @@ +-This is Info file ld.info, produced by Makeinfo version 1.68 from the +-input file ./ld.texinfo. +- +-START-INFO-DIR-ENTRY +-* Ld: (ld). The GNU linker. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU linker LD. +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided also +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: ld.info, Node: Assignment, Next: Arithmetic Functions, Prev: Evaluation, Up: Expressions +- +-Assignment: Defining Symbols +----------------------------- +- +- You may create global symbols, and assign values (addresses) to +-global symbols, using any of the C assignment operators: +- +-`SYMBOL = EXPRESSION ;' +-`SYMBOL &= EXPRESSION ;' +-`SYMBOL += EXPRESSION ;' +-`SYMBOL -= EXPRESSION ;' +-`SYMBOL *= EXPRESSION ;' +-`SYMBOL /= EXPRESSION ;' +- Two things distinguish assignment from other operators in `ld' +-expressions. +- * Assignment may only be used at the root of an expression; `a=b+3;' +- is allowed, but `a+b=3;' is an error. +- +- * You must place a trailing semicolon ("<;>") at the end of an +- assignment statement. +- +- Assignment statements may appear: +- * as commands in their own right in an `ld' script; or +- +- * as independent statements within a `SECTIONS' command; or +- +- * as part of the contents of a section definition in a `SECTIONS' +- command. +- +- The first two cases are equivalent in effect--both define a symbol +-with an absolute address. The last case defines a symbol whose address +-is relative to a particular section (*note SECTIONS::.). +- +- When a linker expression is evaluated and assigned to a variable, it +-is given either an absolute or a relocatable type. An absolute +-expression type is one in which the symbol contains the value that it +-will have in the output file; a relocatable expression type is one in +-which the value is expressed as a fixed offset from the base of a +-section. +- +- The type of the expression is controlled by its position in the +-script file. A symbol assigned within a section definition is created +-relative to the base of the section; a symbol assigned in any other +-place is created as an absolute symbol. Since a symbol created within a +-section definition is relative to the base of the section, it will +-remain relocatable if relocatable output is requested. A symbol may be +-created with an absolute value even when assigned to within a section +-definition by using the absolute assignment function `ABSOLUTE'. For +-example, to create an absolute symbol whose address is the last byte of +-an output section named `.data': +- SECTIONS{ ... +- .data : +- { +- *(.data) +- _edata = ABSOLUTE(.) ; +- } +- ... } +- +- The linker tries to put off the evaluation of an assignment until all +-the terms in the source expression are known (*note Evaluation::.). For +-instance, the sizes of sections cannot be known until after allocation, +-so assignments dependent upon these are not performed until after +-allocation. Some expressions, such as those depending upon the location +-counter "dot", `.' must be evaluated during allocation. If the result +-of an expression is required, but the value is not available, then an +-error results. For example, a script like the following +- SECTIONS { ... +- text 9+this_isnt_constant : +- { ... +- } +- ... } +- +-will cause the error message "`Non constant expression for initial +-address'". +- +- In some cases, it is desirable for a linker script to define a symbol +-only if it is referenced, and only if it is not defined by any object +-included in the link. For example, traditional linkers defined the +-symbol `etext'. However, ANSI C requires that the user be able to use +-`etext' as a function name without encountering an error. The +-`PROVIDE' keyword may be used to define a symbol, such as `etext', only +-if it is referenced but not defined. The syntax is `PROVIDE(SYMBOL = +-EXPRESSION)'. +- +- +-File: ld.info, Node: Arithmetic Functions, Next: Semicolons, Prev: Assignment, Up: Expressions +- +-Arithmetic Functions +--------------------- +- +- The command language includes a number of built-in functions for use +-in link script expressions. +-`ABSOLUTE(EXP)' +- Return the absolute (non-relocatable, as opposed to non-negative) +- value of the expression EXP. Primarily useful to assign an +- absolute value to a symbol within a section definition, where +- symbol values are normally section-relative. +- +-`ADDR(SECTION)' +- Return the absolute address of the named SECTION. Your script must +- previously have defined the location of that section. In the +- following example, `symbol_1' and `symbol_2' are assigned identical +- values: +- SECTIONS{ ... +- .output1 : +- { +- start_of_output_1 = ABSOLUTE(.); +- ... +- } +- .output : +- { +- symbol_1 = ADDR(.output1); +- symbol_2 = start_of_output_1; +- } +- ... } +- +-`LOADADDR(SECTION)' +- Return the absolute load address of the named SECTION. This is +- normally the same as `ADDR', but it may be different if the `AT' +- keyword is used in the section definition (*note Section +- Options::.). +- +-`ALIGN(EXP)' +- Return the result of the current location counter (`.') aligned to +- the next EXP boundary. EXP must be an expression whose value is a +- power of two. This is equivalent to +- (. + EXP - 1) & ~(EXP - 1) +- +- `ALIGN' doesn't change the value of the location counter--it just +- does arithmetic on it. As an example, to align the output `.data' +- section to the next `0x2000' byte boundary after the preceding +- section and to set a variable within the section to the next +- `0x8000' boundary after the input sections: +- SECTIONS{ ... +- .data ALIGN(0x2000): { +- *(.data) +- variable = ALIGN(0x8000); +- } +- ... } +- +- The first use of `ALIGN' in this example specifies the location of +- a section because it is used as the optional START attribute of a +- section definition (*note Section Options::.). The second use +- simply defines the value of a variable. +- +- The built-in `NEXT' is closely related to `ALIGN'. +- +-`DEFINED(SYMBOL)' +- Return 1 if SYMBOL is in the linker global symbol table and is +- defined, otherwise return 0. You can use this function to provide +- default values for symbols. For example, the following +- command-file fragment shows how to set a global symbol `begin' to +- the first location in the `.text' section--but if a symbol called +- `begin' already existed, its value is preserved: +- +- SECTIONS{ ... +- .text : { +- begin = DEFINED(begin) ? begin : . ; +- ... +- } +- ... } +- +-`NEXT(EXP)' +- Return the next unallocated address that is a multiple of EXP. +- This function is closely related to `ALIGN(EXP)'; unless you use +- the `MEMORY' command to define discontinuous memory for the output +- file, the two functions are equivalent. +- +-`SIZEOF(SECTION)' +- Return the size in bytes of the named SECTION, if that section has +- been allocated. In the following example, `symbol_1' and +- `symbol_2' are assigned identical values: +- SECTIONS{ ... +- .output { +- .start = . ; +- ... +- .end = . ; +- } +- symbol_1 = .end - .start ; +- symbol_2 = SIZEOF(.output); +- ... } +- +-`SIZEOF_HEADERS' +-`sizeof_headers' +- Return the size in bytes of the output file's headers. You can +- use this number as the start address of the first section, if you +- choose, to facilitate paging. +- +-`MAX(EXP1, EXP2)' +- Returns the maximum of EXP1 and EXP2. +- +-`MIN(EXP1, EXP2)' +- Returns the minimum of EXP1 and EXP2. +- +- +-File: ld.info, Node: Semicolons, Prev: Arithmetic Functions, Up: Expressions +- +-Semicolons +----------- +- +- Semicolons ("<;>") are required in the following places. In all +-other places they can appear for aesthetic reasons but are otherwise +-ignored. +- +-`Assignment' +- Semicolons must appear at the end of assignment expressions. +- *Note Assignment:: +- +-`PHDRS' +- Semicolons must appear at the end of a `PHDRS' statement. *Note +- PHDRS:: +- +- +-File: ld.info, Node: MEMORY, Next: SECTIONS, Prev: Expressions, Up: Commands +- +-Memory Layout +-============= +- +- The linker's default configuration permits allocation of all +-available memory. You can override this configuration by using the +-`MEMORY' command. The `MEMORY' command describes the location and size +-of blocks of memory in the target. By using it carefully, you can +-describe which memory regions may be used by the linker, and which +-memory regions it must avoid. The linker does not shuffle sections to +-fit into the available regions, but does move the requested sections +-into the correct regions and issue errors when the regions become too +-full. +- +- A command file may contain at most one use of the `MEMORY' command; +-however, you can define as many blocks of memory within it as you wish. +-The syntax is: +- +- MEMORY +- { +- NAME (ATTR) : ORIGIN = ORIGIN, LENGTH = LEN +- ... +- } +- +-`NAME' +- is a name used internally by the linker to refer to the region. Any +- symbol name may be used. The region names are stored in a separate +- name space, and will not conflict with symbols, file names or +- section names. Use distinct names to specify multiple regions. +- +-`(ATTR)' +- is an optional list of attributes that specify whether to use a +- particular memory to place sections that are not listed in the +- linker script. Valid attribute lists must be made up of the +- characters "`ALIRWX'" that match section attributes. If you omit +- the attribute list, you may omit the parentheses around it as +- well. The attributes currently supported are: +- +- ``Letter'' +- `Section Attribute' +- +- ``R'' +- Read-only sections. +- +- ``W'' +- Read/write sections. +- +- ``X'' +- Sections containing executable code. +- +- ``A'' +- Allocated sections. +- +- ``I'' +- Initialized sections. +- +- ``L'' +- Same as `I'. +- +- ``!'' +- Invert the sense of any of the following attributes. +- +-`ORIGIN' +- is the start address of the region in physical memory. It is an +- expression that must evaluate to a constant before memory +- allocation is performed. The keyword `ORIGIN' may be abbreviated +- to `org' or `o' (but not, for example, `ORG'). +- +-`LEN' +- is the size in bytes of the region (an expression). The keyword +- `LENGTH' may be abbreviated to `len' or `l'. +- +- For example, to specify that memory has two regions available for +-allocation--one starting at 0 for 256 kilobytes, and the other starting +-at `0x40000000' for four megabytes. The `rom' memory region will get +-all sections without an explicit memory register that are either +-read-only or contain code, while the `ram' memory region will get the +-sections. +- +- MEMORY +- { +- rom (rx) : ORIGIN = 0, LENGTH = 256K +- ram (!rx) : org = 0x40000000, l = 4M +- } +- +- Once you have defined a region of memory named MEM, you can direct +-specific output sections there by using a command ending in `>MEM' +-within the `SECTIONS' command (*note Section Options::.). If the +-combined output sections directed to a region are too big for the +-region, the linker will issue an error message. +- +- +-File: ld.info, Node: SECTIONS, Next: PHDRS, Prev: MEMORY, Up: Commands +- +-Specifying Output Sections +-========================== +- +- The `SECTIONS' command controls exactly where input sections are +-placed into output sections, their order in the output file, and to +-which output sections they are allocated. +- +- You may use at most one `SECTIONS' command in a script file, but you +-can have as many statements within it as you wish. Statements within +-the `SECTIONS' command can do one of three things: +- +- * define the entry point; +- +- * assign a value to a symbol; +- +- * describe the placement of a named output section, and which input +- sections go into it. +- +- You can also use the first two operations--defining the entry point +-and defining symbols--outside the `SECTIONS' command: *note Entry +-Point::., and *Note Assignment::. They are permitted here as well for +-your convenience in reading the script, so that symbols and the entry +-point can be defined at meaningful points in your output-file layout. +- +- If you do not use a `SECTIONS' command, the linker places each input +-section into an identically named output section in the order that the +-sections are first encountered in the input files. If all input +-sections are present in the first file, for example, the order of +-sections in the output file will match the order in the first input +-file. +- +-* Menu: +- +-* Section Definition:: Section Definitions +-* Section Placement:: Section Placement +-* Section Data Expressions:: Section Data Expressions +-* Section Options:: Optional Section Attributes +-* Overlays:: Overlays +- +- +-File: ld.info, Node: Section Definition, Next: Section Placement, Up: SECTIONS +- +-Section Definitions +-------------------- +- +- The most frequently used statement in the `SECTIONS' command is the +-"section definition", which specifies the properties of an output +-section: its location, alignment, contents, fill pattern, and target +-memory region. Most of these specifications are optional; the simplest +-form of a section definition is +- SECTIONS { ... +- SECNAME : { +- CONTENTS +- } +- ... } +- +-SECNAME is the name of the output section, and CONTENTS a specification +-of what goes there--for example, a list of input files or sections of +-input files (*note Section Placement::.). The whitespace around +-SECNAME is required, so that the section name is unambiguous. The +-other whitespace shown is optional. You do need the colon `:' and the +-braces `{}', however. +- +- SECNAME must meet the constraints of your output format. In formats +-which only support a limited number of sections, such as `a.out', the +-name must be one of the names supported by the format (`a.out', for +-example, allows only `.text', `.data' or `.bss'). If the output format +-supports any number of sections, but with numbers and not names (as is +-the case for Oasys), the name should be supplied as a quoted numeric +-string. A section name may consist of any sequence of characters, but +-any name which does not conform to the standard `ld' symbol name syntax +-must be quoted. *Note Symbol Names: Symbols. +- +- The special SECNAME `/DISCARD/' may be used to discard input +-sections. Any sections which are assigned to an output section named +-`/DISCARD/' are not included in the final link output. +- +- The linker will not create output sections which do not have any +-contents. This is for convenience when referring to input sections that +-may or may not exist. For example, +- .foo { *(.foo) } +- will only create a `.foo' section in the output file if there is a +-`.foo' section in at least one input file. +- +- +-File: ld.info, Node: Section Placement, Next: Section Data Expressions, Prev: Section Definition, Up: SECTIONS +- +-Section Placement +------------------ +- +- In a section definition, you can specify the contents of an output +-section by listing particular input files, by listing particular +-input-file sections, or by a combination of the two. You can also place +-arbitrary data in the section, and define symbols relative to the +-beginning of the section. +- +- The CONTENTS of a section definition may include any of the +-following kinds of statement. You can include as many of these as you +-like in a single section definition, separated from one another by +-whitespace. +- +-`FILENAME' +- You may simply name a particular input file to be placed in the +- current output section; *all* sections from that file are placed +- in the current section definition. If the file name has already +- been mentioned in another section definition, with an explicit +- section name list, then only those sections which have not yet +- been allocated are used. +- +- To specify a list of particular files by name: +- .data : { afile.o bfile.o cfile.o } +- +- The example also illustrates that multiple statements can be +- included in the contents of a section definition, since each file +- name is a separate statement. +- +-`FILENAME( SECTION )' +-`FILENAME( SECTION , SECTION, ... )' +-`FILENAME( SECTION SECTION ... )' +- You can name one or more sections from your input files, for +- insertion in the current output section. If you wish to specify a +- list of input-file sections inside the parentheses, separate the +- section names with whitespace. +- +-`* (SECTION)' +-`* (SECTION, SECTION, ...)' +-`* (SECTION SECTION ...)' +- Instead of explicitly naming particular input files in a link +- control script, you can refer to *all* files from the `ld' command +- line: use `*' instead of a particular file name before the +- parenthesized input-file section list. +- +- If you have already explicitly included some files by name, `*' +- refers to all *remaining* files--those whose places in the output +- file have not yet been defined. +- +- For example, to copy sections `1' through `4' from an Oasys file +- into the `.text' section of an `a.out' file, and sections `13' and +- `14' into the `.data' section: +- SECTIONS { +- .text :{ +- *("1" "2" "3" "4") +- } +- +- .data :{ +- *("13" "14") +- } +- } +- +- `[ SECTION ... ]' used to be accepted as an alternate way to +- specify named sections from all unallocated input files. Because +- some operating systems (VMS) allow brackets in file names, that +- notation is no longer supported. +- +-`FILENAME`( COMMON )'' +-`*( COMMON )' +- Specify where in your output file to place uninitialized data with +- this notation. `*(COMMON)' by itself refers to all uninitialized +- data from all input files (so far as it is not yet allocated); +- FILENAME`(COMMON)' refers to uninitialized data from a particular +- file. Both are special cases of the general mechanisms for +- specifying where to place input-file sections: `ld' permits you to +- refer to uninitialized data as if it were in an input-file section +- named `COMMON', regardless of the input file's format. +- +- In any place where you may use a specific file or section name, you +-may also use a wildcard pattern. The linker handles wildcards much as +-the Unix shell does. A `*' character matches any number of characters. +-A `?' character matches any single character. The sequence `[CHARS]' +-will match a single instance of any of the CHARS; the `-' character may +-be used to specify a range of characters, as in `[a-z]' to match any +-lower case letter. A `\' character may be used to quote the following +-character. +- +- When a file name is matched with a wildcard, the wildcard characters +-will not match a `/' character (used to separate directory names on +-Unix). A pattern consisting of a single `*' character is an exception; +-it will always match any file name. In a section name, the wildcard +-characters will match a `/' character. +- +- Wildcards only match files which are explicitly specified on the +-command line. The linker does not search directories to expand +-wildcards. However, if you specify a simple file name--a name with no +-wildcard characters--in a linker script, and the file name is not also +-specified on the command line, the linker will attempt to open the file +-as though it appeared on the command line. +- +- In the following example, the command script arranges the output file +-into three consecutive sections, named `.text', `.data', and `.bss', +-taking the input for each from the correspondingly named sections of +-all the input files: +- +- SECTIONS { +- .text : { *(.text) } +- .data : { *(.data) } +- .bss : { *(.bss) *(COMMON) } +- } +- +- The following example reads all of the sections from file `all.o' +-and places them at the start of output section `outputa' which starts +-at location `0x10000'. All of section `.input1' from file `foo.o' +-follows immediately, in the same output section. All of section +-`.input2' from `foo.o' goes into output section `outputb', followed by +-section `.input1' from `foo1.o'. All of the remaining `.input1' and +-`.input2' sections from any files are written to output section +-`outputc'. +- +- SECTIONS { +- outputa 0x10000 : +- { +- all.o +- foo.o (.input1) +- } +- outputb : +- { +- foo.o (.input2) +- foo1.o (.input1) +- } +- outputc : +- { +- *(.input1) +- *(.input2) +- } +- } +- +- This example shows how wildcard patterns might be used to partition +-files. All `.text' sections are placed in `.text', and all `.bss' +-sections are placed in `.bss'. For all files beginning with an upper +-case character, the `.data' section is placed into `.DATA'; for all +-other files, the `.data' section is placed into `.data'. +- +- SECTIONS { +- .text : { *(.text) } +- .DATA : { [A-Z]*(.data) } +- .data : { *(.data) } +- .bss : { *(.bss) } +- } +- +- +-File: ld.info, Node: Section Data Expressions, Next: Section Options, Prev: Section Placement, Up: SECTIONS +- +-Section Data Expressions +------------------------- +- +- The foregoing statements arrange, in your output file, data +-originating from your input files. You can also place data directly in +-an output section from the link command script. Most of these +-additional statements involve expressions (*note Expressions::.). +-Although these statements are shown separately here for ease of +-presentation, no such segregation is needed within a section definition +-in the `SECTIONS' command; you can intermix them freely with any of the +-statements we've just described. +- +-`CREATE_OBJECT_SYMBOLS' +- Create a symbol for each input file in the current section, set to +- the address of the first byte of data written from that input +- file. For instance, with `a.out' files it is conventional to have +- a symbol for each input file. You can accomplish this by defining +- the output `.text' section as follows: +- SECTIONS { +- .text 0x2020 : +- { +- CREATE_OBJECT_SYMBOLS +- *(.text) +- _etext = ALIGN(0x2000); +- } +- ... +- } +- +- If `sample.ld' is a file containing this script, and `a.o', `b.o', +- `c.o', and `d.o' are four input files with contents like the +- following-- +- /* a.c */ +- +- afunction() { } +- int adata=1; +- int abss; +- +- `ld -M -T sample.ld a.o b.o c.o d.o' would create a map like this, +- containing symbols matching the object file names: +- 00000000 A __DYNAMIC +- 00004020 B _abss +- 00004000 D _adata +- 00002020 T _afunction +- 00004024 B _bbss +- 00004008 D _bdata +- 00002038 T _bfunction +- 00004028 B _cbss +- 00004010 D _cdata +- 00002050 T _cfunction +- 0000402c B _dbss +- 00004018 D _ddata +- 00002068 T _dfunction +- 00004020 D _edata +- 00004030 B _end +- 00004000 T _etext +- 00002020 t a.o +- 00002038 t b.o +- 00002050 t c.o +- 00002068 t d.o +- +-`SYMBOL = EXPRESSION ;' +-`SYMBOL F= EXPRESSION ;' +- SYMBOL is any symbol name (*note Symbols::.). "F=" refers to any +- of the operators `&= += -= *= /=' which combine arithmetic and +- assignment. +- +- When you assign a value to a symbol within a particular section +- definition, the value is relative to the beginning of the section +- (*note Assignment::.). If you write +- +- SECTIONS { +- abs = 14 ; +- ... +- .data : { ... rel = 14 ; ... } +- abs2 = 14 + ADDR(.data); +- ... +- } +- +- `abs' and `rel' do not have the same value; `rel' has the same +- value as `abs2'. +- +-`BYTE(EXPRESSION)' +-`SHORT(EXPRESSION)' +-`LONG(EXPRESSION)' +-`QUAD(EXPRESSION)' +-`SQUAD(EXPRESSION)' +- By including one of these four statements in a section definition, +- you can explicitly place one, two, four, eight unsigned, or eight +- signed bytes (respectively) at the current address of that +- section. When using a 64 bit host or target, `QUAD' and `SQUAD' +- are the same. When both host and target are 32 bits, `QUAD' uses +- an unsigned 32 bit value, and `SQUAD' sign extends the value. +- Both will use the correct endianness when writing out the value. +- +- Multiple-byte quantities are represented in whatever byte order is +- appropriate for the output file format (*note BFD::.). +- +-`FILL(EXPRESSION)' +- Specify the "fill pattern" for the current section. Any otherwise +- unspecified regions of memory within the section (for example, +- regions you skip over by assigning a new value to the location +- counter `.') are filled with the two least significant bytes from +- the EXPRESSION argument. A `FILL' statement covers memory +- locations *after* the point it occurs in the section definition; by +- including more than one `FILL' statement, you can have different +- fill patterns in different parts of an output section. +- +- +-File: ld.info, Node: Section Options, Next: Overlays, Prev: Section Data Expressions, Up: SECTIONS +- +-Optional Section Attributes +---------------------------- +- +- Here is the full syntax of a section definition, including all the +-optional portions: +- +- SECTIONS { +- ... +- SECNAME START BLOCK(ALIGN) (NOLOAD) : AT ( LDADR ) +- { CONTENTS } >REGION :PHDR =FILL +- ... +- } +- +- SECNAME and CONTENTS are required. *Note Section Definition::, and +-*Note Section Placement::, for details on CONTENTS. The remaining +-elements--START, `BLOCK(ALIGN)', `(NOLOAD)', `AT ( LDADR )', `>REGION', +-`:PHDR', and `=FILL'--are all optional. +- +-`START' +- You can force the output section to be loaded at a specified +- address by specifying START immediately following the section name. +- START can be represented as any expression. The following example +- generates section OUTPUT at location `0x40000000': +- +- SECTIONS { +- ... +- output 0x40000000: { +- ... +- } +- ... +- } +- +-`BLOCK(ALIGN)' +- You can include `BLOCK()' specification to advance the location +- counter `.' prior to the beginning of the section, so that the +- section will begin at the specified alignment. ALIGN is an +- expression. +- +-`(NOLOAD)' +- The `(NOLOAD)' directive will mark a section to not be loaded at +- run time. The linker will process the section normally, but will +- mark it so that a program loader will not load it into memory. +- For example, in the script sample below, the `ROM' section is +- addressed at memory location `0' and does not need to be loaded +- when the program is run. The contents of the `ROM' section will +- appear in the linker output file as usual. +- +- SECTIONS { +- ROM 0 (NOLOAD) : { ... } +- ... +- } +- +-`AT ( LDADR )' +- The expression LDADR that follows the `AT' keyword specifies the +- load address of the section. The default (if you do not use the +- `AT' keyword) is to make the load address the same as the +- relocation address. This feature is designed to make it easy to +- build a ROM image. For example, this `SECTIONS' definition +- creates two output sections: one called `.text', which starts at +- `0x1000', and one called `.mdata', which is loaded at the end of +- the `.text' section even though its relocation address is +- `0x2000'. The symbol `_data' is defined with the value `0x2000': +- +- SECTIONS +- { +- .text 0x1000 : { *(.text) _etext = . ; } +- .mdata 0x2000 : +- AT ( ADDR(.text) + SIZEOF ( .text ) ) +- { _data = . ; *(.data); _edata = . ; } +- .bss 0x3000 : +- { _bstart = . ; *(.bss) *(COMMON) ; _bend = . ;} +- } +- +- The run-time initialization code (for C programs, usually `crt0') +- for use with a ROM generated this way has to include something like +- the following, to copy the initialized data from the ROM image to +- its runtime address: +- +- char *src = _etext; +- char *dst = _data; +- +- /* ROM has data at end of text; copy it. */ +- while (dst < _edata) { +- *dst++ = *src++; +- } +- +- /* Zero bss */ +- for (dst = _bstart; dst< _bend; dst++) +- *dst = 0; +- +-`>REGION' +- Assign this section to a previously defined region of memory. +- *Note MEMORY::. +- +-`:PHDR' +- Assign this section to a segment described by a program header. +- *Note PHDRS::. If a section is assigned to one or more segments, +- then all subsequent allocated sections will be assigned to those +- segments as well, unless they use an explicitly `:PHDR' modifier. +- To prevent a section from being assigned to a segment when it would +- normally default to one, use `:NONE'. +- +-`=FILL' +- Including `=FILL' in a section definition specifies the initial +- fill value for that section. You may use any expression to +- specify FILL. Any unallocated holes in the current output section +- when written to the output file will be filled with the two least +- significant bytes of the value, repeated as necessary. You can +- also change the fill value with a `FILL' statement in the CONTENTS +- of a section definition. +- +- +-File: ld.info, Node: Overlays, Prev: Section Options, Up: SECTIONS +- +-Overlays +--------- +- +- The `OVERLAY' command provides an easy way to describe sections +-which are to be loaded as part of a single memory image but are to be +-run at the same memory address. At run time, some sort of overlay +-manager will copy the overlaid sections in and out of the runtime memory +-address as required, perhaps by simply manipulating addressing bits. +-This approach can be useful, for example, when a certain region of +-memory is faster than another. +- +- The `OVERLAY' command is used within a `SECTIONS' command. It +-appears as follows: +- OVERLAY START : [ NOCROSSREFS ] AT ( LDADDR ) +- { +- SECNAME1 { CONTENTS } :PHDR =FILL +- SECNAME2 { CONTENTS } :PHDR =FILL +- ... +- } >REGION :PHDR =FILL +- +- Everything is optional except `OVERLAY' (a keyword), and each +-section must have a name (SECNAME1 and SECNAME2 above). The section +-definitions within the `OVERLAY' construct are identical to those +-within the general `SECTIONS' contruct (*note SECTIONS::.), except that +-no addresses and no memory regions may be defined for sections within +-an `OVERLAY'. +- +- The sections are all defined with the same starting address. The +-load addresses of the sections are arranged such that they are +-consecutive in memory starting at the load address used for the +-`OVERLAY' as a whole (as with normal section definitions, the load +-address is optional, and defaults to the start address; the start +-address is also optional, and defaults to `.'). +- +- If the `NOCROSSREFS' keyword is used, and there any references among +-the sections, the linker will report an error. Since the sections all +-run at the same address, it normally does not make sense for one +-section to refer directly to another. *Note NOCROSSREFS: Option +-Commands. +- +- For each section within the `OVERLAY', the linker automatically +-defines two symbols. The symbol `__load_start_SECNAME' is defined as +-the starting load address of the section. The symbol +-`__load_stop_SECNAME' is defined as the final load address of the +-section. Any characters within SECNAME which are not legal within C +-identifiers are removed. C (or assembler) code may use these symbols +-to move the overlaid sections around as necessary. +- +- At the end of the overlay, the value of `.' is set to the start +-address of the overlay plus the size of the largest section. +- +- Here is an example. Remember that this would appear inside a +-`SECTIONS' construct. +- +- OVERLAY 0x1000 : AT (0x4000) +- { +- .text0 { o1/*.o(.text) } +- .text1 { o2/*.o(.text) } +- } +- +- This will define both `.text0' and `.text1' to start at address +-0x1000. `.text0' will be loaded at address 0x4000, and `.text1' will +-be loaded immediately after `.text0'. The following symbols will be +-defined: `__load_start_text0', `__load_stop_text0', +-`__load_start_text1', `__load_stop_text1'. +- +- C code to copy overlay `.text1' into the overlay area might look +-like the following. +- +- extern char __load_start_text1, __load_stop_text1; +- memcpy ((char *) 0x1000, &__load_start_text1, +- &__load_stop_text1 - &__load_start_text1); +- +- Note that the `OVERLAY' command is just syntactic sugar, since +-everything it does can be done using the more basic commands. The above +-example could have been written identically as follows. +- +- .text0 0x1000 : AT (0x4000) { o1/*.o(.text) } +- __load_start_text0 = LOADADDR (.text0); +- __load_stop_text0 = LOADADDR (.text0) + SIZEOF (.text0); +- .text1 0x1000 : AT (0x4000 + SIZEOF (.text0)) { o2/*.o(.text) } +- __load_start_text1 = LOADADDR (.text1); +- __load_stop_text1 = LOADADDR (.text1) + SIZEOF (.text1); +- . = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1)); +- +- +-File: ld.info, Node: PHDRS, Next: Entry Point, Prev: SECTIONS, Up: Commands +- +-ELF Program Headers +-=================== +- +- The ELF object file format uses "program headers", which are read by +-the system loader and describe how the program should be loaded into +-memory. These program headers must be set correctly in order to run the +-program on a native ELF system. The linker will create reasonable +-program headers by default. However, in some cases, it is desirable to +-specify the program headers more precisely; the `PHDRS' command may be +-used for this purpose. When the `PHDRS' command is used, the linker +-will not generate any program headers itself. +- +- The `PHDRS' command is only meaningful when generating an ELF output +-file. It is ignored in other cases. This manual does not describe the +-details of how the system loader interprets program headers; for more +-information, see the ELF ABI. The program headers of an ELF file may +-be displayed using the `-p' option of the `objdump' command. +- +- This is the syntax of the `PHDRS' command. The words `PHDRS', +-`FILEHDR', `AT', and `FLAGS' are keywords. +- +- PHDRS +- { +- NAME TYPE [ FILEHDR ] [ PHDRS ] [ AT ( ADDRESS ) ] +- [ FLAGS ( FLAGS ) ] ; +- } +- +- The NAME is used only for reference in the `SECTIONS' command of the +-linker script. It does not get put into the output file. +- +- Certain program header types describe segments of memory which are +-loaded from the file by the system loader. In the linker script, the +-contents of these segments are specified by directing allocated output +-sections to be placed in the segment. To do this, the command +-describing the output section in the `SECTIONS' command should use +-`:NAME', where NAME is the name of the program header as it appears in +-the `PHDRS' command. *Note Section Options::. +- +- It is normal for certain sections to appear in more than one segment. +-This merely implies that one segment of memory contains another. This +-is specified by repeating `:NAME', using it once for each program +-header in which the section is to appear. +- +- If a section is placed in one or more segments using `:NAME', then +-all subsequent allocated sections which do not specify `:NAME' are +-placed in the same segments. This is for convenience, since generally +-a whole set of contiguous sections will be placed in a single segment. +-To prevent a section from being assigned to a segment when it would +-normally default to one, use `:NONE'. +- +- The `FILEHDR' and `PHDRS' keywords which may appear after the +-program header type also indicate contents of the segment of memory. +-The `FILEHDR' keyword means that the segment should include the ELF +-file header. The `PHDRS' keyword means that the segment should include +-the ELF program headers themselves. +- +- The TYPE may be one of the following. The numbers indicate the +-value of the keyword. +- +-`PT_NULL' (0) +- Indicates an unused program header. +- +-`PT_LOAD' (1) +- Indicates that this program header describes a segment to be +- loaded from the file. +- +-`PT_DYNAMIC' (2) +- Indicates a segment where dynamic linking information can be found. +- +-`PT_INTERP' (3) +- Indicates a segment where the name of the program interpreter may +- be found. +- +-`PT_NOTE' (4) +- Indicates a segment holding note information. +- +-`PT_SHLIB' (5) +- A reserved program header type, defined but not specified by the +- ELF ABI. +- +-`PT_PHDR' (6) +- Indicates a segment where the program headers may be found. +- +-EXPRESSION +- An expression giving the numeric type of the program header. This +- may be used for types not defined above. +- +- It is possible to specify that a segment should be loaded at a +-particular address in memory. This is done using an `AT' expression. +-This is identical to the `AT' command used in the `SECTIONS' command +-(*note Section Options::.). Using the `AT' command for a program +-header overrides any information in the `SECTIONS' command. +- +- Normally the segment flags are set based on the sections. The +-`FLAGS' keyword may be used to explicitly specify the segment flags. +-The value of FLAGS must be an integer. It is used to set the `p_flags' +-field of the program header. +- +- Here is an example of the use of `PHDRS'. This shows a typical set +-of program headers used on a native ELF system. +- +- PHDRS +- { +- headers PT_PHDR PHDRS ; +- interp PT_INTERP ; +- text PT_LOAD FILEHDR PHDRS ; +- data PT_LOAD ; +- dynamic PT_DYNAMIC ; +- } +- +- SECTIONS +- { +- . = SIZEOF_HEADERS; +- .interp : { *(.interp) } :text :interp +- .text : { *(.text) } :text +- .rodata : { *(.rodata) } /* defaults to :text */ +- ... +- . = . + 0x1000; /* move to a new page in memory */ +- .data : { *(.data) } :data +- .dynamic : { *(.dynamic) } :data :dynamic +- ... +- } +- +- +-File: ld.info, Node: Entry Point, Next: Version Script, Prev: PHDRS, Up: Commands +- +-The Entry Point +-=============== +- +- The linker command language includes a command specifically for +-defining the first executable instruction in an output file (its "entry +-point"). Its argument is a symbol name: +- ENTRY(SYMBOL) +- +- Like symbol assignments, the `ENTRY' command may be placed either as +-an independent command in the command file, or among the section +-definitions within the `SECTIONS' command--whatever makes the most +-sense for your layout. +- +- `ENTRY' is only one of several ways of choosing the entry point. +-You may indicate it in any of the following ways (shown in descending +-order of priority: methods higher in the list override methods lower +-down). +- * the `-e' ENTRY command-line option; +- +- * the `ENTRY(SYMBOL)' command in a linker control script; +- +- * the value of the symbol `start', if present; +- +- * the address of the first byte of the `.text' section, if present; +- +- * The address `0'. +- +- For example, you can use these rules to generate an entry point with +-an assignment statement: if no symbol `start' is defined within your +-input files, you can simply define it, assigning it an appropriate +-value-- +- +- start = 0x2020; +- +-The example shows an absolute address, but you can use any expression. +-For example, if your input object files use some other symbol-name +-convention for the entry point, you can just assign the value of +-whatever symbol contains the start address to `start': +- +- start = other_symbol ; +- +- +-File: ld.info, Node: Version Script, Next: Option Commands, Prev: Entry Point, Up: Commands +- +-Version Script +-============== +- +- The linker command script includes a command specifically for +-specifying a version script, and is only meaningful for ELF platforms +-that support shared libraries. A version script can be build directly +-into the linker script that you are using, or you can supply the +-version script as just another input file to the linker at the time +-that you link. The command script syntax is: +- VERSION { version script contents } +- The version script can also be specified to the linker by means of +-the `--version-script' linker command line option. Version scripts are +-only meaningful when creating shared libraries. +- +- The format of the version script itself is identical to that used by +-Sun's linker in Solaris 2.5. Versioning is done by defining a tree of +-version nodes with the names and interdependencies specified in the +-version script. The version script can specify which symbols are bound +-to which version nodes, and it can reduce a specified set of symbols to +-local scope so that they are not globally visible outside of the shared +-library. +- +- The easiest way to demonstrate the version script language is with a +-few examples. +- +- VERS_1.1 { +- global: +- foo1; +- local: +- old*; +- original*; +- new*; +- }; +- +- VERS_1.2 { +- foo2; +- } VERS_1.1; +- +- VERS_2.0 { +- bar1; bar2; +- } VERS_1.2; +- +- In this example, three version nodes are defined. `VERS_1.1' is the +-first version node defined, and has no other dependencies. The symbol +-`foo1' is bound to this version node, and a number of symbols that have +-appeared within various object files are reduced in scope to local so +-that they are not visible outside of the shared library. +- +- Next, the node `VERS_1.2' is defined. It depends upon `VERS_1.1'. +-The symbol `foo2' is bound to this version node. +- +- Finally, the node `VERS_2.0' is defined. It depends upon +-`VERS_1.2'. The symbols `bar1' and `bar2' are bound to this version +-node. +- +- Symbols defined in the library which aren't specifically bound to a +-version node are effectively bound to an unspecified base version of the +-library. It is possible to bind all otherwise unspecified symbols to a +-given version node using `global: *' somewhere in the version script. +- +- Lexically the names of the version nodes have no specific meaning +-other than what they might suggest to the person reading them. The +-`2.0' version could just as well have appeared in between `1.1' and +-`1.2'. However, this would be a confusing way to write a version +-script. +- +- When you link an application against a shared library that has +-versioned symbols, the application itself knows which version of each +-symbol it requires, and it also knows which version nodes it needs from +-each shared library it is linked against. Thus at runtime, the dynamic +-loader can make a quick check to make sure that the libraries you have +-linked against do in fact supply all of the version nodes that the +-application will need to resolve all of the dynamic symbols. In this +-way it is possible for the dynamic linker to know with certainty that +-all external symbols that it needs will be resolvable without having to +-search for each symbol reference. +- +- The symbol versioning is in effect a much more sophisticated way of +-doing minor version checking that SunOS does. The fundamental problem +-that is being addressed here is that typically references to external +-functions are bound on an as-needed basis, and are not all bound when +-the application starts up. If a shared library is out of date, a +-required interface may be missing; when the application tries to use +-that interface, it may suddenly and unexpectedly fail. With symbol +-versioning, the user will get a warning when they start their program if +-the libraries being used with the application are too old. +- +- There are several GNU extensions to Sun's versioning approach. The +-first of these is the ability to bind a symbol to a version node in the +-source file where the symbol is defined instead of in the versioning +-script. This was done mainly to reduce the burden on the library +-maintainer. This can be done by putting something like: +- +- __asm__(".symver original_foo,foo@VERS_1.1"); +- +- in the C source file. This renamed the function `original_foo' to +-be an alias for `foo' bound to the version node `VERS_1.1'. The +-`local:' directive can be used to prevent the symbol `original_foo' +-from being exported. +- +- The second GNU extension is to allow multiple versions of the same +-function to appear in a given shared library. In this way an +-incompatible change to an interface can take place without increasing +-the major version number of the shared library, while still allowing +-applications linked against the old interface to continue to function. +- +- This can only be accomplished by using multiple `.symver' directives +-in the assembler. An example of this would be: +- +- __asm__(".symver original_foo,foo@"); +- __asm__(".symver old_foo,foo@VERS_1.1"); +- __asm__(".symver old_foo1,foo@VERS_1.2"); +- __asm__(".symver new_foo,foo@@VERS_2.0"); +- +- In this example, `foo@' represents the symbol `foo' bound to the +-unspecified base version of the symbol. The source file that contains +-this example would define 4 C functions: `original_foo', `old_foo', +-`old_foo1', and `new_foo'. +- +- When you have multiple definitions of a given symbol, there needs to +-be some way to specify a default version to which external references to +-this symbol will be bound. This can be accomplished with the +-`foo@@VERS_2.0' type of `.symver' directive. Only one version of a +-symbol can be declared 'default' in this manner - otherwise you would +-effectively have multiple definitions of the same symbol. +- +- If you wish to bind a reference to a specific version of the symbol +-within the shared library, you can use the aliases of convenience (i.e. +-`old_foo'), or you can use the `.symver' directive to specifically bind +-to an external version of the function in question. +- +diff -rup --new-file binutils-2.9.1/ld/ld.info-3 binutils-2.9.1/ld/ld.info-3 +--- binutils-2.9.1/ld/ld.info-3 Fri May 1 08:49:27 1998 ++++ binutils-2.9.1/ld/ld.info-3 Wed Dec 31 17:00:00 1969 +@@ -1,753 +0,0 @@ +-This is Info file ld.info, produced by Makeinfo version 1.68 from the +-input file ./ld.texinfo. +- +-START-INFO-DIR-ENTRY +-* Ld: (ld). The GNU linker. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU linker LD. +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided also +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: ld.info, Node: Option Commands, Prev: Version Script, Up: Commands +- +-Option Commands +-=============== +- +- The command language includes a number of other commands that you can +-use for specialized purposes. They are similar in purpose to +-command-line options. +- +-`CONSTRUCTORS' +- When linking using the `a.out' object file format, the linker uses +- an unusual set construct to support C++ global constructors and +- destructors. When linking object file formats which do not support +- arbitrary sections, such as `ECOFF' and `XCOFF', the linker will +- automatically recognize C++ global constructors and destructors by +- name. For these object file formats, the `CONSTRUCTORS' command +- tells the linker where this information should be placed. The +- `CONSTRUCTORS' command is ignored for other object file formats. +- +- The symbol `__CTOR_LIST__' marks the start of the global +- constructors, and the symbol `__DTOR_LIST' marks the end. The +- first word in the list is the number of entries, followed by the +- address of each constructor or destructor, followed by a zero +- word. The compiler must arrange to actually run the code. For +- these object file formats GNU C++ calls constructors from a +- subroutine `__main'; a call to `__main' is automatically inserted +- into the startup code for `main'. GNU C++ runs destructors either +- by using `atexit', or directly from the function `exit'. +- +- For object file formats such as `COFF' or `ELF' which support +- multiple sections, GNU C++ will normally arrange to put the +- addresses of global constructors and destructors into the `.ctors' +- and `.dtors' sections. Placing the following sequence into your +- linker script will build the sort of table which the GNU C++ +- runtime code expects to see. +- +- __CTOR_LIST__ = .; +- LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) +- *(.ctors) +- LONG(0) +- __CTOR_END__ = .; +- __DTOR_LIST__ = .; +- LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) +- *(.dtors) +- LONG(0) +- __DTOR_END__ = .; +- +- Normally the compiler and linker will handle these issues +- automatically, and you will not need to concern yourself with +- them. However, you may need to consider this if you are using C++ +- and writing your own linker scripts. +- +-`FLOAT' +-`NOFLOAT' +- These keywords were used in some older linkers to request a +- particular math subroutine library. `ld' doesn't use the +- keywords, assuming instead that any necessary subroutines are in +- libraries specified using the general mechanisms for linking to +- archives; but to permit the use of scripts that were written for +- the older linkers, the keywords `FLOAT' and `NOFLOAT' are accepted +- and ignored. +- +-`FORCE_COMMON_ALLOCATION' +- This command has the same effect as the `-d' command-line option: +- to make `ld' assign space to common symbols even if a relocatable +- output file is specified (`-r'). +- +-`INCLUDE FILENAME' +- Include the linker script FILENAME at this point. The file will +- be searched for in the current directory, and in any directory +- specified with the `-L' option. You can nest calls to `INCLUDE' +- up to 10 levels deep. +- +-`INPUT ( FILE, FILE, ... )' +-`INPUT ( FILE FILE ... )' +- Use this command to include binary input files in the link, without +- including them in a particular section definition. Specify the +- full name for each FILE, including `.a' if required. +- +- `ld' searches for each FILE through the archive-library search +- path, just as for files you specify on the command line. See the +- description of `-L' in *Note Command Line Options: Options. +- +- If you use `-lFILE', `ld' will transform the name to `libFILE.a' +- as with the command line argument `-l'. +- +-`GROUP ( FILE, FILE, ... )' +-`GROUP ( FILE FILE ... )' +- This command is like `INPUT', except that the named files should +- all be archives, and they are searched repeatedly until no new +- undefined references are created. See the description of `-(' in +- *Note Command Line Options: Options. +- +-`OUTPUT ( FILENAME )' +- Use this command to name the link output file FILENAME. The +- effect of `OUTPUT(FILENAME)' is identical to the effect of +- `-o FILENAME', which overrides it. You can use this command to +- supply a default output-file name other than `a.out'. +- +-`OUTPUT_ARCH ( BFDNAME )' +- Specify a particular output machine architecture, with one of the +- names used by the BFD back-end routines (*note BFD::.). This +- command is often unnecessary; the architecture is most often set +- implicitly by either the system BFD configuration or as a side +- effect of the `OUTPUT_FORMAT' command. +- +-`OUTPUT_FORMAT ( BFDNAME )' +- When `ld' is configured to support multiple object code formats, +- you can use this command to specify a particular output format. +- BFDNAME is one of the names used by the BFD back-end routines +- (*note BFD::.). The effect is identical to the effect of the +- `--oformat' command-line option. This selection affects only the +- output file; the related command `TARGET' affects primarily input +- files. +- +-`SEARCH_DIR ( PATH )' +- Add PATH to the list of paths where `ld' looks for archive +- libraries. `SEARCH_DIR(PATH)' has the same effect as `-LPATH' on +- the command line. +- +-`STARTUP ( FILENAME )' +- Ensure that FILENAME is the first input file used in the link +- process. +- +-`TARGET ( FORMAT )' +- When `ld' is configured to support multiple object code formats, +- you can use this command to change the input-file object code +- format (like the command-line option `-b' or its synonym +- `--format'). The argument FORMAT is one of the strings used by +- BFD to name binary formats. If `TARGET' is specified but +- `OUTPUT_FORMAT' is not, the last `TARGET' argument is also used as +- the default format for the `ld' output file. *Note BFD::. +- +- If you don't use the `TARGET' command, `ld' uses the value of the +- environment variable `GNUTARGET', if available, to select the +- output file format. If that variable is also absent, `ld' uses +- the default format configured for your machine in the BFD +- libraries. +- +-`NOCROSSREFS ( SECTION SECTION ... )' +- This command may be used to tell `ld' to issue an error about any +- references among certain sections. +- +- In certain types of programs, particularly on embedded systems, +- when one section is loaded into memory, another section will not +- be. Any direct references between the two sections would be +- errors. For example, it would be an error if code in one section +- called a function defined in the other section. +- +- The `NOCROSSREFS' command takes a list of section names. If `ld' +- detects any cross references between the sections, it reports an +- error and returns a non-zero exit status. The `NOCROSSREFS' +- command uses output section names, defined in the `SECTIONS' +- command. It does not use the names of input sections. +- +- +-File: ld.info, Node: Machine Dependent, Next: BFD, Prev: Commands, Up: Top +- +-Machine Dependent Features +-************************** +- +- `ld' has additional features on some platforms; the following +-sections describe them. Machines where `ld' has no additional +-functionality are not listed. +- +-* Menu: +- +-* H8/300:: `ld' and the H8/300 +-* i960:: `ld' and the Intel 960 family +- +- +-File: ld.info, Node: H8/300, Next: i960, Up: Machine Dependent +- +-`ld' and the H8/300 +-=================== +- +- For the H8/300, `ld' can perform these global optimizations when you +-specify the `--relax' command-line option. +- +-*relaxing address modes* +- `ld' finds all `jsr' and `jmp' instructions whose targets are +- within eight bits, and turns them into eight-bit program-counter +- relative `bsr' and `bra' instructions, respectively. +- +-*synthesizing instructions* +- `ld' finds all `mov.b' instructions which use the sixteen-bit +- absolute address form, but refer to the top page of memory, and +- changes them to use the eight-bit address form. (That is: the +- linker turns `mov.b `@'AA:16' into `mov.b `@'AA:8' whenever the +- address AA is in the top page of memory). +- +- +-File: ld.info, Node: i960, Prev: H8/300, Up: Machine Dependent +- +-`ld' and the Intel 960 family +-============================= +- +- You can use the `-AARCHITECTURE' command line option to specify one +-of the two-letter names identifying members of the 960 family; the +-option specifies the desired output target, and warns of any +-incompatible instructions in the input files. It also modifies the +-linker's search strategy for archive libraries, to support the use of +-libraries specific to each particular architecture, by including in the +-search loop names suffixed with the string identifying the architecture. +- +- For example, if your `ld' command line included `-ACA' as well as +-`-ltry', the linker would look (in its built-in search paths, and in +-any paths you specify with `-L') for a library with the names +- +- try +- libtry.a +- tryca +- libtryca.a +- +-The first two possibilities would be considered in any event; the last +-two are due to the use of `-ACA'. +- +- You can meaningfully use `-A' more than once on a command line, since +-the 960 architecture family allows combination of target architectures; +-each use will add another pair of name variants to search for when `-l' +-specifies a library. +- +- `ld' supports the `--relax' option for the i960 family. If you +-specify `--relax', `ld' finds all `balx' and `calx' instructions whose +-targets are within 24 bits, and turns them into 24-bit program-counter +-relative `bal' and `cal' instructions, respectively. `ld' also turns +-`cal' instructions into `bal' instructions when it determines that the +-target subroutine is a leaf routine (that is, the target subroutine does +-not itself call any subroutines). +- +- +-File: ld.info, Node: BFD, Next: Reporting Bugs, Prev: Machine Dependent, Up: Top +- +-BFD +-*** +- +- The linker accesses object and archive files using the BFD libraries. +-These libraries allow the linker to use the same routines to operate on +-object files whatever the object file format. A different object file +-format can be supported simply by creating a new BFD back end and adding +-it to the library. To conserve runtime memory, however, the linker and +-associated tools are usually configured to support only a subset of the +-object file formats available. You can use `objdump -i' (*note +-objdump: (binutils.info)objdump.) to list all the formats available for +-your configuration. +- +- As with most implementations, BFD is a compromise between several +-conflicting requirements. The major factor influencing BFD design was +-efficiency: any time used converting between formats is time which +-would not have been spent had BFD not been involved. This is partly +-offset by abstraction payback; since BFD simplifies applications and +-back ends, more time and care may be spent optimizing algorithms for a +-greater speed. +- +- One minor artifact of the BFD solution which you should bear in mind +-is the potential for information loss. There are two places where +-useful information can be lost using the BFD mechanism: during +-conversion and during output. *Note BFD information loss::. +- +-* Menu: +- +-* BFD outline:: How it works: an outline of BFD +- +- +-File: ld.info, Node: BFD outline, Up: BFD +- +-How it works: an outline of BFD +-=============================== +- +- When an object file is opened, BFD subroutines automatically +-determine the format of the input object file. They then build a +-descriptor in memory with pointers to routines that will be used to +-access elements of the object file's data structures. +- +- As different information from the the object files is required, BFD +-reads from different sections of the file and processes them. For +-example, a very common operation for the linker is processing symbol +-tables. Each BFD back end provides a routine for converting between +-the object file's representation of symbols and an internal canonical +-format. When the linker asks for the symbol table of an object file, it +-calls through a memory pointer to the routine from the relevant BFD +-back end which reads and converts the table into a canonical form. The +-linker then operates upon the canonical form. When the link is finished +-and the linker writes the output file's symbol table, another BFD back +-end routine is called to take the newly created symbol table and +-convert it into the chosen output format. +- +-* Menu: +- +-* BFD information loss:: Information Loss +-* Canonical format:: The BFD canonical object-file format +- +- +-File: ld.info, Node: BFD information loss, Next: Canonical format, Up: BFD outline +- +-Information Loss +----------------- +- +- *Information can be lost during output.* The output formats +-supported by BFD do not provide identical facilities, and information +-which can be described in one form has nowhere to go in another format. +-One example of this is alignment information in `b.out'. There is +-nowhere in an `a.out' format file to store alignment information on the +-contained data, so when a file is linked from `b.out' and an `a.out' +-image is produced, alignment information will not propagate to the +-output file. (The linker will still use the alignment information +-internally, so the link is performed correctly). +- +- Another example is COFF section names. COFF files may contain an +-unlimited number of sections, each one with a textual section name. If +-the target of the link is a format which does not have many sections +-(e.g., `a.out') or has sections without names (e.g., the Oasys format), +-the link cannot be done simply. You can circumvent this problem by +-describing the desired input-to-output section mapping with the linker +-command language. +- +- *Information can be lost during canonicalization.* The BFD internal +-canonical form of the external formats is not exhaustive; there are +-structures in input formats for which there is no direct representation +-internally. This means that the BFD back ends cannot maintain all +-possible data richness through the transformation between external to +-internal and back to external formats. +- +- This limitation is only a problem when an application reads one +-format and writes another. Each BFD back end is responsible for +-maintaining as much data as possible, and the internal BFD canonical +-form has structures which are opaque to the BFD core, and exported only +-to the back ends. When a file is read in one format, the canonical form +-is generated for BFD and the application. At the same time, the back +-end saves away any information which may otherwise be lost. If the data +-is then written back in the same format, the back end routine will be +-able to use the canonical form provided by the BFD core as well as the +-information it prepared earlier. Since there is a great deal of +-commonality between back ends, there is no information lost when +-linking or copying big endian COFF to little endian COFF, or `a.out' to +-`b.out'. When a mixture of formats is linked, the information is only +-lost from the files whose format differs from the destination. +- +- +-File: ld.info, Node: Canonical format, Prev: BFD information loss, Up: BFD outline +- +-The BFD canonical object-file format +------------------------------------- +- +- The greatest potential for loss of information occurs when there is +-the least overlap between the information provided by the source +-format, that stored by the canonical format, and that needed by the +-destination format. A brief description of the canonical form may help +-you understand which kinds of data you can count on preserving across +-conversions. +- +-*files* +- Information stored on a per-file basis includes target machine +- architecture, particular implementation format type, a demand +- pageable bit, and a write protected bit. Information like Unix +- magic numbers is not stored here--only the magic numbers' meaning, +- so a `ZMAGIC' file would have both the demand pageable bit and the +- write protected text bit set. The byte order of the target is +- stored on a per-file basis, so that big- and little-endian object +- files may be used with one another. +- +-*sections* +- Each section in the input file contains the name of the section, +- the section's original address in the object file, size and +- alignment information, various flags, and pointers into other BFD +- data structures. +- +-*symbols* +- Each symbol contains a pointer to the information for the object +- file which originally defined it, its name, its value, and various +- flag bits. When a BFD back end reads in a symbol table, it +- relocates all symbols to make them relative to the base of the +- section where they were defined. Doing this ensures that each +- symbol points to its containing section. Each symbol also has a +- varying amount of hidden private data for the BFD back end. Since +- the symbol points to the original file, the private data format +- for that symbol is accessible. `ld' can operate on a collection +- of symbols of wildly different formats without problems. +- +- Normal global and simple local symbols are maintained on output, +- so an output file (no matter its format) will retain symbols +- pointing to functions and to global, static, and common variables. +- Some symbol information is not worth retaining; in `a.out', type +- information is stored in the symbol table as long symbol names. +- This information would be useless to most COFF debuggers; the +- linker has command line switches to allow users to throw it away. +- +- There is one word of type information within the symbol, so if the +- format supports symbol type information within symbols (for +- example, COFF, IEEE, Oasys) and the type is simple enough to fit +- within one word (nearly everything but aggregates), the +- information will be preserved. +- +-*relocation level* +- Each canonical BFD relocation record contains a pointer to the +- symbol to relocate to, the offset of the data to relocate, the +- section the data is in, and a pointer to a relocation type +- descriptor. Relocation is performed by passing messages through +- the relocation type descriptor and the symbol pointer. Therefore, +- relocations can be performed on output data using a relocation +- method that is only available in one of the input formats. For +- instance, Oasys provides a byte relocation format. A relocation +- record requesting this relocation type would point indirectly to a +- routine to perform this, so the relocation may be performed on a +- byte being written to a 68k COFF file, even though 68k COFF has no +- such relocation type. +- +-*line numbers* +- Object formats can contain, for debugging purposes, some form of +- mapping between symbols, source line numbers, and addresses in the +- output file. These addresses have to be relocated along with the +- symbol information. Each symbol with an associated list of line +- number records points to the first record of the list. The head +- of a line number list consists of a pointer to the symbol, which +- allows finding out the address of the function whose line number +- is being described. The rest of the list is made up of pairs: +- offsets into the section and line numbers. Any format which can +- simply derive this information can pass it successfully between +- formats (COFF, IEEE and Oasys). +- +- +-File: ld.info, Node: Reporting Bugs, Next: MRI, Prev: BFD, Up: Top +- +-Reporting Bugs +-************** +- +- Your bug reports play an essential role in making `ld' reliable. +- +- Reporting a bug may help you by bringing a solution to your problem, +-or it may not. But in any case the principal function of a bug report +-is to help the entire community by making the next version of `ld' work +-better. Bug reports are your contribution to the maintenance of `ld'. +- +- In order for a bug report to serve its purpose, you must include the +-information that enables us to fix the bug. +- +-* Menu: +- +-* Bug Criteria:: Have you found a bug? +-* Bug Reporting:: How to report bugs +- +- +-File: ld.info, Node: Bug Criteria, Next: Bug Reporting, Up: Reporting Bugs +- +-Have you found a bug? +-===================== +- +- If you are not sure whether you have found a bug, here are some +-guidelines: +- +- * If the linker gets a fatal signal, for any input whatever, that is +- a `ld' bug. Reliable linkers never crash. +- +- * If `ld' produces an error message for valid input, that is a bug. +- +- * If `ld' does not produce an error message for invalid input, that +- may be a bug. In the general case, the linker can not verify that +- object files are correct. +- +- * If you are an experienced user of linkers, your suggestions for +- improvement of `ld' are welcome in any case. +- +- +-File: ld.info, Node: Bug Reporting, Prev: Bug Criteria, Up: Reporting Bugs +- +-How to report bugs +-================== +- +- A number of companies and individuals offer support for GNU +-products. If you obtained `ld' from a support organization, we +-recommend you contact that organization first. +- +- You can find contact information for many support companies and +-individuals in the file `etc/SERVICE' in the GNU Emacs distribution. +- +- In any event, we also recommend that you send bug reports for `ld' +-to `bug-gnu-utils@gnu.org'. +- +- The fundamental principle of reporting bugs usefully is this: +-*report all the facts*. If you are not sure whether to state a fact or +-leave it out, state it! +- +- Often people omit facts because they think they know what causes the +-problem and assume that some details do not matter. Thus, you might +-assume that the name of a symbol you use in an example does not matter. +-Well, probably it does not, but one cannot be sure. Perhaps the bug is +-a stray memory reference which happens to fetch from the location where +-that name is stored in memory; perhaps, if the name were different, the +-contents of that location would fool the linker into doing the right +-thing despite the bug. Play it safe and give a specific, complete +-example. That is the easiest thing for you to do, and the most helpful. +- +- Keep in mind that the purpose of a bug report is to enable us to fix +-the bug if it is new to us. Therefore, always write your bug reports +-on the assumption that the bug has not been reported previously. +- +- Sometimes people give a few sketchy facts and ask, "Does this ring a +-bell?" Those bug reports are useless, and we urge everyone to *refuse +-to respond to them* except to chide the sender to report bugs properly. +- +- To enable us to fix the bug, you should include all these things: +- +- * The version of `ld'. `ld' announces it if you start it with the +- `--version' argument. +- +- Without this, we will not know whether there is any point in +- looking for the bug in the current version of `ld'. +- +- * Any patches you may have applied to the `ld' source, including any +- patches made to the `BFD' library. +- +- * The type of machine you are using, and the operating system name +- and version number. +- +- * What compiler (and its version) was used to compile `ld'--e.g. +- "`gcc-2.7'". +- +- * The command arguments you gave the linker to link your example and +- observe the bug. To guarantee you will not omit something +- important, list them all. A copy of the Makefile (or the output +- from make) is sufficient. +- +- If we were to try to guess the arguments, we would probably guess +- wrong and then we might not encounter the bug. +- +- * A complete input file, or set of input files, that will reproduce +- the bug. It is generally most helpful to send the actual object +- files, uuencoded if necessary to get them through the mail system. +- Making them available for anonymous FTP is not as good, but may +- be the only reasonable choice for large object files. +- +- If the source files were assembled using `gas' or compiled using +- `gcc', then it may be OK to send the source files rather than the +- object files. In this case, be sure to say exactly what version of +- `gas' or `gcc' was used to produce the object files. Also say how +- `gas' or `gcc' were configured. +- +- * A description of what behavior you observe that you believe is +- incorrect. For example, "It gets a fatal signal." +- +- Of course, if the bug is that `ld' gets a fatal signal, then we +- will certainly notice it. But if the bug is incorrect output, we +- might not notice unless it is glaringly wrong. You might as well +- not give us a chance to make a mistake. +- +- Even if the problem you experience is a fatal signal, you should +- still say so explicitly. Suppose something strange is going on, +- such as, your copy of `ld' is out of synch, or you have +- encountered a bug in the C library on your system. (This has +- happened!) Your copy might crash and ours would not. If you told +- us to expect a crash, then when ours fails to crash, we would know +- that the bug was not happening for us. If you had not told us to +- expect a crash, then we would not be able to draw any conclusion +- from our observations. +- +- * If you wish to suggest changes to the `ld' source, send us context +- diffs, as generated by `diff' with the `-u', `-c', or `-p' option. +- Always send diffs from the old file to the new file. If you even +- discuss something in the `ld' source, refer to it by context, not +- by line number. +- +- The line numbers in our development sources will not match those +- in your sources. Your line numbers would convey no useful +- information to us. +- +- Here are some things that are not necessary: +- +- * A description of the envelope of the bug. +- +- Often people who encounter a bug spend a lot of time investigating +- which changes to the input file will make the bug go away and which +- changes will not affect it. +- +- This is often time consuming and not very useful, because the way +- we will find the bug is by running a single example under the +- debugger with breakpoints, not by pure deduction from a series of +- examples. We recommend that you save your time for something else. +- +- Of course, if you can find a simpler example to report *instead* +- of the original one, that is a convenience for us. Errors in the +- output will be easier to spot, running under the debugger will take +- less time, and so on. +- +- However, simplification is not vital; if you do not want to do +- this, report the bug anyway and send us the entire test case you +- used. +- +- * A patch for the bug. +- +- A patch for the bug does help us if it is a good one. But do not +- omit the necessary information, such as the test case, on the +- assumption that a patch is all we need. We might see problems +- with your patch and decide to fix the problem another way, or we +- might not understand it at all. +- +- Sometimes with a program as complicated as `ld' it is very hard to +- construct an example that will make the program follow a certain +- path through the code. If you do not send us the example, we will +- not be able to construct one, so we will not be able to verify +- that the bug is fixed. +- +- And if we cannot understand what bug you are trying to fix, or why +- your patch should be an improvement, we will not install it. A +- test case will help us to understand. +- +- * A guess about what the bug is or what it depends on. +- +- Such guesses are usually wrong. Even we cannot guess right about +- such things without first using the debugger to find the facts. +- +- +-File: ld.info, Node: MRI, Next: Index, Prev: Reporting Bugs, Up: Top +- +-MRI Compatible Script Files +-*************************** +- +- To aid users making the transition to GNU `ld' from the MRI linker, +-`ld' can use MRI compatible linker scripts as an alternative to the +-more general-purpose linker scripting language described in *Note +-Command Language: Commands. MRI compatible linker scripts have a much +-simpler command set than the scripting language otherwise used with +-`ld'. GNU `ld' supports the most commonly used MRI linker commands; +-these commands are described here. +- +- In general, MRI scripts aren't of much use with the `a.out' object +-file format, since it only has three sections and MRI scripts lack some +-features to make use of them. +- +- You can specify a file containing an MRI-compatible script using the +-`-c' command-line option. +- +- Each command in an MRI-compatible script occupies its own line; each +-command line starts with the keyword that identifies the command (though +-blank lines are also allowed for punctuation). If a line of an +-MRI-compatible script begins with an unrecognized keyword, `ld' issues +-a warning message, but continues processing the script. +- +- Lines beginning with `*' are comments. +- +- You can write these commands using all upper-case letters, or all +-lower case; for example, `chip' is the same as `CHIP'. The following +-list shows only the upper-case form of each command. +- +-`ABSOLUTE SECNAME' +-`ABSOLUTE SECNAME, SECNAME, ... SECNAME' +- Normally, `ld' includes in the output file all sections from all +- the input files. However, in an MRI-compatible script, you can +- use the `ABSOLUTE' command to restrict the sections that will be +- present in your output program. If the `ABSOLUTE' command is used +- at all in a script, then only the sections named explicitly in +- `ABSOLUTE' commands will appear in the linker output. You can +- still use other input sections (whatever you select on the command +- line, or using `LOAD') to resolve addresses in the output file. +- +-`ALIAS OUT-SECNAME, IN-SECNAME' +- Use this command to place the data from input section IN-SECNAME +- in a section called OUT-SECNAME in the linker output file. +- +- IN-SECNAME may be an integer. +- +-`ALIGN SECNAME = EXPRESSION' +- Align the section called SECNAME to EXPRESSION. The EXPRESSION +- should be a power of two. +- +-`BASE EXPRESSION' +- Use the value of EXPRESSION as the lowest address (other than +- absolute addresses) in the output file. +- +-`CHIP EXPRESSION' +-`CHIP EXPRESSION, EXPRESSION' +- This command does nothing; it is accepted only for compatibility. +- +-`END' +- This command does nothing whatever; it's only accepted for +- compatibility. +- +-`FORMAT OUTPUT-FORMAT' +- Similar to the `OUTPUT_FORMAT' command in the more general linker +- language, but restricted to one of these output formats: +- +- 1. S-records, if OUTPUT-FORMAT is `S' +- +- 2. IEEE, if OUTPUT-FORMAT is `IEEE' +- +- 3. COFF (the `coff-m68k' variant in BFD), if OUTPUT-FORMAT is +- `COFF' +- +-`LIST ANYTHING...' +- Print (to the standard output file) a link map, as produced by the +- `ld' command-line option `-M'. +- +- The keyword `LIST' may be followed by anything on the same line, +- with no change in its effect. +- +-`LOAD FILENAME' +-`LOAD FILENAME, FILENAME, ... FILENAME' +- Include one or more object file FILENAME in the link; this has the +- same effect as specifying FILENAME directly on the `ld' command +- line. +- +-`NAME OUTPUT-NAME' +- OUTPUT-NAME is the name for the program produced by `ld'; the +- MRI-compatible command `NAME' is equivalent to the command-line +- option `-o' or the general script language command `OUTPUT'. +- +-`ORDER SECNAME, SECNAME, ... SECNAME' +-`ORDER SECNAME SECNAME SECNAME' +- Normally, `ld' orders the sections in its output file in the order +- in which they first appear in the input files. In an +- MRI-compatible script, you can override this ordering with the +- `ORDER' command. The sections you list with `ORDER' will appear +- first in your output file, in the order specified. +- +-`PUBLIC NAME=EXPRESSION' +-`PUBLIC NAME,EXPRESSION' +-`PUBLIC NAME EXPRESSION' +- Supply a value (EXPRESSION) for external symbol NAME used in the +- linker input files. +- +-`SECT SECNAME, EXPRESSION' +-`SECT SECNAME=EXPRESSION' +-`SECT SECNAME EXPRESSION' +- You can use any of these three forms of the `SECT' command to +- specify the start address (EXPRESSION) for section SECNAME. If +- you have more than one `SECT' statement for the same SECNAME, only +- the *first* sets the start address. +- +diff -rup --new-file binutils-2.9.1/ld/ld.info-4 binutils-2.9.1/ld/ld.info-4 +--- binutils-2.9.1/ld/ld.info-4 Fri May 1 08:49:27 1998 ++++ binutils-2.9.1/ld/ld.info-4 Wed Dec 31 17:00:00 1969 +@@ -1,432 +0,0 @@ +-This is Info file ld.info, produced by Makeinfo version 1.68 from the +-input file ./ld.texinfo. +- +-START-INFO-DIR-ENTRY +-* Ld: (ld). The GNU linker. +-END-INFO-DIR-ENTRY +- +- This file documents the GNU linker LD. +- +- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software +-Foundation, Inc. +- +- Permission is granted to make and distribute verbatim copies of this +-manual provided the copyright notice and this permission notice are +-preserved on all copies. +- +- Permission is granted to copy and distribute modified versions of +-this manual under the conditions for verbatim copying, provided also +-that the entire resulting derived work is distributed under the terms +-of a permission notice identical to this one. +- +- Permission is granted to copy and distribute translations of this +-manual into another language, under the above conditions for modified +-versions. +- +- +-File: ld.info, Node: Index, Prev: MRI, Up: Top +- +-Index +-***** +- +-* Menu: +- +-* ": Symbols. +-* *( COMMON ): Section Placement. +-* *(SECTION): Section Placement. +-* -(: Options. +-* --relax on i960: i960. +-* -AARCH: Options. +-* -aKEYWORD: Options. +-* -architecture=ARCH: Options. +-* -assert KEYWORD: Options. +-* -auxiliary: Options. +-* -b FORMAT: Options. +-* -Bdynamic: Options. +-* -Bshareable: Options. +-* -Bstatic: Options. +-* -Bsymbolic: Options. +-* -c MRI-CMDFILE: Options. +-* -call_shared: Options. +-* -cref: Options. +-* -d: Options. +-* -dc: Options. +-* -defsym SYMBOL=EXP: Options. +-* -discard-all: Options. +-* -discard-locals: Options. +-* -dn: Options. +-* -dp: Options. +-* -dy: Options. +-* -dynamic-linker FILE: Options. +-* -E: Options. +-* -e ENTRY: Options. +-* -EB: Options. +-* -EL: Options. +-* -embedded-relocs: Options. +-* -entry=ENTRY: Options. +-* -export-dynamic: Options. +-* -f: Options. +-* -F: Options. +-* -filter: Options. +-* -force-exe-suffix: Options. +-* -format=FORMAT: Options. +-* -g: Options. +-* -G: Options. +-* -gpsize: Options. +-* -help: Options. +-* -hNAME: Options. +-* -i: Options. +-* -just-symbols=FILE: Options. +-* -lARCHIVE: Options. +-* -LDIR: Options. +-* -library-path=DIR: Options. +-* -library=ARCHIVE: Options. +-* -M: Options. +-* -m EMULATION: Options. +-* -Map: Options. +-* -mri-script=MRI-CMDFILE: Options. +-* -N: Options. +-* -n: Options. +-* -nmagic: Options. +-* -no-keep-memory: Options. +-* -no-warn-mismatch: Options. +-* -no-whole-archive: Options. +-* -noinhibit-exec: Options. +-* -non_shared: Options. +-* -o OUTPUT: Options. +-* -oformat: Options. +-* -omagic: Options. +-* -output=OUTPUT: Options. +-* -print-map: Options. +-* -qmagic: Options. +-* -Qy: Options. +-* -r: Options. +-* -R FILE: Options. +-* -relax: Options. +-* -relocateable: Options. +-* -rpath: Options. +-* -rpath-link: Options. +-* -S: Options. +-* -s: Options. +-* -script=SCRIPT: Options. +-* -shared: Options. +-* -soname=NAME: Options. +-* -sort-common: Options. +-* -split-by-file: Options. +-* -split-by-reloc: Options. +-* -static: Options. +-* -stats: Options. +-* -strip-all: Options. +-* -strip-debug: Options. +-* -t: Options. +-* -T SCRIPT: Options. +-* -Tbss ORG: Options. +-* -Tdata ORG: Options. +-* -trace: Options. +-* -trace-symbol=SYMBOL: Options. +-* -traditional-format: Options. +-* -Ttext ORG: Options. +-* -u SYMBOL: Options. +-* -undefined=SYMBOL: Options. +-* -Ur: Options. +-* -v: Options. +-* -V: Options. +-* -verbose: Options. +-* -version: Options. +-* -version-script=VERSION-SCRIPTFILE: Options. +-* -warn-comon: Options. +-* -warn-constructors: Options. +-* -warn-multiple-gp: Options. +-* -warn-once: Options. +-* -warn-section-align: Options. +-* -whole-archive: Options. +-* -wrap: Options. +-* -X: Options. +-* -x: Options. +-* -Y PATH: Options. +-* -y SYMBOL: Options. +-* -z KEYWORD: Options. +-* .: Location Counter. +-* 0x: Integers. +-* :PHDR: Section Options. +-* ;: Assignment. +-* =FILL: Section Options. +-* >REGION: Section Options. +-* [SECTION...], not supported: Section Placement. +-* ABSOLUTE (MRI): MRI. +-* absolute and relocatable symbols: Assignment. +-* ABSOLUTE(EXP): Arithmetic Functions. +-* ADDR(SECTION): Arithmetic Functions. +-* ALIAS (MRI): MRI. +-* ALIGN (MRI): MRI. +-* ALIGN(EXP): Arithmetic Functions. +-* aligning sections: Section Options. +-* allocating memory: MEMORY. +-* architectures: Options. +-* archive files, from cmd line: Options. +-* arithmetic: Expressions. +-* arithmetic operators: Operators. +-* assignment in scripts: Assignment. +-* assignment, in section defn: Section Data Expressions. +-* AT ( LDADR ): Section Options. +-* back end: BFD. +-* BASE (MRI): MRI. +-* BFD canonical format: Canonical format. +-* BFD requirements: BFD. +-* big-endian objects: Options. +-* binary input files: Option Commands. +-* binary input format: Options. +-* BLOCK(ALIGN): Section Options. +-* bug criteria: Bug Criteria. +-* bug reports: Bug Reporting. +-* bugs in ld: Reporting Bugs. +-* BYTE(EXPRESSION): Section Data Expressions. +-* C++ constructors, arranging in link: Option Commands. +-* CHIP (MRI): MRI. +-* combining symbols, warnings on: Options. +-* command files: Commands. +-* command line: Options. +-* commands, fundamental: Scripts. +-* comments: Scripts. +-* common allocation <1>: Options. +-* common allocation: Option Commands. +-* commons in output: Section Placement. +-* compatibility, MRI: Options. +-* constructors: Options. +-* CONSTRUCTORS: Option Commands. +-* constructors, arranging in link: Option Commands. +-* contents of a section: Section Placement. +-* crash of linker: Bug Criteria. +-* CREATE_OBJECT_SYMBOLS: Section Data Expressions. +-* cross reference table: Options. +-* cross references: Option Commands. +-* current output location: Location Counter. +-* dbx: Options. +-* decimal integers: Integers. +-* default emulation: Environment. +-* default input format: Environment. +-* DEFINED(SYMBOL): Arithmetic Functions. +-* deleting local symbols: Options. +-* direct output: Section Data Expressions. +-* discontinuous memory: MEMORY. +-* dot: Location Counter. +-* dynamic linker, from command line: Options. +-* dynamic symbol table: Options. +-* ELF program headers: PHDRS. +-* emulation: Options. +-* emulation, default: Environment. +-* END (MRI): MRI. +-* endianness: Options. +-* entry point, defaults: Entry Point. +-* entry point, from command line: Options. +-* ENTRY(SYMBOL): Entry Point. +-* error on valid input: Bug Criteria. +-* expression evaluation order: Evaluation. +-* expression syntax: Expressions. +-* expression, absolute: Arithmetic Functions. +-* expressions in a section: Section Data Expressions. +-* fatal signal: Bug Criteria. +-* FILENAME: Section Placement. +-* filename symbols: Section Data Expressions. +-* FILENAME(SECTION): Section Placement. +-* files and sections, section defn: Section Placement. +-* files, including in output sections: Section Placement. +-* fill pattern, entire section: Section Options. +-* FILL(EXPRESSION): Section Data Expressions. +-* first input file: Option Commands. +-* first instruction: Entry Point. +-* FLOAT: Option Commands. +-* FORCE_COMMON_ALLOCATION: Option Commands. +-* FORMAT (MRI): MRI. +-* format, output file: Option Commands. +-* functions in expression language: Arithmetic Functions. +-* fundamental script commands: Scripts. +-* GNU linker: Overview. +-* GNUTARGET <1>: Option Commands. +-* GNUTARGET: Environment. +-* GROUP ( FILES ): Option Commands. +-* grouping input files: Option Commands. +-* groups of archives: Options. +-* H8/300 support: H8/300. +-* header size: Arithmetic Functions. +-* help: Options. +-* hexadecimal integers: Integers. +-* holes: Location Counter. +-* holes, filling: Section Data Expressions. +-* i960 support: i960. +-* INCLUDE FILENAME: Option Commands. +-* including a linker script: Option Commands. +-* including an entire archive: Options. +-* incremental link: Options. +-* INPUT ( FILES ): Option Commands. +-* input file format: Option Commands. +-* input filename symbols: Section Data Expressions. +-* input files, displaying: Options. +-* input files, section defn: Section Placement. +-* input format: Options. +-* input sections to output section: Section Placement. +-* integer notation: Integers. +-* integer suffixes: Integers. +-* internal object-file format: Canonical format. +-* invalid input: Bug Criteria. +-* K and M integer suffixes: Integers. +-* l =: MEMORY. +-* L, deleting symbols beginning: Options. +-* layout of output file: Scripts. +-* lazy evaluation: Evaluation. +-* ld bugs, reporting: Bug Reporting. +-* LDEMULATION: Environment. +-* len =: MEMORY. +-* LENGTH =: MEMORY. +-* link map: Options. +-* link-time runtime library search path: Options. +-* linker crash: Bug Criteria. +-* LIST (MRI): MRI. +-* little-endian objects: Options. +-* LOAD (MRI): MRI. +-* load address, specifying: Section Options. +-* LOADADDR(SECTION): Arithmetic Functions. +-* loading, preventing: Section Options. +-* local symbols, deleting: Options. +-* location counter: Location Counter. +-* LONG(EXPRESSION): Section Data Expressions. +-* M and K integer suffixes: Integers. +-* machine architecture, output: Option Commands. +-* machine dependencies: Machine Dependent. +-* MAX: Arithmetic Functions. +-* MEMORY: MEMORY. +-* memory region attributes: MEMORY. +-* memory regions and sections: Section Options. +-* memory usage: Options. +-* MIN: Arithmetic Functions. +-* MIPS embedded PIC code: Options. +-* MRI compatibility: MRI. +-* NAME (MRI): MRI. +-* names: Symbols. +-* naming memory regions: MEMORY. +-* naming output sections: Section Definition. +-* naming the output file <1>: Options. +-* naming the output file: Option Commands. +-* negative integers: Integers. +-* NEXT(EXP): Arithmetic Functions. +-* NMAGIC: Options. +-* NOCROSSREFS ( SECTIONS ): Option Commands. +-* NOFLOAT: Option Commands. +-* NOLOAD: Section Options. +-* Non constant expression: Assignment. +-* o =: MEMORY. +-* objdump -i: BFD. +-* object file management: BFD. +-* object files: Options. +-* object formats available: BFD. +-* object size: Options. +-* octal integers: Integers. +-* OMAGIC: Options. +-* opening object files: BFD outline. +-* Operators for arithmetic: Operators. +-* options: Options. +-* ORDER (MRI): MRI. +-* org =: MEMORY. +-* ORIGIN =: MEMORY. +-* OUTPUT ( FILENAME ): Option Commands. +-* output file after errors: Options. +-* output file layout: Scripts. +-* OUTPUT_ARCH ( BFDNAME ): Option Commands. +-* OUTPUT_FORMAT ( BFDNAME ): Option Commands. +-* OVERLAY: Overlays. +-* overlays: Overlays. +-* partial link: Options. +-* path for libraries: Option Commands. +-* PHDRS: PHDRS. +-* precedence in expressions: Operators. +-* prevent unnecessary loading: Section Options. +-* program headers: PHDRS. +-* program headers and sections: Section Options. +-* provide: Assignment. +-* PUBLIC (MRI): MRI. +-* QUAD(EXPRESSION): Section Data Expressions. +-* quoted symbol names: Symbols. +-* read-only text: Options. +-* read/write from cmd line: Options. +-* regions of memory: MEMORY. +-* relaxing addressing modes: Options. +-* relaxing on H8/300: H8/300. +-* relaxing on i960: i960. +-* relocatable and absolute symbols: Assignment. +-* relocatable output: Options. +-* reporting bugs in ld: Reporting Bugs. +-* requirements for BFD: BFD. +-* retaining specified symbols: Options. +-* rounding up location counter: Arithmetic Functions. +-* runtime library name: Options. +-* runtime library search path: Options. +-* scaled integers: Integers. +-* script files: Options. +-* search directory, from cmd line: Options. +-* search path, libraries: Option Commands. +-* SEARCH_DIR ( PATH ): Option Commands. +-* SECT (MRI): MRI. +-* section address <1>: Section Options. +-* section address: Arithmetic Functions. +-* section alignment: Section Options. +-* section alignment, warnings on: Options. +-* section definition: Section Definition. +-* section defn, full syntax: Section Options. +-* section fill pattern: Section Options. +-* section load address: Arithmetic Functions. +-* section size: Arithmetic Functions. +-* section start: Section Options. +-* section, assigning to memory region: Section Options. +-* section, assigning to program header: Section Options. +-* SECTIONS: SECTIONS. +-* segment origins, cmd line: Options. +-* semicolon: Assignment. +-* shared libraries: Options. +-* SHORT(EXPRESSION): Section Data Expressions. +-* SIZEOF(SECTION): Arithmetic Functions. +-* SIZEOF_HEADERS: Arithmetic Functions. +-* sizeof_headers: Arithmetic Functions. +-* specify load address: Section Options. +-* SQUAD(EXPRESSION): Section Data Expressions. +-* standard Unix system: Options. +-* start address, section: Section Options. +-* start of execution: Entry Point. +-* STARTUP ( FILENAME ): Option Commands. +-* strip all symbols: Options. +-* strip debugger symbols: Options. +-* stripping all but some symbols: Options. +-* suffixes for integers: Integers. +-* SYMBOL = EXPRESSION ;: Section Data Expressions. +-* symbol defaults: Arithmetic Functions. +-* symbol definition, scripts: Assignment. +-* SYMBOL F= EXPRESSION ;: Section Data Expressions. +-* symbol names: Symbols. +-* symbol tracing: Options. +-* symbol versions: Version Script. +-* symbol-only input: Options. +-* symbols, from command line: Options. +-* symbols, relocatable and absolute: Assignment. +-* symbols, retaining selectively: Options. +-* synthesizing linker: Options. +-* synthesizing on H8/300: H8/300. +-* TARGET ( FORMAT ): Option Commands. +-* traditional format: Options. +-* unallocated address, next: Arithmetic Functions. +-* undefined symbol: Options. +-* undefined symbols, warnings on: Options. +-* uninitialized data: Section Placement. +-* unspecified memory: Section Data Expressions. +-* usage: Options. +-* variables, defining: Assignment. +-* verbose: Options. +-* version: Options. +-* version script: Version Script. +-* version script, symbol versions: Options. +-* VERSION {script text}: Version Script. +-* versions of symbols: Version Script. +-* warnings, on combining symbols: Options. +-* warnings, on section alignment: Options. +-* warnings, on undefined symbols: Options. +-* what is this?: Overview. +- +- +diff -rup --new-file binutils-2.9.1/ld/ld.texinfo binutils-2.9.1/ld/ld.texinfo +--- binutils-2.9.1/ld/ld.texinfo Fri May 1 08:48:48 1998 ++++ binutils-2.9.1/ld/ld.texinfo Sun Aug 23 00:00:00 1998 +@@ -1834,11 +1834,11 @@ other places they can appear for aesthet + @table @code + @item Assignment + Semicolons must appear at the end of assignment expressions. +-@xref{Assignment} ++@xref{Assignment}. + + @item PHDRS + Semicolons must appear at the end of a @code{PHDRS} statement. +-@xref{PHDRS} ++@xref{PHDRS}. + @end table + + @node MEMORY +diff -rup --new-file binutils-2.9.1/ld/ldctor.c binutils-2.9.1/ld/ldctor.c +--- binutils-2.9.1/ld/ldctor.c Fri May 1 08:48:48 1998 ++++ binutils-2.9.1/ld/ldctor.c Sun Aug 23 00:00:00 1998 +@@ -144,10 +144,13 @@ ldctor_build_sets () + /* If the symbol is defined, we may have been invoked from + collect, and the sets may already have been built, so we do + not do anything. */ +- if (p->h->type == bfd_link_hash_defined +- || p->h->type == bfd_link_hash_defweak) ++ /* dgv -- libnix v1.1 uses absolute sets that are also explicitly ++ defined in the library so that the sets need to be build even ++ if the symbol is defined */ ++ if ((output_bfd->xvec->flavour != bfd_target_amiga_flavour) && ++ (p->h->type == bfd_link_hash_defined ++ || p->h->type == bfd_link_hash_defweak)) + continue; +- + /* For each set we build: + set: + .long number_of_elements +@@ -239,10 +242,17 @@ ldctor_build_sets () + if (e->name != NULL) + minfo ("%T\n", e->name); + else +- minfo ("%G\n", e->section->owner, e->section, e->value); ++ if (e->section->owner) ++ minfo ("%G\n", e->section->owner, e->section, e->value); ++ else ++ minfo ("%s\n", "** ABS **"); + } + +- if (link_info.relocateable) ++ /* dgv -- on the amiga, we want the constructors to be relocateable ++ objects. However, this should be arranged somewhere else (FIXME) */ ++ if (link_info.relocateable || ++ (output_bfd->xvec->flavour == bfd_target_amiga_flavour && ++ e->section != bfd_abs_section_ptr)) + lang_add_reloc (p->reloc, howto, e->section, e->name, + exp_intop (e->value)); + else +diff -rup --new-file binutils-2.9.1/ld/ldfile.c binutils-2.9.1/ld/ldfile.c +--- binutils-2.9.1/ld/ldfile.c Fri May 1 08:48:48 1998 ++++ binutils-2.9.1/ld/ldfile.c Sun Aug 23 00:00:00 1998 +@@ -39,6 +39,9 @@ Software Foundation, 59 Temple Place - S + + #include + ++static int n_flavors, flavors_len; ++char **flavors; ++ + const char *ldfile_input_filename; + boolean ldfile_assumed_script = false; + const char *ldfile_output_machine_name = ""; +@@ -79,6 +82,32 @@ static boolean ldfile_open_file_search + const char *lib, const char *suffix)); + static FILE *try_open PARAMS ((const char *name, const char *exten)); + ++static int flavors_cmp (f1, f2) ++ const void *f1, *f2; ++{ ++ return strcmp (*(char**)f1, *(char**)f2); ++} ++ ++void ++sort_flavors () ++{ ++ if (n_flavors > 1) ++ qsort ((void*)flavors, n_flavors, sizeof(char**), flavors_cmp); ++} ++ ++void ++ldfile_add_flavor (name) ++ char *name; ++{ ++ n_flavors++; ++ if (flavors) ++ flavors = (char**) xrealloc ((PTR)flavors, n_flavors*sizeof (char*)); ++ else ++ flavors = (char**) xmalloc (sizeof (char*)); ++ flavors [n_flavors-1] = name; ++ flavors_len += strlen (name); ++} ++ + void + ldfile_add_library_path (name, cmdline) + const char *name; +@@ -128,6 +157,7 @@ ldfile_open_file_search (arch, entry, li + const char *suffix; + { + search_dirs_type *search; ++ char *flavor_dir = (char *) alloca (flavors_len + n_flavors + 1); + + /* If this is not an archive, try to open it in the current + directory first. */ +@@ -142,6 +172,7 @@ ldfile_open_file_search (arch, entry, li + search = search->next) + { + char *string; ++ int i, count=n_flavors; + + if (entry->dynamic && ! link_info.relocateable) + { +@@ -171,15 +202,40 @@ ldfile_open_file_search (arch, entry, li + else + sprintf (string, "%s%s%s", search->name, slash, entry->filename); + +- if (ldfile_try_open_bfd (string, entry)) +- { +- entry->filename = string; +- return true; ++ for (count = n_flavors; count>=0; count--) { ++ *flavor_dir = '\0'; ++ for (i=0; iname) ++ + strlen (slash) ++ + strlen (flavor_dir) ++ + strlen (lib) ++ + strlen (entry->filename) ++ + strlen (arch) ++ + strlen (suffix) ++ + 1); ++ ++ if (entry->is_archive) ++ sprintf (string, "%s%s%s%s%s%s%s", search->name, slash, flavor_dir, ++ lib, entry->filename, arch, suffix); ++ else if (entry->filename[0] == '/' || entry->filename[0] == '.') ++ strcpy (string, entry->filename); ++ else ++ sprintf (string, "%s%s%s%s", search->name, slash, flavor_dir, ++ entry->filename); ++ ++ if (ldfile_try_open_bfd (string, entry)) ++ { ++ entry->filename = string; ++ return true; ++ } ++ ++ free (string); ++ } + } +- + return false; + } + +@@ -206,6 +262,15 @@ ldfile_open_file (entry) + arch != (search_arch_type *) NULL; + arch = arch->next) + { ++#if (defined (__BEOS__) && defined (__INTEL__)) ++ if (ldfile_open_file_search (arch->name, entry, "lib", ".so.LIB")) ++ return; ++#endif ++#if defined (__CYGWIN32__) ++ if (strcmp (default_target, "pei-i386") == 0 ++ && (ldfile_open_file_search (arch->name, entry, "", ".lib"))) ++ return; ++#endif + if (ldfile_open_file_search (arch->name, entry, "lib", ".a")) + return; + #ifdef VMS +diff -rup --new-file binutils-2.9.1/ld/ldgram.c binutils-2.9.1/ld/ldgram.c +--- binutils-2.9.1/ld/ldgram.c Fri May 1 08:49:27 1998 ++++ binutils-2.9.1/ld/ldgram.c Wed Dec 31 17:00:00 1969 +@@ -1,2584 +0,0 @@ +- +-/* A Bison parser, made from ldgram.y +- by GNU Bison version 1.25 +- */ +- +-#define YYBISON 1 /* Identify Bison output. */ +- +-#define INT 258 +-#define NAME 259 +-#define LNAME 260 +-#define PLUSEQ 261 +-#define MINUSEQ 262 +-#define MULTEQ 263 +-#define DIVEQ 264 +-#define LSHIFTEQ 265 +-#define RSHIFTEQ 266 +-#define ANDEQ 267 +-#define OREQ 268 +-#define OROR 269 +-#define ANDAND 270 +-#define EQ 271 +-#define NE 272 +-#define LE 273 +-#define GE 274 +-#define LSHIFT 275 +-#define RSHIFT 276 +-#define UNARY 277 +-#define END 278 +-#define ALIGN_K 279 +-#define BLOCK 280 +-#define BIND 281 +-#define QUAD 282 +-#define SQUAD 283 +-#define LONG 284 +-#define SHORT 285 +-#define BYTE 286 +-#define SECTIONS 287 +-#define PHDRS 288 +-#define SIZEOF_HEADERS 289 +-#define OUTPUT_FORMAT 290 +-#define FORCE_COMMON_ALLOCATION 291 +-#define OUTPUT_ARCH 292 +-#define INCLUDE 293 +-#define MEMORY 294 +-#define DEFSYMEND 295 +-#define NOLOAD 296 +-#define DSECT 297 +-#define COPY 298 +-#define INFO 299 +-#define OVERLAY 300 +-#define DEFINED 301 +-#define TARGET_K 302 +-#define SEARCH_DIR 303 +-#define MAP 304 +-#define ENTRY 305 +-#define NEXT 306 +-#define SIZEOF 307 +-#define ADDR 308 +-#define LOADADDR 309 +-#define MAX 310 +-#define MIN 311 +-#define STARTUP 312 +-#define HLL 313 +-#define SYSLIB 314 +-#define FLOAT 315 +-#define NOFLOAT 316 +-#define NOCROSSREFS 317 +-#define ORIGIN 318 +-#define FILL 319 +-#define LENGTH 320 +-#define CREATE_OBJECT_SYMBOLS 321 +-#define INPUT 322 +-#define GROUP 323 +-#define OUTPUT 324 +-#define CONSTRUCTORS 325 +-#define ALIGNMOD 326 +-#define AT 327 +-#define PROVIDE 328 +-#define CHIP 329 +-#define LIST 330 +-#define SECT 331 +-#define ABSOLUTE 332 +-#define LOAD 333 +-#define NEWLINE 334 +-#define ENDWORD 335 +-#define ORDER 336 +-#define NAMEWORD 337 +-#define FORMAT 338 +-#define PUBLIC 339 +-#define BASE 340 +-#define ALIAS 341 +-#define TRUNCATE 342 +-#define REL 343 +-#define INPUT_SCRIPT 344 +-#define INPUT_MRI_SCRIPT 345 +-#define INPUT_DEFSYM 346 +-#define CASE 347 +-#define EXTERN 348 +-#define START 349 +-#define VERS_TAG 350 +-#define VERS_IDENTIFIER 351 +-#define GLOBAL 352 +-#define LOCAL 353 +-#define VERSIONK 354 +-#define INPUT_VERSION_SCRIPT 355 +- +-#line 21 "ldgram.y" +- +-/* +- +- */ +- +-#define DONTDECLARE_MALLOC +- +-#include "bfd.h" +-#include "sysdep.h" +-#include "bfdlink.h" +-#include "ld.h" +-#include "ldexp.h" +-#include "ldver.h" +-#include "ldlang.h" +-#include "ldemul.h" +-#include "ldfile.h" +-#include "ldmisc.h" +-#include "ldmain.h" +-#include "mri.h" +-#include "ldlex.h" +- +-#ifndef YYDEBUG +-#define YYDEBUG 1 +-#endif +- +-static enum section_type sectype; +- +-lang_memory_region_type *region; +- +- +-char *current_file; +-boolean ldgram_want_filename = true; +-boolean had_script = false; +-boolean force_make_executable = false; +- +-boolean ldgram_in_script = false; +-boolean ldgram_had_equals = false; +- +- +-#define ERROR_NAME_MAX 20 +-static char *error_names[ERROR_NAME_MAX]; +-static int error_index; +-#define PUSH_ERROR(x) if (error_index < ERROR_NAME_MAX) error_names[error_index] = x; error_index++; +-#define POP_ERROR() error_index--; +- +-#line 66 "ldgram.y" +-typedef union { +- bfd_vma integer; +- char *name; +- int token; +- union etree_union *etree; +- struct phdr_info +- { +- boolean filehdr; +- boolean phdrs; +- union etree_union *at; +- union etree_union *flags; +- } phdr; +- struct lang_nocrossref *nocrossref; +- struct lang_output_section_phdr_list *section_phdr; +- struct bfd_elf_version_deps *deflist; +- struct bfd_elf_version_expr *versyms; +- struct bfd_elf_version_tree *versnode; +-} YYSTYPE; +-#include +- +-#ifndef __cplusplus +-#ifndef __STDC__ +-#define const +-#endif +-#endif +- +- +- +-#define YYFINAL 542 +-#define YYFLAG -32768 +-#define YYNTBASE 124 +- +-#define YYTRANSLATE(x) ((unsigned)(x) <= 355 ? yytranslate[x] : 222) +- +-static const char yytranslate[] = { 0, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 122, 2, 2, 2, 34, 21, 2, 37, +- 119, 32, 30, 117, 31, 2, 33, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 16, 118, 24, +- 10, 25, 15, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 120, 2, 121, 20, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 48, 19, 49, 123, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, +- 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, +- 22, 23, 26, 27, 28, 29, 35, 36, 38, 39, +- 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, +- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, +- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, +- 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, +- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, +- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, +- 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, +- 112, 113, 114, 115, 116 +-}; +- +-#if YYDEBUG != 0 +-static const short yyprhs[] = { 0, +- 0, 3, 6, 9, 12, 14, 15, 20, 21, 24, +- 28, 29, 32, 37, 39, 41, 44, 46, 51, 56, +- 60, 63, 68, 72, 77, 82, 87, 92, 97, 100, +- 103, 106, 111, 116, 119, 122, 125, 128, 129, 135, +- 138, 139, 143, 146, 147, 149, 153, 155, 159, 160, +- 162, 166, 168, 172, 173, 176, 179, 180, 182, 184, +- 186, 188, 190, 192, 194, 196, 198, 200, 205, 210, +- 215, 220, 229, 234, 236, 241, 242, 248, 253, 254, +- 260, 265, 267, 271, 274, 276, 280, 283, 288, 291, +- 294, 295, 300, 303, 305, 307, 309, 313, 317, 321, +- 323, 324, 329, 330, 336, 337, 343, 344, 350, 353, +- 355, 357, 359, 361, 366, 371, 374, 376, 377, 379, +- 381, 383, 385, 387, 389, 392, 393, 395, 397, 399, +- 401, 403, 405, 407, 409, 411, 413, 417, 421, 428, +- 430, 431, 437, 440, 444, 445, 446, 454, 458, 462, +- 466, 467, 472, 477, 481, 485, 487, 492, 496, 497, +- 499, 501, 502, 505, 509, 510, 513, 516, 520, 525, +- 528, 531, 534, 538, 542, 546, 550, 554, 558, 562, +- 566, 570, 574, 578, 582, 586, 590, 594, 598, 604, +- 608, 612, 617, 619, 621, 626, 631, 636, 641, 646, +- 651, 653, 660, 667, 672, 673, 674, 675, 676, 677, +- 678, 694, 695, 696, 697, 698, 699, 716, 717, 718, +- 726, 728, 730, 732, 734, 736, 740, 741, 744, 748, +- 751, 758, 769, 772, 774, 775, 777, 780, 781, 782, +- 786, 787, 788, 789, 790, 802, 807, 808, 811, 812, +- 813, 820, 822, 823, 827, 833, 834, 838, 839, 842, +- 843, 849, 851, 854, 860, 867, 869, 872, 873, 876, +- 881, 886, 895, 897 +-}; +- +-static const short yyrhs[] = { 105, +- 138, 0, 106, 128, 0, 116, 213, 0, 107, 126, +- 0, 4, 0, 0, 127, 4, 10, 179, 0, 0, +- 129, 130, 0, 130, 131, 95, 0, 0, 90, 179, +- 0, 90, 179, 117, 179, 0, 4, 0, 91, 0, +- 97, 133, 0, 96, 0, 100, 4, 10, 179, 0, +- 100, 4, 117, 179, 0, 100, 4, 179, 0, 99, +- 4, 0, 92, 4, 117, 179, 0, 92, 4, 179, +- 0, 92, 4, 10, 179, 0, 38, 4, 10, 179, +- 0, 38, 4, 117, 179, 0, 87, 4, 10, 179, +- 0, 87, 4, 117, 179, 0, 93, 135, 0, 94, +- 134, 0, 98, 4, 0, 102, 4, 117, 4, 0, +- 102, 4, 117, 3, 0, 101, 179, 0, 103, 3, +- 0, 108, 136, 0, 109, 137, 0, 0, 54, 125, +- 132, 130, 36, 0, 110, 4, 0, 0, 133, 117, +- 4, 0, 133, 4, 0, 0, 4, 0, 134, 117, +- 4, 0, 4, 0, 135, 117, 4, 0, 0, 4, +- 0, 136, 117, 4, 0, 4, 0, 137, 117, 4, +- 0, 0, 139, 140, 0, 140, 141, 0, 0, 163, +- 0, 145, 0, 205, 0, 170, 0, 171, 0, 173, +- 0, 175, 0, 147, 0, 215, 0, 118, 0, 63, +- 37, 4, 119, 0, 64, 37, 125, 119, 0, 85, +- 37, 125, 119, 0, 51, 37, 4, 119, 0, 51, +- 37, 4, 117, 4, 117, 4, 119, 0, 53, 37, +- 4, 119, 0, 52, 0, 83, 37, 144, 119, 0, +- 0, 84, 142, 37, 144, 119, 0, 65, 37, 125, +- 119, 0, 0, 54, 125, 143, 140, 36, 0, 78, +- 37, 176, 119, 0, 4, 0, 144, 117, 4, 0, +- 144, 4, 0, 5, 0, 144, 117, 5, 0, 144, +- 5, 0, 46, 48, 146, 49, 0, 146, 181, 0, +- 146, 147, 0, 0, 66, 37, 4, 119, 0, 161, +- 160, 0, 4, 0, 32, 0, 15, 0, 148, 162, +- 4, 0, 148, 162, 32, 0, 148, 162, 15, 0, +- 4, 0, 0, 120, 150, 148, 121, 0, 0, 4, +- 151, 37, 148, 119, 0, 0, 15, 152, 37, 148, +- 119, 0, 0, 32, 153, 37, 148, 119, 0, 161, +- 160, 0, 82, 0, 118, 0, 86, 0, 149, 0, +- 157, 37, 177, 119, 0, 80, 37, 177, 119, 0, +- 155, 154, 0, 154, 0, 0, 155, 0, 41, 0, +- 42, 0, 43, 0, 44, 0, 45, 0, 10, 177, +- 0, 0, 6, 0, 7, 0, 8, 0, 9, 0, +- 11, 0, 12, 0, 13, 0, 14, 0, 118, 0, +- 117, 0, 4, 10, 177, 0, 4, 159, 177, 0, +- 89, 37, 4, 10, 177, 119, 0, 117, 0, 0, +- 55, 48, 165, 164, 49, 0, 164, 165, 0, 164, +- 117, 165, 0, 0, 0, 4, 166, 169, 16, 167, +- 162, 168, 0, 79, 10, 177, 0, 81, 10, 177, +- 0, 37, 4, 119, 0, 0, 73, 37, 125, 119, +- 0, 74, 37, 172, 119, 0, 74, 37, 119, 0, +- 172, 162, 125, 0, 125, 0, 75, 37, 174, 119, +- 0, 174, 162, 125, 0, 0, 76, 0, 77, 0, +- 0, 4, 176, 0, 4, 117, 176, 0, 0, 178, +- 179, 0, 31, 179, 0, 37, 179, 119, 0, 67, +- 37, 179, 119, 0, 122, 179, 0, 30, 179, 0, +- 123, 179, 0, 179, 32, 179, 0, 179, 33, 179, +- 0, 179, 34, 179, 0, 179, 30, 179, 0, 179, +- 31, 179, 0, 179, 28, 179, 0, 179, 29, 179, +- 0, 179, 22, 179, 0, 179, 23, 179, 0, 179, +- 26, 179, 0, 179, 27, 179, 0, 179, 24, 179, +- 0, 179, 25, 179, 0, 179, 21, 179, 0, 179, +- 20, 179, 0, 179, 19, 179, 0, 179, 15, 179, +- 16, 179, 0, 179, 18, 179, 0, 179, 17, 179, +- 0, 62, 37, 4, 119, 0, 3, 0, 50, 0, +- 68, 37, 4, 119, 0, 69, 37, 4, 119, 0, +- 70, 37, 4, 119, 0, 93, 37, 179, 119, 0, +- 38, 37, 179, 119, 0, 39, 37, 179, 119, 0, +- 4, 0, 71, 37, 179, 117, 179, 119, 0, 72, +- 37, 179, 117, 179, 119, 0, 88, 37, 179, 119, +- 0, 0, 0, 0, 0, 0, 0, 4, 182, 196, +- 180, 183, 48, 184, 156, 49, 185, 199, 200, 158, +- 186, 162, 0, 0, 0, 0, 0, 0, 61, 187, +- 197, 198, 180, 188, 48, 189, 201, 49, 190, 199, +- 200, 158, 191, 162, 0, 0, 0, 84, 192, 196, +- 193, 48, 146, 49, 0, 57, 0, 58, 0, 59, +- 0, 60, 0, 61, 0, 37, 194, 119, 0, 0, +- 37, 119, 0, 179, 195, 16, 0, 195, 16, 0, +- 40, 37, 179, 119, 195, 16, 0, 40, 37, 179, +- 119, 39, 37, 179, 119, 195, 16, 0, 179, 16, +- 0, 16, 0, 0, 78, 0, 25, 4, 0, 0, +- 0, 200, 16, 4, 0, 0, 0, 0, 0, 201, +- 4, 202, 48, 156, 49, 203, 200, 158, 204, 162, +- 0, 47, 48, 206, 49, 0, 0, 206, 207, 0, +- 0, 0, 4, 208, 210, 211, 209, 118, 0, 179, +- 0, 0, 4, 212, 211, 0, 88, 37, 179, 119, +- 211, 0, 0, 37, 179, 119, 0, 0, 214, 217, +- 0, 0, 216, 115, 48, 217, 49, 0, 218, 0, +- 217, 218, 0, 111, 48, 220, 49, 118, 0, 111, +- 48, 220, 49, 219, 118, 0, 111, 0, 219, 111, +- 0, 0, 221, 118, 0, 113, 16, 221, 118, 0, +- 114, 16, 221, 118, 0, 113, 16, 221, 118, 114, +- 16, 221, 118, 0, 112, 0, 221, 118, 112, 0 +-}; +- +-#endif +- +-#if YYDEBUG != 0 +-static const short yyrline[] = { 0, +- 142, 144, 145, 146, 150, 153, 155, 162, 168, 175, +- 177, 180, 182, 183, 186, 189, 190, 191, 193, 195, +- 197, 199, 201, 203, 205, 207, 209, 211, 213, 214, +- 215, 217, 219, 221, 223, 225, 226, 227, 228, 229, +- 231, 234, 236, 237, 240, 243, 246, 249, 253, 255, +- 256, 259, 262, 266, 271, 277, 279, 284, 286, 287, +- 288, 289, 290, 291, 292, 293, 294, 295, 297, 299, +- 301, 304, 306, 308, 310, 311, 313, 315, 317, 318, +- 319, 325, 329, 332, 335, 338, 341, 346, 350, 352, +- 353, 356, 359, 364, 367, 369, 371, 373, 375, 379, +- 384, 389, 390, 394, 395, 401, 402, 406, 409, 411, +- 415, 416, 421, 422, 427, 437, 439, 442, 444, 447, +- 450, 452, 454, 456, 460, 468, 473, 476, 478, 480, +- 482, 484, 486, 488, 493, 493, 497, 502, 510, 517, +- 518, 521, 525, 527, 528, 532, 534, 537, 545, 554, +- 559, 563, 568, 570, 574, 577, 582, 584, 587, 590, +- 593, 597, 602, 611, 622, 624, 627, 630, 632, 634, +- 636, 638, 641, 643, 645, 647, 649, 651, 653, 655, +- 657, 659, 661, 663, 665, 667, 669, 671, 673, 675, +- 677, 679, 681, 683, 686, 688, 690, 692, 694, 696, +- 698, 700, 702, 707, 709, 712, 714, 716, 722, 723, +- 729, 729, 731, 734, 738, 740, 746, 746, 752, 756, +- 759, 761, 762, 763, 764, 767, 769, 770, 773, 775, +- 776, 781, 785, 787, 790, 793, 797, 800, 803, 808, +- 821, 823, 829, 831, 837, 839, 843, 845, 848, 850, +- 852, 858, 888, 893, 905, 912, 917, 925, 931, 939, +- 943, 949, 951, 954, 959, 965, 970, 976, 981, 985, +- 989, 993, 999, 1004 +-}; +-#endif +- +- +-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) +- +-static const char * const yytname[] = { "$","error","$undefined.","INT","NAME", +-"LNAME","PLUSEQ","MINUSEQ","MULTEQ","DIVEQ","'='","LSHIFTEQ","RSHIFTEQ","ANDEQ", +-"OREQ","'?'","':'","OROR","ANDAND","'|'","'^'","'&'","EQ","NE","'<'","'>'","LE", +-"GE","LSHIFT","RSHIFT","'+'","'-'","'*'","'/'","'%'","UNARY","END","'('","ALIGN_K", +-"BLOCK","BIND","QUAD","SQUAD","LONG","SHORT","BYTE","SECTIONS","PHDRS","'{'", +-"'}'","SIZEOF_HEADERS","OUTPUT_FORMAT","FORCE_COMMON_ALLOCATION","OUTPUT_ARCH", +-"INCLUDE","MEMORY","DEFSYMEND","NOLOAD","DSECT","COPY","INFO","OVERLAY","DEFINED", +-"TARGET_K","SEARCH_DIR","MAP","ENTRY","NEXT","SIZEOF","ADDR","LOADADDR","MAX", +-"MIN","STARTUP","HLL","SYSLIB","FLOAT","NOFLOAT","NOCROSSREFS","ORIGIN","FILL", +-"LENGTH","CREATE_OBJECT_SYMBOLS","INPUT","GROUP","OUTPUT","CONSTRUCTORS","ALIGNMOD", +-"AT","PROVIDE","CHIP","LIST","SECT","ABSOLUTE","LOAD","NEWLINE","ENDWORD","ORDER", +-"NAMEWORD","FORMAT","PUBLIC","BASE","ALIAS","TRUNCATE","REL","INPUT_SCRIPT", +-"INPUT_MRI_SCRIPT","INPUT_DEFSYM","CASE","EXTERN","START","VERS_TAG","VERS_IDENTIFIER", +-"GLOBAL","LOCAL","VERSIONK","INPUT_VERSION_SCRIPT","','","';'","')'","'['","']'", +-"'!'","'~'","file","filename","defsym_expr","@1","mri_script_file","@2","mri_script_lines", +-"mri_script_command","@3","ordernamelist","mri_load_name_list","mri_abs_name_list", +-"casesymlist","extern_name_list","script_file","@4","ifile_list","ifile_p1", +-"@5","@6","input_list","sections","sec_or_group_p1","statement_anywhere","file_NAME_list", +-"input_section_spec","@7","@8","@9","@10","statement","statement_list","statement_list_opt", +-"length","fill_opt","assign_op","end","assignment","opt_comma","memory","memory_spec_list", +-"memory_spec","@11","origin_spec","length_spec","attributes_opt","startup","high_level_library", +-"high_level_library_NAME_list","low_level_library","low_level_library_NAME_list", +-"floating_point_support","nocrossref_list","mustbe_exp","@12","exp","opt_at", +-"section","@13","@14","@15","@16","@17","@18","@19","@20","@21","@22","@23", +-"@24","type","atype","opt_exp_with_type","opt_exp_without_type","opt_nocrossrefs", +-"memspec_opt","phdr_opt","overlay_section","@25","@26","@27","phdrs","phdr_list", +-"phdr","@28","@29","phdr_type","phdr_qualifiers","phdr_val","version_script_file", +-"@30","version","@31","vers_nodes","vers_node","verdep","vers_tag","vers_defns", NULL +-}; +-#endif +- +-static const short yyr1[] = { 0, +- 124, 124, 124, 124, 125, 127, 126, 129, 128, 130, +- 130, 131, 131, 131, 131, 131, 131, 131, 131, 131, +- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, +- 131, 131, 131, 131, 131, 131, 131, 132, 131, 131, +- 131, 133, 133, 133, 134, 134, 135, 135, 136, 136, +- 136, 137, 137, 139, 138, 140, 140, 141, 141, 141, +- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, +- 141, 141, 141, 141, 141, 142, 141, 141, 143, 141, +- 141, 144, 144, 144, 144, 144, 144, 145, 146, 146, +- 146, 147, 147, 148, 148, 148, 148, 148, 148, 149, +- 150, 149, 151, 149, 152, 149, 153, 149, 154, 154, +- 154, 154, 154, 154, 154, 155, 155, 156, 156, 157, +- 157, 157, 157, 157, 158, 158, 159, 159, 159, 159, +- 159, 159, 159, 159, 160, 160, 161, 161, 161, 162, +- 162, 163, 164, 164, 164, 166, 165, 167, 168, 169, +- 169, 170, 171, 171, 172, 172, 173, 174, 174, 175, +- 175, 176, 176, 176, 178, 177, 179, 179, 179, 179, +- 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, +- 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, +- 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, +- 179, 179, 179, 180, 180, 182, 183, 184, 185, 186, +- 181, 187, 188, 189, 190, 191, 181, 192, 193, 181, +- 194, 194, 194, 194, 194, 195, 195, 195, 196, 196, +- 196, 196, 197, 197, 198, 198, 199, 199, 200, 200, +- 201, 202, 203, 204, 201, 205, 206, 206, 208, 209, +- 207, 210, 211, 211, 211, 212, 212, 214, 213, 216, +- 215, 217, 217, 218, 218, 219, 219, 220, 220, 220, +- 220, 220, 221, 221 +-}; +- +-static const short yyr2[] = { 0, +- 2, 2, 2, 2, 1, 0, 4, 0, 2, 3, +- 0, 2, 4, 1, 1, 2, 1, 4, 4, 3, +- 2, 4, 3, 4, 4, 4, 4, 4, 2, 2, +- 2, 4, 4, 2, 2, 2, 2, 0, 5, 2, +- 0, 3, 2, 0, 1, 3, 1, 3, 0, 1, +- 3, 1, 3, 0, 2, 2, 0, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, +- 4, 8, 4, 1, 4, 0, 5, 4, 0, 5, +- 4, 1, 3, 2, 1, 3, 2, 4, 2, 2, +- 0, 4, 2, 1, 1, 1, 3, 3, 3, 1, +- 0, 4, 0, 5, 0, 5, 0, 5, 2, 1, +- 1, 1, 1, 4, 4, 2, 1, 0, 1, 1, +- 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 3, 3, 6, 1, +- 0, 5, 2, 3, 0, 0, 7, 3, 3, 3, +- 0, 4, 4, 3, 3, 1, 4, 3, 0, 1, +- 1, 0, 2, 3, 0, 2, 2, 3, 4, 2, +- 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, +- 3, 4, 1, 1, 4, 4, 4, 4, 4, 4, +- 1, 6, 6, 4, 0, 0, 0, 0, 0, 0, +- 15, 0, 0, 0, 0, 0, 16, 0, 0, 7, +- 1, 1, 1, 1, 1, 3, 0, 2, 3, 2, +- 6, 10, 2, 1, 0, 1, 2, 0, 0, 3, +- 0, 0, 0, 0, 11, 4, 0, 2, 0, 0, +- 6, 1, 0, 3, 5, 0, 3, 0, 2, 0, +- 5, 1, 2, 5, 6, 1, 2, 0, 2, 4, +- 4, 8, 1, 3 +-}; +- +-static const short yydefact[] = { 0, +- 54, 8, 6, 258, 1, 57, 2, 11, 4, 0, +- 3, 0, 55, 9, 0, 0, 259, 262, 0, 0, +- 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 160, 161, 0, 0, 76, 0, 0, +- 67, 56, 59, 65, 0, 58, 61, 62, 63, 64, +- 60, 66, 0, 14, 0, 0, 0, 0, 15, 0, +- 0, 0, 17, 44, 0, 0, 0, 0, 0, 0, +- 49, 0, 0, 0, 0, 268, 263, 127, 128, 129, +- 130, 165, 131, 132, 133, 134, 165, 91, 247, 0, +- 0, 5, 79, 0, 0, 0, 0, 0, 0, 0, +- 159, 162, 0, 0, 0, 0, 136, 135, 93, 0, +- 0, 38, 0, 193, 201, 0, 0, 0, 0, 0, +- 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 12, 0, 47, 29, 45, 30, 16, 31, 21, +- 0, 34, 0, 35, 50, 36, 52, 37, 40, 10, +- 7, 273, 0, 0, 0, 0, 137, 0, 138, 0, +- 0, 0, 0, 57, 146, 145, 0, 0, 0, 0, +- 0, 154, 156, 141, 141, 162, 0, 82, 85, 0, +- 0, 0, 0, 0, 0, 0, 11, 0, 0, 171, +- 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 170, 172, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 23, 0, 0, 43, +- 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, +- 269, 166, 206, 88, 212, 218, 90, 89, 249, 246, +- 248, 0, 71, 73, 260, 151, 0, 68, 69, 78, +- 92, 152, 140, 153, 0, 157, 0, 162, 163, 81, +- 84, 87, 0, 75, 0, 70, 165, 0, 25, 26, +- 41, 27, 28, 168, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 191, 190, 188, 187, 186, +- 180, 181, 184, 185, 182, 183, 178, 179, 176, 177, +- 173, 174, 175, 13, 24, 22, 48, 46, 42, 18, +- 19, 33, 32, 51, 53, 0, 0, 266, 264, 0, +- 274, 227, 0, 227, 0, 0, 80, 0, 0, 142, +- 0, 143, 155, 158, 164, 83, 86, 77, 0, 261, +- 39, 199, 200, 192, 169, 195, 196, 197, 0, 0, +- 198, 0, 270, 271, 267, 265, 0, 0, 227, 0, +- 205, 234, 0, 235, 219, 252, 253, 0, 0, 0, +- 144, 139, 0, 0, 189, 0, 221, 222, 223, 224, +- 225, 228, 0, 0, 0, 0, 230, 0, 207, 233, +- 236, 205, 0, 256, 0, 250, 0, 150, 0, 141, +- 202, 203, 0, 226, 0, 229, 0, 0, 213, 91, +- 0, 253, 0, 0, 72, 165, 0, 0, 227, 0, +- 208, 0, 0, 0, 254, 0, 251, 148, 0, 147, +- 272, 0, 0, 204, 118, 214, 220, 257, 253, 165, +- 0, 231, 100, 105, 107, 120, 121, 122, 123, 124, +- 0, 110, 112, 111, 101, 113, 117, 119, 0, 0, +- 0, 241, 255, 149, 0, 0, 0, 0, 165, 0, +- 116, 209, 165, 109, 0, 227, 0, 0, 0, 0, +- 94, 96, 95, 141, 238, 0, 242, 215, 0, 141, +- 141, 141, 115, 102, 0, 0, 239, 114, 0, 238, +- 232, 104, 106, 108, 97, 99, 98, 237, 126, 118, +- 239, 165, 0, 210, 0, 126, 125, 240, 141, 243, +- 216, 211, 239, 141, 126, 217, 244, 141, 245, 0, +- 0, 0 +-}; +- +-static const short yydefgoto[] = { 540, +- 93, 9, 10, 7, 8, 14, 74, 187, 138, 137, +- 135, 146, 148, 5, 6, 13, 42, 104, 164, 180, +- 43, 160, 44, 494, 466, 480, 476, 477, 478, 467, +- 468, 469, 470, 524, 87, 109, 45, 505, 46, 257, +- 166, 256, 410, 440, 339, 47, 48, 174, 49, 175, +- 50, 177, 157, 158, 192, 399, 248, 332, 418, 445, +- 495, 529, 333, 432, 472, 510, 534, 334, 403, 393, +- 370, 371, 374, 402, 507, 519, 485, 509, 533, 538, +- 51, 161, 251, 335, 424, 377, 406, 422, 11, 12, +- 52, 53, 17, 18, 330, 155, 156 +-}; +- +-static const short yypact[] = { -44, +--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 50, +--32768, -40, 490, 542, 48, 35, -40,-32768, 175, 44, +- 72, 97,-32768, 105, 173, 148, 162, 166, 178, 186, +- 194, 196, 205,-32768,-32768, 211, 221,-32768, 222, 224, +--32768,-32768,-32768,-32768, 29,-32768,-32768,-32768,-32768,-32768, +--32768,-32768, 95,-32768, 258, 173, 262, 439,-32768, 263, +- 264, 265,-32768,-32768, 266, 268, 269, 439, 270, 278, +- 279, 280, 281, 187, 439, 60,-32768,-32768,-32768,-32768, +--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 283, +- 289,-32768,-32768, 290, 291, 173, 173, 292, 173, 11, +--32768, 293, 236, 251, 173, 297,-32768,-32768,-32768, 256, +- 4,-32768, 7,-32768,-32768, 439, 439, 439, 271, 272, +--32768, 273, 282, 287, 288, 298, 299, 301, 303, 439, +- 439, 978, 18,-32768, 189,-32768, 190, 6,-32768,-32768, +- 261, 1117, 203,-32768,-32768, 209,-32768, 210,-32768,-32768, +- 1117,-32768, 325, 326, 285, 225,-32768, 439,-32768, 30, +- 26, -10, 226,-32768,-32768,-32768, 227, 228, 231, 232, +- 233,-32768,-32768, -4, -1, 16, 234,-32768,-32768, 8, +- 236, 240, 334, -40, 439, 439,-32768, 439, 439,-32768, +--32768, 649, 439, 439, 357, 439, 361, 365, 366, 439, +- 439, 439,-32768,-32768, 439, 439, 439, 439, 439, 439, +- 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, +- 439, 439, 439, 439, 439, 439, 1117, 368, 369,-32768, +- 370, 439, 439, 1117, 241, 371, 372, 267, 267, -14, +- 294, 1117, 175,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +--32768, 373,-32768,-32768, 536, 344, 21,-32768,-32768,-32768, +--32768,-32768,-32768,-32768, 173,-32768, 173, 293,-32768,-32768, +--32768,-32768, 242,-32768, 61,-32768,-32768, -18, 1117, 1117, +- 611, 1117, 1117,-32768, 707, 727, 274, 752, 276, 286, +- 295, 1016, 1036, 772, 1139, 789, 891, 993, 663, 1056, +- 1093, 1093, 284, 284, 284, 284, 161, 161, 168, 168, +--32768,-32768,-32768, 1117, 1117, 1117,-32768,-32768,-32768, 1117, +- 1117,-32768,-32768,-32768,-32768, 300, 302,-32768,-32768, -13, +--32768, 318, 394, 318, 439, 296,-32768, 378, 375,-32768, +- 290,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 304,-32768, +--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 439, 439, +--32768, 439, 99, 294,-32768,-32768, 167, 362, 1079, 384, +- 313,-32768, 1159, 324,-32768, 1117, 15, 399, 307, 328, +--32768,-32768, 810, 830, 1117, 388,-32768,-32768,-32768,-32768, +--32768,-32768, 308, 439, -19, 393,-32768, 379,-32768,-32768, +--32768, 313, 364, 380, 385,-32768, 309,-32768, 405, 312, +--32768,-32768, 267,-32768, 855,-32768, 439, 382,-32768,-32768, +- 439, 15, 439, 316,-32768,-32768, 340, 319, 179, 875, +--32768, 390, 33, 913,-32768, 933,-32768,-32768, 429,-32768, +- 294, 413, 435,-32768, 404,-32768,-32768,-32768, 15,-32768, +- 439,-32768, 243,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +- 415,-32768,-32768,-32768,-32768,-32768,-32768, 404, 406, 416, +- 29,-32768,-32768,-32768, 958, 417, 420, 421,-32768, 49, +--32768,-32768,-32768,-32768, 28, 422, 49, 49, 49, 341, +--32768,-32768,-32768, -88, 442, 349,-32768,-32768, 455, 102, +- 103, 113,-32768,-32768, 63, 468,-32768,-32768, 425, 442, +--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 96, 404, +--32768,-32768, 470,-32768, 426, 96,-32768,-32768, 312,-32768, +--32768,-32768,-32768, 312, 96,-32768,-32768, 312,-32768, 479, +- 480,-32768 +-}; +- +-static const short yypgoto[] = {-32768, +- -53,-32768,-32768,-32768,-32768, 305,-32768,-32768,-32768,-32768, +--32768,-32768,-32768,-32768,-32768, 317,-32768,-32768,-32768, 310, +--32768, 62, -154, -280,-32768,-32768,-32768,-32768,-32768, 17, +--32768, -37,-32768, -490,-32768, 24, -418, -167,-32768,-32768, +- -231,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +--32768, -160, -87,-32768, -57, 86,-32768,-32768,-32768,-32768, +--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +- -360, 163,-32768,-32768, -12, -498,-32768,-32768,-32768,-32768, +--32768,-32768,-32768,-32768,-32768,-32768, -398,-32768,-32768,-32768, +--32768,-32768, 315, -15,-32768,-32768, -234 +-}; +- +- +-#define YYLAST 1193 +- +- +-static const short yytable[] = { 159, +- 132, 77, 112, 326, 327, 247, 265, 267, 396, 230, +- 142, 271, 272, 185, 92, 269, 188, 151, 404, 176, +- 114, 115, 526, 435, 165, 342, 471, 225, 263, 249, +- 350, 497, 504, 243, 535, 531, 243, 387, 388, 389, +- 390, 391, 168, 169, 537, 171, 173, 116, 117, 471, +- 473, 182, 491, 15, 118, 119, 120, 75, 190, 191, +- 1, 2, 3, 492, 271, 272, 515, 121, 443, 340, +- 16, 4, 203, 204, 250, 227, 498, 516, 244, 122, +- 493, 447, 76, 234, 123, 124, 125, 126, 127, 128, +- 245, 88, 16, 245, 517, 30, 328, 365, 30, 392, +- 242, 471, 405, 329, 366, 522, 252, 345, 253, 381, +- 129, 523, 263, 246, 264, 263, 246, 266, 40, 89, +- 186, 40, 231, 189, 273, 499, 274, 279, 280, 172, +- 282, 283, 268, 90, 226, 285, 286, 341, 288, 130, +- 131, 91, 292, 293, 294, 107, 108, 295, 296, 297, +- 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, +- 308, 309, 310, 311, 312, 313, 314, 315, 316, 114, +- 115, 152, 153, 154, 320, 321, 92, 273, 428, 348, +- 78, 79, 80, 81, 82, 83, 84, 85, 86, 349, +- 219, 220, 221, 222, 223, 94, 116, 117, 95, 221, +- 222, 223, 96, 118, 119, 120, 500, 501, 502, 110, +- 331, 343, 386, 344, 97, 395, 121, 442, 263, 263, +- 512, 513, 98, 387, 388, 389, 390, 391, 122, 263, +- 99, 514, 100, 123, 124, 125, 126, 127, 128, 178, +- 179, 101, 427, 322, 323, 346, 347, 102, 78, 79, +- 80, 81, 82, 83, 84, 85, 86, 103, 105, 129, +- 106, 111, 77, 114, 115, 113, 133, 134, 136, 139, +- 232, 140, 141, 143, 369, 373, 369, 376, 247, -103, +- 144, 150, 145, 147, 149, 392, 162, 181, 130, 131, +- 116, 117, 163, 165, 167, 170, 176, 118, 119, 120, +- 183, 383, 384, 184, 385, 228, 229, 193, 194, 195, +- 121, 217, 218, 219, 220, 221, 222, 223, 196, 235, +- 114, 115, 122, 197, 198, 236, 237, 123, 124, 125, +- 126, 127, 128, 240, 199, 200, 415, 201, 438, 202, +- 238, 239, 241, 277, 254, 258, 259, 116, 117, 260, +- 261, 262, 270, 129, 367, 119, 120, 368, 276, 430, +- 287, 532, 474, 434, 289, 436, 536, 121, 290, 291, +- 539, 317, 318, 319, 324, 325, 336, 233, 152, 122, +- 338, 379, 130, 131, 123, 124, 125, 126, 127, 128, +- 380, 490, 354, 475, 356, 496, 114, 115, 394, 397, +- 398, 401, 407, 413, 357, 331, 409, 453, 416, 372, +- 129, 420, 378, 358, 426, 417, 421, 363, 454, 364, +- 439, 423, 382, 116, 117, 408, 414, 425, 263, 431, +- 118, 119, 120, 437, 527, 455, 441, 446, 450, 130, +- 131, 114, 115, 121, 456, 457, 458, 459, 460, 451, +- 452, 479, 483, 487, 482, 122, 488, 489, 395, 503, +- 123, 124, 125, 126, 127, 128, 506, 508, 116, 117, +- 511, 518, 520, 528, 530, 118, 119, 120, 541, 542, +- 255, 433, 525, 461, 481, 462, 129, 419, 121, 463, +- 275, 281, 40, 19, 484, 0, 375, 521, 278, 0, +- 122, 0, 0, 0, 0, 123, 124, 125, 126, 127, +- 128, 0, 0, 0, 0, 130, 131, 0, 0, 0, +- 0, 464, 0, 465, 0, 0, 0, 0, 0, 0, +- 0, 129, 0, 0, 0, 20, 21, 0, 0, 19, +- 22, 23, 24, 25, 26, 54, 0, 0, 0, 0, +- 0, 0, 27, 28, 29, 30, 0, 0, 0, 0, +- 130, 131, 31, 32, 33, 34, 35, 36, 0, 0, +- 0, 337, 37, 38, 39, 0, 0, 0, 40, 55, +- 0, 20, 21, 0, 0, 0, 22, 23, 24, 25, +- 26, 0, 0, 0, 0, 56, 0, 0, 27, 28, +- 29, 30, 0, 0, -260, 0, 0, 41, 31, 32, +- 33, 34, 35, 36, 54, 0, 0, 0, 37, 38, +- 39, 0, 0, 0, 40, 0, 0, 0, 57, 0, +- 0, 58, 59, 60, 61, 62, -41, 63, 64, 65, +- 66, 67, 68, 69, 70, 0, 351, 0, 55, 71, +- 72, 73, 0, 41, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 205, 56, 206, 207, 208, 209, 210, +- 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, +- 221, 222, 223, 210, 211, 212, 213, 214, 215, 216, +- 217, 218, 219, 220, 221, 222, 223, 57, 0, 0, +- 58, 59, 60, 61, 62, 0, 63, 64, 65, 66, +- 67, 68, 69, 70, 0, 0, 0, 0, 71, 72, +- 73, 205, 0, 206, 207, 208, 209, 210, 211, 212, +- 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, +- 223, 205, 0, 206, 207, 208, 209, 210, 211, 212, +- 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, +- 223, 0, 0, 0, 0, 0, 205, 284, 206, 207, +- 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, +- 218, 219, 220, 221, 222, 223, 205, 0, 206, 207, +- 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, +- 218, 219, 220, 221, 222, 223, 207, 208, 209, 210, +- 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, +- 221, 222, 223, 0, 205, 352, 206, 207, 208, 209, +- 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, +- 220, 221, 222, 223, 205, 353, 206, 207, 208, 209, +- 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, +- 220, 221, 222, 223, 0, 0, 0, 0, 0, 205, +- 355, 206, 207, 208, 209, 210, 211, 212, 213, 214, +- 215, 216, 217, 218, 219, 220, 221, 222, 223, 205, +- 361, 206, 207, 208, 209, 210, 211, 212, 213, 214, +- 215, 216, 217, 218, 219, 220, 221, 222, 223, 208, +- 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, +- 219, 220, 221, 222, 223, 0, 0, 205, 411, 206, +- 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, +- 217, 218, 219, 220, 221, 222, 223, 205, 412, 206, +- 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, +- 217, 218, 219, 220, 221, 222, 223, 0, 0, 0, +- 0, 0, 205, 429, 206, 207, 208, 209, 210, 211, +- 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, +- 222, 223, 205, 444, 206, 207, 208, 209, 210, 211, +- 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, +- 222, 223, 209, 210, 211, 212, 213, 214, 215, 216, +- 217, 218, 219, 220, 221, 222, 223, 0, 0, 0, +- 205, 448, 206, 207, 208, 209, 210, 211, 212, 213, +- 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, +- 205, 449, 206, 207, 208, 209, 210, 211, 212, 213, +- 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, +- 0, 0, 0, 0, 0, 0, 486, 211, 212, 213, +- 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, +- 0, 0, 0, 205, 224, 206, 207, 208, 209, 210, +- 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, +- 221, 222, 223, 0, 0, 395, 213, 214, 215, 216, +- 217, 218, 219, 220, 221, 222, 223, 0, 0, 0, +- 0, 205, 359, 206, 207, 208, 209, 210, 211, 212, +- 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, +- 223, 0, 360, 205, 362, 206, 207, 208, 209, 210, +- 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, +- 221, 222, 223, 205, 400, 206, 207, 208, 209, 210, +- 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, +- 221, 222, 223 +-}; +- +-static const short yycheck[] = { 87, +- 58, 17, 56, 238, 239, 160, 174, 175, 369, 4, +- 68, 4, 5, 10, 4, 176, 10, 75, 4, 4, +- 3, 4, 521, 422, 4, 257, 445, 10, 117, 4, +- 49, 4, 121, 4, 533, 526, 4, 57, 58, 59, +- 60, 61, 96, 97, 535, 99, 100, 30, 31, 468, +- 449, 105, 4, 4, 37, 38, 39, 10, 116, 117, +- 105, 106, 107, 15, 4, 5, 4, 50, 429, 49, +- 111, 116, 130, 131, 49, 133, 49, 15, 49, 62, +- 32, 49, 48, 141, 67, 68, 69, 70, 71, 72, +- 61, 48, 111, 61, 32, 66, 111, 111, 66, 119, +- 158, 520, 88, 118, 118, 10, 117, 268, 119, 341, +- 93, 16, 117, 84, 119, 117, 84, 119, 89, 48, +- 117, 89, 117, 117, 117, 486, 119, 185, 186, 119, +- 188, 189, 117, 37, 117, 193, 194, 117, 196, 122, +- 123, 37, 200, 201, 202, 117, 118, 205, 206, 207, +- 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, +- 218, 219, 220, 221, 222, 223, 224, 225, 226, 3, +- 4, 112, 113, 114, 232, 233, 4, 117, 413, 119, +- 6, 7, 8, 9, 10, 11, 12, 13, 14, 277, +- 30, 31, 32, 33, 34, 48, 30, 31, 37, 32, +- 33, 34, 37, 37, 38, 39, 487, 488, 489, 115, +- 112, 265, 114, 267, 37, 37, 50, 39, 117, 117, +- 119, 119, 37, 57, 58, 59, 60, 61, 62, 117, +- 37, 119, 37, 67, 68, 69, 70, 71, 72, 4, +- 5, 37, 410, 3, 4, 4, 5, 37, 6, 7, +- 8, 9, 10, 11, 12, 13, 14, 37, 37, 93, +- 37, 4, 278, 3, 4, 4, 4, 4, 4, 4, +- 10, 4, 4, 4, 332, 333, 334, 335, 433, 37, +- 3, 95, 4, 4, 4, 119, 4, 37, 122, 123, +- 30, 31, 4, 4, 4, 4, 4, 37, 38, 39, +- 4, 359, 360, 48, 362, 117, 117, 37, 37, 37, +- 50, 28, 29, 30, 31, 32, 33, 34, 37, 117, +- 3, 4, 62, 37, 37, 117, 117, 67, 68, 69, +- 70, 71, 72, 49, 37, 37, 394, 37, 426, 37, +- 16, 16, 118, 10, 119, 119, 119, 30, 31, 119, +- 119, 119, 119, 93, 37, 38, 39, 40, 119, 417, +- 4, 529, 450, 421, 4, 423, 534, 50, 4, 4, +- 538, 4, 4, 4, 4, 4, 4, 117, 112, 62, +- 37, 4, 122, 123, 67, 68, 69, 70, 71, 72, +- 16, 479, 119, 451, 119, 483, 3, 4, 37, 16, +- 88, 78, 4, 16, 119, 112, 79, 4, 16, 16, +- 93, 48, 117, 119, 10, 37, 37, 118, 15, 118, +- 81, 37, 119, 30, 31, 119, 119, 119, 117, 48, +- 37, 38, 39, 118, 522, 32, 118, 48, 10, 122, +- 123, 3, 4, 50, 41, 42, 43, 44, 45, 37, +- 16, 37, 37, 37, 49, 62, 37, 37, 37, 119, +- 67, 68, 69, 70, 71, 72, 25, 119, 30, 31, +- 16, 4, 48, 4, 49, 37, 38, 39, 0, 0, +- 164, 420, 520, 80, 468, 82, 93, 402, 50, 86, +- 181, 187, 89, 4, 471, -1, 334, 510, 184, -1, +- 62, -1, -1, -1, -1, 67, 68, 69, 70, 71, +- 72, -1, -1, -1, -1, 122, 123, -1, -1, -1, +- -1, 118, -1, 120, -1, -1, -1, -1, -1, -1, +- -1, 93, -1, -1, -1, 46, 47, -1, -1, 4, +- 51, 52, 53, 54, 55, 4, -1, -1, -1, -1, +- -1, -1, 63, 64, 65, 66, -1, -1, -1, -1, +- 122, 123, 73, 74, 75, 76, 77, 78, -1, -1, +- -1, 36, 83, 84, 85, -1, -1, -1, 89, 38, +- -1, 46, 47, -1, -1, -1, 51, 52, 53, 54, +- 55, -1, -1, -1, -1, 54, -1, -1, 63, 64, +- 65, 66, -1, -1, 115, -1, -1, 118, 73, 74, +- 75, 76, 77, 78, 4, -1, -1, -1, 83, 84, +- 85, -1, -1, -1, 89, -1, -1, -1, 87, -1, +- -1, 90, 91, 92, 93, 94, 95, 96, 97, 98, +- 99, 100, 101, 102, 103, -1, 36, -1, 38, 108, +- 109, 110, -1, 118, -1, -1, -1, -1, -1, -1, +- -1, -1, -1, 15, 54, 17, 18, 19, 20, 21, +- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +- 32, 33, 34, 21, 22, 23, 24, 25, 26, 27, +- 28, 29, 30, 31, 32, 33, 34, 87, -1, -1, +- 90, 91, 92, 93, 94, -1, 96, 97, 98, 99, +- 100, 101, 102, 103, -1, -1, -1, -1, 108, 109, +- 110, 15, -1, 17, 18, 19, 20, 21, 22, 23, +- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, +- 34, 15, -1, 17, 18, 19, 20, 21, 22, 23, +- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, +- 34, -1, -1, -1, -1, -1, 15, 119, 17, 18, +- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, +- 29, 30, 31, 32, 33, 34, 15, -1, 17, 18, +- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, +- 29, 30, 31, 32, 33, 34, 18, 19, 20, 21, +- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +- 32, 33, 34, -1, 15, 119, 17, 18, 19, 20, +- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, +- 31, 32, 33, 34, 15, 119, 17, 18, 19, 20, +- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, +- 31, 32, 33, 34, -1, -1, -1, -1, -1, 15, +- 119, 17, 18, 19, 20, 21, 22, 23, 24, 25, +- 26, 27, 28, 29, 30, 31, 32, 33, 34, 15, +- 119, 17, 18, 19, 20, 21, 22, 23, 24, 25, +- 26, 27, 28, 29, 30, 31, 32, 33, 34, 19, +- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, +- 30, 31, 32, 33, 34, -1, -1, 15, 119, 17, +- 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, +- 28, 29, 30, 31, 32, 33, 34, 15, 119, 17, +- 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, +- 28, 29, 30, 31, 32, 33, 34, -1, -1, -1, +- -1, -1, 15, 119, 17, 18, 19, 20, 21, 22, +- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, +- 33, 34, 15, 119, 17, 18, 19, 20, 21, 22, +- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, +- 33, 34, 20, 21, 22, 23, 24, 25, 26, 27, +- 28, 29, 30, 31, 32, 33, 34, -1, -1, -1, +- 15, 119, 17, 18, 19, 20, 21, 22, 23, 24, +- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, +- 15, 119, 17, 18, 19, 20, 21, 22, 23, 24, +- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, +- -1, -1, -1, -1, -1, -1, 119, 22, 23, 24, +- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, +- -1, -1, -1, 15, 117, 17, 18, 19, 20, 21, +- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +- 32, 33, 34, -1, -1, 37, 24, 25, 26, 27, +- 28, 29, 30, 31, 32, 33, 34, -1, -1, -1, +- -1, 15, 117, 17, 18, 19, 20, 21, 22, 23, +- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, +- 34, -1, 117, 15, 16, 17, 18, 19, 20, 21, +- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +- 32, 33, 34, 15, 16, 17, 18, 19, 20, 21, +- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, +- 32, 33, 34 +-}; +-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +-#line 3 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* Skeleton output parser for bison, +- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. +- +- 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +- +-/* As a special exception, when this file is copied by Bison into a +- Bison output file, you may use that output file without restriction. +- This special exception was added by the Free Software Foundation +- in version 1.24 of Bison. */ +- +-#ifndef alloca +-#ifdef __GNUC__ +-#define alloca __builtin_alloca +-#else /* not GNU C. */ +-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +-#include +-#else /* not sparc */ +-#if defined (MSDOS) && !defined (__TURBOC__) +-#include +-#else /* not MSDOS, or __TURBOC__ */ +-#if defined(_AIX) +-#include +- #pragma alloca +-#else /* not MSDOS, __TURBOC__, or _AIX */ +-#ifdef __hpux +-#ifdef __cplusplus +-extern "C" { +-void *alloca (unsigned int); +-}; +-#else /* not __cplusplus */ +-void *alloca (); +-#endif /* not __cplusplus */ +-#endif /* __hpux */ +-#endif /* not _AIX */ +-#endif /* not MSDOS, or __TURBOC__ */ +-#endif /* not sparc. */ +-#endif /* not GNU C. */ +-#endif /* alloca not defined. */ +- +-/* This is the parser code that is written into each bison parser +- when the %semantic_parser declaration is not specified in the grammar. +- It was written by Richard Stallman by simplifying the hairy parser +- used when %semantic_parser is specified. */ +- +-/* Note: there must be only one dollar sign in this file. +- It is replaced by the list of actions, each action +- as one case of the switch. */ +- +-#define yyerrok (yyerrstatus = 0) +-#define yyclearin (yychar = YYEMPTY) +-#define YYEMPTY -2 +-#define YYEOF 0 +-#define YYACCEPT return(0) +-#define YYABORT return(1) +-#define YYERROR goto yyerrlab1 +-/* Like YYERROR except do call yyerror. +- This remains here temporarily to ease the +- transition to the new meaning of YYERROR, for GCC. +- Once GCC version 2 has supplanted version 1, this can go. */ +-#define YYFAIL goto yyerrlab +-#define YYRECOVERING() (!!yyerrstatus) +-#define YYBACKUP(token, value) \ +-do \ +- if (yychar == YYEMPTY && yylen == 1) \ +- { yychar = (token), yylval = (value); \ +- yychar1 = YYTRANSLATE (yychar); \ +- YYPOPSTACK; \ +- goto yybackup; \ +- } \ +- else \ +- { yyerror ("syntax error: cannot back up"); YYERROR; } \ +-while (0) +- +-#define YYTERROR 1 +-#define YYERRCODE 256 +- +-#ifndef YYPURE +-#define YYLEX yylex() +-#endif +- +-#ifdef YYPURE +-#ifdef YYLSP_NEEDED +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval, &yylloc) +-#endif +-#else /* not YYLSP_NEEDED */ +-#ifdef YYLEX_PARAM +-#define YYLEX yylex(&yylval, YYLEX_PARAM) +-#else +-#define YYLEX yylex(&yylval) +-#endif +-#endif /* not YYLSP_NEEDED */ +-#endif +- +-/* If nonreentrant, generate the variables here */ +- +-#ifndef YYPURE +- +-int yychar; /* the lookahead symbol */ +-YYSTYPE yylval; /* the semantic value of the */ +- /* lookahead symbol */ +- +-#ifdef YYLSP_NEEDED +-YYLTYPE yylloc; /* location data for the lookahead */ +- /* symbol */ +-#endif +- +-int yynerrs; /* number of parse errors so far */ +-#endif /* not YYPURE */ +- +-#if YYDEBUG != 0 +-int yydebug; /* nonzero means print parse trace */ +-/* Since this is uninitialized, it does not stop multiple parsers +- from coexisting. */ +-#endif +- +-/* YYINITDEPTH indicates the initial size of the parser's stacks */ +- +-#ifndef YYINITDEPTH +-#define YYINITDEPTH 200 +-#endif +- +-/* YYMAXDEPTH is the maximum size the stacks can grow to +- (effective only if the built-in stack extension method is used). */ +- +-#if YYMAXDEPTH == 0 +-#undef YYMAXDEPTH +-#endif +- +-#ifndef YYMAXDEPTH +-#define YYMAXDEPTH 10000 +-#endif +- +-/* Prevent warning if -Wstrict-prototypes. */ +-#ifdef __GNUC__ +-int yyparse (void); +-#endif +- +-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +-#else /* not GNU C or C++ */ +-#ifndef __cplusplus +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (to, from, count) +- char *to; +- char *from; +- int count; +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#else /* __cplusplus */ +- +-/* This is the most reliable way to avoid incompatibilities +- in available built-in functions on various systems. */ +-static void +-__yy_memcpy (char *to, char *from, int count) +-{ +- register char *f = from; +- register char *t = to; +- register int i = count; +- +- while (i-- > 0) +- *t++ = *f++; +-} +- +-#endif +-#endif +- +-#line 196 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +-/* The user can define YYPARSE_PARAM as the name of an argument to be passed +- into yyparse. The argument should have type void *. +- It should actually point to an object. +- Grammar actions can access the variable by casting it +- to the proper pointer type. */ +- +-#ifdef YYPARSE_PARAM +-#ifdef __cplusplus +-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL +-#else /* not __cplusplus */ +-#define YYPARSE_PARAM_ARG YYPARSE_PARAM +-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +-#endif /* not __cplusplus */ +-#else /* not YYPARSE_PARAM */ +-#define YYPARSE_PARAM_ARG +-#define YYPARSE_PARAM_DECL +-#endif /* not YYPARSE_PARAM */ +- +-int +-yyparse(YYPARSE_PARAM_ARG) +- YYPARSE_PARAM_DECL +-{ +- register int yystate; +- register int yyn; +- register short *yyssp; +- register YYSTYPE *yyvsp; +- int yyerrstatus; /* number of tokens to shift before error messages enabled */ +- int yychar1 = 0; /* lookahead token as an internal (translated) token number */ +- +- short yyssa[YYINITDEPTH]; /* the state stack */ +- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ +- +- short *yyss = yyssa; /* refer to the stacks thru separate pointers */ +- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ +- +-#ifdef YYLSP_NEEDED +- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ +- YYLTYPE *yyls = yylsa; +- YYLTYPE *yylsp; +- +-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +-#else +-#define YYPOPSTACK (yyvsp--, yyssp--) +-#endif +- +- int yystacksize = YYINITDEPTH; +- +-#ifdef YYPURE +- int yychar; +- YYSTYPE yylval; +- int yynerrs; +-#ifdef YYLSP_NEEDED +- YYLTYPE yylloc; +-#endif +-#endif +- +- YYSTYPE yyval; /* the variable used to return */ +- /* semantic values from the action */ +- /* routines */ +- +- int yylen; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Starting parse\n"); +-#endif +- +- yystate = 0; +- yyerrstatus = 0; +- yynerrs = 0; +- yychar = YYEMPTY; /* Cause a token to be read. */ +- +- /* Initialize stack pointers. +- Waste one element of value and location stack +- so that they stay on the same level as the state stack. +- The wasted elements are never initialized. */ +- +- yyssp = yyss - 1; +- yyvsp = yyvs; +-#ifdef YYLSP_NEEDED +- yylsp = yyls; +-#endif +- +-/* Push a new state, which is found in yystate . */ +-/* In all cases, when you get here, the value and location stacks +- have just been pushed. so pushing a state here evens the stacks. */ +-yynewstate: +- +- *++yyssp = yystate; +- +- if (yyssp >= yyss + yystacksize - 1) +- { +- /* Give user a chance to reallocate the stack */ +- /* Use copies of these so that the &'s don't force the real ones into memory. */ +- YYSTYPE *yyvs1 = yyvs; +- short *yyss1 = yyss; +-#ifdef YYLSP_NEEDED +- YYLTYPE *yyls1 = yyls; +-#endif +- +- /* Get the current used size of the three stacks, in elements. */ +- int size = yyssp - yyss + 1; +- +-#ifdef yyoverflow +- /* Each stack pointer address is followed by the size of +- the data in use in that stack, in bytes. */ +-#ifdef YYLSP_NEEDED +- /* This used to be a conditional around just the two extra args, +- but that might be undefined if yyoverflow is a macro. */ +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yyls1, size * sizeof (*yylsp), +- &yystacksize); +-#else +- yyoverflow("parser stack overflow", +- &yyss1, size * sizeof (*yyssp), +- &yyvs1, size * sizeof (*yyvsp), +- &yystacksize); +-#endif +- +- yyss = yyss1; yyvs = yyvs1; +-#ifdef YYLSP_NEEDED +- yyls = yyls1; +-#endif +-#else /* no yyoverflow */ +- /* Extend the stack our own way. */ +- if (yystacksize >= YYMAXDEPTH) +- { +- yyerror("parser stack overflow"); +- return 2; +- } +- yystacksize *= 2; +- if (yystacksize > YYMAXDEPTH) +- yystacksize = YYMAXDEPTH; +- yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); +- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); +- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); +- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); +-#ifdef YYLSP_NEEDED +- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); +- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); +-#endif +-#endif /* no yyoverflow */ +- +- yyssp = yyss + size - 1; +- yyvsp = yyvs + size - 1; +-#ifdef YYLSP_NEEDED +- yylsp = yyls + size - 1; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Stack size increased to %d\n", yystacksize); +-#endif +- +- if (yyssp >= yyss + yystacksize - 1) +- YYABORT; +- } +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Entering state %d\n", yystate); +-#endif +- +- goto yybackup; +- yybackup: +- +-/* Do appropriate processing given the current state. */ +-/* Read a lookahead token if we need one and don't already have one. */ +-/* yyresume: */ +- +- /* First try to decide what to do without reference to lookahead token. */ +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yydefault; +- +- /* Not known => get a lookahead token if don't already have one. */ +- +- /* yychar is either YYEMPTY or YYEOF +- or a valid token in external form. */ +- +- if (yychar == YYEMPTY) +- { +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Reading a token: "); +-#endif +- yychar = YYLEX; +- } +- +- /* Convert token to internal form (in yychar1) for indexing tables with */ +- +- if (yychar <= 0) /* This means end of input. */ +- { +- yychar1 = 0; +- yychar = YYEOF; /* Don't call YYLEX any more */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Now at end of input.\n"); +-#endif +- } +- else +- { +- yychar1 = YYTRANSLATE(yychar); +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); +- /* Give the individual parser a way to print the precise meaning +- of a token, for further debugging info. */ +-#ifdef YYPRINT +- YYPRINT (stderr, yychar, yylval); +-#endif +- fprintf (stderr, ")\n"); +- } +-#endif +- } +- +- yyn += yychar1; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) +- goto yydefault; +- +- yyn = yytable[yyn]; +- +- /* yyn is what to do for this token type in this state. +- Negative => reduce, -yyn is rule number. +- Positive => shift, yyn is new state. +- New state is final state => don't bother to shift, +- just return success. +- 0, or most negative number => error. */ +- +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrlab; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrlab; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +- /* Shift the lookahead token. */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +-#endif +- +- /* Discard the token being shifted unless it is eof. */ +- if (yychar != YYEOF) +- yychar = YYEMPTY; +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- /* count tokens shifted since error; after three, turn off error status. */ +- if (yyerrstatus) yyerrstatus--; +- +- yystate = yyn; +- goto yynewstate; +- +-/* Do the default action for the current state. */ +-yydefault: +- +- yyn = yydefact[yystate]; +- if (yyn == 0) +- goto yyerrlab; +- +-/* Do a reduction. yyn is the number of a rule to reduce with. */ +-yyreduce: +- yylen = yyr2[yyn]; +- if (yylen > 0) +- yyval = yyvsp[1-yylen]; /* implement default value of the action */ +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- int i; +- +- fprintf (stderr, "Reducing via rule %d (line %d), ", +- yyn, yyrline[yyn]); +- +- /* Print the symbols being reduced, and their result. */ +- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) +- fprintf (stderr, "%s ", yytname[yyrhs[i]]); +- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); +- } +-#endif +- +- +- switch (yyn) { +- +-case 6: +-#line 154 "ldgram.y" +-{ ldlex_defsym(); ; +- break;} +-case 7: +-#line 156 "ldgram.y" +-{ +- ldlex_popstate(); +- lang_add_assignment(exp_assop(yyvsp[-1].token,yyvsp[-2].name,yyvsp[0].etree)); +- ; +- break;} +-case 8: +-#line 163 "ldgram.y" +-{ +- ldlex_mri_script (); +- PUSH_ERROR ("MRI style script"); +- ; +- break;} +-case 9: +-#line 168 "ldgram.y" +-{ +- ldlex_popstate (); +- mri_draw_tree (); +- POP_ERROR (); +- ; +- break;} +-case 14: +-#line 183 "ldgram.y" +-{ +- einfo("%P%F: unrecognised keyword in MRI style script '%s'\n",yyvsp[0].name); +- ; +- break;} +-case 15: +-#line 186 "ldgram.y" +-{ +- config.map_filename = "-"; +- ; +- break;} +-case 18: +-#line 192 "ldgram.y" +-{ mri_public(yyvsp[-2].name, yyvsp[0].etree); ; +- break;} +-case 19: +-#line 194 "ldgram.y" +-{ mri_public(yyvsp[-2].name, yyvsp[0].etree); ; +- break;} +-case 20: +-#line 196 "ldgram.y" +-{ mri_public(yyvsp[-1].name, yyvsp[0].etree); ; +- break;} +-case 21: +-#line 198 "ldgram.y" +-{ mri_format(yyvsp[0].name); ; +- break;} +-case 22: +-#line 200 "ldgram.y" +-{ mri_output_section(yyvsp[-2].name, yyvsp[0].etree);; +- break;} +-case 23: +-#line 202 "ldgram.y" +-{ mri_output_section(yyvsp[-1].name, yyvsp[0].etree);; +- break;} +-case 24: +-#line 204 "ldgram.y" +-{ mri_output_section(yyvsp[-2].name, yyvsp[0].etree);; +- break;} +-case 25: +-#line 206 "ldgram.y" +-{ mri_align(yyvsp[-2].name,yyvsp[0].etree); ; +- break;} +-case 26: +-#line 208 "ldgram.y" +-{ mri_align(yyvsp[-2].name,yyvsp[0].etree); ; +- break;} +-case 27: +-#line 210 "ldgram.y" +-{ mri_alignmod(yyvsp[-2].name,yyvsp[0].etree); ; +- break;} +-case 28: +-#line 212 "ldgram.y" +-{ mri_alignmod(yyvsp[-2].name,yyvsp[0].etree); ; +- break;} +-case 31: +-#line 216 "ldgram.y" +-{ mri_name(yyvsp[0].name); ; +- break;} +-case 32: +-#line 218 "ldgram.y" +-{ mri_alias(yyvsp[-2].name,yyvsp[0].name,0);; +- break;} +-case 33: +-#line 220 "ldgram.y" +-{ mri_alias(yyvsp[-2].name,0,(int) yyvsp[0].integer);; +- break;} +-case 34: +-#line 222 "ldgram.y" +-{ mri_base(yyvsp[0].etree); ; +- break;} +-case 35: +-#line 224 "ldgram.y" +-{ mri_truncate((unsigned int) yyvsp[0].integer); ; +- break;} +-case 38: +-#line 228 "ldgram.y" +-{ ldfile_open_command_file (yyvsp[0].name); ; +- break;} +-case 40: +-#line 230 "ldgram.y" +-{ lang_add_entry (yyvsp[0].name, false); ; +- break;} +-case 42: +-#line 235 "ldgram.y" +-{ mri_order(yyvsp[0].name); ; +- break;} +-case 43: +-#line 236 "ldgram.y" +-{ mri_order(yyvsp[0].name); ; +- break;} +-case 45: +-#line 242 "ldgram.y" +-{ mri_load(yyvsp[0].name); ; +- break;} +-case 46: +-#line 243 "ldgram.y" +-{ mri_load(yyvsp[0].name); ; +- break;} +-case 47: +-#line 248 "ldgram.y" +-{ mri_only_load(yyvsp[0].name); ; +- break;} +-case 48: +-#line 250 "ldgram.y" +-{ mri_only_load(yyvsp[0].name); ; +- break;} +-case 49: +-#line 254 "ldgram.y" +-{ yyval.name = NULL; ; +- break;} +-case 52: +-#line 261 "ldgram.y" +-{ ldlang_add_undef (yyvsp[0].name); ; +- break;} +-case 53: +-#line 263 "ldgram.y" +-{ ldlang_add_undef (yyvsp[0].name); ; +- break;} +-case 54: +-#line 267 "ldgram.y" +-{ +- ldlex_both(); +- ; +- break;} +-case 55: +-#line 271 "ldgram.y" +-{ +- ldlex_popstate(); +- ; +- break;} +-case 68: +-#line 296 "ldgram.y" +-{ lang_add_target(yyvsp[-1].name); ; +- break;} +-case 69: +-#line 298 "ldgram.y" +-{ ldfile_add_library_path (yyvsp[-1].name, false); ; +- break;} +-case 70: +-#line 300 "ldgram.y" +-{ lang_add_output(yyvsp[-1].name, 1); ; +- break;} +-case 71: +-#line 302 "ldgram.y" +-{ lang_add_output_format (yyvsp[-1].name, (char *) NULL, +- (char *) NULL, 1); ; +- break;} +-case 72: +-#line 305 "ldgram.y" +-{ lang_add_output_format (yyvsp[-5].name, yyvsp[-3].name, yyvsp[-1].name, 1); ; +- break;} +-case 73: +-#line 307 "ldgram.y" +-{ ldfile_set_output_arch(yyvsp[-1].name); ; +- break;} +-case 74: +-#line 309 "ldgram.y" +-{ command_line.force_common_definition = true ; ; +- break;} +-case 76: +-#line 312 "ldgram.y" +-{ lang_enter_group (); ; +- break;} +-case 77: +-#line 314 "ldgram.y" +-{ lang_leave_group (); ; +- break;} +-case 78: +-#line 316 "ldgram.y" +-{ lang_add_map(yyvsp[-1].name); ; +- break;} +-case 79: +-#line 318 "ldgram.y" +-{ ldfile_open_command_file(yyvsp[0].name); ; +- break;} +-case 81: +-#line 320 "ldgram.y" +-{ +- lang_add_nocrossref (yyvsp[-1].nocrossref); +- ; +- break;} +-case 82: +-#line 327 "ldgram.y" +-{ lang_add_input_file(yyvsp[0].name,lang_input_file_is_search_file_enum, +- (char *)NULL); ; +- break;} +-case 83: +-#line 330 "ldgram.y" +-{ lang_add_input_file(yyvsp[0].name,lang_input_file_is_search_file_enum, +- (char *)NULL); ; +- break;} +-case 84: +-#line 333 "ldgram.y" +-{ lang_add_input_file(yyvsp[0].name,lang_input_file_is_search_file_enum, +- (char *)NULL); ; +- break;} +-case 85: +-#line 336 "ldgram.y" +-{ lang_add_input_file(yyvsp[0].name,lang_input_file_is_l_enum, +- (char *)NULL); ; +- break;} +-case 86: +-#line 339 "ldgram.y" +-{ lang_add_input_file(yyvsp[0].name,lang_input_file_is_l_enum, +- (char *)NULL); ; +- break;} +-case 87: +-#line 342 "ldgram.y" +-{ lang_add_input_file(yyvsp[0].name,lang_input_file_is_l_enum, +- (char *)NULL); ; +- break;} +-case 92: +-#line 358 "ldgram.y" +-{ lang_add_entry (yyvsp[-1].name, false); ; +- break;} +-case 94: +-#line 366 "ldgram.y" +-{ lang_add_wild (yyvsp[0].name, current_file); ; +- break;} +-case 95: +-#line 368 "ldgram.y" +-{ lang_add_wild ("*", current_file); ; +- break;} +-case 96: +-#line 370 "ldgram.y" +-{ lang_add_wild ("?", current_file); ; +- break;} +-case 97: +-#line 372 "ldgram.y" +-{ lang_add_wild (yyvsp[0].name, current_file); ; +- break;} +-case 98: +-#line 374 "ldgram.y" +-{ lang_add_wild ("*", current_file); ; +- break;} +-case 99: +-#line 376 "ldgram.y" +-{ lang_add_wild ("?", current_file); ; +- break;} +-case 100: +-#line 381 "ldgram.y" +-{ +- lang_add_wild((char *)NULL, yyvsp[0].name); +- ; +- break;} +-case 101: +-#line 385 "ldgram.y" +-{ +- current_file = (char *)NULL; +- ; +- break;} +-case 103: +-#line 391 "ldgram.y" +-{ +- current_file = yyvsp[0].name; +- ; +- break;} +-case 105: +-#line 398 "ldgram.y" +-{ +- current_file = "?"; +- ; +- break;} +-case 107: +-#line 403 "ldgram.y" +-{ +- current_file = (char *)NULL; +- ; +- break;} +-case 110: +-#line 412 "ldgram.y" +-{ +- lang_add_attribute(lang_object_symbols_statement_enum); +- ; +- break;} +-case 112: +-#line 417 "ldgram.y" +-{ +- +- lang_add_attribute(lang_constructors_statement_enum); +- ; +- break;} +-case 114: +-#line 423 "ldgram.y" +-{ +- lang_add_data((int) yyvsp[-3].integer,yyvsp[-1].etree); +- ; +- break;} +-case 115: +-#line 428 "ldgram.y" +-{ +- lang_add_fill +- (exp_get_value_int(yyvsp[-1].etree, +- 0, +- "fill value", +- lang_first_phase_enum)); +- ; +- break;} +-case 120: +-#line 449 "ldgram.y" +-{ yyval.integer = yyvsp[0].token; ; +- break;} +-case 121: +-#line 451 "ldgram.y" +-{ yyval.integer = yyvsp[0].token; ; +- break;} +-case 122: +-#line 453 "ldgram.y" +-{ yyval.integer = yyvsp[0].token; ; +- break;} +-case 123: +-#line 455 "ldgram.y" +-{ yyval.integer = yyvsp[0].token; ; +- break;} +-case 124: +-#line 457 "ldgram.y" +-{ yyval.integer = yyvsp[0].token; ; +- break;} +-case 125: +-#line 462 "ldgram.y" +-{ +- yyval.integer = exp_get_value_int(yyvsp[0].etree, +- 0, +- "fill value", +- lang_first_phase_enum); +- ; +- break;} +-case 126: +-#line 468 "ldgram.y" +-{ yyval.integer = 0; ; +- break;} +-case 127: +-#line 475 "ldgram.y" +-{ yyval.token = '+'; ; +- break;} +-case 128: +-#line 477 "ldgram.y" +-{ yyval.token = '-'; ; +- break;} +-case 129: +-#line 479 "ldgram.y" +-{ yyval.token = '*'; ; +- break;} +-case 130: +-#line 481 "ldgram.y" +-{ yyval.token = '/'; ; +- break;} +-case 131: +-#line 483 "ldgram.y" +-{ yyval.token = LSHIFT; ; +- break;} +-case 132: +-#line 485 "ldgram.y" +-{ yyval.token = RSHIFT; ; +- break;} +-case 133: +-#line 487 "ldgram.y" +-{ yyval.token = '&'; ; +- break;} +-case 134: +-#line 489 "ldgram.y" +-{ yyval.token = '|'; ; +- break;} +-case 137: +-#line 499 "ldgram.y" +-{ +- lang_add_assignment (exp_assop (yyvsp[-1].token, yyvsp[-2].name, yyvsp[0].etree)); +- ; +- break;} +-case 138: +-#line 503 "ldgram.y" +-{ +- lang_add_assignment (exp_assop ('=', yyvsp[-2].name, +- exp_binop (yyvsp[-1].token, +- exp_nameop (NAME, +- yyvsp[-2].name), +- yyvsp[0].etree))); +- ; +- break;} +-case 139: +-#line 511 "ldgram.y" +-{ +- lang_add_assignment (exp_provide (yyvsp[-3].name, yyvsp[-1].etree)); +- ; +- break;} +-case 146: +-#line 533 "ldgram.y" +-{ region = lang_memory_region_lookup(yyvsp[0].name); ; +- break;} +-case 148: +-#line 539 "ldgram.y" +-{ region->current = +- region->origin = +- exp_get_vma(yyvsp[0].etree, 0L,"origin", lang_first_phase_enum); +-; +- break;} +-case 149: +-#line 547 "ldgram.y" +-{ region->length = exp_get_vma(yyvsp[0].etree, +- ~((bfd_vma)0), +- "length", +- lang_first_phase_enum); +- ; +- break;} +-case 150: +-#line 556 "ldgram.y" +-{ +- lang_set_flags(region, yyvsp[-1].name); +- ; +- break;} +-case 152: +-#line 565 "ldgram.y" +-{ lang_startup(yyvsp[-1].name); ; +- break;} +-case 154: +-#line 571 "ldgram.y" +-{ ldemul_hll((char *)NULL); ; +- break;} +-case 155: +-#line 576 "ldgram.y" +-{ ldemul_hll(yyvsp[0].name); ; +- break;} +-case 156: +-#line 578 "ldgram.y" +-{ ldemul_hll(yyvsp[0].name); ; +- break;} +-case 158: +-#line 586 "ldgram.y" +-{ ldemul_syslib(yyvsp[0].name); ; +- break;} +-case 160: +-#line 592 "ldgram.y" +-{ lang_float(true); ; +- break;} +-case 161: +-#line 594 "ldgram.y" +-{ lang_float(false); ; +- break;} +-case 162: +-#line 599 "ldgram.y" +-{ +- yyval.nocrossref = NULL; +- ; +- break;} +-case 163: +-#line 603 "ldgram.y" +-{ +- struct lang_nocrossref *n; +- +- n = (struct lang_nocrossref *) xmalloc (sizeof *n); +- n->name = yyvsp[-1].name; +- n->next = yyvsp[0].nocrossref; +- yyval.nocrossref = n; +- ; +- break;} +-case 164: +-#line 612 "ldgram.y" +-{ +- struct lang_nocrossref *n; +- +- n = (struct lang_nocrossref *) xmalloc (sizeof *n); +- n->name = yyvsp[-2].name; +- n->next = yyvsp[0].nocrossref; +- yyval.nocrossref = n; +- ; +- break;} +-case 165: +-#line 622 "ldgram.y" +-{ ldlex_expression(); ; +- break;} +-case 166: +-#line 624 "ldgram.y" +-{ ldlex_popstate(); yyval.etree=yyvsp[0].etree;; +- break;} +-case 167: +-#line 629 "ldgram.y" +-{ yyval.etree = exp_unop('-', yyvsp[0].etree); ; +- break;} +-case 168: +-#line 631 "ldgram.y" +-{ yyval.etree = yyvsp[-1].etree; ; +- break;} +-case 169: +-#line 633 "ldgram.y" +-{ yyval.etree = exp_unop((int) yyvsp[-3].integer,yyvsp[-1].etree); ; +- break;} +-case 170: +-#line 635 "ldgram.y" +-{ yyval.etree = exp_unop('!', yyvsp[0].etree); ; +- break;} +-case 171: +-#line 637 "ldgram.y" +-{ yyval.etree = yyvsp[0].etree; ; +- break;} +-case 172: +-#line 639 "ldgram.y" +-{ yyval.etree = exp_unop('~', yyvsp[0].etree);; +- break;} +-case 173: +-#line 642 "ldgram.y" +-{ yyval.etree = exp_binop('*', yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 174: +-#line 644 "ldgram.y" +-{ yyval.etree = exp_binop('/', yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 175: +-#line 646 "ldgram.y" +-{ yyval.etree = exp_binop('%', yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 176: +-#line 648 "ldgram.y" +-{ yyval.etree = exp_binop('+', yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 177: +-#line 650 "ldgram.y" +-{ yyval.etree = exp_binop('-' , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 178: +-#line 652 "ldgram.y" +-{ yyval.etree = exp_binop(LSHIFT , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 179: +-#line 654 "ldgram.y" +-{ yyval.etree = exp_binop(RSHIFT , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 180: +-#line 656 "ldgram.y" +-{ yyval.etree = exp_binop(EQ , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 181: +-#line 658 "ldgram.y" +-{ yyval.etree = exp_binop(NE , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 182: +-#line 660 "ldgram.y" +-{ yyval.etree = exp_binop(LE , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 183: +-#line 662 "ldgram.y" +-{ yyval.etree = exp_binop(GE , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 184: +-#line 664 "ldgram.y" +-{ yyval.etree = exp_binop('<' , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 185: +-#line 666 "ldgram.y" +-{ yyval.etree = exp_binop('>' , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 186: +-#line 668 "ldgram.y" +-{ yyval.etree = exp_binop('&' , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 187: +-#line 670 "ldgram.y" +-{ yyval.etree = exp_binop('^' , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 188: +-#line 672 "ldgram.y" +-{ yyval.etree = exp_binop('|' , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 189: +-#line 674 "ldgram.y" +-{ yyval.etree = exp_trinop('?' , yyvsp[-4].etree, yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 190: +-#line 676 "ldgram.y" +-{ yyval.etree = exp_binop(ANDAND , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 191: +-#line 678 "ldgram.y" +-{ yyval.etree = exp_binop(OROR , yyvsp[-2].etree, yyvsp[0].etree); ; +- break;} +-case 192: +-#line 680 "ldgram.y" +-{ yyval.etree = exp_nameop(DEFINED, yyvsp[-1].name); ; +- break;} +-case 193: +-#line 682 "ldgram.y" +-{ yyval.etree = exp_intop(yyvsp[0].integer); ; +- break;} +-case 194: +-#line 684 "ldgram.y" +-{ yyval.etree = exp_nameop(SIZEOF_HEADERS,0); ; +- break;} +-case 195: +-#line 687 "ldgram.y" +-{ yyval.etree = exp_nameop(SIZEOF,yyvsp[-1].name); ; +- break;} +-case 196: +-#line 689 "ldgram.y" +-{ yyval.etree = exp_nameop(ADDR,yyvsp[-1].name); ; +- break;} +-case 197: +-#line 691 "ldgram.y" +-{ yyval.etree = exp_nameop(LOADADDR,yyvsp[-1].name); ; +- break;} +-case 198: +-#line 693 "ldgram.y" +-{ yyval.etree = exp_unop(ABSOLUTE, yyvsp[-1].etree); ; +- break;} +-case 199: +-#line 695 "ldgram.y" +-{ yyval.etree = exp_unop(ALIGN_K,yyvsp[-1].etree); ; +- break;} +-case 200: +-#line 697 "ldgram.y" +-{ yyval.etree = exp_unop(ALIGN_K,yyvsp[-1].etree); ; +- break;} +-case 201: +-#line 699 "ldgram.y" +-{ yyval.etree = exp_nameop(NAME,yyvsp[0].name); ; +- break;} +-case 202: +-#line 701 "ldgram.y" +-{ yyval.etree = exp_binop (MAX, yyvsp[-3].etree, yyvsp[-1].etree ); ; +- break;} +-case 203: +-#line 703 "ldgram.y" +-{ yyval.etree = exp_binop (MIN, yyvsp[-3].etree, yyvsp[-1].etree ); ; +- break;} +-case 204: +-#line 708 "ldgram.y" +-{ yyval.etree = yyvsp[-1].etree; ; +- break;} +-case 205: +-#line 709 "ldgram.y" +-{ yyval.etree = 0; ; +- break;} +-case 206: +-#line 712 "ldgram.y" +-{ ldlex_expression(); ; +- break;} +-case 207: +-#line 714 "ldgram.y" +-{ ldlex_popstate (); ldlex_script (); ; +- break;} +-case 208: +-#line 716 "ldgram.y" +-{ +- lang_enter_output_section_statement(yyvsp[-5].name, yyvsp[-3].etree, +- sectype, +- 0, 0, 0, yyvsp[-2].etree); +- ; +- break;} +-case 209: +-#line 722 "ldgram.y" +-{ ldlex_popstate (); ldlex_expression (); ; +- break;} +-case 210: +-#line 724 "ldgram.y" +-{ +- ldlex_popstate (); +- lang_leave_output_section_statement (yyvsp[0].integer, yyvsp[-2].name, yyvsp[-1].section_phdr); +- ; +- break;} +-case 212: +-#line 730 "ldgram.y" +-{ ldlex_expression (); ; +- break;} +-case 213: +-#line 732 "ldgram.y" +-{ ldlex_popstate (); ldlex_script (); ; +- break;} +-case 214: +-#line 734 "ldgram.y" +-{ +- lang_enter_overlay (yyvsp[-4].etree, yyvsp[-2].etree, (int) yyvsp[-3].integer); +- ; +- break;} +-case 215: +-#line 739 "ldgram.y" +-{ ldlex_popstate (); ldlex_expression (); ; +- break;} +-case 216: +-#line 741 "ldgram.y" +-{ +- ldlex_popstate (); +- lang_leave_overlay (yyvsp[0].integer, yyvsp[-2].name, yyvsp[-1].section_phdr); +- ; +- break;} +-case 218: +-#line 750 "ldgram.y" +-{ ldlex_expression (); ; +- break;} +-case 219: +-#line 752 "ldgram.y" +-{ +- ldlex_popstate (); +- lang_add_assignment (exp_assop ('=', ".", yyvsp[0].etree)); +- ; +- break;} +-case 221: +-#line 760 "ldgram.y" +-{ sectype = noload_section; ; +- break;} +-case 222: +-#line 761 "ldgram.y" +-{ sectype = dsect_section; ; +- break;} +-case 223: +-#line 762 "ldgram.y" +-{ sectype = copy_section; ; +- break;} +-case 224: +-#line 763 "ldgram.y" +-{ sectype = info_section; ; +- break;} +-case 225: +-#line 764 "ldgram.y" +-{ sectype = overlay_section; ; +- break;} +-case 227: +-#line 769 "ldgram.y" +-{ sectype = normal_section; ; +- break;} +-case 228: +-#line 770 "ldgram.y" +-{ sectype = normal_section; ; +- break;} +-case 229: +-#line 774 "ldgram.y" +-{ yyval.etree = yyvsp[-2].etree; ; +- break;} +-case 230: +-#line 775 "ldgram.y" +-{ yyval.etree = (etree_type *)NULL; ; +- break;} +-case 231: +-#line 780 "ldgram.y" +-{ yyval.etree = yyvsp[-3].etree; ; +- break;} +-case 232: +-#line 782 "ldgram.y" +-{ yyval.etree = yyvsp[-7].etree; ; +- break;} +-case 233: +-#line 786 "ldgram.y" +-{ yyval.etree = yyvsp[-1].etree; ; +- break;} +-case 234: +-#line 787 "ldgram.y" +-{ yyval.etree = (etree_type *) NULL; ; +- break;} +-case 235: +-#line 792 "ldgram.y" +-{ yyval.integer = 0; ; +- break;} +-case 236: +-#line 794 "ldgram.y" +-{ yyval.integer = 1; ; +- break;} +-case 237: +-#line 799 "ldgram.y" +-{ yyval.name = yyvsp[0].name; ; +- break;} +-case 238: +-#line 800 "ldgram.y" +-{ yyval.name = "*default*"; ; +- break;} +-case 239: +-#line 805 "ldgram.y" +-{ +- yyval.section_phdr = NULL; +- ; +- break;} +-case 240: +-#line 809 "ldgram.y" +-{ +- struct lang_output_section_phdr_list *n; +- +- n = ((struct lang_output_section_phdr_list *) +- xmalloc (sizeof *n)); +- n->name = yyvsp[0].name; +- n->used = false; +- n->next = yyvsp[-2].section_phdr; +- yyval.section_phdr = n; +- ; +- break;} +-case 242: +-#line 825 "ldgram.y" +-{ +- ldlex_script (); +- lang_enter_overlay_section (yyvsp[0].name); +- ; +- break;} +-case 243: +-#line 830 "ldgram.y" +-{ ldlex_popstate (); ldlex_expression (); ; +- break;} +-case 244: +-#line 832 "ldgram.y" +-{ +- ldlex_popstate (); +- lang_leave_overlay_section (yyvsp[0].integer, yyvsp[-1].section_phdr); +- ; +- break;} +-case 249: +-#line 849 "ldgram.y" +-{ ldlex_expression (); ; +- break;} +-case 250: +-#line 850 "ldgram.y" +-{ ldlex_popstate (); ; +- break;} +-case 251: +-#line 852 "ldgram.y" +-{ +- lang_new_phdr (yyvsp[-5].name, yyvsp[-3].etree, yyvsp[-2].phdr.filehdr, yyvsp[-2].phdr.phdrs, yyvsp[-2].phdr.at, +- yyvsp[-2].phdr.flags); +- ; +- break;} +-case 252: +-#line 860 "ldgram.y" +-{ +- yyval.etree = yyvsp[0].etree; +- +- if (yyvsp[0].etree->type.node_class == etree_name +- && yyvsp[0].etree->type.node_code == NAME) +- { +- const char *s; +- unsigned int i; +- static const char * const phdr_types[] = +- { +- "PT_NULL", "PT_LOAD", "PT_DYNAMIC", +- "PT_INTERP", "PT_NOTE", "PT_SHLIB", +- "PT_PHDR" +- }; +- +- s = yyvsp[0].etree->name.name; +- for (i = 0; +- i < sizeof phdr_types / sizeof phdr_types[0]; +- i++) +- if (strcmp (s, phdr_types[i]) == 0) +- { +- yyval.etree = exp_intop (i); +- break; +- } +- } +- ; +- break;} +-case 253: +-#line 890 "ldgram.y" +-{ +- memset (&yyval.phdr, 0, sizeof (struct phdr_info)); +- ; +- break;} +-case 254: +-#line 894 "ldgram.y" +-{ +- yyval.phdr = yyvsp[0].phdr; +- if (strcmp (yyvsp[-2].name, "FILEHDR") == 0 && yyvsp[-1].etree == NULL) +- yyval.phdr.filehdr = true; +- else if (strcmp (yyvsp[-2].name, "PHDRS") == 0 && yyvsp[-1].etree == NULL) +- yyval.phdr.phdrs = true; +- else if (strcmp (yyvsp[-2].name, "FLAGS") == 0 && yyvsp[-1].etree != NULL) +- yyval.phdr.flags = yyvsp[-1].etree; +- else +- einfo ("%X%P:%S: PHDRS syntax error at `%s'\n", yyvsp[-2].name); +- ; +- break;} +-case 255: +-#line 906 "ldgram.y" +-{ +- yyval.phdr = yyvsp[0].phdr; +- yyval.phdr.at = yyvsp[-2].etree; +- ; +- break;} +-case 256: +-#line 914 "ldgram.y" +-{ +- yyval.etree = NULL; +- ; +- break;} +-case 257: +-#line 918 "ldgram.y" +-{ +- yyval.etree = yyvsp[-1].etree; +- ; +- break;} +-case 258: +-#line 926 "ldgram.y" +-{ +- ldlex_version_file (); +- PUSH_ERROR ("VERSION script"); +- ; +- break;} +-case 259: +-#line 931 "ldgram.y" +-{ +- ldlex_popstate (); +- POP_ERROR (); +- ; +- break;} +-case 260: +-#line 940 "ldgram.y" +-{ +- ldlex_version_script (); +- ; +- break;} +-case 261: +-#line 944 "ldgram.y" +-{ +- ldlex_popstate (); +- ; +- break;} +-case 264: +-#line 956 "ldgram.y" +-{ +- lang_register_vers_node (yyvsp[-4].name, yyvsp[-2].versnode, NULL); +- ; +- break;} +-case 265: +-#line 960 "ldgram.y" +-{ +- lang_register_vers_node (yyvsp[-5].name, yyvsp[-3].versnode, yyvsp[-1].deflist); +- ; +- break;} +-case 266: +-#line 967 "ldgram.y" +-{ +- yyval.deflist = lang_add_vers_depend (NULL, yyvsp[0].name); +- ; +- break;} +-case 267: +-#line 971 "ldgram.y" +-{ +- yyval.deflist = lang_add_vers_depend (yyvsp[-1].deflist, yyvsp[0].name); +- ; +- break;} +-case 268: +-#line 978 "ldgram.y" +-{ +- yyval.versnode = lang_new_vers_node (NULL, NULL); +- ; +- break;} +-case 269: +-#line 982 "ldgram.y" +-{ +- yyval.versnode = lang_new_vers_node (yyvsp[-1].versyms, NULL); +- ; +- break;} +-case 270: +-#line 986 "ldgram.y" +-{ +- yyval.versnode = lang_new_vers_node (yyvsp[-1].versyms, NULL); +- ; +- break;} +-case 271: +-#line 990 "ldgram.y" +-{ +- yyval.versnode = lang_new_vers_node (NULL, yyvsp[-1].versyms); +- ; +- break;} +-case 272: +-#line 994 "ldgram.y" +-{ +- yyval.versnode = lang_new_vers_node (yyvsp[-5].versyms, yyvsp[-1].versyms); +- ; +- break;} +-case 273: +-#line 1001 "ldgram.y" +-{ +- yyval.versyms = lang_new_vers_regex (NULL, yyvsp[0].name); +- ; +- break;} +-case 274: +-#line 1005 "ldgram.y" +-{ +- yyval.versyms = lang_new_vers_regex (yyvsp[-2].versyms, yyvsp[0].name); +- ; +- break;} +-} +- /* the action file gets copied in in place of this dollarsign */ +-#line 498 "/usr/cygnus/progressive-97r2/share/bison.simple" +- +- yyvsp -= yylen; +- yyssp -= yylen; +-#ifdef YYLSP_NEEDED +- yylsp -= yylen; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +- *++yyvsp = yyval; +- +-#ifdef YYLSP_NEEDED +- yylsp++; +- if (yylen == 0) +- { +- yylsp->first_line = yylloc.first_line; +- yylsp->first_column = yylloc.first_column; +- yylsp->last_line = (yylsp-1)->last_line; +- yylsp->last_column = (yylsp-1)->last_column; +- yylsp->text = 0; +- } +- else +- { +- yylsp->last_line = (yylsp+yylen-1)->last_line; +- yylsp->last_column = (yylsp+yylen-1)->last_column; +- } +-#endif +- +- /* Now "shift" the result of the reduction. +- Determine what state that goes to, +- based on the state we popped back to +- and the rule number reduced by. */ +- +- yyn = yyr1[yyn]; +- +- yystate = yypgoto[yyn - YYNTBASE] + *yyssp; +- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) +- yystate = yytable[yystate]; +- else +- yystate = yydefgoto[yyn - YYNTBASE]; +- +- goto yynewstate; +- +-yyerrlab: /* here on detecting error */ +- +- if (! yyerrstatus) +- /* If not already recovering from an error, report this error. */ +- { +- ++yynerrs; +- +-#ifdef YYERROR_VERBOSE +- yyn = yypact[yystate]; +- +- if (yyn > YYFLAG && yyn < YYLAST) +- { +- int size = 0; +- char *msg; +- int x, count; +- +- count = 0; +- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- size += strlen(yytname[x]) + 15, count++; +- msg = (char *) malloc(size + 15); +- if (msg != 0) +- { +- strcpy(msg, "parse error"); +- +- if (count < 5) +- { +- count = 0; +- for (x = (yyn < 0 ? -yyn : 0); +- x < (sizeof(yytname) / sizeof(char *)); x++) +- if (yycheck[x + yyn] == x) +- { +- strcat(msg, count == 0 ? ", expecting `" : " or `"); +- strcat(msg, yytname[x]); +- strcat(msg, "'"); +- count++; +- } +- } +- yyerror(msg); +- free(msg); +- } +- else +- yyerror ("parse error; also virtual memory exceeded"); +- } +- else +-#endif /* YYERROR_VERBOSE */ +- yyerror("parse error"); +- } +- +- goto yyerrlab1; +-yyerrlab1: /* here on error raised explicitly by an action */ +- +- if (yyerrstatus == 3) +- { +- /* if just tried and failed to reuse lookahead token after an error, discard it. */ +- +- /* return failure if at end of input */ +- if (yychar == YYEOF) +- YYABORT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +-#endif +- +- yychar = YYEMPTY; +- } +- +- /* Else will try to reuse lookahead token +- after shifting the error token. */ +- +- yyerrstatus = 3; /* Each real token shifted decrements this */ +- +- goto yyerrhandle; +- +-yyerrdefault: /* current state does not do anything special for the error token. */ +- +-#if 0 +- /* This is wrong; only states that explicitly want error tokens +- should shift them. */ +- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ +- if (yyn) goto yydefault; +-#endif +- +-yyerrpop: /* pop the current state because it cannot handle the error token */ +- +- if (yyssp == yyss) YYABORT; +- yyvsp--; +- yystate = *--yyssp; +-#ifdef YYLSP_NEEDED +- yylsp--; +-#endif +- +-#if YYDEBUG != 0 +- if (yydebug) +- { +- short *ssp1 = yyss - 1; +- fprintf (stderr, "Error: state stack now"); +- while (ssp1 != yyssp) +- fprintf (stderr, " %d", *++ssp1); +- fprintf (stderr, "\n"); +- } +-#endif +- +-yyerrhandle: +- +- yyn = yypact[yystate]; +- if (yyn == YYFLAG) +- goto yyerrdefault; +- +- yyn += YYTERROR; +- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) +- goto yyerrdefault; +- +- yyn = yytable[yyn]; +- if (yyn < 0) +- { +- if (yyn == YYFLAG) +- goto yyerrpop; +- yyn = -yyn; +- goto yyreduce; +- } +- else if (yyn == 0) +- goto yyerrpop; +- +- if (yyn == YYFINAL) +- YYACCEPT; +- +-#if YYDEBUG != 0 +- if (yydebug) +- fprintf(stderr, "Shifting error token, "); +-#endif +- +- *++yyvsp = yylval; +-#ifdef YYLSP_NEEDED +- *++yylsp = yylloc; +-#endif +- +- yystate = yyn; +- goto yynewstate; +-} +-#line 1010 "ldgram.y" +- +-void +-yyerror(arg) +- const char *arg; +-{ +- if (ldfile_assumed_script) +- einfo ("%P:%s: file format not recognized; treating as linker script\n", +- ldfile_input_filename); +- if (error_index > 0 && error_index < ERROR_NAME_MAX) +- einfo ("%P%F:%S: %s in %s\n", arg, error_names[error_index-1]); +- else +- einfo ("%P%F:%S: %s\n", arg); +-} +diff -rup --new-file binutils-2.9.1/ld/ldgram.h binutils-2.9.1/ld/ldgram.h +--- binutils-2.9.1/ld/ldgram.h Fri May 1 08:49:27 1998 ++++ binutils-2.9.1/ld/ldgram.h Wed Dec 31 17:00:00 1969 +@@ -1,119 +0,0 @@ +-typedef union { +- bfd_vma integer; +- char *name; +- int token; +- union etree_union *etree; +- struct phdr_info +- { +- boolean filehdr; +- boolean phdrs; +- union etree_union *at; +- union etree_union *flags; +- } phdr; +- struct lang_nocrossref *nocrossref; +- struct lang_output_section_phdr_list *section_phdr; +- struct bfd_elf_version_deps *deflist; +- struct bfd_elf_version_expr *versyms; +- struct bfd_elf_version_tree *versnode; +-} YYSTYPE; +-#define INT 258 +-#define NAME 259 +-#define LNAME 260 +-#define PLUSEQ 261 +-#define MINUSEQ 262 +-#define MULTEQ 263 +-#define DIVEQ 264 +-#define LSHIFTEQ 265 +-#define RSHIFTEQ 266 +-#define ANDEQ 267 +-#define OREQ 268 +-#define OROR 269 +-#define ANDAND 270 +-#define EQ 271 +-#define NE 272 +-#define LE 273 +-#define GE 274 +-#define LSHIFT 275 +-#define RSHIFT 276 +-#define UNARY 277 +-#define END 278 +-#define ALIGN_K 279 +-#define BLOCK 280 +-#define BIND 281 +-#define QUAD 282 +-#define SQUAD 283 +-#define LONG 284 +-#define SHORT 285 +-#define BYTE 286 +-#define SECTIONS 287 +-#define PHDRS 288 +-#define SIZEOF_HEADERS 289 +-#define OUTPUT_FORMAT 290 +-#define FORCE_COMMON_ALLOCATION 291 +-#define OUTPUT_ARCH 292 +-#define INCLUDE 293 +-#define MEMORY 294 +-#define DEFSYMEND 295 +-#define NOLOAD 296 +-#define DSECT 297 +-#define COPY 298 +-#define INFO 299 +-#define OVERLAY 300 +-#define DEFINED 301 +-#define TARGET_K 302 +-#define SEARCH_DIR 303 +-#define MAP 304 +-#define ENTRY 305 +-#define NEXT 306 +-#define SIZEOF 307 +-#define ADDR 308 +-#define LOADADDR 309 +-#define MAX 310 +-#define MIN 311 +-#define STARTUP 312 +-#define HLL 313 +-#define SYSLIB 314 +-#define FLOAT 315 +-#define NOFLOAT 316 +-#define NOCROSSREFS 317 +-#define ORIGIN 318 +-#define FILL 319 +-#define LENGTH 320 +-#define CREATE_OBJECT_SYMBOLS 321 +-#define INPUT 322 +-#define GROUP 323 +-#define OUTPUT 324 +-#define CONSTRUCTORS 325 +-#define ALIGNMOD 326 +-#define AT 327 +-#define PROVIDE 328 +-#define CHIP 329 +-#define LIST 330 +-#define SECT 331 +-#define ABSOLUTE 332 +-#define LOAD 333 +-#define NEWLINE 334 +-#define ENDWORD 335 +-#define ORDER 336 +-#define NAMEWORD 337 +-#define FORMAT 338 +-#define PUBLIC 339 +-#define BASE 340 +-#define ALIAS 341 +-#define TRUNCATE 342 +-#define REL 343 +-#define INPUT_SCRIPT 344 +-#define INPUT_MRI_SCRIPT 345 +-#define INPUT_DEFSYM 346 +-#define CASE 347 +-#define EXTERN 348 +-#define START 349 +-#define VERS_TAG 350 +-#define VERS_IDENTIFIER 351 +-#define GLOBAL 352 +-#define LOCAL 353 +-#define VERSIONK 354 +-#define INPUT_VERSION_SCRIPT 355 +- +- +-extern YYSTYPE yylval; +diff -rup --new-file binutils-2.9.1/ld/ldlang.c binutils-2.9.1/ld/ldlang.c +--- binutils-2.9.1/ld/ldlang.c Fri May 1 08:48:49 1998 ++++ binutils-2.9.1/ld/ldlang.c Sun Aug 23 00:00:00 1998 +@@ -745,12 +745,32 @@ section_already_linked (abfd, sec, data) + + if ((flags & SEC_LINK_ONCE) == 0) + return; +- ++ pei_get_comdat_info(sec); + name = bfd_get_section_name (abfd, sec); ++ if (sec->pe_comdat_info != NULL) ++ { ++ if (sec->pe_comdat_info && sec->pe_comdat_info->asoc_sec != (int)NULL) ++ { ++ /* .idata$2 & .idata$3 are not marked SEC_LINK_ONCE in MS .lib's ++ assuming that any SEC_LINK_ONCE section that dosen't have a ++ comdat symbol is an associated section and that the ++ section with the symbol has already been processed */ ++ for (l = sec_link_once_list; l != NULL; l = l->next) ++ { ++ if ((abfd == l->sec->owner) && (sec->pe_comdat_info->asoc_sec == l->sec->index + 1)) ++ return; ++ } ++ sec->output_section = bfd_abs_section_ptr; ++ return; ++ } ++ } + + for (l = sec_link_once_list; l != NULL; l = l->next) + { +- if (strcmp (name, bfd_get_section_name (l->sec->owner, l->sec)) == 0) ++ if ((strcmp (name, bfd_get_section_name (l->sec->owner, l->sec)) == 0) ++ && sec->pe_comdat_info != NULL ++ && (strcmp (sec->pe_comdat_info->name_buf, l->sec->pe_comdat_info->name_buf) == 0) ++ && (strcmp (sec->pe_comdat_info->comdat_sym, l->sec->pe_comdat_info->comdat_sym) == 0)) + { + /* The section has already been linked. See if we should + issue a warning. */ +@@ -790,7 +810,7 @@ section_already_linked (abfd, sec, data) + } + } + +- /* This is the first section with this name. Record it. */ ++ /* This is the first section with this name and symbol. Record it. */ + + l = (struct sec_link_once *) xmalloc (sizeof *l); + l->sec = sec; +@@ -1442,6 +1462,27 @@ ldlang_add_undef (name) + new->name = buystring (name); + } + ++/* exchange an older undefined entry point for a newer one ++ this will avoid dragging in the extra .o files ++ when the entry point is in a lib file */ ++void ++ldlang_switch_undef_entry (name) ++ CONST char *CONST name; ++{ ++ ldlang_undef_chain_list_type *new = ldlang_undef_chain_list_head; ++ while (new != (ldlang_undef_chain_list_type *) NULL) ++ { ++ if (strcmp (new->name, entry_symbol) == 0) ++ { ++ free(new->name); ++ new->name = buystring (name); ++ } ++ new = new->next; ++ } ++ ++} ++ ++ + /* Run through the list of undefineds created above and place them + into the linker hash table as undefined symbols belonging to the + script file. +@@ -3389,17 +3430,13 @@ lang_add_entry (name, cmdline) + || cmdline + || ! entry_from_cmdline) + { ++ if (entry_symbol != NULL) ++ ldlang_switch_undef_entry (name); ++ else ++ ldlang_add_undef(name); + entry_symbol = name; + entry_from_cmdline = cmdline; + } +-#if 0 +- /* don't do this yet. It seems to work (the executables run), but the +- image created is very different from what I was getting before indicating +- that something else is being pulled in. When everything else is working, +- then try to put this back in to see if it will do the right thing for +- other more complicated applications */ +- ldlang_add_undef (name); +-#endif + } + + void +diff -rup --new-file binutils-2.9.1/ld/ldlang.h binutils-2.9.1/ld/ldlang.h +--- binutils-2.9.1/ld/ldlang.h Fri May 1 08:48:49 1998 ++++ binutils-2.9.1/ld/ldlang.h Sun Aug 23 00:00:00 1998 +@@ -256,6 +256,8 @@ typedef struct lang_input_statement_stru + /* unsigned int globals_in_this_file;*/ + const char *target; + boolean real; ++ /* Added for AMIGA support of section attributes */ ++ int amiga_attribute; + } lang_input_statement_type; + + typedef struct +diff -rup --new-file binutils-2.9.1/ld/ldlex.c binutils-2.9.1/ld/ldlex.c +--- binutils-2.9.1/ld/ldlex.c Fri May 1 08:49:28 1998 ++++ binutils-2.9.1/ld/ldlex.c Wed Dec 31 17:00:00 1969 +@@ -1,3492 +0,0 @@ +-/* A lexical scanner generated by flex */ +- +-/* Scanner skeleton version: +- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $ +- */ +- +-#define FLEX_SCANNER +-#define YY_FLEX_MAJOR_VERSION 2 +-#define YY_FLEX_MINOR_VERSION 5 +- +-#include +- +- +-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +-#ifdef c_plusplus +-#ifndef __cplusplus +-#define __cplusplus +-#endif +-#endif +- +- +-#ifdef __cplusplus +- +-#include +-#include +- +-/* Use prototypes in function declarations. */ +-#define YY_USE_PROTOS +- +-/* The "const" storage-class-modifier is valid. */ +-#define YY_USE_CONST +- +-#else /* ! __cplusplus */ +- +-#if __STDC__ +- +-#define YY_USE_PROTOS +-#define YY_USE_CONST +- +-#endif /* __STDC__ */ +-#endif /* ! __cplusplus */ +- +-#ifdef __TURBOC__ +- #pragma warn -rch +- #pragma warn -use +-#include +-#include +-#define YY_USE_CONST +-#define YY_USE_PROTOS +-#endif +- +-#ifdef YY_USE_CONST +-#define yyconst const +-#else +-#define yyconst +-#endif +- +- +-#ifdef YY_USE_PROTOS +-#define YY_PROTO(proto) proto +-#else +-#define YY_PROTO(proto) () +-#endif +- +-/* Returned upon end-of-file. */ +-#define YY_NULL 0 +- +-/* Promotes a possibly negative, possibly signed char to an unsigned +- * integer for use as an array index. If the signed char is negative, +- * we want to instead treat it as an 8-bit unsigned char, hence the +- * double cast. +- */ +-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +- +-/* Enter a start condition. This macro really ought to take a parameter, +- * but we do it the disgusting crufty way forced on us by the ()-less +- * definition of BEGIN. +- */ +-#define BEGIN yy_start = 1 + 2 * +- +-/* Translate the current start state into a value that can be later handed +- * to BEGIN to return to the state. The YYSTATE alias is for lex +- * compatibility. +- */ +-#define YY_START ((yy_start - 1) / 2) +-#define YYSTATE YY_START +- +-/* Action number for EOF rule of a given start state. */ +-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +- +-/* Special action meaning "start processing a new file". */ +-#define YY_NEW_FILE yyrestart( yyin ) +- +-#define YY_END_OF_BUFFER_CHAR 0 +- +-/* Size of default input buffer. */ +-#define YY_BUF_SIZE 16384 +- +-typedef struct yy_buffer_state *YY_BUFFER_STATE; +- +-extern int yyleng; +-extern FILE *yyin, *yyout; +- +-#define EOB_ACT_CONTINUE_SCAN 0 +-#define EOB_ACT_END_OF_FILE 1 +-#define EOB_ACT_LAST_MATCH 2 +- +-/* The funky do-while in the following #define is used to turn the definition +- * int a single C statement (which needs a semi-colon terminator). This +- * avoids problems with code like: +- * +- * if ( condition_holds ) +- * yyless( 5 ); +- * else +- * do_something_else(); +- * +- * Prior to using the do-while the compiler would get upset at the +- * "else" because it interpreted the "if" statement as being all +- * done when it reached the ';' after the yyless() call. +- */ +- +-/* Return all but the first 'n' matched characters back to the input stream. */ +- +-#define yyless(n) \ +- do \ +- { \ +- /* Undo effects of setting up yytext. */ \ +- *yy_cp = yy_hold_char; \ +- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ +- YY_DO_BEFORE_ACTION; /* set up yytext again */ \ +- } \ +- while ( 0 ) +- +-#define unput(c) yyunput( c, yytext_ptr ) +- +-/* The following is because we cannot portably get our hands on size_t +- * (without autoconf's help, which isn't available because we want +- * flex-generated scanners to compile on their own). +- */ +-typedef unsigned int yy_size_t; +- +- +-struct yy_buffer_state +- { +- FILE *yy_input_file; +- +- char *yy_ch_buf; /* input buffer */ +- char *yy_buf_pos; /* current position in input buffer */ +- +- /* Size of input buffer in bytes, not including room for EOB +- * characters. +- */ +- yy_size_t yy_buf_size; +- +- /* Number of characters read into yy_ch_buf, not including EOB +- * characters. +- */ +- int yy_n_chars; +- +- /* Whether we "own" the buffer - i.e., we know we created it, +- * and can realloc() it to grow it, and should free() it to +- * delete it. +- */ +- int yy_is_our_buffer; +- +- /* Whether this is an "interactive" input source; if so, and +- * if we're using stdio for input, then we want to use getc() +- * instead of fread(), to make sure we stop fetching input after +- * each newline. +- */ +- int yy_is_interactive; +- +- /* Whether we're considered to be at the beginning of a line. +- * If so, '^' rules will be active on the next match, otherwise +- * not. +- */ +- int yy_at_bol; +- +- /* Whether to try to fill the input buffer when we reach the +- * end of it. +- */ +- int yy_fill_buffer; +- +- int yy_buffer_status; +-#define YY_BUFFER_NEW 0 +-#define YY_BUFFER_NORMAL 1 +- /* When an EOF's been seen but there's still some text to process +- * then we mark the buffer as YY_EOF_PENDING, to indicate that we +- * shouldn't try reading from the input source any more. We might +- * still have a bunch of tokens to match, though, because of +- * possible backing-up. +- * +- * When we actually see the EOF, we change the status to "new" +- * (via yyrestart()), so that the user can continue scanning by +- * just pointing yyin at a new input file. +- */ +-#define YY_BUFFER_EOF_PENDING 2 +- }; +- +-static YY_BUFFER_STATE yy_current_buffer = 0; +- +-/* We provide macros for accessing buffer states in case in the +- * future we want to put the buffer states in a more general +- * "scanner state". +- */ +-#define YY_CURRENT_BUFFER yy_current_buffer +- +- +-/* yy_hold_char holds the character lost when yytext is formed. */ +-static char yy_hold_char; +- +-static int yy_n_chars; /* number of characters read into yy_ch_buf */ +- +- +-int yyleng; +- +-/* Points to current character in buffer. */ +-static char *yy_c_buf_p = (char *) 0; +-static int yy_init = 1; /* whether we need to initialize */ +-static int yy_start = 0; /* start state number */ +- +-/* Flag which is used to allow yywrap()'s to do buffer switches +- * instead of setting up a fresh yyin. A bit of a hack ... +- */ +-static int yy_did_buffer_switch_on_eof; +- +-void yyrestart YY_PROTO(( FILE *input_file )); +- +-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +-void yy_load_buffer_state YY_PROTO(( void )); +-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) +- +-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str )); +-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); +- +-static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +-static void yy_flex_free YY_PROTO(( void * )); +- +-#define yy_new_buffer yy_create_buffer +- +-#define yy_set_interactive(is_interactive) \ +- { \ +- if ( ! yy_current_buffer ) \ +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ +- yy_current_buffer->yy_is_interactive = is_interactive; \ +- } +- +-#define yy_set_bol(at_bol) \ +- { \ +- if ( ! yy_current_buffer ) \ +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ +- yy_current_buffer->yy_at_bol = at_bol; \ +- } +- +-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +- +-typedef unsigned char YY_CHAR; +-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +-typedef int yy_state_type; +-extern char *yytext; +-#define yytext_ptr yytext +- +-static yy_state_type yy_get_previous_state YY_PROTO(( void )); +-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +-static int yy_get_next_buffer YY_PROTO(( void )); +-static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +- +-/* Done after the current pattern has been matched and before the +- * corresponding action - sets up yytext. +- */ +-#define YY_DO_BEFORE_ACTION \ +- yytext_ptr = yy_bp; \ +- yyleng = (int) (yy_cp - yy_bp); \ +- yy_hold_char = *yy_cp; \ +- *yy_cp = '\0'; \ +- yy_c_buf_p = yy_cp; +- +-#define YY_NUM_RULES 162 +-#define YY_END_OF_BUFFER 163 +-static yyconst short int yy_accept[1003] = +- { 0, +- 0, 0, 145, 145, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 163, 162, +- 160, 148, 147, 32, 160, 145, 38, 29, 44, 43, +- 34, 35, 28, 36, 145, 37, 8, 8, 45, 46, +- 39, 40, 27, 33, 145, 145, 145, 145, 145, 145, +- 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, +- 145, 145, 10, 9, 145, 96, 94, 145, 42, 30, +- 41, 31, 161, 148, 32, 161, 143, 38, 29, 44, +- 43, 34, 35, 28, 36, 143, 37, 8, 8, 45, +- 46, 39, 40, 27, 33, 143, 143, 143, 143, 143, +- +- 143, 143, 143, 143, 143, 143, 143, 143, 10, 9, +- 143, 143, 42, 30, 41, 31, 143, 8, 8, 143, +- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, +- 143, 143, 143, 143, 143, 143, 143, 96, 94, 4, +- 3, 2, 4, 5, 103, 102, 142, 34, 35, 28, +- 36, 142, 37, 8, 8, 45, 46, 40, 33, 142, +- 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, +- 142, 10, 9, 142, 142, 142, 142, 142, 142, 142, +- 142, 142, 142, 142, 31, 159, 157, 158, 154, 153, +- 149, 155, 156, 152, 152, 152, 148, 15, 0, 146, +- +- 145, 8, 26, 24, 22, 20, 21, 1, 23, 8, +- 8, 145, 18, 17, 14, 16, 19, 145, 145, 145, +- 100, 145, 145, 145, 145, 145, 145, 145, 145, 145, +- 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, +- 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, +- 145, 145, 145, 145, 145, 145, 145, 145, 145, 25, +- 13, 143, 6, 22, 20, 21, 0, 1, 23, 8, +- 0, 7, 7, 8, 7, 14, 143, 7, 7, 7, +- 143, 100, 7, 143, 143, 7, 143, 143, 143, 143, +- 143, 143, 143, 143, 143, 143, 143, 143, 7, 143, +- +- 8, 8, 0, 143, 143, 143, 143, 143, 143, 143, +- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, +- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, +- 143, 143, 143, 143, 143, 4, 4, 102, 102, 142, +- 6, 104, 22, 23, 105, 142, 7, 7, 7, 142, +- 142, 142, 7, 142, 7, 7, 142, 142, 142, 142, +- 142, 142, 142, 142, 7, 142, 142, 142, 7, 142, +- 7, 7, 142, 142, 142, 142, 142, 142, 142, 142, +- 159, 158, 153, 152, 152, 152, 11, 12, 145, 145, +- 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, +- +- 145, 145, 145, 145, 78, 145, 145, 145, 145, 145, +- 145, 62, 145, 145, 145, 145, 145, 145, 145, 145, +- 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, +- 145, 145, 145, 97, 95, 145, 8, 144, 8, 143, +- 7, 143, 143, 143, 143, 143, 143, 143, 143, 143, +- 56, 57, 143, 143, 143, 143, 143, 143, 143, 143, +- 143, 143, 143, 143, 143, 143, 143, 143, 143, 78, +- 143, 143, 143, 143, 62, 143, 143, 143, 143, 143, +- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, +- 97, 95, 4, 8, 142, 142, 142, 142, 142, 106, +- +- 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, +- 142, 142, 142, 142, 142, 124, 142, 142, 142, 142, +- 142, 142, 142, 142, 142, 142, 152, 152, 145, 54, +- 145, 51, 145, 85, 145, 91, 145, 145, 145, 145, +- 74, 145, 145, 145, 145, 92, 145, 145, 145, 83, +- 145, 59, 145, 145, 145, 145, 145, 145, 145, 145, +- 81, 145, 145, 145, 145, 145, 145, 145, 145, 145, +- 145, 145, 143, 54, 143, 51, 143, 91, 143, 143, +- 143, 92, 143, 59, 143, 143, 143, 143, 143, 143, +- 143, 85, 143, 143, 143, 74, 143, 143, 143, 143, +- +- 143, 83, 143, 143, 143, 143, 143, 143, 81, 143, +- 143, 143, 143, 143, 143, 143, 143, 142, 142, 142, +- 110, 118, 109, 142, 142, 121, 113, 116, 142, 142, +- 122, 142, 142, 142, 142, 142, 128, 136, 127, 142, +- 142, 139, 131, 134, 142, 142, 140, 142, 142, 152, +- 152, 145, 53, 50, 145, 145, 145, 90, 58, 80, +- 145, 68, 145, 67, 145, 145, 145, 145, 145, 145, +- 145, 145, 145, 99, 145, 145, 145, 84, 145, 82, +- 145, 145, 145, 145, 145, 145, 143, 53, 50, 143, +- 90, 68, 143, 143, 143, 143, 143, 143, 143, 143, +- +- 143, 143, 58, 80, 143, 143, 67, 143, 143, 143, +- 143, 143, 143, 99, 143, 143, 84, 82, 143, 143, +- 143, 143, 142, 111, 108, 142, 142, 121, 121, 115, +- 142, 120, 142, 142, 129, 126, 142, 142, 139, 139, +- 133, 142, 138, 142, 152, 151, 145, 145, 145, 145, +- 145, 145, 52, 145, 47, 145, 145, 89, 48, 66, +- 145, 145, 145, 145, 63, 145, 79, 64, 145, 145, +- 145, 143, 143, 143, 143, 89, 143, 143, 63, 143, +- 143, 143, 143, 143, 143, 52, 47, 143, 48, 66, +- 143, 143, 143, 143, 79, 64, 143, 142, 142, 119, +- +- 117, 114, 142, 142, 142, 137, 135, 132, 142, 150, +- 145, 145, 145, 69, 145, 98, 145, 145, 86, 145, +- 88, 101, 145, 145, 145, 75, 49, 145, 145, 143, +- 69, 143, 143, 93, 101, 143, 143, 143, 143, 143, +- 143, 98, 86, 143, 88, 143, 143, 75, 49, 142, +- 142, 142, 142, 142, 142, 123, 145, 145, 145, 55, +- 145, 145, 145, 145, 73, 145, 141, 145, 123, 55, +- 143, 143, 141, 143, 143, 143, 143, 143, 143, 143, +- 73, 123, 107, 112, 141, 125, 130, 145, 145, 145, +- 145, 145, 145, 145, 145, 145, 143, 143, 143, 143, +- +- 143, 143, 143, 143, 143, 145, 145, 145, 145, 145, +- 145, 65, 145, 145, 143, 143, 143, 143, 143, 143, +- 143, 143, 65, 145, 145, 145, 87, 77, 145, 145, +- 145, 87, 143, 143, 143, 143, 143, 77, 143, 71, +- 145, 145, 145, 145, 145, 143, 143, 71, 143, 143, +- 143, 145, 145, 76, 145, 145, 143, 143, 143, 143, +- 76, 145, 145, 61, 60, 61, 60, 143, 143, 145, +- 145, 143, 143, 145, 145, 143, 143, 145, 145, 143, +- 143, 145, 145, 143, 143, 145, 145, 143, 143, 145, +- 145, 143, 143, 70, 145, 70, 143, 145, 143, 72, +- +- 72, 0 +- } ; +- +-static yyconst int yy_ec[256] = +- { 0, +- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, +- 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 2, 4, 5, 6, 7, 8, 9, 1, 10, +- 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, +- 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, +- 23, 24, 25, 1, 26, 27, 28, 29, 30, 31, +- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, +- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, +- 52, 53, 54, 1, 55, 1, 56, 57, 58, 59, +- +- 60, 61, 62, 63, 64, 48, 65, 66, 67, 68, +- 69, 70, 48, 71, 72, 73, 74, 48, 48, 75, +- 48, 76, 77, 78, 79, 80, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1 +- } ; +- +-static yyconst int yy_meta[81] = +- { 0, +- 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, +- 1, 4, 5, 6, 5, 7, 3, 8, 8, 5, +- 1, 1, 6, 1, 4, 8, 8, 8, 8, 8, +- 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, +- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, +- 9, 5, 3, 5, 9, 8, 8, 8, 8, 8, +- 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, +- 9, 9, 9, 9, 9, 9, 1, 1, 1, 3 +- } ; +- +-static yyconst short int yy_base[1025] = +- { 0, +- 0, 0, 0, 0, 80, 0, 154, 0, 223, 302, +- 381, 0, 162, 172, 461, 541, 621, 701, 1676, 1862, +- 1862, 1673, 1862, 1651, 1668, 764, 1862, 153, 1862, 1862, +- 1649, 1648, 0, 1647, 0, 154, 300, 232, 0, 1862, +- 147, 1646, 166, 0, 226, 166, 162, 174, 1629, 220, +- 1624, 1629, 1626, 167, 137, 179, 215, 223, 1618, 239, +- 1637, 1632, 0, 0, 1604, 1600, 1588, 1594, 1862, 198, +- 1862, 0, 1862, 1655, 1633, 1650, 808, 1862, 199, 1862, +- 1862, 1631, 1630, 1862, 217, 0, 194, 852, 1577, 1862, +- 1862, 242, 1628, 255, 1862, 910, 253, 302, 314, 303, +- +- 1607, 1610, 1608, 145, 255, 1600, 1603, 1611, 1862, 1862, +- 460, 1580, 1862, 268, 1862, 0, 968, 709, 549, 308, +- 318, 253, 244, 1604, 323, 1605, 1602, 331, 336, 334, +- 326, 455, 1594, 461, 1613, 1608, 1575, 1571, 1559, 1012, +- 1862, 1862, 0, 1862, 1862, 1626, 1056, 1605, 1604, 1862, +- 1602, 0, 1596, 0, 1540, 1862, 0, 1586, 1862, 1100, +- 473, 475, 482, 542, 489, 252, 1582, 1564, 1560, 222, +- 1562, 1862, 1862, 491, 543, 545, 578, 559, 264, 1548, +- 1532, 1528, 417, 1530, 0, 1598, 1862, 0, 1862, 0, +- 1862, 1862, 1862, 0, 1533, 1529, 1595, 1862, 1591, 1862, +- +- 0, 1158, 1862, 1862, 0, 0, 0, 0, 0, 629, +- 0, 535, 1572, 1862, 0, 1862, 1571, 1549, 1563, 1557, +- 0, 1551, 1549, 1543, 337, 1557, 1555, 1555, 1539, 1546, +- 1542, 1538, 1540, 1542, 492, 1539, 495, 1536, 1538, 1526, +- 494, 1540, 1528, 1542, 1542, 1530, 1543, 504, 1528, 1516, +- 1520, 1539, 1520, 1520, 1519, 1489, 1492, 1497, 1477, 1862, +- 1862, 0, 1208, 1862, 1862, 1862, 0, 1862, 0, 1477, +- 721, 0, 1862, 1862, 0, 1862, 547, 625, 561, 0, +- 1517, 0, 631, 1511, 1509, 1507, 704, 1516, 1500, 1505, +- 1504, 1480, 1489, 1478, 499, 1496, 1485, 1473, 705, 1447, +- +- 613, 733, 0, 1478, 1492, 1475, 496, 1489, 1487, 1472, +- 1479, 1475, 1471, 1476, 576, 1473, 571, 455, 1473, 635, +- 1476, 1464, 1478, 1478, 1480, 549, 1465, 1458, 1477, 1458, +- 1458, 1457, 1427, 1430, 1435, 0, 1258, 1493, 1862, 0, +- 1308, 0, 0, 1862, 0, 576, 644, 652, 0, 1461, +- 699, 721, 1460, 1464, 1447, 1448, 1446, 1463, 1450, 1458, +- 1459, 1457, 1458, 1437, 658, 1418, 729, 733, 1417, 1421, +- 1401, 1402, 1400, 1415, 1403, 1410, 1410, 1403, 1401, 1377, +- 1448, 0, 0, 0, 1380, 1390, 1862, 1862, 1407, 1403, +- 1413, 1415, 1415, 1412, 1397, 1390, 1413, 1404, 1409, 1393, +- +- 1398, 1408, 1405, 1386, 0, 1394, 1390, 1383, 1396, 1398, +- 1394, 0, 1385, 1379, 1380, 1385, 1381, 1388, 1378, 1375, +- 1374, 1369, 1386, 1371, 1368, 1369, 1381, 1384, 1366, 1371, +- 1375, 1362, 1336, 0, 0, 1344, 0, 0, 619, 1363, +- 770, 1370, 1372, 1367, 1344, 813, 1365, 1346, 1351, 1361, +- 0, 0, 1343, 1339, 1338, 1331, 1325, 1341, 1301, 1303, +- 1319, 1331, 1316, 1333, 1324, 1314, 1319, 1329, 1326, 0, +- 1316, 1306, 1319, 1318, 0, 1309, 1311, 1315, 1304, 1300, +- 1299, 1312, 1297, 1288, 1289, 1305, 1287, 1292, 1296, 1280, +- 0, 0, 0, 0, 1282, 557, 1291, 1290, 1272, 0, +- +- 1282, 1273, 1265, 1280, 1278, 1277, 1269, 1260, 1261, 1264, +- 1233, 594, 1241, 1240, 1229, 0, 1238, 1230, 1222, 1234, +- 1232, 1231, 1224, 1210, 1211, 1213, 1223, 1223, 1241, 0, +- 1235, 0, 1236, 0, 1226, 0, 1225, 1224, 1217, 1211, +- 0, 1215, 1229, 1217, 1211, 0, 1211, 1210, 1228, 0, +- 1210, 0, 1212, 1211, 1224, 1215, 1202, 1210, 1201, 1209, +- 0, 1214, 1207, 1195, 1193, 1203, 1186, 1196, 1199, 1194, +- 1158, 1153, 1184, 0, 1181, 0, 1177, 0, 1173, 1166, +- 1169, 0, 1183, 0, 1168, 1181, 1169, 1171, 1164, 1137, +- 1133, 0, 1156, 1155, 1149, 0, 1153, 1167, 1149, 1148, +- +- 1147, 0, 1148, 1150, 1149, 1136, 1144, 1136, 0, 1151, +- 1144, 1129, 1144, 1127, 1137, 1140, 1134, 1130, 1122, 1126, +- 0, 0, 0, 1121, 1136, 1375, 0, 0, 1112, 1120, +- 0, 1108, 1124, 1085, 1078, 1080, 0, 0, 0, 1076, +- 1090, 1454, 0, 0, 1074, 1080, 0, 1070, 1084, 1085, +- 1073, 1092, 0, 0, 1093, 1105, 1104, 0, 0, 0, +- 1077, 0, 1096, 0, 1091, 1094, 1072, 1077, 1094, 1082, +- 1071, 1064, 1082, 0, 1078, 1073, 1065, 0, 1073, 0, +- 1057, 1075, 1056, 1060, 1025, 1037, 1051, 0, 0, 1066, +- 0, 0, 1066, 1050, 1064, 1066, 1062, 1059, 1015, 1027, +- +- 1038, 1050, 0, 0, 1024, 1049, 0, 1044, 1026, 1041, +- 1027, 1020, 1038, 0, 1030, 1022, 0, 0, 1015, 1033, +- 1014, 1018, 1011, 0, 1018, 1016, 1009, 0, 1533, 0, +- 1025, 0, 1026, 977, 0, 983, 981, 975, 0, 1612, +- 0, 989, 0, 990, 979, 0, 999, 991, 981, 1006, +- 1006, 1003, 0, 1003, 0, 979, 977, 0, 0, 966, +- 970, 989, 963, 978, 961, 974, 0, 0, 975, 940, +- 957, 966, 981, 980, 964, 0, 957, 976, 950, 931, +- 948, 956, 946, 972, 963, 0, 0, 947, 0, 936, +- 940, 934, 949, 943, 0, 0, 944, 937, 941, 0, +- +- 0, 0, 935, 905, 908, 0, 0, 0, 903, 0, +- 945, 946, 932, 0, 925, 0, 921, 920, 0, 633, +- 0, 0, 933, 917, 153, 0, 0, 199, 231, 304, +- 0, 306, 307, 0, 0, 344, 408, 429, 465, 467, +- 484, 0, 0, 651, 0, 549, 565, 0, 0, 581, +- 583, 603, 577, 602, 630, 0, 646, 665, 655, 0, +- 667, 665, 673, 683, 0, 699, 0, 677, 0, 0, +- 708, 714, 0, 686, 716, 735, 726, 725, 732, 739, +- 0, 0, 0, 0, 0, 0, 0, 735, 750, 749, +- 758, 774, 760, 761, 780, 752, 778, 784, 755, 772, +- +- 779, 778, 789, 775, 776, 785, 799, 790, 787, 799, +- 795, 0, 812, 784, 800, 816, 787, 805, 819, 811, +- 819, 815, 0, 810, 827, 817, 0, 0, 831, 829, +- 800, 0, 831, 802, 819, 844, 834, 0, 848, 0, +- 830, 821, 832, 841, 815, 844, 818, 0, 846, 838, +- 849, 840, 870, 0, 853, 826, 855, 828, 847, 877, +- 0, 860, 868, 0, 0, 0, 0, 862, 870, 864, +- 879, 868, 883, 884, 883, 886, 885, 899, 902, 904, +- 904, 893, 908, 895, 916, 907, 900, 909, 903, 905, +- 917, 908, 919, 0, 914, 0, 916, 918, 919, 0, +- +- 0, 1862, 1691, 1700, 1709, 1718, 1727, 1736, 1743, 1750, +- 1757, 1766, 1773, 1782, 1791, 1800, 1803, 1809, 1816, 952, +- 1825, 1834, 1843, 1852 +- } ; +- +-static yyconst short int yy_def[1025] = +- { 0, +- 1003, 1003, 1002, 3, 1002, 5, 5, 7, 1004, 1004, +- 1002, 11, 1005, 1005, 1006, 1006, 1007, 1007, 1002, 1002, +- 1002, 1002, 1002, 1002, 1008, 1009, 1002, 1002, 1002, 1002, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1002, +- 1002, 1009, 1002, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1002, 1002, +- 1002, 1009, 1002, 1002, 1002, 1008, 1010, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1010, 1010, 1002, 88, 1002, +- 1002, 1002, 1002, 1002, 1002, 1010, 96, 96, 96, 96, +- +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1002, 1002, +- 96, 1010, 1002, 1002, 1002, 1010, 1010, 1002, 1002, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1011, +- 1002, 1002, 1011, 1002, 1002, 1012, 1013, 1014, 1002, 1002, +- 1002, 1013, 1013, 88, 88, 1002, 1015, 1002, 1002, 1013, +- 160, 160, 160, 160, 160, 1013, 1013, 1013, 1013, 1013, +- 1013, 1002, 1002, 160, 160, 160, 160, 160, 1013, 1013, +- 1013, 1013, 1013, 1013, 1013, 1002, 1002, 1016, 1002, 1017, +- 1002, 1002, 1002, 1018, 1018, 1018, 1002, 1002, 1008, 1002, +- +- 1009, 1009, 1002, 1002, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 202, 1002, 1002, 1009, 1002, 1002, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1002, +- 1002, 1010, 1010, 1002, 1002, 1002, 1019, 1002, 1010, 88, +- 88, 271, 1002, 1002, 1020, 1002, 96, 96, 96, 1010, +- 1010, 1010, 96, 1010, 1010, 1010, 96, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 96, 1010, +- +- 117, 1002, 1020, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1011, 1011, 1012, 1002, 1013, +- 1013, 1014, 1014, 1002, 1015, 160, 160, 160, 1013, 1013, +- 160, 160, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, +- 1013, 1013, 1013, 1013, 160, 1013, 160, 160, 1013, 1013, +- 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, +- 1002, 1016, 1017, 1018, 1018, 1018, 1002, 1002, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1010, 1019, 1020, 1010, +- 96, 1010, 1010, 1010, 1010, 96, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1011, 1013, 1013, 1013, 1013, 1013, 1013, 1013, +- +- 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, +- 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, +- 1013, 1013, 1013, 1013, 1013, 1013, 1018, 1018, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1013, 1013, 1013, +- 1013, 1013, 1013, 1013, 1013, 1021, 1013, 1013, 1013, 1013, +- 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, +- 1013, 1022, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1018, +- 1018, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1013, 1013, 1013, 1013, 1013, 1023, 1021, 1013, +- 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1024, 1022, +- 1013, 1013, 1013, 1013, 1018, 1018, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1013, 1013, 1013, +- +- 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1018, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1013, +- 1013, 1013, 1013, 1013, 1013, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1009, 1010, 1010, +- 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1013, 1013, 1013, 1013, 1013, 1013, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, +- +- 1010, 1010, 1010, 1010, 1010, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, 1010, 1010, +- 1010, 1010, 1010, 1009, 1009, 1009, 1009, 1009, 1009, 1009, +- 1009, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1009, +- 1009, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, 1010, +- 1010, 1009, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, +- 1010, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010, 1009, +- 1009, 1010, 1010, 1009, 1009, 1010, 1010, 1009, 1009, 1010, +- 1010, 1009, 1009, 1010, 1010, 1009, 1009, 1010, 1010, 1009, +- 1009, 1010, 1010, 1009, 1009, 1010, 1010, 1009, 1010, 1009, +- +- 1010, 0, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002 +- } ; +- +-static yyconst short int yy_nxt[1943] = +- { 0, +- 21, 22, 23, 24, 25, 21, 26, 27, 28, 29, +- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, +- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, +- 50, 51, 52, 53, 35, 35, 54, 55, 56, 57, +- 58, 59, 35, 60, 61, 35, 62, 35, 35, 35, +- 35, 63, 35, 64, 35, 65, 35, 35, 35, 35, +- 35, 35, 35, 35, 35, 66, 35, 35, 67, 35, +- 35, 68, 35, 35, 35, 35, 69, 70, 71, 72, +- 73, 74, 23, 75, 76, 73, 77, 78, 79, 80, +- 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, +- +- 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, +- 100, 101, 86, 102, 86, 86, 103, 104, 105, 106, +- 107, 86, 86, 108, 86, 86, 86, 86, 86, 86, +- 86, 109, 86, 110, 86, 111, 100, 100, 100, 100, +- 100, 86, 86, 86, 86, 86, 86, 86, 86, 86, +- 86, 112, 86, 86, 86, 86, 113, 114, 115, 116, +- 117, 203, 238, 186, 187, 208, 239, 188, 213, 214, +- 292, 118, 119, 186, 187, 204, 209, 188, 293, 120, +- 121, 122, 123, 124, 125, 866, 126, 127, 216, 217, +- 128, 129, 130, 131, 132, 133, 236, 134, 135, 222, +- +- 136, 225, 223, 227, 226, 268, 237, 203, 240, 137, +- 86, 86, 86, 86, 86, 224, 269, 228, 241, 138, +- 260, 204, 139, 73, 73, 20, 73, 73, 73, 140, +- 73, 73, 73, 73, 73, 141, 73, 142, 189, 266, +- 118, 119, 73, 73, 73, 144, 73, 73, 189, 210, +- 210, 362, 218, 230, 219, 245, 231, 242, 867, 232, +- 243, 244, 220, 213, 214, 246, 363, 211, 248, 211, +- 221, 249, 250, 309, 73, 261, 73, 216, 217, 283, +- 251, 283, 267, 252, 294, 357, 284, 288, 253, 285, +- 260, 358, 307, 868, 295, 308, 211, 262, 211, 73, +- +- 73, 73, 73, 73, 20, 73, 73, 73, 140, 73, +- 73, 73, 73, 73, 141, 73, 142, 210, 210, 118, +- 119, 73, 73, 73, 144, 73, 73, 373, 283, 283, +- 283, 283, 374, 869, 304, 211, 305, 211, 262, 262, +- 283, 286, 283, 287, 281, 261, 262, 262, 870, 871, +- 262, 284, 282, 73, 285, 73, 311, 288, 262, 312, +- 316, 318, 313, 294, 211, 319, 211, 306, 321, 293, +- 317, 322, 323, 320, 212, 395, 872, 396, 73, 73, +- 73, 21, 22, 145, 24, 21, 146, 147, 27, 28, +- 29, 30, 148, 149, 150, 151, 152, 153, 154, 155, +- +- 156, 157, 41, 158, 43, 159, 160, 161, 162, 163, +- 164, 165, 152, 152, 152, 152, 152, 166, 152, 167, +- 168, 169, 152, 152, 170, 171, 152, 152, 152, 152, +- 152, 152, 172, 152, 173, 152, 174, 175, 176, 163, +- 177, 178, 152, 152, 152, 152, 179, 152, 180, 181, +- 182, 152, 183, 184, 152, 152, 152, 69, 70, 71, +- 185, 21, 186, 187, 21, 21, 188, 873, 21, 21, +- 21, 21, 21, 21, 191, 21, 378, 21, 21, 21, +- 191, 191, 21, 21, 21, 21, 283, 324, 283, 379, +- 326, 874, 875, 327, 298, 475, 262, 297, 351, 348, +- +- 352, 348, 328, 451, 262, 329, 876, 353, 348, 340, +- 330, 340, 21, 21, 21, 348, 299, 348, 340, 406, +- 410, 415, 407, 877, 416, 340, 454, 340, 356, 424, +- 417, 425, 408, 411, 463, 455, 445, 192, 21, 193, +- 21, 21, 186, 187, 21, 21, 188, 365, 21, 21, +- 21, 21, 21, 21, 191, 21, 366, 21, 21, 21, +- 191, 191, 21, 21, 21, 21, 302, 302, 348, 348, +- 201, 348, 201, 283, 483, 283, 484, 880, 340, 340, +- 354, 340, 619, 262, 274, 348, 274, 283, 620, 441, +- 355, 262, 21, 21, 21, 340, 450, 262, 367, 201, +- +- 368, 201, 348, 471, 348, 262, 449, 369, 881, 474, +- 882, 883, 340, 274, 340, 274, 472, 192, 21, 193, +- 21, 21, 186, 187, 21, 21, 188, 372, 21, 21, +- 21, 21, 884, 21, 191, 21, 885, 21, 21, 21, +- 191, 191, 21, 21, 21, 370, 210, 210, 437, 635, +- 437, 283, 371, 283, 274, 636, 274, 283, 862, 283, +- 886, 262, 454, 863, 211, 477, 211, 262, 440, 262, +- 348, 455, 21, 21, 21, 262, 878, 437, 348, 437, +- 340, 879, 195, 274, 348, 274, 196, 495, 340, 887, +- 888, 889, 890, 211, 340, 211, 891, 21, 21, 193, +- +- 21, 21, 186, 187, 21, 21, 188, 892, 21, 21, +- 21, 21, 893, 21, 191, 21, 894, 21, 21, 21, +- 191, 191, 21, 21, 21, 348, 302, 302, 895, 511, +- 283, 283, 283, 283, 446, 340, 896, 897, 271, 271, +- 262, 262, 497, 898, 274, 899, 274, 348, 262, 262, +- 302, 302, 21, 21, 21, 348, 1002, 340, 1002, 348, +- 900, 901, 195, 902, 498, 340, 196, 903, 274, 340, +- 274, 904, 905, 274, 906, 274, 459, 21, 21, 193, +- 21, 202, 202, 303, 907, 1002, 908, 1002, 909, 202, +- 202, 202, 202, 202, 202, 273, 283, 274, 283, 274, +- +- 513, 910, 911, 912, 514, 913, 262, 914, 915, 916, +- 917, 918, 574, 919, 262, 920, 921, 922, 923, 202, +- 202, 202, 202, 202, 202, 263, 263, 924, 925, 926, +- 927, 928, 929, 263, 263, 263, 263, 263, 263, 283, +- 930, 283, 931, 932, 933, 934, 579, 935, 936, 262, +- 937, 938, 939, 940, 941, 942, 943, 262, 944, 945, +- 946, 947, 948, 263, 263, 263, 263, 263, 263, 270, +- 270, 949, 950, 951, 952, 953, 954, 271, 272, 271, +- 272, 271, 271, 955, 273, 956, 957, 274, 958, 274, +- 959, 273, 960, 961, 962, 963, 964, 965, 966, 967, +- +- 273, 968, 969, 970, 971, 972, 973, 271, 272, 271, +- 272, 271, 271, 974, 273, 975, 274, 976, 274, 977, +- 273, 978, 979, 980, 981, 982, 275, 277, 277, 983, +- 984, 985, 986, 987, 988, 277, 278, 277, 279, 277, +- 277, 989, 280, 990, 991, 992, 281, 993, 994, 280, +- 995, 996, 997, 998, 282, 999, 1000, 1001, 280, 439, +- 865, 864, 861, 860, 859, 277, 283, 277, 283, 277, +- 277, 858, 280, 857, 856, 855, 854, 853, 280, 852, +- 851, 850, 849, 848, 280, 301, 301, 847, 846, 845, +- 844, 843, 842, 301, 301, 301, 301, 301, 301, 841, +- +- 840, 839, 838, 837, 836, 835, 834, 833, 832, 831, +- 830, 829, 828, 827, 826, 825, 824, 823, 822, 821, +- 820, 819, 818, 301, 301, 301, 301, 301, 301, 337, +- 337, 817, 816, 815, 814, 813, 812, 337, 337, 337, +- 337, 337, 337, 811, 810, 809, 808, 807, 806, 805, +- 804, 803, 802, 801, 800, 799, 798, 797, 796, 795, +- 794, 793, 792, 791, 790, 789, 788, 337, 337, 337, +- 337, 337, 337, 341, 341, 787, 786, 785, 784, 783, +- 782, 341, 341, 341, 341, 341, 341, 781, 780, 779, +- 778, 777, 776, 775, 774, 773, 772, 771, 770, 769, +- +- 768, 767, 766, 765, 764, 763, 762, 761, 760, 759, +- 758, 341, 341, 341, 341, 341, 341, 346, 346, 757, +- 756, 755, 754, 753, 752, 346, 347, 346, 348, 346, +- 346, 751, 349, 750, 749, 748, 350, 747, 746, 349, +- 745, 744, 743, 742, 741, 738, 737, 736, 349, 735, +- 734, 733, 732, 731, 730, 346, 348, 346, 348, 346, +- 346, 727, 349, 726, 725, 724, 723, 722, 349, 721, +- 720, 719, 718, 717, 349, 202, 202, 716, 715, 714, +- 713, 712, 711, 202, 202, 202, 202, 202, 202, 710, +- 709, 708, 707, 211, 706, 211, 705, 704, 703, 702, +- +- 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, +- 691, 690, 689, 202, 202, 202, 202, 202, 202, 688, +- 687, 686, 211, 685, 211, 263, 263, 684, 683, 682, +- 681, 680, 679, 263, 263, 263, 263, 263, 263, 678, +- 677, 676, 675, 437, 674, 437, 673, 672, 671, 670, +- 669, 668, 667, 666, 665, 664, 663, 662, 661, 660, +- 659, 658, 657, 263, 263, 263, 263, 263, 263, 656, +- 655, 654, 437, 653, 437, 337, 337, 652, 651, 650, +- 649, 648, 647, 337, 337, 337, 337, 337, 337, 646, +- 645, 644, 643, 493, 642, 493, 641, 640, 639, 638, +- +- 637, 634, 633, 632, 631, 630, 629, 628, 627, 626, +- 625, 624, 623, 337, 337, 337, 337, 337, 337, 622, +- 621, 618, 493, 617, 493, 341, 341, 616, 615, 614, +- 613, 612, 611, 341, 341, 341, 341, 341, 341, 610, +- 609, 608, 607, 494, 606, 494, 605, 604, 603, 602, +- 601, 600, 599, 598, 597, 596, 595, 579, 594, 593, +- 592, 574, 591, 341, 341, 341, 341, 341, 341, 590, +- 589, 588, 494, 587, 494, 728, 728, 586, 728, 728, +- 728, 585, 728, 728, 728, 728, 728, 584, 728, 583, +- 582, 581, 580, 578, 577, 728, 728, 728, 728, 728, +- +- 576, 575, 573, 572, 571, 570, 569, 568, 567, 566, +- 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, +- 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, +- 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, +- 535, 534, 533, 532, 531, 530, 529, 528, 527, 381, +- 526, 728, 728, 728, 739, 739, 525, 739, 739, 739, +- 524, 739, 739, 739, 739, 739, 523, 739, 522, 521, +- 520, 519, 518, 517, 739, 739, 739, 739, 739, 516, +- 515, 512, 510, 509, 508, 507, 506, 505, 504, 503, +- 502, 501, 500, 499, 496, 339, 492, 491, 459, 490, +- +- 489, 488, 487, 486, 485, 482, 481, 480, 479, 478, +- 476, 473, 470, 469, 468, 467, 466, 465, 464, 462, +- 461, 440, 460, 458, 457, 456, 453, 452, 451, 450, +- 739, 739, 739, 728, 728, 449, 728, 728, 728, 448, +- 728, 728, 728, 728, 728, 447, 728, 445, 444, 443, +- 442, 273, 436, 728, 728, 728, 728, 728, 435, 434, +- 433, 432, 431, 430, 429, 428, 427, 426, 423, 422, +- 421, 420, 419, 418, 414, 413, 412, 409, 405, 404, +- 403, 402, 401, 400, 399, 398, 397, 394, 393, 392, +- 391, 390, 389, 388, 387, 200, 197, 386, 385, 381, +- +- 380, 377, 376, 375, 364, 361, 360, 359, 276, 728, +- 728, 728, 739, 739, 273, 739, 739, 739, 344, 739, +- 739, 739, 739, 739, 266, 739, 265, 343, 339, 335, +- 334, 333, 739, 739, 739, 739, 739, 332, 331, 325, +- 315, 314, 310, 300, 298, 297, 296, 291, 290, 289, +- 276, 273, 265, 264, 200, 198, 197, 259, 258, 257, +- 256, 255, 254, 247, 235, 234, 233, 229, 215, 207, +- 206, 205, 200, 198, 197, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 739, 739, +- 739, 20, 20, 20, 20, 20, 20, 20, 20, 20, +- +- 143, 143, 143, 143, 143, 143, 143, 143, 143, 21, +- 21, 21, 21, 21, 21, 21, 21, 21, 190, 190, +- 190, 190, 190, 190, 190, 190, 190, 194, 194, 194, +- 194, 194, 194, 194, 194, 194, 199, 199, 199, 199, +- 199, 199, 199, 199, 199, 201, 201, 201, 201, 201, +- 201, 201, 262, 1002, 262, 262, 262, 262, 262, 336, +- 1002, 1002, 1002, 336, 336, 336, 338, 338, 338, 338, +- 338, 338, 338, 338, 338, 340, 1002, 340, 1002, 340, +- 340, 340, 342, 1002, 342, 342, 342, 342, 342, 342, +- 342, 345, 1002, 345, 345, 345, 345, 345, 345, 345, +- +- 382, 1002, 382, 382, 382, 382, 382, 382, 382, 383, +- 383, 383, 384, 1002, 1002, 1002, 384, 384, 438, 1002, +- 438, 438, 438, 438, 438, 729, 1002, 729, 729, 729, +- 729, 729, 729, 729, 740, 1002, 740, 740, 740, 740, +- 740, 740, 740, 728, 1002, 728, 728, 728, 728, 728, +- 728, 728, 739, 1002, 739, 739, 739, 739, 739, 739, +- 739, 19, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002 +- } ; +- +-static yyconst short int yy_chk[1943] = +- { 0, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- +- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 7, 28, 55, 13, 13, 36, 55, 13, 41, 41, +- 104, 7, 7, 14, 14, 28, 36, 14, 104, 7, +- 7, 7, 7, 7, 7, 825, 7, 7, 43, 43, +- 7, 7, 7, 7, 7, 7, 54, 7, 7, 46, +- +- 7, 47, 46, 48, 47, 87, 54, 79, 56, 7, +- 7, 7, 7, 7, 7, 46, 87, 48, 56, 7, +- 70, 79, 7, 9, 9, 9, 9, 9, 9, 9, +- 9, 9, 9, 9, 9, 9, 9, 9, 13, 85, +- 9, 9, 9, 9, 9, 9, 9, 9, 14, 38, +- 38, 170, 45, 50, 45, 58, 50, 57, 828, 50, +- 57, 57, 45, 92, 92, 58, 170, 38, 60, 38, +- 45, 60, 60, 123, 9, 70, 9, 94, 94, 97, +- 60, 97, 85, 60, 105, 166, 97, 123, 60, 97, +- 114, 166, 122, 829, 105, 122, 38, 97, 38, 9, +- +- 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, +- 10, 10, 10, 10, 10, 10, 10, 37, 37, 10, +- 10, 10, 10, 10, 10, 10, 10, 179, 98, 100, +- 98, 100, 179, 830, 120, 37, 120, 37, 98, 100, +- 99, 98, 99, 99, 120, 114, 98, 100, 832, 833, +- 99, 121, 120, 10, 121, 10, 125, 99, 99, 125, +- 128, 129, 125, 130, 37, 129, 37, 121, 131, 129, +- 128, 131, 131, 130, 37, 225, 836, 225, 10, 10, +- 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, +- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +- +- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +- 11, 15, 15, 15, 15, 15, 15, 837, 15, 15, +- 15, 15, 15, 15, 15, 15, 183, 15, 15, 15, +- 15, 15, 15, 15, 15, 15, 111, 132, 111, 183, +- 134, 838, 839, 134, 134, 318, 111, 132, 161, 161, +- +- 162, 162, 134, 318, 111, 134, 840, 162, 163, 161, +- 134, 162, 15, 15, 15, 165, 111, 174, 163, 235, +- 237, 241, 235, 841, 241, 165, 295, 174, 165, 248, +- 241, 248, 235, 237, 307, 295, 307, 15, 15, 15, +- 15, 16, 16, 16, 16, 16, 16, 174, 16, 16, +- 16, 16, 16, 16, 16, 16, 174, 16, 16, 16, +- 16, 16, 16, 16, 16, 16, 119, 119, 164, 175, +- 212, 176, 212, 277, 326, 277, 326, 846, 164, 175, +- 164, 176, 496, 277, 119, 178, 119, 279, 496, 279, +- 164, 277, 16, 16, 16, 178, 317, 279, 175, 212, +- +- 176, 212, 346, 315, 177, 279, 315, 176, 847, 317, +- 850, 851, 346, 119, 177, 119, 315, 16, 16, 16, +- 16, 17, 17, 17, 17, 17, 17, 178, 17, 17, +- 17, 17, 852, 17, 17, 17, 853, 17, 17, 17, +- 17, 17, 17, 17, 17, 177, 210, 210, 301, 512, +- 301, 278, 177, 278, 439, 512, 439, 283, 820, 283, +- 854, 278, 320, 820, 210, 320, 210, 283, 278, 278, +- 347, 320, 17, 17, 17, 283, 844, 301, 348, 301, +- 347, 844, 17, 439, 365, 439, 17, 347, 348, 855, +- 857, 858, 859, 210, 365, 210, 861, 17, 17, 17, +- +- 17, 18, 18, 18, 18, 18, 18, 862, 18, 18, +- 18, 18, 863, 18, 18, 18, 864, 18, 18, 18, +- 18, 18, 18, 18, 18, 351, 118, 118, 866, 365, +- 287, 299, 287, 299, 287, 351, 868, 871, 271, 271, +- 287, 299, 351, 872, 118, 874, 118, 352, 287, 299, +- 302, 302, 18, 18, 18, 367, 271, 352, 271, 368, +- 875, 876, 18, 877, 352, 367, 18, 878, 302, 368, +- 302, 879, 880, 118, 888, 118, 299, 18, 18, 18, +- 18, 26, 26, 118, 889, 271, 890, 271, 891, 26, +- 26, 26, 26, 26, 26, 271, 441, 302, 441, 302, +- +- 367, 892, 893, 894, 368, 895, 441, 896, 897, 898, +- 899, 900, 441, 901, 441, 902, 903, 904, 905, 26, +- 26, 26, 26, 26, 26, 77, 77, 906, 907, 908, +- 909, 910, 911, 77, 77, 77, 77, 77, 77, 446, +- 913, 446, 914, 915, 916, 917, 446, 918, 919, 446, +- 920, 921, 922, 924, 925, 926, 929, 446, 930, 931, +- 933, 934, 935, 77, 77, 77, 77, 77, 77, 88, +- 88, 936, 937, 939, 941, 942, 943, 88, 88, 88, +- 88, 88, 88, 944, 88, 945, 946, 88, 947, 88, +- 949, 88, 950, 951, 952, 953, 955, 956, 957, 958, +- +- 88, 959, 960, 962, 963, 968, 969, 88, 88, 88, +- 88, 88, 88, 970, 88, 971, 88, 972, 88, 973, +- 88, 974, 975, 976, 977, 978, 88, 96, 96, 979, +- 980, 981, 982, 983, 984, 96, 96, 96, 96, 96, +- 96, 985, 96, 986, 987, 988, 96, 989, 990, 96, +- 991, 992, 993, 995, 96, 997, 998, 999, 96, 1020, +- 824, 823, 818, 817, 815, 96, 96, 96, 96, 96, +- 96, 813, 96, 812, 811, 809, 805, 804, 96, 803, +- 799, 798, 797, 794, 96, 117, 117, 793, 792, 791, +- 790, 788, 785, 117, 117, 117, 117, 117, 117, 784, +- +- 783, 782, 781, 780, 779, 778, 777, 775, 774, 773, +- 772, 771, 770, 769, 766, 765, 764, 763, 762, 761, +- 760, 757, 756, 117, 117, 117, 117, 117, 117, 140, +- 140, 754, 752, 751, 750, 749, 748, 140, 140, 140, +- 140, 140, 140, 747, 745, 744, 742, 738, 737, 736, +- 734, 733, 731, 727, 726, 725, 723, 722, 721, 720, +- 719, 716, 715, 713, 712, 711, 710, 140, 140, 140, +- 140, 140, 140, 147, 147, 709, 708, 706, 705, 702, +- 701, 147, 147, 147, 147, 147, 147, 700, 699, 698, +- 697, 696, 695, 694, 693, 690, 687, 686, 685, 684, +- +- 683, 682, 681, 679, 677, 676, 675, 673, 672, 671, +- 670, 147, 147, 147, 147, 147, 147, 160, 160, 669, +- 668, 667, 666, 665, 663, 160, 160, 160, 160, 160, +- 160, 661, 160, 657, 656, 655, 160, 652, 651, 160, +- 650, 649, 648, 646, 645, 641, 640, 636, 160, 635, +- 634, 633, 632, 630, 629, 160, 160, 160, 160, 160, +- 160, 625, 160, 624, 620, 619, 618, 617, 160, 616, +- 615, 614, 613, 612, 160, 202, 202, 611, 610, 608, +- 607, 606, 605, 202, 202, 202, 202, 202, 202, 604, +- 603, 601, 600, 202, 599, 202, 598, 597, 595, 594, +- +- 593, 591, 590, 589, 588, 587, 586, 585, 583, 581, +- 580, 579, 577, 202, 202, 202, 202, 202, 202, 575, +- 573, 572, 202, 571, 202, 263, 263, 570, 569, 568, +- 567, 566, 565, 263, 263, 263, 263, 263, 263, 564, +- 563, 562, 560, 263, 559, 263, 558, 557, 556, 555, +- 554, 553, 551, 549, 548, 547, 545, 544, 543, 542, +- 540, 539, 538, 263, 263, 263, 263, 263, 263, 537, +- 535, 533, 263, 531, 263, 337, 337, 529, 528, 527, +- 526, 525, 524, 337, 337, 337, 337, 337, 337, 523, +- 522, 521, 520, 337, 519, 337, 518, 517, 515, 514, +- +- 513, 511, 510, 509, 508, 507, 506, 505, 504, 503, +- 502, 501, 499, 337, 337, 337, 337, 337, 337, 498, +- 497, 495, 337, 490, 337, 341, 341, 489, 488, 487, +- 486, 485, 484, 341, 341, 341, 341, 341, 341, 483, +- 482, 481, 480, 341, 479, 341, 478, 477, 476, 474, +- 473, 472, 471, 469, 468, 467, 466, 465, 464, 463, +- 462, 461, 460, 341, 341, 341, 341, 341, 341, 459, +- 458, 457, 341, 456, 341, 626, 626, 455, 626, 626, +- 626, 454, 626, 626, 626, 626, 626, 453, 626, 450, +- 449, 448, 447, 445, 444, 626, 626, 626, 626, 626, +- +- 443, 442, 440, 436, 433, 432, 431, 430, 429, 428, +- 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, +- 417, 416, 415, 414, 413, 411, 410, 409, 408, 407, +- 406, 404, 403, 402, 401, 400, 399, 398, 397, 396, +- 395, 394, 393, 392, 391, 390, 389, 386, 385, 381, +- 380, 626, 626, 626, 642, 642, 379, 642, 642, 642, +- 378, 642, 642, 642, 642, 642, 377, 642, 376, 375, +- 374, 373, 372, 371, 642, 642, 642, 642, 642, 370, +- 369, 366, 364, 363, 362, 361, 360, 359, 358, 357, +- 356, 355, 354, 353, 350, 338, 335, 334, 333, 332, +- +- 331, 330, 329, 328, 327, 325, 324, 323, 322, 321, +- 319, 316, 314, 313, 312, 311, 310, 309, 308, 306, +- 305, 304, 300, 298, 297, 296, 294, 293, 292, 291, +- 642, 642, 642, 729, 729, 290, 729, 729, 729, 289, +- 729, 729, 729, 729, 729, 288, 729, 286, 285, 284, +- 281, 270, 259, 729, 729, 729, 729, 729, 258, 257, +- 256, 255, 254, 253, 252, 251, 250, 249, 247, 246, +- 245, 244, 243, 242, 240, 239, 238, 236, 234, 233, +- 232, 231, 230, 229, 228, 227, 226, 224, 223, 222, +- 220, 219, 218, 217, 213, 199, 197, 196, 195, 186, +- +- 184, 182, 181, 180, 171, 169, 168, 167, 158, 729, +- 729, 729, 740, 740, 155, 740, 740, 740, 153, 740, +- 740, 740, 740, 740, 151, 740, 149, 148, 146, 139, +- 138, 137, 740, 740, 740, 740, 740, 136, 135, 133, +- 127, 126, 124, 112, 108, 107, 106, 103, 102, 101, +- 93, 89, 83, 82, 76, 75, 74, 68, 67, 66, +- 65, 62, 61, 59, 53, 52, 51, 49, 42, 34, +- 32, 31, 25, 24, 22, 19, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 740, 740, +- 740, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, +- +- 1004, 1004, 1004, 1004, 1004, 1004, 1004, 1004, 1004, 1005, +- 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1006, 1006, +- 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1007, 1007, 1007, +- 1007, 1007, 1007, 1007, 1007, 1007, 1008, 1008, 1008, 1008, +- 1008, 1008, 1008, 1008, 1008, 1009, 1009, 1009, 1009, 1009, +- 1009, 1009, 1010, 0, 1010, 1010, 1010, 1010, 1010, 1011, +- 0, 0, 0, 1011, 1011, 1011, 1012, 1012, 1012, 1012, +- 1012, 1012, 1012, 1012, 1012, 1013, 0, 1013, 0, 1013, +- 1013, 1013, 1014, 0, 1014, 1014, 1014, 1014, 1014, 1014, +- 1014, 1015, 0, 1015, 1015, 1015, 1015, 1015, 1015, 1015, +- +- 1016, 0, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1017, +- 1017, 1017, 1018, 0, 0, 0, 1018, 1018, 1019, 0, +- 1019, 1019, 1019, 1019, 1019, 1021, 0, 1021, 1021, 1021, +- 1021, 1021, 1021, 1021, 1022, 0, 1022, 1022, 1022, 1022, +- 1022, 1022, 1022, 1023, 0, 1023, 1023, 1023, 1023, 1023, +- 1023, 1023, 1024, 0, 1024, 1024, 1024, 1024, 1024, 1024, +- 1024, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, +- 1002, 1002 +- } ; +- +-static yy_state_type yy_last_accepting_state; +-static char *yy_last_accepting_cpos; +- +-/* The intent behind this definition is that it'll catch +- * any uses of REJECT which flex missed. +- */ +-#define REJECT reject_used_but_not_detected +-#define yymore() yymore_used_but_not_detected +-#define YY_MORE_ADJ 0 +-char *yytext; +-#line 1 "ldlex.l" +-#define INITIAL 0 +-#line 2 "ldlex.l" +- +-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 +- Free Software Foundation, Inc. +- +-This file is part of GLD, the Gnu Linker. +- +-GLD is free software; you can redistribute it and/or modify +-it under the terms of the GNU General Public License as published by +-the Free Software Foundation; either version 2, or (at your option) +-any later version. +- +-GLD 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 GLD; see the file COPYING. If not, write to the Free +-Software Foundation, 59 Temple Place - Suite 330, Boston, MA +-02111-1307, USA. */ +- +-/* +-This was written by steve chamberlain +- sac@cygnus.com +-*/ +- +- +-#include +-#include +-#include +- +-#ifdef MPW +-/* Prevent enum redefinition problems. */ +-#define TRUE_FALSE_ALREADY_DEFINED +-#endif /* MPW */ +- +-#include "bfd.h" +-#include "sysdep.h" +-#include "ld.h" +-#include "ldgram.h" +-#include "ldmisc.h" +-#include "ldexp.h" +-#include "ldlang.h" +-#include "ldfile.h" +-#include "ldlex.h" +-#include "ldmain.h" +- +-/* The type of top-level parser input. +- yylex and yyparse (indirectly) both check this. */ +-input_type parser_input; +- +-/* Line number in the current input file. +- (FIXME Actually, it doesn't appear to get reset for each file?) */ +-unsigned int lineno = 1; +- +-/* The string we are currently lexing, or NULL if we are reading a +- file. */ +-const char *lex_string = NULL; +- +-/* Support for flex reading from more than one input file (stream). +- `include_stack' is flex's input state for each open file; +- `file_name_stack' is the file names. `lineno_stack' is the current +- line numbers. +- +- If `include_stack_ptr' is 0, we haven't started reading anything yet. +- Otherwise, stack elements 0 through `include_stack_ptr - 1' are valid. */ +- +-#undef YY_INPUT +-#define YY_INPUT(buf,result,max_size) yy_input(buf, &result, max_size) +- +-#define MAX_INCLUDE_DEPTH 10 +-static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; +-static const char *file_name_stack[MAX_INCLUDE_DEPTH]; +-static unsigned int lineno_stack[MAX_INCLUDE_DEPTH]; +-static unsigned int include_stack_ptr = 0; +- +-static YY_BUFFER_STATE yy_create_string_buffer PARAMS ((const char *string, +- size_t size)); +-static void yy_input PARAMS ((char *, int *result, int max_size)); +- +-static void comment PARAMS ((void)); +-static void lex_warn_invalid PARAMS ((char *where, char *what)); +- +-/* STATES +- EXPRESSION definitely in an expression +- SCRIPT definitely in a script +- BOTH either EXPRESSION or SCRIPT +- DEFSYMEXP in an argument to -defsym +- MRI in an MRI script +- VERS_START starting a Sun style mapfile +- VERS_SCRIPT a Sun style mapfile +- VERS_NODE a node within a Sun style mapfile +-*/ +-#define RTOKEN(x) { yylval.token = x; return x; } +- +-/* Some versions of flex want this. */ +-#ifndef yywrap +-int yywrap () { return 1; } +-#endif +-#define SCRIPT 1 +- +-#define EXPRESSION 2 +- +-#define BOTH 3 +- +-#define DEFSYMEXP 4 +- +-#define MRI 5 +- +-#define VERS_START 6 +- +-#define VERS_SCRIPT 7 +- +-#define VERS_NODE 8 +- +-#line 1244 "lex.yy.c" +- +-/* Macros after this point can all be overridden by user definitions in +- * section 1. +- */ +- +-#ifndef YY_SKIP_YYWRAP +-#ifdef __cplusplus +-extern "C" int yywrap YY_PROTO(( void )); +-#else +-extern int yywrap YY_PROTO(( void )); +-#endif +-#endif +- +-#ifndef YY_NO_UNPUT +-static void yyunput YY_PROTO(( int c, char *buf_ptr )); +-#endif +- +-#ifndef yytext_ptr +-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +-#endif +- +-#ifndef YY_NO_INPUT +-#ifdef __cplusplus +-static int yyinput YY_PROTO(( void )); +-#else +-static int input YY_PROTO(( void )); +-#endif +-#endif +- +-#if YY_STACK_USED +-static int yy_start_stack_ptr = 0; +-static int yy_start_stack_depth = 0; +-static int *yy_start_stack = 0; +-#ifndef YY_NO_PUSH_STATE +-static void yy_push_state YY_PROTO(( int new_state )); +-#endif +-#ifndef YY_NO_POP_STATE +-static void yy_pop_state YY_PROTO(( void )); +-#endif +-#ifndef YY_NO_TOP_STATE +-static int yy_top_state YY_PROTO(( void )); +-#endif +- +-#else +-#define YY_NO_PUSH_STATE 1 +-#define YY_NO_POP_STATE 1 +-#define YY_NO_TOP_STATE 1 +-#endif +- +-#ifdef YY_MALLOC_DECL +-YY_MALLOC_DECL +-#else +-#if __STDC__ +-#ifndef __cplusplus +-#include +-#endif +-#else +-/* Just try to get by without declaring the routines. This will fail +- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) +- * or sizeof(void*) != sizeof(int). +- */ +-#endif +-#endif +- +-/* Amount of stuff to slurp up with each read. */ +-#ifndef YY_READ_BUF_SIZE +-#define YY_READ_BUF_SIZE 8192 +-#endif +- +-/* Copy whatever the last rule matched to the standard output. */ +- +-#ifndef ECHO +-/* This used to be an fputs(), but since the string might contain NUL's, +- * we now use fwrite(). +- */ +-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +-#endif +- +-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, +- * is returned in "result". +- */ +-#ifndef YY_INPUT +-#define YY_INPUT(buf,result,max_size) \ +- if ( yy_current_buffer->yy_is_interactive ) \ +- { \ +- int c = '*', n; \ +- for ( n = 0; n < max_size && \ +- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ +- buf[n] = (char) c; \ +- if ( c == '\n' ) \ +- buf[n++] = (char) c; \ +- if ( c == EOF && ferror( yyin ) ) \ +- YY_FATAL_ERROR( "input in flex scanner failed" ); \ +- result = n; \ +- } \ +- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ +- && ferror( yyin ) ) \ +- YY_FATAL_ERROR( "input in flex scanner failed" ); +-#endif +- +-/* No semi-colon after return; correct usage is to write "yyterminate();" - +- * we don't want an extra ';' after the "return" because that will cause +- * some compilers to complain about unreachable statements. +- */ +-#ifndef yyterminate +-#define yyterminate() return YY_NULL +-#endif +- +-/* Number of entries by which start-condition stack grows. */ +-#ifndef YY_START_STACK_INCR +-#define YY_START_STACK_INCR 25 +-#endif +- +-/* Report a fatal error. */ +-#ifndef YY_FATAL_ERROR +-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +-#endif +- +-/* Default declaration of generated scanner - a define so the user can +- * easily add parameters. +- */ +-#ifndef YY_DECL +-#define YY_DECL int yylex YY_PROTO(( void )) +-#endif +- +-/* Code executed at the beginning of each rule, after yytext and yyleng +- * have been set up. +- */ +-#ifndef YY_USER_ACTION +-#define YY_USER_ACTION +-#endif +- +-/* Code executed at the end of each rule. */ +-#ifndef YY_BREAK +-#define YY_BREAK break; +-#endif +- +-#define YY_RULE_SETUP \ +- YY_USER_ACTION +- +-YY_DECL +- { +- register yy_state_type yy_current_state; +- register char *yy_cp, *yy_bp; +- register int yy_act; +- +-#line 127 "ldlex.l" +- +- +- if (parser_input != input_selected) +- { +- /* The first token of the input determines the initial parser state. */ +- input_type t = parser_input; +- parser_input = input_selected; +- switch (t) +- { +- case input_script: return INPUT_SCRIPT; break; +- case input_mri_script: return INPUT_MRI_SCRIPT; break; +- case input_version_script: return INPUT_VERSION_SCRIPT; break; +- case input_defsym: return INPUT_DEFSYM; break; +- default: abort (); +- } +- } +- +-#line 1409 "lex.yy.c" +- +- if ( yy_init ) +- { +- yy_init = 0; +- +-#ifdef YY_USER_INIT +- YY_USER_INIT; +-#endif +- +- if ( ! yy_start ) +- yy_start = 1; /* first start state */ +- +- if ( ! yyin ) +- yyin = stdin; +- +- if ( ! yyout ) +- yyout = stdout; +- +- if ( ! yy_current_buffer ) +- yy_current_buffer = +- yy_create_buffer( yyin, YY_BUF_SIZE ); +- +- yy_load_buffer_state(); +- } +- +- while ( 1 ) /* loops until end-of-file is reached */ +- { +- yy_cp = yy_c_buf_p; +- +- /* Support of yytext. */ +- *yy_cp = yy_hold_char; +- +- /* yy_bp points to the position in yy_ch_buf of the start of +- * the current run. +- */ +- yy_bp = yy_cp; +- +- yy_current_state = yy_start; +-yy_match: +- do +- { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 1003 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- ++yy_cp; +- } +- while ( yy_base[yy_current_state] != 1862 ); +- +-yy_find_action: +- yy_act = yy_accept[yy_current_state]; +- if ( yy_act == 0 ) +- { /* have to back up */ +- yy_cp = yy_last_accepting_cpos; +- yy_current_state = yy_last_accepting_state; +- yy_act = yy_accept[yy_current_state]; +- } +- +- YY_DO_BEFORE_ACTION; +- +- +-do_action: /* This label is used only to access EOF actions. */ +- +- +- switch ( yy_act ) +- { /* beginning of action switch */ +- case 0: /* must back up */ +- /* undo the effects of YY_DO_BEFORE_ACTION */ +- *yy_cp = yy_hold_char; +- yy_cp = yy_last_accepting_cpos; +- yy_current_state = yy_last_accepting_state; +- goto yy_find_action; +- +-case 1: +-YY_RULE_SETUP +-#line 144 "ldlex.l" +-{ comment(); } +- YY_BREAK +-case 2: +-YY_RULE_SETUP +-#line 147 "ldlex.l" +-{ RTOKEN('-');} +- YY_BREAK +-case 3: +-YY_RULE_SETUP +-#line 148 "ldlex.l" +-{ RTOKEN('+');} +- YY_BREAK +-case 4: +-YY_RULE_SETUP +-#line 149 "ldlex.l" +-{ yylval.name = buystring(yytext); return NAME; } +- YY_BREAK +-case 5: +-YY_RULE_SETUP +-#line 150 "ldlex.l" +-{ RTOKEN('='); } +- YY_BREAK +-case 6: +-YY_RULE_SETUP +-#line 152 "ldlex.l" +-{ +- yylval.integer = bfd_scan_vma (yytext+1, 0,16); +- return INT; +- } +- YY_BREAK +-case 7: +-YY_RULE_SETUP +-#line 157 "ldlex.l" +-{ +- int ibase ; +- switch (yytext[yyleng-1]) { +- case 'X': +- case 'x': +- case 'H': +- case 'h': +- ibase = 16; +- break; +- case 'O': +- case 'o': +- ibase = 8; +- break; +- case 'B': +- case 'b': +- ibase = 2; +- break; +- default: +- ibase = 10; +- } +- yylval.integer = bfd_scan_vma (yytext, 0, +- ibase); +- return INT; +- } +- YY_BREAK +-case 8: +-YY_RULE_SETUP +-#line 181 "ldlex.l" +-{ +- char *s = yytext; +- +- if (*s == '$') +- ++s; +- yylval.integer = bfd_scan_vma (s, 0, 0); +- if (yytext[yyleng-1] == 'M' +- || yytext[yyleng-1] == 'm') +- yylval.integer *= 1024 * 1024; +- if (yytext[yyleng-1] == 'K' +- || yytext[yyleng-1]=='k') +- yylval.integer *= 1024; +- return INT; +- } +- YY_BREAK +-case 9: +-YY_RULE_SETUP +-#line 195 "ldlex.l" +-{ RTOKEN(']');} +- YY_BREAK +-case 10: +-YY_RULE_SETUP +-#line 196 "ldlex.l" +-{ RTOKEN('[');} +- YY_BREAK +-case 11: +-YY_RULE_SETUP +-#line 197 "ldlex.l" +-{ RTOKEN(LSHIFTEQ);} +- YY_BREAK +-case 12: +-YY_RULE_SETUP +-#line 198 "ldlex.l" +-{ RTOKEN(RSHIFTEQ);} +- YY_BREAK +-case 13: +-YY_RULE_SETUP +-#line 199 "ldlex.l" +-{ RTOKEN(OROR);} +- YY_BREAK +-case 14: +-YY_RULE_SETUP +-#line 200 "ldlex.l" +-{ RTOKEN(EQ);} +- YY_BREAK +-case 15: +-YY_RULE_SETUP +-#line 201 "ldlex.l" +-{ RTOKEN(NE);} +- YY_BREAK +-case 16: +-YY_RULE_SETUP +-#line 202 "ldlex.l" +-{ RTOKEN(GE);} +- YY_BREAK +-case 17: +-YY_RULE_SETUP +-#line 203 "ldlex.l" +-{ RTOKEN(LE);} +- YY_BREAK +-case 18: +-YY_RULE_SETUP +-#line 204 "ldlex.l" +-{ RTOKEN(LSHIFT);} +- YY_BREAK +-case 19: +-YY_RULE_SETUP +-#line 205 "ldlex.l" +-{ RTOKEN(RSHIFT);} +- YY_BREAK +-case 20: +-YY_RULE_SETUP +-#line 206 "ldlex.l" +-{ RTOKEN(PLUSEQ);} +- YY_BREAK +-case 21: +-YY_RULE_SETUP +-#line 207 "ldlex.l" +-{ RTOKEN(MINUSEQ);} +- YY_BREAK +-case 22: +-YY_RULE_SETUP +-#line 208 "ldlex.l" +-{ RTOKEN(MULTEQ);} +- YY_BREAK +-case 23: +-YY_RULE_SETUP +-#line 209 "ldlex.l" +-{ RTOKEN(DIVEQ);} +- YY_BREAK +-case 24: +-YY_RULE_SETUP +-#line 210 "ldlex.l" +-{ RTOKEN(ANDEQ);} +- YY_BREAK +-case 25: +-YY_RULE_SETUP +-#line 211 "ldlex.l" +-{ RTOKEN(OREQ);} +- YY_BREAK +-case 26: +-YY_RULE_SETUP +-#line 212 "ldlex.l" +-{ RTOKEN(ANDAND);} +- YY_BREAK +-case 27: +-YY_RULE_SETUP +-#line 213 "ldlex.l" +-{ RTOKEN('>');} +- YY_BREAK +-case 28: +-YY_RULE_SETUP +-#line 214 "ldlex.l" +-{ RTOKEN(',');} +- YY_BREAK +-case 29: +-YY_RULE_SETUP +-#line 215 "ldlex.l" +-{ RTOKEN('&');} +- YY_BREAK +-case 30: +-YY_RULE_SETUP +-#line 216 "ldlex.l" +-{ RTOKEN('|');} +- YY_BREAK +-case 31: +-YY_RULE_SETUP +-#line 217 "ldlex.l" +-{ RTOKEN('~');} +- YY_BREAK +-case 32: +-YY_RULE_SETUP +-#line 218 "ldlex.l" +-{ RTOKEN('!');} +- YY_BREAK +-case 33: +-YY_RULE_SETUP +-#line 219 "ldlex.l" +-{ RTOKEN('?');} +- YY_BREAK +-case 34: +-YY_RULE_SETUP +-#line 220 "ldlex.l" +-{ RTOKEN('*');} +- YY_BREAK +-case 35: +-YY_RULE_SETUP +-#line 221 "ldlex.l" +-{ RTOKEN('+');} +- YY_BREAK +-case 36: +-YY_RULE_SETUP +-#line 222 "ldlex.l" +-{ RTOKEN('-');} +- YY_BREAK +-case 37: +-YY_RULE_SETUP +-#line 223 "ldlex.l" +-{ RTOKEN('/');} +- YY_BREAK +-case 38: +-YY_RULE_SETUP +-#line 224 "ldlex.l" +-{ RTOKEN('%');} +- YY_BREAK +-case 39: +-YY_RULE_SETUP +-#line 225 "ldlex.l" +-{ RTOKEN('<');} +- YY_BREAK +-case 40: +-YY_RULE_SETUP +-#line 226 "ldlex.l" +-{ RTOKEN('=');} +- YY_BREAK +-case 41: +-YY_RULE_SETUP +-#line 227 "ldlex.l" +-{ RTOKEN('}') ; } +- YY_BREAK +-case 42: +-YY_RULE_SETUP +-#line 228 "ldlex.l" +-{ RTOKEN('{'); } +- YY_BREAK +-case 43: +-YY_RULE_SETUP +-#line 229 "ldlex.l" +-{ RTOKEN(')');} +- YY_BREAK +-case 44: +-YY_RULE_SETUP +-#line 230 "ldlex.l" +-{ RTOKEN('(');} +- YY_BREAK +-case 45: +-YY_RULE_SETUP +-#line 231 "ldlex.l" +-{ RTOKEN(':'); } +- YY_BREAK +-case 46: +-YY_RULE_SETUP +-#line 232 "ldlex.l" +-{ RTOKEN(';');} +- YY_BREAK +-case 47: +-YY_RULE_SETUP +-#line 233 "ldlex.l" +-{ RTOKEN(MEMORY);} +- YY_BREAK +-case 48: +-YY_RULE_SETUP +-#line 234 "ldlex.l" +-{ RTOKEN(ORIGIN);} +- YY_BREAK +-case 49: +-YY_RULE_SETUP +-#line 235 "ldlex.l" +-{ RTOKEN(VERSIONK);} +- YY_BREAK +-case 50: +-YY_RULE_SETUP +-#line 236 "ldlex.l" +-{ RTOKEN(BLOCK);} +- YY_BREAK +-case 51: +-YY_RULE_SETUP +-#line 237 "ldlex.l" +-{ RTOKEN(BIND);} +- YY_BREAK +-case 52: +-YY_RULE_SETUP +-#line 238 "ldlex.l" +-{ RTOKEN(LENGTH);} +- YY_BREAK +-case 53: +-YY_RULE_SETUP +-#line 239 "ldlex.l" +-{ RTOKEN(ALIGN_K);} +- YY_BREAK +-case 54: +-YY_RULE_SETUP +-#line 240 "ldlex.l" +-{ RTOKEN(ADDR);} +- YY_BREAK +-case 55: +-YY_RULE_SETUP +-#line 241 "ldlex.l" +-{ RTOKEN(LOADADDR);} +- YY_BREAK +-case 56: +-YY_RULE_SETUP +-#line 242 "ldlex.l" +-{ RTOKEN(MAX); } +- YY_BREAK +-case 57: +-YY_RULE_SETUP +-#line 243 "ldlex.l" +-{ RTOKEN(MIN); } +- YY_BREAK +-case 58: +-YY_RULE_SETUP +-#line 244 "ldlex.l" +-{ RTOKEN(ENTRY);} +- YY_BREAK +-case 59: +-YY_RULE_SETUP +-#line 245 "ldlex.l" +-{ RTOKEN(NEXT);} +- YY_BREAK +-case 60: +-YY_RULE_SETUP +-#line 246 "ldlex.l" +-{ RTOKEN(SIZEOF_HEADERS);} +- YY_BREAK +-case 61: +-YY_RULE_SETUP +-#line 247 "ldlex.l" +-{ RTOKEN(SIZEOF_HEADERS);} +- YY_BREAK +-case 62: +-YY_RULE_SETUP +-#line 248 "ldlex.l" +-{ RTOKEN(MAP);} +- YY_BREAK +-case 63: +-YY_RULE_SETUP +-#line 249 "ldlex.l" +-{ RTOKEN(SIZEOF);} +- YY_BREAK +-case 64: +-YY_RULE_SETUP +-#line 250 "ldlex.l" +-{ RTOKEN(TARGET_K);} +- YY_BREAK +-case 65: +-YY_RULE_SETUP +-#line 251 "ldlex.l" +-{ RTOKEN(SEARCH_DIR);} +- YY_BREAK +-case 66: +-YY_RULE_SETUP +-#line 252 "ldlex.l" +-{ RTOKEN(OUTPUT);} +- YY_BREAK +-case 67: +-YY_RULE_SETUP +-#line 253 "ldlex.l" +-{ RTOKEN(INPUT);} +- YY_BREAK +-case 68: +-YY_RULE_SETUP +-#line 254 "ldlex.l" +-{ RTOKEN(GROUP);} +- YY_BREAK +-case 69: +-YY_RULE_SETUP +-#line 255 "ldlex.l" +-{ RTOKEN(DEFINED);} +- YY_BREAK +-case 70: +-YY_RULE_SETUP +-#line 256 "ldlex.l" +-{ RTOKEN(CREATE_OBJECT_SYMBOLS);} +- YY_BREAK +-case 71: +-YY_RULE_SETUP +-#line 257 "ldlex.l" +-{ RTOKEN( CONSTRUCTORS);} +- YY_BREAK +-case 72: +-YY_RULE_SETUP +-#line 258 "ldlex.l" +-{ RTOKEN(FORCE_COMMON_ALLOCATION);} +- YY_BREAK +-case 73: +-YY_RULE_SETUP +-#line 259 "ldlex.l" +-{ RTOKEN(SECTIONS);} +- YY_BREAK +-case 74: +-YY_RULE_SETUP +-#line 260 "ldlex.l" +-{ RTOKEN(FILL);} +- YY_BREAK +-case 75: +-YY_RULE_SETUP +-#line 261 "ldlex.l" +-{ RTOKEN(STARTUP);} +- YY_BREAK +-case 76: +-YY_RULE_SETUP +-#line 262 "ldlex.l" +-{ RTOKEN(OUTPUT_FORMAT);} +- YY_BREAK +-case 77: +-YY_RULE_SETUP +-#line 263 "ldlex.l" +-{ RTOKEN( OUTPUT_ARCH);} +- YY_BREAK +-case 78: +-YY_RULE_SETUP +-#line 264 "ldlex.l" +-{ RTOKEN(HLL);} +- YY_BREAK +-case 79: +-YY_RULE_SETUP +-#line 265 "ldlex.l" +-{ RTOKEN(SYSLIB);} +- YY_BREAK +-case 80: +-YY_RULE_SETUP +-#line 266 "ldlex.l" +-{ RTOKEN(FLOAT);} +- YY_BREAK +-case 81: +-YY_RULE_SETUP +-#line 267 "ldlex.l" +-{ RTOKEN( QUAD);} +- YY_BREAK +-case 82: +-YY_RULE_SETUP +-#line 268 "ldlex.l" +-{ RTOKEN( SQUAD);} +- YY_BREAK +-case 83: +-YY_RULE_SETUP +-#line 269 "ldlex.l" +-{ RTOKEN( LONG);} +- YY_BREAK +-case 84: +-YY_RULE_SETUP +-#line 270 "ldlex.l" +-{ RTOKEN( SHORT);} +- YY_BREAK +-case 85: +-YY_RULE_SETUP +-#line 271 "ldlex.l" +-{ RTOKEN( BYTE);} +- YY_BREAK +-case 86: +-YY_RULE_SETUP +-#line 272 "ldlex.l" +-{ RTOKEN(NOFLOAT);} +- YY_BREAK +-case 87: +-YY_RULE_SETUP +-#line 273 "ldlex.l" +-{ RTOKEN(NOCROSSREFS);} +- YY_BREAK +-case 88: +-YY_RULE_SETUP +-#line 274 "ldlex.l" +-{ RTOKEN(OVERLAY); } +- YY_BREAK +-case 89: +-YY_RULE_SETUP +-#line 275 "ldlex.l" +-{ RTOKEN(NOLOAD);} +- YY_BREAK +-case 90: +-YY_RULE_SETUP +-#line 276 "ldlex.l" +-{ RTOKEN(DSECT);} +- YY_BREAK +-case 91: +-YY_RULE_SETUP +-#line 277 "ldlex.l" +-{ RTOKEN(COPY);} +- YY_BREAK +-case 92: +-YY_RULE_SETUP +-#line 278 "ldlex.l" +-{ RTOKEN(INFO);} +- YY_BREAK +-case 93: +-YY_RULE_SETUP +-#line 279 "ldlex.l" +-{ RTOKEN(OVERLAY);} +- YY_BREAK +-case 94: +-YY_RULE_SETUP +-#line 280 "ldlex.l" +-{ RTOKEN(ORIGIN);} +- YY_BREAK +-case 95: +-YY_RULE_SETUP +-#line 281 "ldlex.l" +-{ RTOKEN(ORIGIN);} +- YY_BREAK +-case 96: +-YY_RULE_SETUP +-#line 282 "ldlex.l" +-{ RTOKEN( LENGTH);} +- YY_BREAK +-case 97: +-YY_RULE_SETUP +-#line 283 "ldlex.l" +-{ RTOKEN( LENGTH);} +- YY_BREAK +-case 98: +-YY_RULE_SETUP +-#line 284 "ldlex.l" +-{ RTOKEN(INCLUDE);} +- YY_BREAK +-case 99: +-YY_RULE_SETUP +-#line 285 "ldlex.l" +-{ RTOKEN (PHDRS); } +- YY_BREAK +-case 100: +-YY_RULE_SETUP +-#line 286 "ldlex.l" +-{ RTOKEN(AT);} +- YY_BREAK +-case 101: +-YY_RULE_SETUP +-#line 287 "ldlex.l" +-{ RTOKEN(PROVIDE); } +- YY_BREAK +-case 102: +-YY_RULE_SETUP +-#line 288 "ldlex.l" +-{ ++ lineno; } +- YY_BREAK +-case 103: +-YY_RULE_SETUP +-#line 289 "ldlex.l" +-{ ++ lineno; RTOKEN(NEWLINE); } +- YY_BREAK +-case 104: +-YY_RULE_SETUP +-#line 290 "ldlex.l" +-{ /* Mri comment line */ } +- YY_BREAK +-case 105: +-YY_RULE_SETUP +-#line 291 "ldlex.l" +-{ /* Mri comment line */ } +- YY_BREAK +-case 106: +-YY_RULE_SETUP +-#line 292 "ldlex.l" +-{ RTOKEN(ENDWORD); } +- YY_BREAK +-case 107: +-YY_RULE_SETUP +-#line 293 "ldlex.l" +-{ RTOKEN(ALIGNMOD);} +- YY_BREAK +-case 108: +-YY_RULE_SETUP +-#line 294 "ldlex.l" +-{ RTOKEN(ALIGN_K);} +- YY_BREAK +-case 109: +-YY_RULE_SETUP +-#line 295 "ldlex.l" +-{ RTOKEN(CHIP); } +- YY_BREAK +-case 110: +-YY_RULE_SETUP +-#line 296 "ldlex.l" +-{ RTOKEN(BASE); } +- YY_BREAK +-case 111: +-YY_RULE_SETUP +-#line 297 "ldlex.l" +-{ RTOKEN(ALIAS); } +- YY_BREAK +-case 112: +-YY_RULE_SETUP +-#line 298 "ldlex.l" +-{ RTOKEN(TRUNCATE); } +- YY_BREAK +-case 113: +-YY_RULE_SETUP +-#line 299 "ldlex.l" +-{ RTOKEN(LOAD); } +- YY_BREAK +-case 114: +-YY_RULE_SETUP +-#line 300 "ldlex.l" +-{ RTOKEN(PUBLIC); } +- YY_BREAK +-case 115: +-YY_RULE_SETUP +-#line 301 "ldlex.l" +-{ RTOKEN(ORDER); } +- YY_BREAK +-case 116: +-YY_RULE_SETUP +-#line 302 "ldlex.l" +-{ RTOKEN(NAMEWORD); } +- YY_BREAK +-case 117: +-YY_RULE_SETUP +-#line 303 "ldlex.l" +-{ RTOKEN(FORMAT); } +- YY_BREAK +-case 118: +-YY_RULE_SETUP +-#line 304 "ldlex.l" +-{ RTOKEN(CASE); } +- YY_BREAK +-case 119: +-YY_RULE_SETUP +-#line 305 "ldlex.l" +-{ RTOKEN(EXTERN); } +- YY_BREAK +-case 120: +-YY_RULE_SETUP +-#line 306 "ldlex.l" +-{ RTOKEN(START); } +- YY_BREAK +-case 121: +-YY_RULE_SETUP +-#line 307 "ldlex.l" +-{ RTOKEN(LIST); /* LIST and ignore to end of line */ } +- YY_BREAK +-case 122: +-YY_RULE_SETUP +-#line 308 "ldlex.l" +-{ RTOKEN(SECT); } +- YY_BREAK +-case 123: +-YY_RULE_SETUP +-#line 309 "ldlex.l" +-{ RTOKEN(ABSOLUTE); } +- YY_BREAK +-case 124: +-YY_RULE_SETUP +-#line 310 "ldlex.l" +-{ RTOKEN(ENDWORD); } +- YY_BREAK +-case 125: +-YY_RULE_SETUP +-#line 311 "ldlex.l" +-{ RTOKEN(ALIGNMOD);} +- YY_BREAK +-case 126: +-YY_RULE_SETUP +-#line 312 "ldlex.l" +-{ RTOKEN(ALIGN_K);} +- YY_BREAK +-case 127: +-YY_RULE_SETUP +-#line 313 "ldlex.l" +-{ RTOKEN(CHIP); } +- YY_BREAK +-case 128: +-YY_RULE_SETUP +-#line 314 "ldlex.l" +-{ RTOKEN(BASE); } +- YY_BREAK +-case 129: +-YY_RULE_SETUP +-#line 315 "ldlex.l" +-{ RTOKEN(ALIAS); } +- YY_BREAK +-case 130: +-YY_RULE_SETUP +-#line 316 "ldlex.l" +-{ RTOKEN(TRUNCATE); } +- YY_BREAK +-case 131: +-YY_RULE_SETUP +-#line 317 "ldlex.l" +-{ RTOKEN(LOAD); } +- YY_BREAK +-case 132: +-YY_RULE_SETUP +-#line 318 "ldlex.l" +-{ RTOKEN(PUBLIC); } +- YY_BREAK +-case 133: +-YY_RULE_SETUP +-#line 319 "ldlex.l" +-{ RTOKEN(ORDER); } +- YY_BREAK +-case 134: +-YY_RULE_SETUP +-#line 320 "ldlex.l" +-{ RTOKEN(NAMEWORD); } +- YY_BREAK +-case 135: +-YY_RULE_SETUP +-#line 321 "ldlex.l" +-{ RTOKEN(FORMAT); } +- YY_BREAK +-case 136: +-YY_RULE_SETUP +-#line 322 "ldlex.l" +-{ RTOKEN(CASE); } +- YY_BREAK +-case 137: +-YY_RULE_SETUP +-#line 323 "ldlex.l" +-{ RTOKEN(EXTERN); } +- YY_BREAK +-case 138: +-YY_RULE_SETUP +-#line 324 "ldlex.l" +-{ RTOKEN(START); } +- YY_BREAK +-case 139: +-YY_RULE_SETUP +-#line 325 "ldlex.l" +-{ RTOKEN(LIST); /* LIST and ignore to end of line */ } +- YY_BREAK +-case 140: +-YY_RULE_SETUP +-#line 326 "ldlex.l" +-{ RTOKEN(SECT); } +- YY_BREAK +-case 141: +-YY_RULE_SETUP +-#line 327 "ldlex.l" +-{ RTOKEN(ABSOLUTE); } +- YY_BREAK +-case 142: +-YY_RULE_SETUP +-#line 329 "ldlex.l" +-{ +-/* Filename without commas, needed to parse mri stuff */ +- yylval.name = buystring(yytext); +- return NAME; +- } +- YY_BREAK +-case 143: +-YY_RULE_SETUP +-#line 336 "ldlex.l" +-{ +- yylval.name = buystring(yytext); +- return NAME; +- } +- YY_BREAK +-case 144: +-YY_RULE_SETUP +-#line 340 "ldlex.l" +-{ +- yylval.name = buystring (yytext + 2); +- return LNAME; +- } +- YY_BREAK +-case 145: +-YY_RULE_SETUP +-#line 344 "ldlex.l" +-{ +- /* Annoyingly, this pattern can match comments, and we have +- longest match issues to consider. So if the first two +- characters are a comment opening, put the input back and +- try again. */ +- if (yytext[0] == '/' && yytext[1] == '*') +- { +- yyless(2); +- comment (); +- } +- else +- { +- yylval.name = buystring(yytext); +- return NAME; +- } +- } +- YY_BREAK +-case 146: +-YY_RULE_SETUP +-#line 361 "ldlex.l" +-{ +- /* No matter the state, quotes +- give what's inside */ +- yylval.name = buystring(yytext+1); +- yylval.name[yyleng-2] = 0; +- return NAME; +- } +- YY_BREAK +-case 147: +-YY_RULE_SETUP +-#line 368 "ldlex.l" +-{ lineno++;} +- YY_BREAK +-case 148: +-YY_RULE_SETUP +-#line 369 "ldlex.l" +-{ } +- YY_BREAK +-case 149: +-YY_RULE_SETUP +-#line 371 "ldlex.l" +-{ return *yytext; } +- YY_BREAK +-case 150: +-YY_RULE_SETUP +-#line 373 "ldlex.l" +-{ RTOKEN(GLOBAL); } +- YY_BREAK +-case 151: +-YY_RULE_SETUP +-#line 375 "ldlex.l" +-{ RTOKEN(LOCAL); } +- YY_BREAK +-case 152: +-YY_RULE_SETUP +-#line 377 "ldlex.l" +-{ yylval.name = buystring (yytext); +- return VERS_IDENTIFIER; } +- YY_BREAK +-case 153: +-YY_RULE_SETUP +-#line 380 "ldlex.l" +-{ yylval.name = buystring (yytext); +- return VERS_TAG; } +- YY_BREAK +-case 154: +-YY_RULE_SETUP +-#line 383 "ldlex.l" +-{ BEGIN(VERS_SCRIPT); return *yytext; } +- YY_BREAK +-case 155: +-YY_RULE_SETUP +-#line 385 "ldlex.l" +-{ BEGIN(VERS_NODE); return *yytext; } +- YY_BREAK +-case 156: +-YY_RULE_SETUP +-#line 386 "ldlex.l" +-{ BEGIN(VERS_SCRIPT); return *yytext; } +- YY_BREAK +-case 157: +-YY_RULE_SETUP +-#line 388 "ldlex.l" +-{ lineno++; } +- YY_BREAK +-case 158: +-YY_RULE_SETUP +-#line 390 "ldlex.l" +-{ /* Eat up comments */ } +- YY_BREAK +-case 159: +-YY_RULE_SETUP +-#line 392 "ldlex.l" +-{ /* Eat up whitespace */ } +- YY_BREAK +-case YY_STATE_EOF(INITIAL): +-case YY_STATE_EOF(SCRIPT): +-case YY_STATE_EOF(EXPRESSION): +-case YY_STATE_EOF(BOTH): +-case YY_STATE_EOF(DEFSYMEXP): +-case YY_STATE_EOF(MRI): +-case YY_STATE_EOF(VERS_START): +-case YY_STATE_EOF(VERS_SCRIPT): +-case YY_STATE_EOF(VERS_NODE): +-#line 394 "ldlex.l" +-{ +- include_stack_ptr--; +- +- if (include_stack_ptr == 0) +- { +- yyterminate(); +- } +- else +- { +- yy_switch_to_buffer(include_stack[include_stack_ptr]); +- +- } +- BEGIN(SCRIPT); +- ldfile_input_filename = file_name_stack[include_stack_ptr - 1]; +- lineno = lineno_stack[include_stack_ptr - 1]; +- +- return END; +-} +- YY_BREAK +-case 160: +-YY_RULE_SETUP +-#line 413 "ldlex.l" +-lex_warn_invalid(" in script", yytext); +- YY_BREAK +-case 161: +-YY_RULE_SETUP +-#line 414 "ldlex.l" +-lex_warn_invalid(" in expression", yytext); +- YY_BREAK +-case 162: +-YY_RULE_SETUP +-#line 416 "ldlex.l" +-ECHO; +- YY_BREAK +-#line 2403 "lex.yy.c" +- +- case YY_END_OF_BUFFER: +- { +- /* Amount of text matched not including the EOB char. */ +- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; +- +- /* Undo the effects of YY_DO_BEFORE_ACTION. */ +- *yy_cp = yy_hold_char; +- +- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) +- { +- /* We're scanning a new file or input source. It's +- * possible that this happened because the user +- * just pointed yyin at a new source and called +- * yylex(). If so, then we have to assure +- * consistency between yy_current_buffer and our +- * globals. Here is the right place to do so, because +- * this is the first action (other than possibly a +- * back-up) that will match for the new input source. +- */ +- yy_n_chars = yy_current_buffer->yy_n_chars; +- yy_current_buffer->yy_input_file = yyin; +- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; +- } +- +- /* Note that here we test for yy_c_buf_p "<=" to the position +- * of the first EOB in the buffer, since yy_c_buf_p will +- * already have been incremented past the NUL character +- * (since all states make transitions on EOB to the +- * end-of-buffer state). Contrast this with the test +- * in input(). +- */ +- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) +- { /* This was really a NUL. */ +- yy_state_type yy_next_state; +- +- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; +- +- yy_current_state = yy_get_previous_state(); +- +- /* Okay, we're now positioned to make the NUL +- * transition. We couldn't have +- * yy_get_previous_state() go ahead and do it +- * for us because it doesn't know how to deal +- * with the possibility of jamming (and we don't +- * want to build jamming into it because then it +- * will run more slowly). +- */ +- +- yy_next_state = yy_try_NUL_trans( yy_current_state ); +- +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- +- if ( yy_next_state ) +- { +- /* Consume the NUL. */ +- yy_cp = ++yy_c_buf_p; +- yy_current_state = yy_next_state; +- goto yy_match; +- } +- +- else +- { +- yy_cp = yy_c_buf_p; +- goto yy_find_action; +- } +- } +- +- else switch ( yy_get_next_buffer() ) +- { +- case EOB_ACT_END_OF_FILE: +- { +- yy_did_buffer_switch_on_eof = 0; +- +- if ( yywrap() ) +- { +- /* Note: because we've taken care in +- * yy_get_next_buffer() to have set up +- * yytext, we can now set up +- * yy_c_buf_p so that if some total +- * hoser (like flex itself) wants to +- * call the scanner after we return the +- * YY_NULL, it'll still work - another +- * YY_NULL will get returned. +- */ +- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; +- +- yy_act = YY_STATE_EOF(YY_START); +- goto do_action; +- } +- +- else +- { +- if ( ! yy_did_buffer_switch_on_eof ) +- YY_NEW_FILE; +- } +- break; +- } +- +- case EOB_ACT_CONTINUE_SCAN: +- yy_c_buf_p = +- yytext_ptr + yy_amount_of_matched_text; +- +- yy_current_state = yy_get_previous_state(); +- +- yy_cp = yy_c_buf_p; +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- goto yy_match; +- +- case EOB_ACT_LAST_MATCH: +- yy_c_buf_p = +- &yy_current_buffer->yy_ch_buf[yy_n_chars]; +- +- yy_current_state = yy_get_previous_state(); +- +- yy_cp = yy_c_buf_p; +- yy_bp = yytext_ptr + YY_MORE_ADJ; +- goto yy_find_action; +- } +- break; +- } +- +- default: +- YY_FATAL_ERROR( +- "fatal flex scanner internal error--no action found" ); +- } /* end of action switch */ +- } /* end of scanning one token */ +- } /* end of yylex */ +- +- +-/* yy_get_next_buffer - try to read in a new buffer +- * +- * Returns a code representing an action: +- * EOB_ACT_LAST_MATCH - +- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position +- * EOB_ACT_END_OF_FILE - end of file +- */ +- +-static int yy_get_next_buffer() +- { +- register char *dest = yy_current_buffer->yy_ch_buf; +- register char *source = yytext_ptr; +- register int number_to_move, i; +- int ret_val; +- +- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) +- YY_FATAL_ERROR( +- "fatal flex scanner internal error--end of buffer missed" ); +- +- if ( yy_current_buffer->yy_fill_buffer == 0 ) +- { /* Don't try to fill the buffer, so this is an EOF. */ +- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) +- { +- /* We matched a singled characater, the EOB, so +- * treat this as a final EOF. +- */ +- return EOB_ACT_END_OF_FILE; +- } +- +- else +- { +- /* We matched some text prior to the EOB, first +- * process it. +- */ +- return EOB_ACT_LAST_MATCH; +- } +- } +- +- /* Try to read more data. */ +- +- /* First move last chars to start of buffer. */ +- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; +- +- for ( i = 0; i < number_to_move; ++i ) +- *(dest++) = *(source++); +- +- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) +- /* don't do the read, it's not guaranteed to return an EOF, +- * just force an EOF +- */ +- yy_n_chars = 0; +- +- else +- { +- int num_to_read = +- yy_current_buffer->yy_buf_size - number_to_move - 1; +- +- while ( num_to_read <= 0 ) +- { /* Not enough room in the buffer - grow it. */ +-#ifdef YY_USES_REJECT +- YY_FATAL_ERROR( +-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +-#else +- +- /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = yy_current_buffer; +- +- int yy_c_buf_p_offset = +- (int) (yy_c_buf_p - b->yy_ch_buf); +- +- if ( b->yy_is_our_buffer ) +- { +- int new_size = b->yy_buf_size * 2; +- +- if ( new_size <= 0 ) +- b->yy_buf_size += b->yy_buf_size / 8; +- else +- b->yy_buf_size *= 2; +- +- b->yy_ch_buf = (char *) +- /* Include room in for 2 EOB chars. */ +- yy_flex_realloc( (void *) b->yy_ch_buf, +- b->yy_buf_size + 2 ); +- } +- else +- /* Can't grow it, we don't own it. */ +- b->yy_ch_buf = 0; +- +- if ( ! b->yy_ch_buf ) +- YY_FATAL_ERROR( +- "fatal error - scanner input buffer overflow" ); +- +- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; +- +- num_to_read = yy_current_buffer->yy_buf_size - +- number_to_move - 1; +-#endif +- } +- +- if ( num_to_read > YY_READ_BUF_SIZE ) +- num_to_read = YY_READ_BUF_SIZE; +- +- /* Read in more data. */ +- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), +- yy_n_chars, num_to_read ); +- } +- +- if ( yy_n_chars == 0 ) +- { +- if ( number_to_move == YY_MORE_ADJ ) +- { +- ret_val = EOB_ACT_END_OF_FILE; +- yyrestart( yyin ); +- } +- +- else +- { +- ret_val = EOB_ACT_LAST_MATCH; +- yy_current_buffer->yy_buffer_status = +- YY_BUFFER_EOF_PENDING; +- } +- } +- +- else +- ret_val = EOB_ACT_CONTINUE_SCAN; +- +- yy_n_chars += number_to_move; +- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; +- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; +- +- yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; +- +- return ret_val; +- } +- +- +-/* yy_get_previous_state - get the state just before the EOB char was reached */ +- +-static yy_state_type yy_get_previous_state() +- { +- register yy_state_type yy_current_state; +- register char *yy_cp; +- +- yy_current_state = yy_start; +- +- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) +- { +- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 1003 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- } +- +- return yy_current_state; +- } +- +- +-/* yy_try_NUL_trans - try to make a transition on the NUL character +- * +- * synopsis +- * next_state = yy_try_NUL_trans( current_state ); +- */ +- +-#ifdef YY_USE_PROTOS +-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +-#else +-static yy_state_type yy_try_NUL_trans( yy_current_state ) +-yy_state_type yy_current_state; +-#endif +- { +- register int yy_is_jam; +- register char *yy_cp = yy_c_buf_p; +- +- register YY_CHAR yy_c = 1; +- if ( yy_accept[yy_current_state] ) +- { +- yy_last_accepting_state = yy_current_state; +- yy_last_accepting_cpos = yy_cp; +- } +- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) +- { +- yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 1003 ) +- yy_c = yy_meta[(unsigned int) yy_c]; +- } +- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 1002); +- +- return yy_is_jam ? 0 : yy_current_state; +- } +- +- +-#ifndef YY_NO_UNPUT +-#ifdef YY_USE_PROTOS +-static void yyunput( int c, register char *yy_bp ) +-#else +-static void yyunput( c, yy_bp ) +-int c; +-register char *yy_bp; +-#endif +- { +- register char *yy_cp = yy_c_buf_p; +- +- /* undo effects of setting up yytext */ +- *yy_cp = yy_hold_char; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- { /* need to shift things up to make room */ +- /* +2 for EOB chars. */ +- register int number_to_move = yy_n_chars + 2; +- register char *dest = &yy_current_buffer->yy_ch_buf[ +- yy_current_buffer->yy_buf_size + 2]; +- register char *source = +- &yy_current_buffer->yy_ch_buf[number_to_move]; +- +- while ( source > yy_current_buffer->yy_ch_buf ) +- *--dest = *--source; +- +- yy_cp += (int) (dest - source); +- yy_bp += (int) (dest - source); +- yy_n_chars = yy_current_buffer->yy_buf_size; +- +- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) +- YY_FATAL_ERROR( "flex scanner push-back overflow" ); +- } +- +- *--yy_cp = (char) c; +- +- +- yytext_ptr = yy_bp; +- yy_hold_char = *yy_cp; +- yy_c_buf_p = yy_cp; +- } +-#endif /* ifndef YY_NO_UNPUT */ +- +- +-#ifdef __cplusplus +-static int yyinput() +-#else +-static int input() +-#endif +- { +- int c; +- +- *yy_c_buf_p = yy_hold_char; +- +- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) +- { +- /* yy_c_buf_p now points to the character we want to return. +- * If this occurs *before* the EOB characters, then it's a +- * valid NUL; if not, then we've hit the end of the buffer. +- */ +- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) +- /* This was really a NUL. */ +- *yy_c_buf_p = '\0'; +- +- else +- { /* need more input */ +- yytext_ptr = yy_c_buf_p; +- ++yy_c_buf_p; +- +- switch ( yy_get_next_buffer() ) +- { +- case EOB_ACT_END_OF_FILE: +- { +- if ( yywrap() ) +- { +- yy_c_buf_p = +- yytext_ptr + YY_MORE_ADJ; +- return EOF; +- } +- +- if ( ! yy_did_buffer_switch_on_eof ) +- YY_NEW_FILE; +-#ifdef __cplusplus +- return yyinput(); +-#else +- return input(); +-#endif +- } +- +- case EOB_ACT_CONTINUE_SCAN: +- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; +- break; +- +- case EOB_ACT_LAST_MATCH: +-#ifdef __cplusplus +- YY_FATAL_ERROR( +- "unexpected last match in yyinput()" ); +-#else +- YY_FATAL_ERROR( +- "unexpected last match in input()" ); +-#endif +- } +- } +- } +- +- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ +- *yy_c_buf_p = '\0'; /* preserve yytext */ +- yy_hold_char = *++yy_c_buf_p; +- +- +- return c; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yyrestart( FILE *input_file ) +-#else +-void yyrestart( input_file ) +-FILE *input_file; +-#endif +- { +- if ( ! yy_current_buffer ) +- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); +- +- yy_init_buffer( yy_current_buffer, input_file ); +- yy_load_buffer_state(); +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +-#else +-void yy_switch_to_buffer( new_buffer ) +-YY_BUFFER_STATE new_buffer; +-#endif +- { +- if ( yy_current_buffer == new_buffer ) +- return; +- +- if ( yy_current_buffer ) +- { +- /* Flush out information for old buffer. */ +- *yy_c_buf_p = yy_hold_char; +- yy_current_buffer->yy_buf_pos = yy_c_buf_p; +- yy_current_buffer->yy_n_chars = yy_n_chars; +- } +- +- yy_current_buffer = new_buffer; +- yy_load_buffer_state(); +- +- /* We don't actually know whether we did this switch during +- * EOF (yywrap()) processing, but the only time this flag +- * is looked at is after yywrap() is called, so it's safe +- * to go ahead and always set it. +- */ +- yy_did_buffer_switch_on_eof = 1; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_load_buffer_state( void ) +-#else +-void yy_load_buffer_state() +-#endif +- { +- yy_n_chars = yy_current_buffer->yy_n_chars; +- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; +- yyin = yy_current_buffer->yy_input_file; +- yy_hold_char = *yy_c_buf_p; +- } +- +- +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +-#else +-YY_BUFFER_STATE yy_create_buffer( file, size ) +-FILE *file; +-int size; +-#endif +- { +- YY_BUFFER_STATE b; +- +- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); +- if ( ! b ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +- +- b->yy_buf_size = size; +- +- /* yy_ch_buf has to be 2 characters longer than the size given because +- * we need to put in 2 end-of-buffer characters. +- */ +- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); +- if ( ! b->yy_ch_buf ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); +- +- b->yy_is_our_buffer = 1; +- +- yy_init_buffer( b, file ); +- +- return b; +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_delete_buffer( YY_BUFFER_STATE b ) +-#else +-void yy_delete_buffer( b ) +-YY_BUFFER_STATE b; +-#endif +- { +- if ( ! b ) +- return; +- +- if ( b == yy_current_buffer ) +- yy_current_buffer = (YY_BUFFER_STATE) 0; +- +- if ( b->yy_is_our_buffer ) +- yy_flex_free( (void *) b->yy_ch_buf ); +- +- yy_flex_free( (void *) b ); +- } +- +- +-#ifndef YY_ALWAYS_INTERACTIVE +-#ifndef YY_NEVER_INTERACTIVE +-extern int isatty YY_PROTO(( int )); +-#endif +-#endif +- +-#ifdef YY_USE_PROTOS +-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +-#else +-void yy_init_buffer( b, file ) +-YY_BUFFER_STATE b; +-FILE *file; +-#endif +- +- +- { +- yy_flush_buffer( b ); +- +- b->yy_input_file = file; +- b->yy_fill_buffer = 1; +- +-#if YY_ALWAYS_INTERACTIVE +- b->yy_is_interactive = 1; +-#else +-#if YY_NEVER_INTERACTIVE +- b->yy_is_interactive = 0; +-#else +- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +-#endif +-#endif +- } +- +- +-#ifdef YY_USE_PROTOS +-void yy_flush_buffer( YY_BUFFER_STATE b ) +-#else +-void yy_flush_buffer( b ) +-YY_BUFFER_STATE b; +-#endif +- +- { +- b->yy_n_chars = 0; +- +- /* We always need two end-of-buffer characters. The first causes +- * a transition to the end-of-buffer state. The second causes +- * a jam in that state. +- */ +- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; +- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; +- +- b->yy_buf_pos = &b->yy_ch_buf[0]; +- +- b->yy_at_bol = 1; +- b->yy_buffer_status = YY_BUFFER_NEW; +- +- if ( b == yy_current_buffer ) +- yy_load_buffer_state(); +- } +- +- +-#ifndef YY_NO_SCAN_BUFFER +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +-#else +-YY_BUFFER_STATE yy_scan_buffer( base, size ) +-char *base; +-yy_size_t size; +-#endif +- { +- YY_BUFFER_STATE b; +- +- if ( size < 2 || +- base[size-2] != YY_END_OF_BUFFER_CHAR || +- base[size-1] != YY_END_OF_BUFFER_CHAR ) +- /* They forgot to leave room for the EOB's. */ +- return 0; +- +- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); +- if ( ! b ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); +- +- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ +- b->yy_buf_pos = b->yy_ch_buf = base; +- b->yy_is_our_buffer = 0; +- b->yy_input_file = 0; +- b->yy_n_chars = b->yy_buf_size; +- b->yy_is_interactive = 0; +- b->yy_at_bol = 1; +- b->yy_fill_buffer = 0; +- b->yy_buffer_status = YY_BUFFER_NEW; +- +- yy_switch_to_buffer( b ); +- +- return b; +- } +-#endif +- +- +-#ifndef YY_NO_SCAN_STRING +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_string( yyconst char *str ) +-#else +-YY_BUFFER_STATE yy_scan_string( str ) +-yyconst char *str; +-#endif +- { +- int len; +- for ( len = 0; str[len]; ++len ) +- ; +- +- return yy_scan_bytes( str, len ); +- } +-#endif +- +- +-#ifndef YY_NO_SCAN_BYTES +-#ifdef YY_USE_PROTOS +-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +-#else +-YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +-yyconst char *bytes; +-int len; +-#endif +- { +- YY_BUFFER_STATE b; +- char *buf; +- yy_size_t n; +- int i; +- +- /* Get memory for full buffer, including space for trailing EOB's. */ +- n = len + 2; +- buf = (char *) yy_flex_alloc( n ); +- if ( ! buf ) +- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); +- +- for ( i = 0; i < len; ++i ) +- buf[i] = bytes[i]; +- +- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; +- +- b = yy_scan_buffer( buf, n ); +- if ( ! b ) +- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); +- +- /* It's okay to grow etc. this buffer, and we should throw it +- * away when we're done. +- */ +- b->yy_is_our_buffer = 1; +- +- return b; +- } +-#endif +- +- +-#ifndef YY_NO_PUSH_STATE +-#ifdef YY_USE_PROTOS +-static void yy_push_state( int new_state ) +-#else +-static void yy_push_state( new_state ) +-int new_state; +-#endif +- { +- if ( yy_start_stack_ptr >= yy_start_stack_depth ) +- { +- yy_size_t new_size; +- +- yy_start_stack_depth += YY_START_STACK_INCR; +- new_size = yy_start_stack_depth * sizeof( int ); +- +- if ( ! yy_start_stack ) +- yy_start_stack = (int *) yy_flex_alloc( new_size ); +- +- else +- yy_start_stack = (int *) yy_flex_realloc( +- (void *) yy_start_stack, new_size ); +- +- if ( ! yy_start_stack ) +- YY_FATAL_ERROR( +- "out of memory expanding start-condition stack" ); +- } +- +- yy_start_stack[yy_start_stack_ptr++] = YY_START; +- +- BEGIN(new_state); +- } +-#endif +- +- +-#ifndef YY_NO_POP_STATE +-static void yy_pop_state() +- { +- if ( --yy_start_stack_ptr < 0 ) +- YY_FATAL_ERROR( "start-condition stack underflow" ); +- +- BEGIN(yy_start_stack[yy_start_stack_ptr]); +- } +-#endif +- +- +-#ifndef YY_NO_TOP_STATE +-static int yy_top_state() +- { +- return yy_start_stack[yy_start_stack_ptr - 1]; +- } +-#endif +- +-#ifndef YY_EXIT_FAILURE +-#define YY_EXIT_FAILURE 2 +-#endif +- +-#ifdef YY_USE_PROTOS +-static void yy_fatal_error( yyconst char msg[] ) +-#else +-static void yy_fatal_error( msg ) +-char msg[]; +-#endif +- { +- (void) fprintf( stderr, "%s\n", msg ); +- exit( YY_EXIT_FAILURE ); +- } +- +- +- +-/* Redefine yyless() so it works in section 3 code. */ +- +-#undef yyless +-#define yyless(n) \ +- do \ +- { \ +- /* Undo effects of setting up yytext. */ \ +- yytext[yyleng] = yy_hold_char; \ +- yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ +- yy_hold_char = *yy_c_buf_p; \ +- *yy_c_buf_p = '\0'; \ +- yyleng = n; \ +- } \ +- while ( 0 ) +- +- +-/* Internal utility routines. */ +- +-#ifndef yytext_ptr +-#ifdef YY_USE_PROTOS +-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +-#else +-static void yy_flex_strncpy( s1, s2, n ) +-char *s1; +-yyconst char *s2; +-int n; +-#endif +- { +- register int i; +- for ( i = 0; i < n; ++i ) +- s1[i] = s2[i]; +- } +-#endif +- +- +-#ifdef YY_USE_PROTOS +-static void *yy_flex_alloc( yy_size_t size ) +-#else +-static void *yy_flex_alloc( size ) +-yy_size_t size; +-#endif +- { +- return (void *) malloc( size ); +- } +- +-#ifdef YY_USE_PROTOS +-static void *yy_flex_realloc( void *ptr, yy_size_t size ) +-#else +-static void *yy_flex_realloc( ptr, size ) +-void *ptr; +-yy_size_t size; +-#endif +- { +- /* The cast to (char *) in the following accommodates both +- * implementations that use char* generic pointers, and those +- * that use void* generic pointers. It works with the latter +- * because both ANSI C and C++ allow castless assignment from +- * any pointer type to void*, and deal with argument conversions +- * as though doing an assignment. +- */ +- return (void *) realloc( (char *) ptr, size ); +- } +- +-#ifdef YY_USE_PROTOS +-static void yy_flex_free( void *ptr ) +-#else +-static void yy_flex_free( ptr ) +-void *ptr; +-#endif +- { +- free( ptr ); +- } +- +-#if YY_MAIN +-int main() +- { +- yylex(); +- return 0; +- } +-#endif +-#line 416 "ldlex.l" +- +- +- +-/* Switch flex to reading script file NAME, open on FILE, +- saving the current input info on the include stack. */ +- +-void +-lex_push_file (file, name) +- FILE *file; +- const char *name; +-{ +- if (include_stack_ptr >= MAX_INCLUDE_DEPTH) +- { +- einfo("%F:includes nested too deeply\n"); +- } +- file_name_stack[include_stack_ptr] = name; +- lineno_stack[include_stack_ptr] = 1; +- include_stack[include_stack_ptr] = YY_CURRENT_BUFFER; +- +- include_stack_ptr++; +- yyin = file; +- yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); +- BEGIN (SCRIPT); +-} +- +-/* Return a newly created flex input buffer containing STRING, +- which is SIZE bytes long. */ +- +-static YY_BUFFER_STATE +-yy_create_string_buffer (string, size) +- CONST char *string; +- size_t size; +-{ +- YY_BUFFER_STATE b; +- +- /* Calls to m-alloc get turned by sed into xm-alloc. */ +- b = (YY_BUFFER_STATE) malloc (sizeof (struct yy_buffer_state)); +- b->yy_input_file = 0; +- b->yy_buf_size = size; +- +- /* yy_ch_buf has to be 2 characters longer than the size given because +- we need to put in 2 end-of-buffer characters. */ +- b->yy_ch_buf = (char *) malloc ((unsigned) (b->yy_buf_size + 3)); +- +- b->yy_ch_buf[0] = '\n'; +- strcpy (b->yy_ch_buf+1, string); +- b->yy_ch_buf[size+1] = YY_END_OF_BUFFER_CHAR; +- b->yy_ch_buf[size+2] = YY_END_OF_BUFFER_CHAR; +- b->yy_n_chars = size+1; +- b->yy_buf_pos = &b->yy_ch_buf[1]; +- +- /* flex 2.4.7 changed the interface. FIXME: We should not be using +- a flex internal interface in the first place! */ +-#ifdef YY_BUFFER_NEW +- b->yy_buffer_status = YY_BUFFER_NEW; +-#else +- b->yy_eof_status = EOF_NOT_SEEN; +-#endif +- +- return b; +-} +- +-/* Switch flex to reading from STRING, saving the current input info +- on the include stack. */ +- +-void +-lex_redirect (string) +- CONST char *string; +-{ +- YY_BUFFER_STATE tmp; +- +- yy_init = 0; +- if (include_stack_ptr >= MAX_INCLUDE_DEPTH) +- { +- einfo("%F: macros nested too deeply\n"); +- } +- file_name_stack[include_stack_ptr] = "redirect"; +- lineno_stack[include_stack_ptr] = 0; +- include_stack[include_stack_ptr] = YY_CURRENT_BUFFER; +- include_stack_ptr++; +- tmp = yy_create_string_buffer (string, strlen (string)); +- yy_switch_to_buffer (tmp); +- BEGIN (SCRIPT); +-} +- +-/* Functions to switch to a different flex start condition, +- saving the current start condition on `state_stack'. */ +- +-static int state_stack[MAX_INCLUDE_DEPTH * 2]; +-static int *state_stack_p = state_stack; +- +-void +-ldlex_script () +-{ +- *(state_stack_p)++ = yy_start; +- BEGIN (SCRIPT); +-} +- +-void +-ldlex_mri_script () +-{ +- *(state_stack_p)++ = yy_start; +- BEGIN (MRI); +-} +- +-void +-ldlex_version_script () +-{ +- *(state_stack_p)++ = yy_start; +- BEGIN (VERS_START); +-} +- +-void +-ldlex_version_file () +-{ +- *(state_stack_p)++ = yy_start; +- BEGIN (VERS_SCRIPT); +-} +- +-void +-ldlex_defsym () +-{ +- *(state_stack_p)++ = yy_start; +- BEGIN (DEFSYMEXP); +-} +- +-void +-ldlex_expression () +-{ +- *(state_stack_p)++ = yy_start; +- BEGIN (EXPRESSION); +-} +- +-void +-ldlex_both () +-{ +- *(state_stack_p)++ = yy_start; +- BEGIN (BOTH); +-} +- +-void +-ldlex_popstate () +-{ +- yy_start = *(--state_stack_p); +-} +- +- +-/* Place up to MAX_SIZE characters in BUF and return in *RESULT +- either the number of characters read, or 0 to indicate EOF. */ +- +-static void +-yy_input (buf, result, max_size) +- char *buf; +- int *result; +- int max_size; +-{ +- *result = 0; +- if (yy_current_buffer->yy_input_file) +- { +- if (yyin) +- { +- *result = read (fileno (yyin), (char *) buf, max_size); +- if (*result < 0) +- einfo ("%F%P: read in flex scanner failed\n"); +- } +- } +-} +- +-/* Eat the rest of a C-style comment. */ +- +-static void +-comment () +-{ +- int c; +- +- while (1) +- { +- c = input(); +- while (c != '*' && c != EOF) +- { +- if (c == '\n') +- lineno++; +- c = input(); +- } +- +- if (c == '*') +- { +- c = input(); +- while (c == '*') +- c = input(); +- if (c == '/') +- break; /* found the end */ +- } +- +- if (c == '\n') +- lineno++; +- +- if (c == EOF) +- { +- einfo( "%F%P: EOF in comment\n"); +- break; +- } +- } +-} +- +-/* Warn the user about a garbage character WHAT in the input +- in context WHERE. */ +- +-static void +-lex_warn_invalid (where, what) +- char *where, *what; +-{ +- char buf[5]; +- +- /* If we have found an input file whose format we do not recognize, +- and we are therefore treating it as a linker script, and we find +- an invalid character, then most likely this is a real object file +- of some different format. Treat it as such. */ +- if (ldfile_assumed_script) +- { +- bfd_set_error (bfd_error_file_not_recognized); +- einfo ("%F%s: file not recognized: %E\n", ldfile_input_filename); +- } +- +- if (! isprint ((unsigned char) *what)) +- { +- sprintf (buf, "\\%03o", (unsigned int) *what); +- what = buf; +- } +- +- einfo ("%P:%S: ignoring invalid character `%s'%s\n", what, where); +-} +diff -rup --new-file binutils-2.9.1/ld/ldmain.c binutils-2.9.1/ld/ldmain.c +--- binutils-2.9.1/ld/ldmain.c Fri May 1 08:48:49 1998 ++++ binutils-2.9.1/ld/ldmain.c Sun Aug 23 00:00:00 1998 +@@ -147,8 +147,10 @@ remove_output () + { + if (output_filename) + { +- if (output_bfd && output_bfd->iostream) ++ if (output_bfd && output_bfd->iostream) { + fclose((FILE *)(output_bfd->iostream)); ++ output_bfd->iostream = NULL; ++ } + if (delete_output_file_on_failure) + unlink (output_filename); + } +diff -rup --new-file binutils-2.9.1/ld/scripttempl/amiga.sc binutils-2.9.1/ld/scripttempl/amiga.sc +--- binutils-2.9.1/ld/scripttempl/amiga.sc Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/ld/scripttempl/amiga.sc Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,48 @@ ++cat < ++ ++ * Makefile.in (lneeded-list): Since xmalloc.o and xexit.o ++ are in REQUIRED_OFILES, there is no need to include them ++ again, so remove conditional include based on alloca.o use. ++ + Thu Aug 28 14:27:15 1997 Andrew Cagney + + * vasprintf.c (vasprintf): Allow for _BSD_VA_LIST_. +diff -rup --new-file binutils-2.9.1/libiberty/Makefile.in binutils-2.9.1/libiberty/Makefile.in +--- binutils-2.9.1/libiberty/Makefile.in Fri May 1 08:47:47 1998 ++++ binutils-2.9.1/libiberty/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -28,7 +28,7 @@ + + srcdir = . + +-prefix = /usr/local ++prefix = @prefix@ + + exec_prefix = $(prefix) + bindir = $(exec_prefix)/bin +@@ -63,15 +63,15 @@ INSTALL = $(SHELL) $(srcdir)/../install- + INSTALL_PROGRAM = $(INSTALL) + INSTALL_DATA = $(INSTALL) + +-AR = ar +-AR_FLAGS = rc ++AR = @AR@ ++ARFLAGS = @ARFLAGS@ + + ERRORS_CC = $(CC) + CC = cc + CFLAGS = -g + LIBCFLAGS = $(CFLAGS) + MAKEINFO = makeinfo +-RANLIB = ranlib ++RANLIB = @RANLIB@ + + PICFLAG = + +@@ -100,7 +100,7 @@ EXTRA_OFILES = + # Flags to pass to a recursive make. + FLAGS_TO_PASS = \ + "AR=$(AR)" \ +- "AR_FLAGS=$(AR_FLAGS)" \ ++ "ARFLAGS=$(ARFLAGS)" \ + "CC=$(CC)" \ + "CFLAGS=$(CFLAGS)" \ + "LIBCFLAGS=$(LIBCFLAGS)" \ +@@ -130,7 +130,7 @@ check installcheck: + + INCDIR=$(srcdir)/$(MULTISRCTOP)../include + +-COMPILE.c = $(CC) -c $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) ++COMPILE.c = $(CC) -c $(LIBCFLAGS) -I. -I$(INCDIR) -I$(srcdir) $(HDEFINES) + .c.o: + test -z "$(PICFLAG)" || \ + $(COMPILE.c) $(PICFLAG) $< -o pic/$@ +@@ -204,9 +204,6 @@ lneeded-list: $(EXTRA_OFILES) needed.awk + *) f="$$f $$i" ;; \ + esac ; \ + done ; \ +- case $$f in \ +- *alloca.o*) f="$$f xmalloc.o xexit.o" ;; \ +- esac ; \ + echo $$f >>lneeded-list + + # Generate an awk script that looks for functions in functions.def +@@ -243,7 +240,7 @@ needed2.awk: $(srcdir)/functions.def Mak + >>needed2.awk + + dummy.o: $(srcdir)/dummy.c $(srcdir)/functions.def +- $(CC) -c $(CFLAGS) -I. -I$(INCDIR) $(HDEFINES) $(srcdir)/dummy.c 2>/dev/null ++ $(CC) -c $(CFLAGS) -I. -I$(INCDIR) -I$(srcdir) $(HDEFINES) $(srcdir)/dummy.c 2>/dev/null + + errors: dummy.o $(EXTRA_OFILES) + -($(ERRORS_CC) -o dummy $(CFLAGS) $(LDFLAGS) $(ERRORS_LDFLAGS) dummy.o $(EXTRA_OFILES) $(LOADLIBES)) >errors 2>&1 || true +@@ -263,7 +260,7 @@ $(RULE1): $(REQUIRED_OFILES) $(DO_ALSO) + RULE2 = not-used + $(RULE2): $(REQUIRED_OFILES) $(HOST_OFILES) + rm -rf $(TARGETLIB) +- $(AR) $(AR_FLAGS) $(TARGETLIB) \ ++ $(AR) $(ARFLAGS) $(TARGETLIB) \ + $(REQUIRED_OFILES) $(HOST_OFILES) + $(RANLIB) $(TARGETLIB) + +diff -rup --new-file binutils-2.9.1/libiberty/alloca-norm.h binutils-2.9.1/libiberty/alloca-norm.h +--- binutils-2.9.1/libiberty/alloca-norm.h Fri May 1 08:47:48 1998 ++++ binutils-2.9.1/libiberty/alloca-norm.h Sun Aug 23 00:00:00 1998 +@@ -1,6 +1,6 @@ + /* "Normal" configuration for alloca. */ + +-#ifdef __GNUC__ ++#if defined (__GNUC__) && !defined (C_ALLOCA) + #ifndef alloca + #define alloca __builtin_alloca + #endif +diff -rup --new-file binutils-2.9.1/libiberty/config/mh-amigaos binutils-2.9.1/libiberty/config/mh-amigaos +--- binutils-2.9.1/libiberty/config/mh-amigaos Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/libiberty/config/mh-amigaos Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,12 @@ ++# Host makefile fragment for Commodore Amiga running AmigaOS. ++ ++# We don't actually use libmmalloc.a, since there is no sbrk(), ++# but this allows us to compile it (and then ignore it). ++MMALLOC= ++MMALLOC_DISABLE = -DNO_MMALLOC ++ ++# There is no standard system compiler. Assume using GNU C. ++CC = gcc ++ ++# Compile for automatic stack extension. ++HDEFINES = -mstackextend +diff -rup --new-file binutils-2.9.1/libiberty/config/mh-beos binutils-2.9.1/libiberty/config/mh-beos +--- binutils-2.9.1/libiberty/config/mh-beos Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/libiberty/config/mh-beos Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,7 @@ ++# Host makefile fragment for BeOS ++ ++# This is a temporary hack until the wimpy default 64k stack ++# limit in BeOS is either increased or made user settable somehow. ++# This probably won't happen until after the DR9 release. ++ ++EXTRA_OFILES = alloca.o +diff -rup --new-file binutils-2.9.1/libiberty/config.table binutils-2.9.1/libiberty/config.table +--- binutils-2.9.1/libiberty/config.table Fri May 1 08:47:49 1998 ++++ binutils-2.9.1/libiberty/config.table Sun Aug 23 00:00:00 1998 +@@ -23,6 +23,8 @@ case "${host}" in + *-*-sysv*) frag=mh-sysv ;; + *-*-go32) frag=mh-go32 ;; + i[345]86-*-windows*) frag=mh-windows ;; ++ *-*-amigaos*) frag=mh-amigaos ;; ++ *-*-beos*) frag=mh-beos ;; + + *-*-vxworks5* | *-*-vxworks) + # VxWorks 5 needs special action, because the usual +diff -rup --new-file binutils-2.9.1/libiberty/xmalloc.c binutils-2.9.1/libiberty/xmalloc.c +--- binutils-2.9.1/libiberty/xmalloc.c Fri May 1 08:47:56 1998 ++++ binutils-2.9.1/libiberty/xmalloc.c Sun Aug 23 00:00:00 1998 +@@ -53,7 +53,7 @@ xmalloc_set_program_name (s) + const char *s; + { + name = s; +-#if ! defined (_WIN32) || defined (__CYGWIN32__) ++#if defined (HAVE_SBRK) && (! defined (_WIN32) || defined (__CYGWIN32__)) + /* Win32 ports other than cygwin32 don't have brk() */ + if (first_break == NULL) + first_break = (char *) sbrk (0); +@@ -71,7 +71,7 @@ xmalloc (size) + newmem = malloc (size); + if (!newmem) + { +-#if ! defined (_WIN32) || defined (__CYGWIN32__) ++#if defined (HAVE_SBRK) && (! defined (_WIN32) || defined (__CYGWIN32__)) + extern char **environ; + size_t allocated; + +@@ -109,7 +109,7 @@ xrealloc (oldmem, size) + newmem = realloc (oldmem, size); + if (!newmem) + { +-#ifndef __MINGW32__ ++#if defined (HAVE_SBRK) && !defined (__MINGW32__) + extern char **environ; + size_t allocated; + +diff -rup --new-file binutils-2.9.1/ltconfig binutils-2.9.1/ltconfig +--- binutils-2.9.1/ltconfig Fri May 1 08:49:28 1998 ++++ binutils-2.9.1/ltconfig Tue May 11 13:33:47 1999 +@@ -90,6 +90,7 @@ with_gcc=no + with_gnu_ld=no + + old_AR="$AR" ++old_ARFLAGS="$ARFLAGS" + old_CC="$CC" + old_CFLAGS="$CFLAGS" + old_CPPFLAGS="$CPPFLAGS" +@@ -320,12 +321,13 @@ aix3*) + esac + + # Determine commands to create old-style static archives. +-old_archive_cmds='$AR cru $oldlib$oldobjs' ++old_archive_cmds='$AR $ARFLAGS $oldlib$oldobjs' + old_postinstall_cmds='chmod 644 $oldlib' + old_postuninstall_cmds= + + # Set a sane default for `AR'. + test -z "$AR" && AR=ar ++test -z "$ARFLAGS" && ARFLAGS=cru + + # If RANLIB is not set, then run the test. + if test "${RANLIB+set}" != "set"; then +@@ -732,7 +734,7 @@ else + case "$host_os" in + aix3*) + allow_undefined_flag=unsupported +- archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' ++ archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR $ARFLAGS $lib $objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes +@@ -745,13 +747,13 @@ else + + aix4*) + allow_undefined_flag=unsupported +- archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' ++ archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR $ARFLAGS $lib $objdir/$soname' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + + amigaos*) +- archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' ++ archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR $ARFLAGS $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; +@@ -1120,7 +1122,7 @@ aix3* | aix4*) + amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. +- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ++ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo \"X$lib\" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show \"(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)\"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + ;; + + freebsd2* | freebsd3*) +@@ -1378,6 +1380,9 @@ host="$host" + + # The archiver. + AR="$AR" ++ ++# The flags passed to the archiver to create an archive ++ARFLAGS="$ARFLAGS" + + # The default C compiler. + CC="$CC" +diff -rup --new-file binutils-2.9.1/manifests/bin binutils-2.9.1/manifests/bin +--- binutils-2.9.1/manifests/bin Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/manifests/bin Wed May 26 20:14:20 1999 +@@ -0,0 +1,55 @@ ++COPYING ++bin/addr2line ++bin/ar ++bin/as ++bin/c++filt ++bin/gasp ++bin/gprof ++bin/ld ++bin/nm ++bin/objcopy ++bin/objdump ++bin/ranlib ++bin/size ++bin/strings ++bin/strip ++guide/standards.guide ++include/ansidecl.h ++include/bfd.h ++include/bfdlink.h ++info/standards.info ++lib/libbfd.a ++lib/libbfd.la ++lib/libiberty.a ++lib/libopcodes.a ++lib/libopcodes.la ++m68k-amigaos/bin/ar ++m68k-amigaos/bin/as ++m68k-amigaos/bin/ld ++m68k-amigaos/bin/nm ++m68k-amigaos/bin/ranlib ++m68k-amigaos/bin/strip ++m68k-amigaos/lib/ldscripts/amiga.x ++m68k-amigaos/lib/ldscripts/amiga.xbn ++m68k-amigaos/lib/ldscripts/amiga.xn ++m68k-amigaos/lib/ldscripts/amiga.xr ++m68k-amigaos/lib/ldscripts/amiga.xu ++m68k-amigaos/lib/ldscripts/amiga_bss.x ++m68k-amigaos/lib/ldscripts/amiga_bss.xbn ++m68k-amigaos/lib/ldscripts/amiga_bss.xn ++m68k-amigaos/lib/ldscripts/amiga_bss.xr ++m68k-amigaos/lib/ldscripts/amiga_bss.xu ++man/man1/addr2line.1 ++man/man1/ar.1 ++man/man1/as.1 ++man/man1/c++filt.1 ++man/man1/gprof.1 ++man/man1/ld.1 ++man/man1/nlmconv.1 ++man/man1/nm.1 ++man/man1/objcopy.1 ++man/man1/objdump.1 ++man/man1/ranlib.1 ++man/man1/size.1 ++man/man1/strings.1 ++man/man1/strip.1 +diff -rup --new-file binutils-2.9.1/manifests/src binutils-2.9.1/manifests/src +--- binutils-2.9.1/manifests/src Wed Dec 31 17:00:00 1969 ++++ binutils-2.9.1/manifests/src Sun Aug 23 00:00:00 1998 +@@ -0,0 +1,2070 @@ ++fsf/binutils/COPYING ++fsf/binutils/COPYING.LIB ++fsf/binutils/ChangeLog ++fsf/binutils/Makefile.in ++fsf/binutils/Product-Info ++fsf/binutils/README ++fsf/binutils/bfd/COPYING ++fsf/binutils/bfd/ChangeLog ++fsf/binutils/bfd/ChangeLog.1 ++fsf/binutils/bfd/ChangeLog.2 ++fsf/binutils/bfd/Makefile.am ++fsf/binutils/bfd/Makefile.in ++fsf/binutils/bfd/PORTING ++fsf/binutils/bfd/README ++fsf/binutils/bfd/TODO ++fsf/binutils/bfd/acconfig.h ++fsf/binutils/bfd/acinclude.m4 ++fsf/binutils/bfd/aclocal.m4 ++fsf/binutils/bfd/aix386-core.c ++fsf/binutils/bfd/amigaos.c ++fsf/binutils/bfd/amigaoslink.c ++fsf/binutils/bfd/aout-adobe.c ++fsf/binutils/bfd/aout-amiga.c ++fsf/binutils/bfd/aout-arm.c ++fsf/binutils/bfd/aout-encap.c ++fsf/binutils/bfd/aout-ns32k.c ++fsf/binutils/bfd/aout-sparcle.c ++fsf/binutils/bfd/aout-target.h ++fsf/binutils/bfd/aout-tic30.c ++fsf/binutils/bfd/aout0.c ++fsf/binutils/bfd/aout32.c ++fsf/binutils/bfd/aout64.c ++fsf/binutils/bfd/aoutf1.h ++fsf/binutils/bfd/aoutx.h ++fsf/binutils/bfd/archive.c ++fsf/binutils/bfd/archures.c ++fsf/binutils/bfd/bfd-in.h ++fsf/binutils/bfd/bfd-in2.h ++fsf/binutils/bfd/bfd.c ++fsf/binutils/bfd/binary.c ++fsf/binutils/bfd/bout.c ++fsf/binutils/bfd/cache.c ++fsf/binutils/bfd/cf-i386lynx.c ++fsf/binutils/bfd/cf-m68klynx.c ++fsf/binutils/bfd/cf-sparclynx.c ++fsf/binutils/bfd/cisco-core.c ++fsf/binutils/bfd/coff-a29k.c ++fsf/binutils/bfd/coff-alpha.c ++fsf/binutils/bfd/coff-apollo.c ++fsf/binutils/bfd/coff-arm.c ++fsf/binutils/bfd/coff-aux.c ++fsf/binutils/bfd/coff-go32.c ++fsf/binutils/bfd/coff-h8300.c ++fsf/binutils/bfd/coff-h8500.c ++fsf/binutils/bfd/coff-i386.c ++fsf/binutils/bfd/coff-i860.c ++fsf/binutils/bfd/coff-i960.c ++fsf/binutils/bfd/coff-m68k.c ++fsf/binutils/bfd/coff-m88k.c ++fsf/binutils/bfd/coff-mips.c ++fsf/binutils/bfd/coff-pmac.c ++fsf/binutils/bfd/coff-ppc.c ++fsf/binutils/bfd/coff-rs6000.c ++fsf/binutils/bfd/coff-sh.c ++fsf/binutils/bfd/coff-sparc.c ++fsf/binutils/bfd/coff-stgo32.c ++fsf/binutils/bfd/coff-svm68k.c ++fsf/binutils/bfd/coff-tic30.c ++fsf/binutils/bfd/coff-u68k.c ++fsf/binutils/bfd/coff-w65.c ++fsf/binutils/bfd/coff-we32k.c ++fsf/binutils/bfd/coff-z8k.c ++fsf/binutils/bfd/coffcode.h ++fsf/binutils/bfd/coffgen.c ++fsf/binutils/bfd/cofflink.c ++fsf/binutils/bfd/coffswap.h ++fsf/binutils/bfd/config.bfd ++fsf/binutils/bfd/config.in ++fsf/binutils/bfd/configure ++fsf/binutils/bfd/configure.bat ++fsf/binutils/bfd/configure.com ++fsf/binutils/bfd/configure.host ++fsf/binutils/bfd/configure.in ++fsf/binutils/bfd/corefile.c ++fsf/binutils/bfd/cpu-a29k.c ++fsf/binutils/bfd/cpu-alpha.c ++fsf/binutils/bfd/cpu-arc.c ++fsf/binutils/bfd/cpu-arm.c ++fsf/binutils/bfd/cpu-d10v.c ++fsf/binutils/bfd/cpu-h8300.c ++fsf/binutils/bfd/cpu-h8500.c ++fsf/binutils/bfd/cpu-hppa.c ++fsf/binutils/bfd/cpu-i386.c ++fsf/binutils/bfd/cpu-i860.c ++fsf/binutils/bfd/cpu-i960.c ++fsf/binutils/bfd/cpu-m10200.c ++fsf/binutils/bfd/cpu-m10300.c ++fsf/binutils/bfd/cpu-m32r.c ++fsf/binutils/bfd/cpu-m68k.c ++fsf/binutils/bfd/cpu-m88k.c ++fsf/binutils/bfd/cpu-mips.c ++fsf/binutils/bfd/cpu-ns32k.c ++fsf/binutils/bfd/cpu-powerpc.c ++fsf/binutils/bfd/cpu-rs6000.c ++fsf/binutils/bfd/cpu-sh.c ++fsf/binutils/bfd/cpu-sparc.c ++fsf/binutils/bfd/cpu-tic30.c ++fsf/binutils/bfd/cpu-v850.c ++fsf/binutils/bfd/cpu-vax.c ++fsf/binutils/bfd/cpu-w65.c ++fsf/binutils/bfd/cpu-we32k.c ++fsf/binutils/bfd/cpu-z8k.c ++fsf/binutils/bfd/demo64.c ++fsf/binutils/bfd/dep-in.sed ++fsf/binutils/bfd/doc/ChangeLog ++fsf/binutils/bfd/doc/Makefile.am ++fsf/binutils/bfd/doc/Makefile.in ++fsf/binutils/bfd/doc/aoutx.texi ++fsf/binutils/bfd/doc/archive.texi ++fsf/binutils/bfd/doc/archures.texi ++fsf/binutils/bfd/doc/bfd.info-6 ++fsf/binutils/bfd/doc/bfd.texinfo ++fsf/binutils/bfd/doc/bfdsumm.texi ++fsf/binutils/bfd/doc/bfdt.texi ++fsf/binutils/bfd/doc/cache.texi ++fsf/binutils/bfd/doc/chew.c ++fsf/binutils/bfd/doc/coffcode.texi ++fsf/binutils/bfd/doc/core.texi ++fsf/binutils/bfd/doc/doc.str ++fsf/binutils/bfd/doc/elf.texi ++fsf/binutils/bfd/doc/elfcode.texi ++fsf/binutils/bfd/doc/format.texi ++fsf/binutils/bfd/doc/hash.texi ++fsf/binutils/bfd/doc/init.texi ++fsf/binutils/bfd/doc/libbfd.texi ++fsf/binutils/bfd/doc/linker.texi ++fsf/binutils/bfd/doc/makefile.vms ++fsf/binutils/bfd/doc/opncls.texi ++fsf/binutils/bfd/doc/proto.str ++fsf/binutils/bfd/doc/reloc.texi ++fsf/binutils/bfd/doc/section.texi ++fsf/binutils/bfd/doc/syms.texi ++fsf/binutils/bfd/doc/targets.texi ++fsf/binutils/bfd/dwarf2.c ++fsf/binutils/bfd/ecoff.c ++fsf/binutils/bfd/ecofflink.c ++fsf/binutils/bfd/ecoffswap.h ++fsf/binutils/bfd/elf-bfd.h ++fsf/binutils/bfd/elf-m10200.c ++fsf/binutils/bfd/elf-m10300.c ++fsf/binutils/bfd/elf.c ++fsf/binutils/bfd/elf32-arc.c ++fsf/binutils/bfd/elf32-d10v.c ++fsf/binutils/bfd/elf32-gen.c ++fsf/binutils/bfd/elf32-hppa.c ++fsf/binutils/bfd/elf32-hppa.h ++fsf/binutils/bfd/elf32-i386.c ++fsf/binutils/bfd/elf32-i860.c ++fsf/binutils/bfd/elf32-m32r.c ++fsf/binutils/bfd/elf32-m68k.c ++fsf/binutils/bfd/elf32-m88k.c ++fsf/binutils/bfd/elf32-mips.c ++fsf/binutils/bfd/elf32-ppc.c ++fsf/binutils/bfd/elf32-sh.c ++fsf/binutils/bfd/elf32-sparc.c ++fsf/binutils/bfd/elf32-v850.c ++fsf/binutils/bfd/elf32.c ++fsf/binutils/bfd/elf64-alpha.c ++fsf/binutils/bfd/elf64-gen.c ++fsf/binutils/bfd/elf64-mips.c ++fsf/binutils/bfd/elf64-sparc.c ++fsf/binutils/bfd/elf64.c ++fsf/binutils/bfd/elfcode.h ++fsf/binutils/bfd/elfcore.h ++fsf/binutils/bfd/elflink.c ++fsf/binutils/bfd/elflink.h ++fsf/binutils/bfd/elfxx-target.h ++fsf/binutils/bfd/evax-alpha.c ++fsf/binutils/bfd/evax-egsd.c ++fsf/binutils/bfd/evax-emh.c ++fsf/binutils/bfd/evax-etir.c ++fsf/binutils/bfd/evax-misc.c ++fsf/binutils/bfd/evax.h ++fsf/binutils/bfd/filemode.c ++fsf/binutils/bfd/format.c ++fsf/binutils/bfd/freebsd.h ++fsf/binutils/bfd/gen-aout.c ++fsf/binutils/bfd/genlink.h ++fsf/binutils/bfd/go32stub.h ++fsf/binutils/bfd/hash.c ++fsf/binutils/bfd/host-aout.c ++fsf/binutils/bfd/hosts/alphalinux.h ++fsf/binutils/bfd/hosts/alphavms.h ++fsf/binutils/bfd/hosts/amigaos.h ++fsf/binutils/bfd/hosts/decstation.h ++fsf/binutils/bfd/hosts/delta68.h ++fsf/binutils/bfd/hosts/dpx2.h ++fsf/binutils/bfd/hosts/hp300bsd.h ++fsf/binutils/bfd/hosts/i386bsd.h ++fsf/binutils/bfd/hosts/i386linux.h ++fsf/binutils/bfd/hosts/i386mach3.h ++fsf/binutils/bfd/hosts/i386sco.h ++fsf/binutils/bfd/hosts/i860mach3.h ++fsf/binutils/bfd/hosts/m68kaux.h ++fsf/binutils/bfd/hosts/m68klinux.h ++fsf/binutils/bfd/hosts/m88kmach3.h ++fsf/binutils/bfd/hosts/mipsbsd.h ++fsf/binutils/bfd/hosts/mipsmach3.h ++fsf/binutils/bfd/hosts/news-mips.h ++fsf/binutils/bfd/hosts/news.h ++fsf/binutils/bfd/hosts/pc532mach.h ++fsf/binutils/bfd/hosts/riscos.h ++fsf/binutils/bfd/hosts/symmetry.h ++fsf/binutils/bfd/hosts/tahoe.h ++fsf/binutils/bfd/hosts/vaxbsd.h ++fsf/binutils/bfd/hosts/vaxult.h ++fsf/binutils/bfd/hosts/vaxult2.h ++fsf/binutils/bfd/hp300bsd.c ++fsf/binutils/bfd/hp300hpux.c ++fsf/binutils/bfd/hppa_stubs.h ++fsf/binutils/bfd/hppabsd-core.c ++fsf/binutils/bfd/hpux-core.c ++fsf/binutils/bfd/i386aout.c ++fsf/binutils/bfd/i386bsd.c ++fsf/binutils/bfd/i386dynix.c ++fsf/binutils/bfd/i386freebsd.c ++fsf/binutils/bfd/i386linux.c ++fsf/binutils/bfd/i386lynx.c ++fsf/binutils/bfd/i386mach3.c ++fsf/binutils/bfd/i386msdos.c ++fsf/binutils/bfd/i386netbsd.c ++fsf/binutils/bfd/i386os9k.c ++fsf/binutils/bfd/ieee.c ++fsf/binutils/bfd/ihex.c ++fsf/binutils/bfd/init.c ++fsf/binutils/bfd/irix-core.c ++fsf/binutils/bfd/libamiga.h ++fsf/binutils/bfd/libaout.h ++fsf/binutils/bfd/libbfd-in.h ++fsf/binutils/bfd/libbfd.c ++fsf/binutils/bfd/libbfd.h ++fsf/binutils/bfd/libcoff-in.h ++fsf/binutils/bfd/libcoff.h ++fsf/binutils/bfd/libecoff.h ++fsf/binutils/bfd/libhppa.h ++fsf/binutils/bfd/libieee.h ++fsf/binutils/bfd/libnlm.h ++fsf/binutils/bfd/liboasys.h ++fsf/binutils/bfd/linker.c ++fsf/binutils/bfd/lynx-core.c ++fsf/binutils/bfd/m68k4knetbsd.c ++fsf/binutils/bfd/m68klinux.c ++fsf/binutils/bfd/m68klynx.c ++fsf/binutils/bfd/m68knetbsd.c ++fsf/binutils/bfd/m88kmach3.c ++fsf/binutils/bfd/makefile.dos ++fsf/binutils/bfd/makefile.vms ++fsf/binutils/bfd/mipsbsd.c ++fsf/binutils/bfd/mpw-config.in ++fsf/binutils/bfd/mpw-make.sed ++fsf/binutils/bfd/netbsd-core.c ++fsf/binutils/bfd/netbsd.h ++fsf/binutils/bfd/newsos3.c ++fsf/binutils/bfd/nlm-target.h ++fsf/binutils/bfd/nlm.c ++fsf/binutils/bfd/nlm32-alpha.c ++fsf/binutils/bfd/nlm32-i386.c ++fsf/binutils/bfd/nlm32-ppc.c ++fsf/binutils/bfd/nlm32-sparc.c ++fsf/binutils/bfd/nlm32.c ++fsf/binutils/bfd/nlm64.c ++fsf/binutils/bfd/nlmcode.h ++fsf/binutils/bfd/nlmswap.h ++fsf/binutils/bfd/ns32k.h ++fsf/binutils/bfd/ns32knetbsd.c ++fsf/binutils/bfd/oasys.c ++fsf/binutils/bfd/opncls.c ++fsf/binutils/bfd/osf-core.c ++fsf/binutils/bfd/pc532-mach.c ++fsf/binutils/bfd/pe-arm.c ++fsf/binutils/bfd/pe-i386.c ++fsf/binutils/bfd/pe-ppc.c ++fsf/binutils/bfd/pei-arm.c ++fsf/binutils/bfd/pei-i386.c ++fsf/binutils/bfd/pei-ppc.c ++fsf/binutils/bfd/peicode.h ++fsf/binutils/bfd/ppcboot.c ++fsf/binutils/bfd/ptrace-core.c ++fsf/binutils/bfd/reloc.c ++fsf/binutils/bfd/reloc16.c ++fsf/binutils/bfd/riscix.c ++fsf/binutils/bfd/rs6000-core.c ++fsf/binutils/bfd/section.c ++fsf/binutils/bfd/som.c ++fsf/binutils/bfd/som.h ++fsf/binutils/bfd/sparclinux.c ++fsf/binutils/bfd/sparclynx.c ++fsf/binutils/bfd/sparcnetbsd.c ++fsf/binutils/bfd/srec.c ++fsf/binutils/bfd/stab-syms.c ++fsf/binutils/bfd/stabs.c ++fsf/binutils/bfd/stamp-h.in ++fsf/binutils/bfd/sunos.c ++fsf/binutils/bfd/syms.c ++fsf/binutils/bfd/sysdep.h ++fsf/binutils/bfd/targets.c ++fsf/binutils/bfd/targmatch.sed ++fsf/binutils/bfd/tekhex.c ++fsf/binutils/bfd/trad-core.c ++fsf/binutils/bfd/vaxnetbsd.c ++fsf/binutils/bfd/versados.c ++fsf/binutils/bfd/xcofflink.c ++fsf/binutils/binutils/ChangeLog ++fsf/binutils/binutils/Makefile.am ++fsf/binutils/binutils/Makefile.in ++fsf/binutils/binutils/NEWS ++fsf/binutils/binutils/README ++fsf/binutils/binutils/acconfig.h ++fsf/binutils/binutils/acinclude.m4 ++fsf/binutils/binutils/aclocal.m4 ++fsf/binutils/binutils/addr2line.1 ++fsf/binutils/binutils/addr2line.c ++fsf/binutils/binutils/ar.1 ++fsf/binutils/binutils/ar.c ++fsf/binutils/binutils/arlex.l ++fsf/binutils/binutils/arparse.y ++fsf/binutils/binutils/arsup.c ++fsf/binutils/binutils/arsup.h ++fsf/binutils/binutils/binutils.texi ++fsf/binutils/binutils/bucomm.c ++fsf/binutils/binutils/bucomm.h ++fsf/binutils/binutils/budbg.h ++fsf/binutils/binutils/coffdump.c ++fsf/binutils/binutils/coffgrok.c ++fsf/binutils/binutils/coffgrok.h ++fsf/binutils/binutils/config.in ++fsf/binutils/binutils/config.texi ++fsf/binutils/binutils/configure ++fsf/binutils/binutils/configure.bat ++fsf/binutils/binutils/configure.com ++fsf/binutils/binutils/configure.in ++fsf/binutils/binutils/cxxfilt.man ++fsf/binutils/binutils/debug.c ++fsf/binutils/binutils/debug.h ++fsf/binutils/binutils/deflex.l ++fsf/binutils/binutils/defparse.c ++fsf/binutils/binutils/defparse.h ++fsf/binutils/binutils/defparse.y ++fsf/binutils/binutils/dep-in.sed ++fsf/binutils/binutils/dlltool.c ++fsf/binutils/binutils/dlltool.h ++fsf/binutils/binutils/filemode.c ++fsf/binutils/binutils/ieee.c ++fsf/binutils/binutils/is-ranlib.c ++fsf/binutils/binutils/is-strip.c ++fsf/binutils/binutils/mac-binutils.r ++fsf/binutils/binutils/makefile.vms ++fsf/binutils/binutils/maybe-ranlib.c ++fsf/binutils/binutils/maybe-strip.c ++fsf/binutils/binutils/mpw-config.in ++fsf/binutils/binutils/mpw-make.sed ++fsf/binutils/binutils/nlmconv.1 ++fsf/binutils/binutils/nlmconv.c ++fsf/binutils/binutils/nlmconv.h ++fsf/binutils/binutils/nlmheader.h ++fsf/binutils/binutils/nlmheader.y ++fsf/binutils/binutils/nm.1 ++fsf/binutils/binutils/nm.c ++fsf/binutils/binutils/not-ranlib.c ++fsf/binutils/binutils/not-strip.c ++fsf/binutils/binutils/objcopy.1 ++fsf/binutils/binutils/objcopy.c ++fsf/binutils/binutils/objdump.1 ++fsf/binutils/binutils/objdump.c ++fsf/binutils/binutils/prdbg.c ++fsf/binutils/binutils/ranlib.1 ++fsf/binutils/binutils/ranlib.sh ++fsf/binutils/binutils/rclex.c ++fsf/binutils/binutils/rclex.l ++fsf/binutils/binutils/rcparse.c ++fsf/binutils/binutils/rcparse.h ++fsf/binutils/binutils/rcparse.y ++fsf/binutils/binutils/rdcoff.c ++fsf/binutils/binutils/rddbg.c ++fsf/binutils/binutils/resbin.c ++fsf/binutils/binutils/rescoff.c ++fsf/binutils/binutils/resrc.c ++fsf/binutils/binutils/sanity.sh ++fsf/binutils/binutils/size.1 ++fsf/binutils/binutils/size.c ++fsf/binutils/binutils/srconv.c ++fsf/binutils/binutils/stabs.c ++fsf/binutils/binutils/stamp-h.in ++fsf/binutils/binutils/strings.1 ++fsf/binutils/binutils/strings.c ++fsf/binutils/binutils/strip.1 ++fsf/binutils/binutils/sysdump.c ++fsf/binutils/binutils/sysinfo.y ++fsf/binutils/binutils/syslex.l ++fsf/binutils/binutils/testsuite/ChangeLog ++fsf/binutils/binutils/testsuite/binutils-all/ar.exp ++fsf/binutils/binutils/testsuite/binutils-all/bintest.s ++fsf/binutils/binutils/testsuite/binutils-all/hppa/addendbug.s ++fsf/binutils/binutils/testsuite/binutils-all/hppa/objdump.exp ++fsf/binutils/binutils/testsuite/binutils-all/nm.exp ++fsf/binutils/binutils/testsuite/binutils-all/objcopy.exp ++fsf/binutils/binutils/testsuite/binutils-all/objdump.exp ++fsf/binutils/binutils/testsuite/binutils-all/size.exp ++fsf/binutils/binutils/testsuite/binutils-all/testprog.c ++fsf/binutils/binutils/testsuite/config/default.exp ++fsf/binutils/binutils/testsuite/config/hppa.sed ++fsf/binutils/binutils/testsuite/lib/utils-lib.exp ++fsf/binutils/binutils/version.c ++fsf/binutils/binutils/windres.c ++fsf/binutils/binutils/windres.h ++fsf/binutils/binutils/wrstabs.c ++fsf/binutils/config-ml.in ++fsf/binutils/config.guess ++fsf/binutils/config.sub ++fsf/binutils/config/ChangeLog ++fsf/binutils/config/mh-a68bsd ++fsf/binutils/config/mh-aix386 ++fsf/binutils/config/mh-amigaos ++fsf/binutils/config/mh-apollo68 ++fsf/binutils/config/mh-cxux ++fsf/binutils/config/mh-cygwin32 ++fsf/binutils/config/mh-decstation ++fsf/binutils/config/mh-delta88 ++fsf/binutils/config/mh-dgux ++fsf/binutils/config/mh-dgux386 ++fsf/binutils/config/mh-elfalphapic ++fsf/binutils/config/mh-go32 ++fsf/binutils/config/mh-hp300 ++fsf/binutils/config/mh-hpux ++fsf/binutils/config/mh-hpux8 ++fsf/binutils/config/mh-irix4 ++fsf/binutils/config/mh-irix5 ++fsf/binutils/config/mh-irix6 ++fsf/binutils/config/mh-lynxos ++fsf/binutils/config/mh-lynxrs6k ++fsf/binutils/config/mh-m68kpic ++fsf/binutils/config/mh-mingw32 ++fsf/binutils/config/mh-ncr3000 ++fsf/binutils/config/mh-ncrsvr43 ++fsf/binutils/config/mh-necv4 ++fsf/binutils/config/mh-papic ++fsf/binutils/config/mh-ppcpic ++fsf/binutils/config/mh-riscos ++fsf/binutils/config/mh-sco ++fsf/binutils/config/mh-solaris ++fsf/binutils/config/mh-sparcpic ++fsf/binutils/config/mh-sun3 ++fsf/binutils/config/mh-sysv ++fsf/binutils/config/mh-sysv4 ++fsf/binutils/config/mh-vaxult2 ++fsf/binutils/config/mh-windows ++fsf/binutils/config/mh-x86pic ++fsf/binutils/config/mpw-mh-mpw ++fsf/binutils/config/mpw/ChangeLog ++fsf/binutils/config/mpw/MoveIfChange ++fsf/binutils/config/mpw/README ++fsf/binutils/config/mpw/forward-include ++fsf/binutils/config/mpw/g-mpw-make.sed ++fsf/binutils/config/mpw/mpw-touch ++fsf/binutils/config/mpw/mpw-true ++fsf/binutils/config/mpw/null-command ++fsf/binutils/config/mpw/open-brace ++fsf/binutils/config/mpw/tr-7to8-src ++fsf/binutils/config/mpw/true ++fsf/binutils/config/mt-elfalphapic ++fsf/binutils/config/mt-linux ++fsf/binutils/config/mt-m68kpic ++fsf/binutils/config/mt-netware ++fsf/binutils/config/mt-papic ++fsf/binutils/config/mt-ppcpic ++fsf/binutils/config/mt-sparcpic ++fsf/binutils/config/mt-v810 ++fsf/binutils/config/mt-x86pic ++fsf/binutils/configure ++fsf/binutils/configure.bat ++fsf/binutils/configure.in ++fsf/binutils/etc/Makefile.in ++fsf/binutils/etc/configure ++fsf/binutils/etc/configure.in ++fsf/binutils/etc/make-stds.texi ++fsf/binutils/etc/standards.texi ++fsf/binutils/gas/CONTRIBUTORS ++fsf/binutils/gas/COPYING ++fsf/binutils/gas/ChangeLog ++fsf/binutils/gas/ChangeLog.1 ++fsf/binutils/gas/Makefile.am ++fsf/binutils/gas/Makefile.in ++fsf/binutils/gas/NEWS ++fsf/binutils/gas/README ++fsf/binutils/gas/README-vms ++fsf/binutils/gas/acconfig.h ++fsf/binutils/gas/acinclude.m4 ++fsf/binutils/gas/aclocal.m4 ++fsf/binutils/gas/app.c ++fsf/binutils/gas/as.c ++fsf/binutils/gas/as.h ++fsf/binutils/gas/atof-generic.c ++fsf/binutils/gas/bignum-copy.c ++fsf/binutils/gas/bignum.h ++fsf/binutils/gas/bit_fix.h ++fsf/binutils/gas/cgen.c ++fsf/binutils/gas/cond.c ++fsf/binutils/gas/config-gas.com ++fsf/binutils/gas/config.in ++fsf/binutils/gas/config/amigaos.mh ++fsf/binutils/gas/config/aout_gnu.h ++fsf/binutils/gas/config/atof-ieee.c ++fsf/binutils/gas/config/atof-tahoe.c ++fsf/binutils/gas/config/atof-vax.c ++fsf/binutils/gas/config/e-i386coff.c ++fsf/binutils/gas/config/e-i386elf.c ++fsf/binutils/gas/config/e-mipsecoff.c ++fsf/binutils/gas/config/e-mipself.c ++fsf/binutils/gas/config/go32.cfg ++fsf/binutils/gas/config/itbl-mips.h ++fsf/binutils/gas/config/m68k-parse.h ++fsf/binutils/gas/config/m68k-parse.y ++fsf/binutils/gas/config/m88k-opcode.h ++fsf/binutils/gas/config/obj-amigahunk.c ++fsf/binutils/gas/config/obj-amigahunk.h ++fsf/binutils/gas/config/obj-aout.c ++fsf/binutils/gas/config/obj-aout.h ++fsf/binutils/gas/config/obj-bout.c ++fsf/binutils/gas/config/obj-bout.h ++fsf/binutils/gas/config/obj-coff.c ++fsf/binutils/gas/config/obj-coff.h ++fsf/binutils/gas/config/obj-ecoff.c ++fsf/binutils/gas/config/obj-ecoff.h ++fsf/binutils/gas/config/obj-elf.c ++fsf/binutils/gas/config/obj-elf.h ++fsf/binutils/gas/config/obj-evax.c ++fsf/binutils/gas/config/obj-evax.h ++fsf/binutils/gas/config/obj-generic.c ++fsf/binutils/gas/config/obj-generic.h ++fsf/binutils/gas/config/obj-hp300.c ++fsf/binutils/gas/config/obj-hp300.h ++fsf/binutils/gas/config/obj-ieee.c ++fsf/binutils/gas/config/obj-ieee.h ++fsf/binutils/gas/config/obj-multi.c ++fsf/binutils/gas/config/obj-multi.h ++fsf/binutils/gas/config/obj-som.c ++fsf/binutils/gas/config/obj-som.h ++fsf/binutils/gas/config/obj-vms.c ++fsf/binutils/gas/config/obj-vms.h ++fsf/binutils/gas/config/tc-a29k.c ++fsf/binutils/gas/config/tc-a29k.h ++fsf/binutils/gas/config/tc-alpha.c ++fsf/binutils/gas/config/tc-alpha.h ++fsf/binutils/gas/config/tc-arc.c ++fsf/binutils/gas/config/tc-arc.h ++fsf/binutils/gas/config/tc-arm.c ++fsf/binutils/gas/config/tc-arm.h ++fsf/binutils/gas/config/tc-d10v.c ++fsf/binutils/gas/config/tc-d10v.h ++fsf/binutils/gas/config/tc-generic.c ++fsf/binutils/gas/config/tc-generic.h ++fsf/binutils/gas/config/tc-h8300.c ++fsf/binutils/gas/config/tc-h8300.h ++fsf/binutils/gas/config/tc-h8500.c ++fsf/binutils/gas/config/tc-h8500.h ++fsf/binutils/gas/config/tc-hppa.c ++fsf/binutils/gas/config/tc-hppa.h ++fsf/binutils/gas/config/tc-i386.c ++fsf/binutils/gas/config/tc-i386.h ++fsf/binutils/gas/config/tc-i860.c ++fsf/binutils/gas/config/tc-i860.h ++fsf/binutils/gas/config/tc-i960.c ++fsf/binutils/gas/config/tc-i960.h ++fsf/binutils/gas/config/tc-m32r.c ++fsf/binutils/gas/config/tc-m32r.h ++fsf/binutils/gas/config/tc-m68851.h ++fsf/binutils/gas/config/tc-m68k.c ++fsf/binutils/gas/config/tc-m68k.h ++fsf/binutils/gas/config/tc-m88k.c ++fsf/binutils/gas/config/tc-m88k.h ++fsf/binutils/gas/config/tc-mips.c ++fsf/binutils/gas/config/tc-mips.h ++fsf/binutils/gas/config/tc-mn10200.c ++fsf/binutils/gas/config/tc-mn10200.h ++fsf/binutils/gas/config/tc-mn10300.c ++fsf/binutils/gas/config/tc-mn10300.h ++fsf/binutils/gas/config/tc-ns32k.c ++fsf/binutils/gas/config/tc-ns32k.h ++fsf/binutils/gas/config/tc-ppc.c ++fsf/binutils/gas/config/tc-ppc.h ++fsf/binutils/gas/config/tc-sh.c ++fsf/binutils/gas/config/tc-sh.h ++fsf/binutils/gas/config/tc-sparc.c ++fsf/binutils/gas/config/tc-sparc.h ++fsf/binutils/gas/config/tc-tahoe.c ++fsf/binutils/gas/config/tc-tahoe.h ++fsf/binutils/gas/config/tc-tic30.c ++fsf/binutils/gas/config/tc-tic30.h ++fsf/binutils/gas/config/tc-v850.c ++fsf/binutils/gas/config/tc-v850.h ++fsf/binutils/gas/config/tc-vax.c ++fsf/binutils/gas/config/tc-vax.h ++fsf/binutils/gas/config/tc-w65.c ++fsf/binutils/gas/config/tc-w65.h ++fsf/binutils/gas/config/tc-z8k.c ++fsf/binutils/gas/config/tc-z8k.h ++fsf/binutils/gas/config/te-386bsd.h ++fsf/binutils/gas/config/te-amiga.h ++fsf/binutils/gas/config/te-aux.h ++fsf/binutils/gas/config/te-delt88.h ++fsf/binutils/gas/config/te-delta.h ++fsf/binutils/gas/config/te-dpx2.h ++fsf/binutils/gas/config/te-dynix.h ++fsf/binutils/gas/config/te-generic.h ++fsf/binutils/gas/config/te-go32.h ++fsf/binutils/gas/config/te-hp300.h ++fsf/binutils/gas/config/te-hppa.h ++fsf/binutils/gas/config/te-i386aix.h ++fsf/binutils/gas/config/te-ic960.h ++fsf/binutils/gas/config/te-linux.h ++fsf/binutils/gas/config/te-lnews.h ++fsf/binutils/gas/config/te-lynx.h ++fsf/binutils/gas/config/te-mach.h ++fsf/binutils/gas/config/te-macos.h ++fsf/binutils/gas/config/te-multi.h ++fsf/binutils/gas/config/te-nbsd.h ++fsf/binutils/gas/config/te-nbsd532.h ++fsf/binutils/gas/config/te-pc532mach.h ++fsf/binutils/gas/config/te-pe.h ++fsf/binutils/gas/config/te-ppcnw.h ++fsf/binutils/gas/config/te-psos.h ++fsf/binutils/gas/config/te-riscix.h ++fsf/binutils/gas/config/te-sparcaout.h ++fsf/binutils/gas/config/te-sun3.h ++fsf/binutils/gas/config/te-svr4.h ++fsf/binutils/gas/config/te-sysv32.h ++fsf/binutils/gas/config/vax-inst.h ++fsf/binutils/gas/config/vms-a-conf.h ++fsf/binutils/gas/config/vms-conf.h ++fsf/binutils/gas/configure ++fsf/binutils/gas/configure.bat ++fsf/binutils/gas/configure.in ++fsf/binutils/gas/debug.c ++fsf/binutils/gas/dep-in.sed ++fsf/binutils/gas/depend.c ++fsf/binutils/gas/doc/Makefile.am ++fsf/binutils/gas/doc/Makefile.in ++fsf/binutils/gas/doc/all.texi ++fsf/binutils/gas/doc/as.1 ++fsf/binutils/gas/doc/as.texinfo ++fsf/binutils/gas/doc/c-a29k.texi ++fsf/binutils/gas/doc/c-arm.texi ++fsf/binutils/gas/doc/c-d10v.texi ++fsf/binutils/gas/doc/c-h8300.texi ++fsf/binutils/gas/doc/c-h8500.texi ++fsf/binutils/gas/doc/c-hppa.texi ++fsf/binutils/gas/doc/c-i386.texi ++fsf/binutils/gas/doc/c-i960.texi ++fsf/binutils/gas/doc/c-m32r.texi ++fsf/binutils/gas/doc/c-m68k.texi ++fsf/binutils/gas/doc/c-mips.texi ++fsf/binutils/gas/doc/c-ns32k.texi ++fsf/binutils/gas/doc/c-sh.texi ++fsf/binutils/gas/doc/c-sparc.texi ++fsf/binutils/gas/doc/c-v850.texi ++fsf/binutils/gas/doc/c-vax.texi ++fsf/binutils/gas/doc/c-z8k.texi ++fsf/binutils/gas/doc/gasp.texi ++fsf/binutils/gas/doc/h8.texi ++fsf/binutils/gas/doc/internals.texi ++fsf/binutils/gas/ecoff.c ++fsf/binutils/gas/ecoff.h ++fsf/binutils/gas/ehopt.c ++fsf/binutils/gas/emul-target.h ++fsf/binutils/gas/emul.h ++fsf/binutils/gas/expr.c ++fsf/binutils/gas/expr.h ++fsf/binutils/gas/flonum-copy.c ++fsf/binutils/gas/flonum-konst.c ++fsf/binutils/gas/flonum-mult.c ++fsf/binutils/gas/flonum.h ++fsf/binutils/gas/frags.c ++fsf/binutils/gas/frags.h ++fsf/binutils/gas/gasp.c ++fsf/binutils/gas/gdbinit.in ++fsf/binutils/gas/hash.c ++fsf/binutils/gas/hash.h ++fsf/binutils/gas/input-file.c ++fsf/binutils/gas/input-file.h ++fsf/binutils/gas/input-scrub.c ++fsf/binutils/gas/itbl-lex.c ++fsf/binutils/gas/itbl-lex.l ++fsf/binutils/gas/itbl-ops.c ++fsf/binutils/gas/itbl-ops.h ++fsf/binutils/gas/itbl-parse.c ++fsf/binutils/gas/itbl-parse.h ++fsf/binutils/gas/itbl-parse.y ++fsf/binutils/gas/link.cmd ++fsf/binutils/gas/listing.c ++fsf/binutils/gas/listing.h ++fsf/binutils/gas/literal.c ++fsf/binutils/gas/mac-as.r ++fsf/binutils/gas/macro.c ++fsf/binutils/gas/macro.h ++fsf/binutils/gas/make-gas.com ++fsf/binutils/gas/makefile.vms ++fsf/binutils/gas/messages.c ++fsf/binutils/gas/mpw-config.in ++fsf/binutils/gas/mpw-make.sed ++fsf/binutils/gas/obj.h ++fsf/binutils/gas/output-file.c ++fsf/binutils/gas/output-file.h ++fsf/binutils/gas/read.c ++fsf/binutils/gas/read.h ++fsf/binutils/gas/sb.c ++fsf/binutils/gas/sb.h ++fsf/binutils/gas/stabs.c ++fsf/binutils/gas/stamp-h.in ++fsf/binutils/gas/struc-symbol.h ++fsf/binutils/gas/subsegs.c ++fsf/binutils/gas/subsegs.h ++fsf/binutils/gas/symbols.c ++fsf/binutils/gas/symbols.h ++fsf/binutils/gas/tc.h ++fsf/binutils/gas/testsuite/ChangeLog ++fsf/binutils/gas/testsuite/config/default.exp ++fsf/binutils/gas/testsuite/gas/all/align.d ++fsf/binutils/gas/testsuite/gas/all/align.s ++fsf/binutils/gas/testsuite/gas/all/cofftag.d ++fsf/binutils/gas/testsuite/gas/all/cofftag.s ++fsf/binutils/gas/testsuite/gas/all/comment.s ++fsf/binutils/gas/testsuite/gas/all/cond.d ++fsf/binutils/gas/testsuite/gas/all/cond.s ++fsf/binutils/gas/testsuite/gas/all/diff1.s ++fsf/binutils/gas/testsuite/gas/all/float.s ++fsf/binutils/gas/testsuite/gas/all/gas.exp ++fsf/binutils/gas/testsuite/gas/all/itbl ++fsf/binutils/gas/testsuite/gas/all/itbl-test.c ++fsf/binutils/gas/testsuite/gas/all/itbl.s ++fsf/binutils/gas/testsuite/gas/all/p1480.s ++fsf/binutils/gas/testsuite/gas/all/p2425.s ++fsf/binutils/gas/testsuite/gas/all/struct.d ++fsf/binutils/gas/testsuite/gas/all/struct.s ++fsf/binutils/gas/testsuite/gas/all/x930509.s ++fsf/binutils/gas/testsuite/gas/alpha/fp.d ++fsf/binutils/gas/testsuite/gas/alpha/fp.exp ++fsf/binutils/gas/testsuite/gas/alpha/fp.s ++fsf/binutils/gas/testsuite/gas/arc/alias.d ++fsf/binutils/gas/testsuite/gas/arc/alias.s ++fsf/binutils/gas/testsuite/gas/arc/arc.exp ++fsf/binutils/gas/testsuite/gas/arc/branch.d ++fsf/binutils/gas/testsuite/gas/arc/branch.s ++fsf/binutils/gas/testsuite/gas/arc/flag.d ++fsf/binutils/gas/testsuite/gas/arc/flag.s ++fsf/binutils/gas/testsuite/gas/arc/insn3.d ++fsf/binutils/gas/testsuite/gas/arc/insn3.s ++fsf/binutils/gas/testsuite/gas/arc/j.d ++fsf/binutils/gas/testsuite/gas/arc/j.s ++fsf/binutils/gas/testsuite/gas/arc/ld.d ++fsf/binutils/gas/testsuite/gas/arc/ld.s ++fsf/binutils/gas/testsuite/gas/arc/math.d ++fsf/binutils/gas/testsuite/gas/arc/math.s ++fsf/binutils/gas/testsuite/gas/arc/sshift.d ++fsf/binutils/gas/testsuite/gas/arc/sshift.s ++fsf/binutils/gas/testsuite/gas/arc/st.d ++fsf/binutils/gas/testsuite/gas/arc/st.s ++fsf/binutils/gas/testsuite/gas/arc/warn.exp ++fsf/binutils/gas/testsuite/gas/arc/warn.s ++fsf/binutils/gas/testsuite/gas/arm/arch4t.s ++fsf/binutils/gas/testsuite/gas/arm/arm.exp ++fsf/binutils/gas/testsuite/gas/arm/arm3.s ++fsf/binutils/gas/testsuite/gas/arm/arm6.s ++fsf/binutils/gas/testsuite/gas/arm/arm7dm.s ++fsf/binutils/gas/testsuite/gas/arm/arm7t.d ++fsf/binutils/gas/testsuite/gas/arm/arm7t.s ++fsf/binutils/gas/testsuite/gas/arm/copro.s ++fsf/binutils/gas/testsuite/gas/arm/float.s ++fsf/binutils/gas/testsuite/gas/arm/immed.s ++fsf/binutils/gas/testsuite/gas/arm/inst.d ++fsf/binutils/gas/testsuite/gas/arm/inst.s ++fsf/binutils/gas/testsuite/gas/arm/le-fpconst.d ++fsf/binutils/gas/testsuite/gas/arm/le-fpconst.s ++fsf/binutils/gas/testsuite/gas/arm/thumb.s ++fsf/binutils/gas/testsuite/gas/h8300/addsub.s ++fsf/binutils/gas/testsuite/gas/h8300/addsubh.s ++fsf/binutils/gas/testsuite/gas/h8300/addsubs.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops1.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops1h.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops1s.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops2.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops2h.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops2s.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops3.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops3h.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops3s.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops4.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops4h.s ++fsf/binutils/gas/testsuite/gas/h8300/bitops4s.s ++fsf/binutils/gas/testsuite/gas/h8300/branch.s ++fsf/binutils/gas/testsuite/gas/h8300/branchh.s ++fsf/binutils/gas/testsuite/gas/h8300/branchs.s ++fsf/binutils/gas/testsuite/gas/h8300/cbranch.s ++fsf/binutils/gas/testsuite/gas/h8300/cbranchh.s ++fsf/binutils/gas/testsuite/gas/h8300/cbranchs.s ++fsf/binutils/gas/testsuite/gas/h8300/cmpsi2.s ++fsf/binutils/gas/testsuite/gas/h8300/compare.s ++fsf/binutils/gas/testsuite/gas/h8300/compareh.s ++fsf/binutils/gas/testsuite/gas/h8300/compares.s ++fsf/binutils/gas/testsuite/gas/h8300/decimal.s ++fsf/binutils/gas/testsuite/gas/h8300/decimalh.s ++fsf/binutils/gas/testsuite/gas/h8300/decimals.s ++fsf/binutils/gas/testsuite/gas/h8300/divmul.s ++fsf/binutils/gas/testsuite/gas/h8300/divmulh.s ++fsf/binutils/gas/testsuite/gas/h8300/divmuls.s ++fsf/binutils/gas/testsuite/gas/h8300/extendh.s ++fsf/binutils/gas/testsuite/gas/h8300/extends.s ++fsf/binutils/gas/testsuite/gas/h8300/ffxx1.d ++fsf/binutils/gas/testsuite/gas/h8300/ffxx1.s ++fsf/binutils/gas/testsuite/gas/h8300/h8300.exp ++fsf/binutils/gas/testsuite/gas/h8300/incdec.s ++fsf/binutils/gas/testsuite/gas/h8300/incdech.s ++fsf/binutils/gas/testsuite/gas/h8300/incdecs.s ++fsf/binutils/gas/testsuite/gas/h8300/logical.s ++fsf/binutils/gas/testsuite/gas/h8300/logicalh.s ++fsf/binutils/gas/testsuite/gas/h8300/logicals.s ++fsf/binutils/gas/testsuite/gas/h8300/macs.s ++fsf/binutils/gas/testsuite/gas/h8300/misc.s ++fsf/binutils/gas/testsuite/gas/h8300/misch.s ++fsf/binutils/gas/testsuite/gas/h8300/miscs.s ++fsf/binutils/gas/testsuite/gas/h8300/mov32bug.s ++fsf/binutils/gas/testsuite/gas/h8300/movb.s ++fsf/binutils/gas/testsuite/gas/h8300/movbh.s ++fsf/binutils/gas/testsuite/gas/h8300/movbs.s ++fsf/binutils/gas/testsuite/gas/h8300/movlh.s ++fsf/binutils/gas/testsuite/gas/h8300/movls.s ++fsf/binutils/gas/testsuite/gas/h8300/movw.s ++fsf/binutils/gas/testsuite/gas/h8300/movwh.s ++fsf/binutils/gas/testsuite/gas/h8300/movws.s ++fsf/binutils/gas/testsuite/gas/h8300/multiples.s ++fsf/binutils/gas/testsuite/gas/h8300/pushpop.s ++fsf/binutils/gas/testsuite/gas/h8300/pushpoph.s ++fsf/binutils/gas/testsuite/gas/h8300/pushpops.s ++fsf/binutils/gas/testsuite/gas/h8300/rotsh.s ++fsf/binutils/gas/testsuite/gas/h8300/rotshh.s ++fsf/binutils/gas/testsuite/gas/h8300/rotshs.s ++fsf/binutils/gas/testsuite/gas/hppa/README ++fsf/binutils/gas/testsuite/gas/hppa/basic/add.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/addi.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/basic.exp ++fsf/binutils/gas/testsuite/gas/hppa/basic/branch.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/comclr.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/copr.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/coprmem.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/dcor.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/deposit.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/ds.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/extract.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/fmem.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/fmemLRbug.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/fp_comp.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/fp_conv.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/fp_fcmp.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/fp_misc.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/imem.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/immed.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/logical.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/purge.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/sh1add.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/sh2add.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/sh3add.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/shift.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/special.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/spop.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/sub.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/subi.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/system.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/unit.s ++fsf/binutils/gas/testsuite/gas/hppa/basic/weird.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/align1.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/align2.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/appbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/badfmpyadd.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/block1.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/block2.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/calldatabug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/callinfobug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/defbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/entrybug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/exportbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/exprbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/fixup7bug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/global.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/labelbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/linesepbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/lselbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/nosubspace.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/parse.exp ++fsf/binutils/gas/testsuite/gas/hppa/parse/procbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/regpopbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/spacebug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/ssbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/stdreg.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/stringer.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/undefbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/versionbug.s ++fsf/binutils/gas/testsuite/gas/hppa/parse/xmpyubug.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/applybug.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/blebug.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/blebug2.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/blebug3.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/exitbug.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/fixupbug.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/funcrelocbug.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/labelopbug.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/longcall.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/picreloc.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/plabelbug.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/r_no_reloc.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/reduce.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/reduce2.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/reduce3.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/reloc.exp ++fsf/binutils/gas/testsuite/gas/hppa/reloc/roundmode.s ++fsf/binutils/gas/testsuite/gas/hppa/reloc/selectorbug.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/align3.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/align4.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/brlenbug.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/common.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/fragbug.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/globalbug.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/importbug.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/labeldiffs.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/locallabel.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/ss_align.s ++fsf/binutils/gas/testsuite/gas/hppa/unsorted/unsorted.exp ++fsf/binutils/gas/testsuite/gas/i386/all.exp ++fsf/binutils/gas/testsuite/gas/i386/inout.s ++fsf/binutils/gas/testsuite/gas/i386/pushw.l ++fsf/binutils/gas/testsuite/gas/i386/pushw.s ++fsf/binutils/gas/testsuite/gas/ieee-fp/x930509a.exp ++fsf/binutils/gas/testsuite/gas/ieee-fp/x930509a.s ++fsf/binutils/gas/testsuite/gas/m32r/allinsn.d ++fsf/binutils/gas/testsuite/gas/m32r/allinsn.exp ++fsf/binutils/gas/testsuite/gas/m32r/allinsn.s ++fsf/binutils/gas/testsuite/gas/m32r/high-1.d ++fsf/binutils/gas/testsuite/gas/m32r/high-1.s ++fsf/binutils/gas/testsuite/gas/m32r/m32r.exp ++fsf/binutils/gas/testsuite/gas/m32r/relax-1.d ++fsf/binutils/gas/testsuite/gas/m32r/relax-1.s ++fsf/binutils/gas/testsuite/gas/m32r/uppercase.d ++fsf/binutils/gas/testsuite/gas/m32r/uppercase.s ++fsf/binutils/gas/testsuite/gas/m68k-coff/gas.exp ++fsf/binutils/gas/testsuite/gas/m68k-coff/p2389.s ++fsf/binutils/gas/testsuite/gas/m68k-coff/p2389a.s ++fsf/binutils/gas/testsuite/gas/m68k-coff/p2430.s ++fsf/binutils/gas/testsuite/gas/m68k-coff/p2430a.s ++fsf/binutils/gas/testsuite/gas/m68k-coff/t1.s ++fsf/binutils/gas/testsuite/gas/m68k/all.exp ++fsf/binutils/gas/testsuite/gas/m68k/bitfield.d ++fsf/binutils/gas/testsuite/gas/m68k/bitfield.s ++fsf/binutils/gas/testsuite/gas/m68k/cas.d ++fsf/binutils/gas/testsuite/gas/m68k/cas.s ++fsf/binutils/gas/testsuite/gas/m68k/disperr.s ++fsf/binutils/gas/testsuite/gas/m68k/fmoveml.d ++fsf/binutils/gas/testsuite/gas/m68k/fmoveml.s ++fsf/binutils/gas/testsuite/gas/m68k/link.d ++fsf/binutils/gas/testsuite/gas/m68k/link.s ++fsf/binutils/gas/testsuite/gas/m68k/op68000.d ++fsf/binutils/gas/testsuite/gas/m68k/operands.d ++fsf/binutils/gas/testsuite/gas/m68k/operands.s ++fsf/binutils/gas/testsuite/gas/m68k/p2410.s ++fsf/binutils/gas/testsuite/gas/m68k/p2663.s ++fsf/binutils/gas/testsuite/gas/m68k/pcrel.d ++fsf/binutils/gas/testsuite/gas/m68k/pcrel.s ++fsf/binutils/gas/testsuite/gas/m68k/pic1.s ++fsf/binutils/gas/testsuite/gas/m68k/t2.d ++fsf/binutils/gas/testsuite/gas/m68k/t2.s ++fsf/binutils/gas/testsuite/gas/m88k/init.d ++fsf/binutils/gas/testsuite/gas/m88k/init.s ++fsf/binutils/gas/testsuite/gas/m88k/m88k.exp ++fsf/binutils/gas/testsuite/gas/macros/err.s ++fsf/binutils/gas/testsuite/gas/macros/irp.d ++fsf/binutils/gas/testsuite/gas/macros/irp.s ++fsf/binutils/gas/testsuite/gas/macros/macros.exp ++fsf/binutils/gas/testsuite/gas/macros/rept.d ++fsf/binutils/gas/testsuite/gas/macros/rept.s ++fsf/binutils/gas/testsuite/gas/macros/semi.d ++fsf/binutils/gas/testsuite/gas/macros/semi.s ++fsf/binutils/gas/testsuite/gas/macros/test1.d ++fsf/binutils/gas/testsuite/gas/macros/test1.s ++fsf/binutils/gas/testsuite/gas/macros/test2.d ++fsf/binutils/gas/testsuite/gas/macros/test2.s ++fsf/binutils/gas/testsuite/gas/macros/test3.d ++fsf/binutils/gas/testsuite/gas/macros/test3.s ++fsf/binutils/gas/testsuite/gas/mips/abs.d ++fsf/binutils/gas/testsuite/gas/mips/abs.s ++fsf/binutils/gas/testsuite/gas/mips/add.d ++fsf/binutils/gas/testsuite/gas/mips/add.s ++fsf/binutils/gas/testsuite/gas/mips/and.d ++fsf/binutils/gas/testsuite/gas/mips/and.s ++fsf/binutils/gas/testsuite/gas/mips/beq.d ++fsf/binutils/gas/testsuite/gas/mips/beq.s ++fsf/binutils/gas/testsuite/gas/mips/bge.d ++fsf/binutils/gas/testsuite/gas/mips/bge.s ++fsf/binutils/gas/testsuite/gas/mips/bgeu.d ++fsf/binutils/gas/testsuite/gas/mips/bgeu.s ++fsf/binutils/gas/testsuite/gas/mips/blt.d ++fsf/binutils/gas/testsuite/gas/mips/blt.s ++fsf/binutils/gas/testsuite/gas/mips/bltu.d ++fsf/binutils/gas/testsuite/gas/mips/bltu.s ++fsf/binutils/gas/testsuite/gas/mips/delay.d ++fsf/binutils/gas/testsuite/gas/mips/delay.s ++fsf/binutils/gas/testsuite/gas/mips/div-ilocks.d ++fsf/binutils/gas/testsuite/gas/mips/div.d ++fsf/binutils/gas/testsuite/gas/mips/div.s ++fsf/binutils/gas/testsuite/gas/mips/dli.d ++fsf/binutils/gas/testsuite/gas/mips/dli.s ++fsf/binutils/gas/testsuite/gas/mips/itbl ++fsf/binutils/gas/testsuite/gas/mips/itbl.s ++fsf/binutils/gas/testsuite/gas/mips/jal-empic.d ++fsf/binutils/gas/testsuite/gas/mips/jal-svr4pic.d ++fsf/binutils/gas/testsuite/gas/mips/jal-svr4pic.s ++fsf/binutils/gas/testsuite/gas/mips/jal-xgot.d ++fsf/binutils/gas/testsuite/gas/mips/jal.d ++fsf/binutils/gas/testsuite/gas/mips/jal.s ++fsf/binutils/gas/testsuite/gas/mips/la-empic.d ++fsf/binutils/gas/testsuite/gas/mips/la-empic.s ++fsf/binutils/gas/testsuite/gas/mips/la-svr4pic.d ++fsf/binutils/gas/testsuite/gas/mips/la-xgot.d ++fsf/binutils/gas/testsuite/gas/mips/la.d ++fsf/binutils/gas/testsuite/gas/mips/la.s ++fsf/binutils/gas/testsuite/gas/mips/lb-empic.d ++fsf/binutils/gas/testsuite/gas/mips/lb-pic.s ++fsf/binutils/gas/testsuite/gas/mips/lb-svr4pic.d ++fsf/binutils/gas/testsuite/gas/mips/lb-xgot-ilocks.d ++fsf/binutils/gas/testsuite/gas/mips/lb-xgot.d ++fsf/binutils/gas/testsuite/gas/mips/lb.d ++fsf/binutils/gas/testsuite/gas/mips/lb.s ++fsf/binutils/gas/testsuite/gas/mips/ld-empic.d ++fsf/binutils/gas/testsuite/gas/mips/ld-ilocks.d ++fsf/binutils/gas/testsuite/gas/mips/ld-pic.s ++fsf/binutils/gas/testsuite/gas/mips/ld-svr4pic.d ++fsf/binutils/gas/testsuite/gas/mips/ld-xgot.d ++fsf/binutils/gas/testsuite/gas/mips/ld.d ++fsf/binutils/gas/testsuite/gas/mips/ld.s ++fsf/binutils/gas/testsuite/gas/mips/li.d ++fsf/binutils/gas/testsuite/gas/mips/li.s ++fsf/binutils/gas/testsuite/gas/mips/lif-empic.d ++fsf/binutils/gas/testsuite/gas/mips/lif-svr4pic.d ++fsf/binutils/gas/testsuite/gas/mips/lif-xgot.d ++fsf/binutils/gas/testsuite/gas/mips/lifloat.d ++fsf/binutils/gas/testsuite/gas/mips/lifloat.s ++fsf/binutils/gas/testsuite/gas/mips/mips.exp ++fsf/binutils/gas/testsuite/gas/mips/mips16.d ++fsf/binutils/gas/testsuite/gas/mips/mips16.s ++fsf/binutils/gas/testsuite/gas/mips/mips4.d ++fsf/binutils/gas/testsuite/gas/mips/mips4.s ++fsf/binutils/gas/testsuite/gas/mips/mips4010.d ++fsf/binutils/gas/testsuite/gas/mips/mips4010.s ++fsf/binutils/gas/testsuite/gas/mips/mips4100.d ++fsf/binutils/gas/testsuite/gas/mips/mips4100.s ++fsf/binutils/gas/testsuite/gas/mips/mips4650.d ++fsf/binutils/gas/testsuite/gas/mips/mips4650.s ++fsf/binutils/gas/testsuite/gas/mips/mul-ilocks.d ++fsf/binutils/gas/testsuite/gas/mips/mul.d ++fsf/binutils/gas/testsuite/gas/mips/mul.s ++fsf/binutils/gas/testsuite/gas/mips/nodelay.d ++fsf/binutils/gas/testsuite/gas/mips/rol.d ++fsf/binutils/gas/testsuite/gas/mips/rol.s ++fsf/binutils/gas/testsuite/gas/mips/sb.d ++fsf/binutils/gas/testsuite/gas/mips/sb.s ++fsf/binutils/gas/testsuite/gas/mips/trunc.d ++fsf/binutils/gas/testsuite/gas/mips/trunc.s ++fsf/binutils/gas/testsuite/gas/mips/uld.d ++fsf/binutils/gas/testsuite/gas/mips/uld.s ++fsf/binutils/gas/testsuite/gas/mips/ulh-empic.d ++fsf/binutils/gas/testsuite/gas/mips/ulh-pic.s ++fsf/binutils/gas/testsuite/gas/mips/ulh-svr4pic.d ++fsf/binutils/gas/testsuite/gas/mips/ulh-xgot.d ++fsf/binutils/gas/testsuite/gas/mips/ulh.d ++fsf/binutils/gas/testsuite/gas/mips/ulh.s ++fsf/binutils/gas/testsuite/gas/mips/ulw.d ++fsf/binutils/gas/testsuite/gas/mips/ulw.s ++fsf/binutils/gas/testsuite/gas/mips/usd.d ++fsf/binutils/gas/testsuite/gas/mips/usd.s ++fsf/binutils/gas/testsuite/gas/mips/ush.d ++fsf/binutils/gas/testsuite/gas/mips/ush.s ++fsf/binutils/gas/testsuite/gas/mips/usw.d ++fsf/binutils/gas/testsuite/gas/mips/usw.s ++fsf/binutils/gas/testsuite/gas/mn10200/add.s ++fsf/binutils/gas/testsuite/gas/mn10200/basic.exp ++fsf/binutils/gas/testsuite/gas/mn10200/bcc.s ++fsf/binutils/gas/testsuite/gas/mn10200/bccx.s ++fsf/binutils/gas/testsuite/gas/mn10200/bit.s ++fsf/binutils/gas/testsuite/gas/mn10200/cmp.s ++fsf/binutils/gas/testsuite/gas/mn10200/ext.s ++fsf/binutils/gas/testsuite/gas/mn10200/logical.s ++fsf/binutils/gas/testsuite/gas/mn10200/mov1.s ++fsf/binutils/gas/testsuite/gas/mn10200/mov2.s ++fsf/binutils/gas/testsuite/gas/mn10200/mov3.s ++fsf/binutils/gas/testsuite/gas/mn10200/mov4.s ++fsf/binutils/gas/testsuite/gas/mn10200/movb.s ++fsf/binutils/gas/testsuite/gas/mn10200/movbu.s ++fsf/binutils/gas/testsuite/gas/mn10200/movx.s ++fsf/binutils/gas/testsuite/gas/mn10200/muldiv.s ++fsf/binutils/gas/testsuite/gas/mn10200/other.s ++fsf/binutils/gas/testsuite/gas/mn10200/shift.s ++fsf/binutils/gas/testsuite/gas/mn10200/sub.s ++fsf/binutils/gas/testsuite/gas/mn10300/add.s ++fsf/binutils/gas/testsuite/gas/mn10300/basic.exp ++fsf/binutils/gas/testsuite/gas/mn10300/bcc.s ++fsf/binutils/gas/testsuite/gas/mn10300/bit.s ++fsf/binutils/gas/testsuite/gas/mn10300/cmp.s ++fsf/binutils/gas/testsuite/gas/mn10300/ext.s ++fsf/binutils/gas/testsuite/gas/mn10300/extend.s ++fsf/binutils/gas/testsuite/gas/mn10300/logical.s ++fsf/binutils/gas/testsuite/gas/mn10300/loop.s ++fsf/binutils/gas/testsuite/gas/mn10300/mov1.s ++fsf/binutils/gas/testsuite/gas/mn10300/mov2.s ++fsf/binutils/gas/testsuite/gas/mn10300/mov3.s ++fsf/binutils/gas/testsuite/gas/mn10300/mov4.s ++fsf/binutils/gas/testsuite/gas/mn10300/movbu.s ++fsf/binutils/gas/testsuite/gas/mn10300/movhu.s ++fsf/binutils/gas/testsuite/gas/mn10300/movm.s ++fsf/binutils/gas/testsuite/gas/mn10300/muldiv.s ++fsf/binutils/gas/testsuite/gas/mn10300/other.s ++fsf/binutils/gas/testsuite/gas/mn10300/shift.s ++fsf/binutils/gas/testsuite/gas/mn10300/sub.s ++fsf/binutils/gas/testsuite/gas/mri/char.d ++fsf/binutils/gas/testsuite/gas/mri/char.s ++fsf/binutils/gas/testsuite/gas/mri/comment.d ++fsf/binutils/gas/testsuite/gas/mri/comment.s ++fsf/binutils/gas/testsuite/gas/mri/common.d ++fsf/binutils/gas/testsuite/gas/mri/common.s ++fsf/binutils/gas/testsuite/gas/mri/constants.d ++fsf/binutils/gas/testsuite/gas/mri/constants.s ++fsf/binutils/gas/testsuite/gas/mri/empty.s ++fsf/binutils/gas/testsuite/gas/mri/equ.d ++fsf/binutils/gas/testsuite/gas/mri/equ.s ++fsf/binutils/gas/testsuite/gas/mri/expr.d ++fsf/binutils/gas/testsuite/gas/mri/expr.s ++fsf/binutils/gas/testsuite/gas/mri/float.d ++fsf/binutils/gas/testsuite/gas/mri/float.s ++fsf/binutils/gas/testsuite/gas/mri/for.d ++fsf/binutils/gas/testsuite/gas/mri/for.s ++fsf/binutils/gas/testsuite/gas/mri/if.d ++fsf/binutils/gas/testsuite/gas/mri/if.s ++fsf/binutils/gas/testsuite/gas/mri/immconst.d ++fsf/binutils/gas/testsuite/gas/mri/label.d ++fsf/binutils/gas/testsuite/gas/mri/label.s ++fsf/binutils/gas/testsuite/gas/mri/moveml.d ++fsf/binutils/gas/testsuite/gas/mri/moveml.s ++fsf/binutils/gas/testsuite/gas/mri/mri.exp ++fsf/binutils/gas/testsuite/gas/mri/repeat.d ++fsf/binutils/gas/testsuite/gas/mri/repeat.s ++fsf/binutils/gas/testsuite/gas/mri/semi.d ++fsf/binutils/gas/testsuite/gas/mri/semi.s ++fsf/binutils/gas/testsuite/gas/mri/while.d ++fsf/binutils/gas/testsuite/gas/mri/while.s ++fsf/binutils/gas/testsuite/gas/ppc/astest.d ++fsf/binutils/gas/testsuite/gas/ppc/astest.s ++fsf/binutils/gas/testsuite/gas/ppc/astest2.d ++fsf/binutils/gas/testsuite/gas/ppc/astest2.s ++fsf/binutils/gas/testsuite/gas/ppc/ppc.exp ++fsf/binutils/gas/testsuite/gas/sh/basic.exp ++fsf/binutils/gas/testsuite/gas/sh/fp.s ++fsf/binutils/gas/testsuite/gas/sparc-solaris/addend.exp ++fsf/binutils/gas/testsuite/gas/sparc-solaris/addend.s ++fsf/binutils/gas/testsuite/gas/sparc-solaris/gas.exp ++fsf/binutils/gas/testsuite/gas/sparc-solaris/sol-cc.s ++fsf/binutils/gas/testsuite/gas/sparc-solaris/sol-gcc.s ++fsf/binutils/gas/testsuite/gas/sparc/asi.d ++fsf/binutils/gas/testsuite/gas/sparc/asi.s ++fsf/binutils/gas/testsuite/gas/sparc/membar.d ++fsf/binutils/gas/testsuite/gas/sparc/membar.s ++fsf/binutils/gas/testsuite/gas/sparc/mism-1.s ++fsf/binutils/gas/testsuite/gas/sparc/mismatch.exp ++fsf/binutils/gas/testsuite/gas/sparc/prefetch.d ++fsf/binutils/gas/testsuite/gas/sparc/prefetch.s ++fsf/binutils/gas/testsuite/gas/sparc/rdpr.d ++fsf/binutils/gas/testsuite/gas/sparc/rdpr.s ++fsf/binutils/gas/testsuite/gas/sparc/reloc64.d ++fsf/binutils/gas/testsuite/gas/sparc/reloc64.s ++fsf/binutils/gas/testsuite/gas/sparc/set64.d ++fsf/binutils/gas/testsuite/gas/sparc/set64.s ++fsf/binutils/gas/testsuite/gas/sparc/sparc.exp ++fsf/binutils/gas/testsuite/gas/sparc/splet-2.d ++fsf/binutils/gas/testsuite/gas/sparc/splet-2.s ++fsf/binutils/gas/testsuite/gas/sparc/splet.d ++fsf/binutils/gas/testsuite/gas/sparc/splet.s ++fsf/binutils/gas/testsuite/gas/sparc/synth.d ++fsf/binutils/gas/testsuite/gas/sparc/synth.s ++fsf/binutils/gas/testsuite/gas/sparc/synth64.d ++fsf/binutils/gas/testsuite/gas/sparc/synth64.s ++fsf/binutils/gas/testsuite/gas/sparc/wrpr.d ++fsf/binutils/gas/testsuite/gas/sparc/wrpr.s ++fsf/binutils/gas/testsuite/gas/sun4/addend.d ++fsf/binutils/gas/testsuite/gas/sun4/addend.exp ++fsf/binutils/gas/testsuite/gas/sun4/addend.s ++fsf/binutils/gas/testsuite/gas/template ++fsf/binutils/gas/testsuite/gas/v850/arith.s ++fsf/binutils/gas/testsuite/gas/v850/basic.exp ++fsf/binutils/gas/testsuite/gas/v850/bit.s ++fsf/binutils/gas/testsuite/gas/v850/branch.s ++fsf/binutils/gas/testsuite/gas/v850/compare.s ++fsf/binutils/gas/testsuite/gas/v850/fepsw.s ++fsf/binutils/gas/testsuite/gas/v850/hilo.s ++fsf/binutils/gas/testsuite/gas/v850/hilo2.s ++fsf/binutils/gas/testsuite/gas/v850/jumps.s ++fsf/binutils/gas/testsuite/gas/v850/logical.s ++fsf/binutils/gas/testsuite/gas/v850/mem.s ++fsf/binutils/gas/testsuite/gas/v850/misc.s ++fsf/binutils/gas/testsuite/gas/v850/move.s ++fsf/binutils/gas/testsuite/gas/v850/range.s ++fsf/binutils/gas/testsuite/gas/v850/reloc.s ++fsf/binutils/gas/testsuite/gas/vax/quad.exp ++fsf/binutils/gas/testsuite/gas/vax/quad.s ++fsf/binutils/gas/testsuite/gasp/INC1.H ++fsf/binutils/gas/testsuite/gasp/INC2.H ++fsf/binutils/gas/testsuite/gasp/assign.asm ++fsf/binutils/gas/testsuite/gasp/assign.err ++fsf/binutils/gas/testsuite/gasp/assign.out ++fsf/binutils/gas/testsuite/gasp/condass.asm ++fsf/binutils/gas/testsuite/gasp/condass.err ++fsf/binutils/gas/testsuite/gasp/condass.out ++fsf/binutils/gas/testsuite/gasp/crash.asm ++fsf/binutils/gas/testsuite/gasp/crash.err ++fsf/binutils/gas/testsuite/gasp/crash.out ++fsf/binutils/gas/testsuite/gasp/crash1.asm ++fsf/binutils/gas/testsuite/gasp/crash1.err ++fsf/binutils/gas/testsuite/gasp/crash1.out ++fsf/binutils/gas/testsuite/gasp/crash2.asm ++fsf/binutils/gas/testsuite/gasp/crash2.err ++fsf/binutils/gas/testsuite/gasp/crash2.out ++fsf/binutils/gas/testsuite/gasp/data.asm ++fsf/binutils/gas/testsuite/gasp/data.err ++fsf/binutils/gas/testsuite/gasp/data.out ++fsf/binutils/gas/testsuite/gasp/exp.asm ++fsf/binutils/gas/testsuite/gasp/exp.err ++fsf/binutils/gas/testsuite/gasp/exp.out ++fsf/binutils/gas/testsuite/gasp/gasp.exp ++fsf/binutils/gas/testsuite/gasp/include.asm ++fsf/binutils/gas/testsuite/gasp/include.err ++fsf/binutils/gas/testsuite/gasp/include.out ++fsf/binutils/gas/testsuite/gasp/listing.asm ++fsf/binutils/gas/testsuite/gasp/listing.err ++fsf/binutils/gas/testsuite/gasp/listing.out ++fsf/binutils/gas/testsuite/gasp/macro.asm ++fsf/binutils/gas/testsuite/gasp/macro.err ++fsf/binutils/gas/testsuite/gasp/macro.out ++fsf/binutils/gas/testsuite/gasp/mdouble.asm ++fsf/binutils/gas/testsuite/gasp/mdouble.err ++fsf/binutils/gas/testsuite/gasp/mdouble.out ++fsf/binutils/gas/testsuite/gasp/mri/embed.asm ++fsf/binutils/gas/testsuite/gasp/mri/embed.out ++fsf/binutils/gas/testsuite/gasp/mri/exists.asm ++fsf/binutils/gas/testsuite/gasp/mri/exists.out ++fsf/binutils/gas/testsuite/gasp/mri/irp.asm ++fsf/binutils/gas/testsuite/gasp/mri/irp.out ++fsf/binutils/gas/testsuite/gasp/mri/irpc.asm ++fsf/binutils/gas/testsuite/gasp/mri/irpc.out ++fsf/binutils/gas/testsuite/gasp/mri/macro.asm ++fsf/binutils/gas/testsuite/gasp/mri/macro.out ++fsf/binutils/gas/testsuite/gasp/mri/narg.asm ++fsf/binutils/gas/testsuite/gasp/mri/narg.out ++fsf/binutils/gas/testsuite/gasp/mri/rept.asm ++fsf/binutils/gas/testsuite/gasp/mri/rept.out ++fsf/binutils/gas/testsuite/gasp/pl1.asm ++fsf/binutils/gas/testsuite/gasp/pl1.err ++fsf/binutils/gas/testsuite/gasp/pl1.out ++fsf/binutils/gas/testsuite/gasp/pl2.asm ++fsf/binutils/gas/testsuite/gasp/pl2.err ++fsf/binutils/gas/testsuite/gasp/pl2.out ++fsf/binutils/gas/testsuite/gasp/pl3.asm ++fsf/binutils/gas/testsuite/gasp/pl3.err ++fsf/binutils/gas/testsuite/gasp/pl3.out ++fsf/binutils/gas/testsuite/gasp/pl4.asm ++fsf/binutils/gas/testsuite/gasp/pl4.err ++fsf/binutils/gas/testsuite/gasp/pl4.out ++fsf/binutils/gas/testsuite/gasp/pl5.asm ++fsf/binutils/gas/testsuite/gasp/pl5.err ++fsf/binutils/gas/testsuite/gasp/pl5.out ++fsf/binutils/gas/testsuite/gasp/pl6.asm ++fsf/binutils/gas/testsuite/gasp/pl6.err ++fsf/binutils/gas/testsuite/gasp/pl6.out ++fsf/binutils/gas/testsuite/gasp/pl7.asm ++fsf/binutils/gas/testsuite/gasp/pl7.err ++fsf/binutils/gas/testsuite/gasp/pl7.out ++fsf/binutils/gas/testsuite/gasp/pl8.asm ++fsf/binutils/gas/testsuite/gasp/pl8.err ++fsf/binutils/gas/testsuite/gasp/pl8.out ++fsf/binutils/gas/testsuite/gasp/pr7583.asm ++fsf/binutils/gas/testsuite/gasp/pr7583.err ++fsf/binutils/gas/testsuite/gasp/pr7583.out ++fsf/binutils/gas/testsuite/gasp/reg.asm ++fsf/binutils/gas/testsuite/gasp/reg.err ++fsf/binutils/gas/testsuite/gasp/reg.out ++fsf/binutils/gas/testsuite/gasp/rep.asm ++fsf/binutils/gas/testsuite/gasp/rep.err ++fsf/binutils/gas/testsuite/gasp/rep.out ++fsf/binutils/gas/testsuite/gasp/repeat.asm ++fsf/binutils/gas/testsuite/gasp/repeat.err ++fsf/binutils/gas/testsuite/gasp/repeat.out ++fsf/binutils/gas/testsuite/gasp/reperr.asm ++fsf/binutils/gas/testsuite/gasp/reperr.err ++fsf/binutils/gas/testsuite/gasp/reperr.out ++fsf/binutils/gas/testsuite/gasp/reperr1.asm ++fsf/binutils/gas/testsuite/gasp/reperr1.err ++fsf/binutils/gas/testsuite/gasp/reperr1.out ++fsf/binutils/gas/testsuite/gasp/reperr2.asm ++fsf/binutils/gas/testsuite/gasp/reperr2.err ++fsf/binutils/gas/testsuite/gasp/reperr2.out ++fsf/binutils/gas/testsuite/gasp/reperr3.asm ++fsf/binutils/gas/testsuite/gasp/reperr3.err ++fsf/binutils/gas/testsuite/gasp/reperr3.out ++fsf/binutils/gas/testsuite/gasp/sdata.asm ++fsf/binutils/gas/testsuite/gasp/sdata.err ++fsf/binutils/gas/testsuite/gasp/sdata.out ++fsf/binutils/gas/testsuite/gasp/sfunc.asm ++fsf/binutils/gas/testsuite/gasp/sfunc.err ++fsf/binutils/gas/testsuite/gasp/sfunc.out ++fsf/binutils/gas/testsuite/gasp/t1.asm ++fsf/binutils/gas/testsuite/gasp/t1.err ++fsf/binutils/gas/testsuite/gasp/t1.out ++fsf/binutils/gas/testsuite/gasp/t2.asm ++fsf/binutils/gas/testsuite/gasp/t2.err ++fsf/binutils/gas/testsuite/gasp/t2.out ++fsf/binutils/gas/testsuite/gasp/t3.asm ++fsf/binutils/gas/testsuite/gasp/t3.err ++fsf/binutils/gas/testsuite/gasp/t3.out ++fsf/binutils/gas/testsuite/gasp/while.asm ++fsf/binutils/gas/testsuite/gasp/while.err ++fsf/binutils/gas/testsuite/gasp/while.out ++fsf/binutils/gas/testsuite/lib/doboth ++fsf/binutils/gas/testsuite/lib/doobjcmp ++fsf/binutils/gas/testsuite/lib/dostriptest ++fsf/binutils/gas/testsuite/lib/dotest ++fsf/binutils/gas/testsuite/lib/dounsreloc ++fsf/binutils/gas/testsuite/lib/dounssym ++fsf/binutils/gas/testsuite/lib/gas-defs.exp ++fsf/binutils/gas/testsuite/lib/gas-dg.exp ++fsf/binutils/gas/testsuite/lib/run ++fsf/binutils/gas/vmsconf.sh ++fsf/binutils/gas/write.c ++fsf/binutils/gas/write.h ++fsf/binutils/gprof/.gdbinit ++fsf/binutils/gprof/ChangeLog ++fsf/binutils/gprof/Makefile.am ++fsf/binutils/gprof/Makefile.in ++fsf/binutils/gprof/NOTES ++fsf/binutils/gprof/TEST ++fsf/binutils/gprof/TODO ++fsf/binutils/gprof/acconfig.h ++fsf/binutils/gprof/aclocal.m4 ++fsf/binutils/gprof/alpha.c ++fsf/binutils/gprof/basic_blocks.c ++fsf/binutils/gprof/basic_blocks.h ++fsf/binutils/gprof/bb_exit_func.c ++fsf/binutils/gprof/bbconv.pl ++fsf/binutils/gprof/bsd_callg_bl.m ++fsf/binutils/gprof/call_graph.c ++fsf/binutils/gprof/call_graph.h ++fsf/binutils/gprof/cg_arcs.c ++fsf/binutils/gprof/cg_arcs.h ++fsf/binutils/gprof/cg_dfn.c ++fsf/binutils/gprof/cg_dfn.h ++fsf/binutils/gprof/cg_print.c ++fsf/binutils/gprof/cg_print.h ++fsf/binutils/gprof/configure ++fsf/binutils/gprof/configure.bat ++fsf/binutils/gprof/configure.in ++fsf/binutils/gprof/core.c ++fsf/binutils/gprof/core.h ++fsf/binutils/gprof/flat_bl.c ++fsf/binutils/gprof/flat_bl.m ++fsf/binutils/gprof/fsf_callg_bl.m ++fsf/binutils/gprof/gconfig.in ++fsf/binutils/gprof/gen-c-prog.awk ++fsf/binutils/gprof/gmon.h ++fsf/binutils/gprof/gmon_io.c ++fsf/binutils/gprof/gmon_io.h ++fsf/binutils/gprof/gmon_out.h ++fsf/binutils/gprof/gprof.1 ++fsf/binutils/gprof/gprof.c ++fsf/binutils/gprof/gprof.h ++fsf/binutils/gprof/gprof.info-1 ++fsf/binutils/gprof/gprof.info-2 ++fsf/binutils/gprof/gprof.texi ++fsf/binutils/gprof/hertz.c ++fsf/binutils/gprof/hertz.h ++fsf/binutils/gprof/hist.c ++fsf/binutils/gprof/hist.h ++fsf/binutils/gprof/i386.c ++fsf/binutils/gprof/search_list.c ++fsf/binutils/gprof/search_list.h ++fsf/binutils/gprof/source.c ++fsf/binutils/gprof/source.h ++fsf/binutils/gprof/sparc.c ++fsf/binutils/gprof/stamp-h.in ++fsf/binutils/gprof/sym_ids.c ++fsf/binutils/gprof/sym_ids.h ++fsf/binutils/gprof/symtab.c ++fsf/binutils/gprof/symtab.h ++fsf/binutils/gprof/tahoe.c ++fsf/binutils/gprof/utils.c ++fsf/binutils/gprof/utils.h ++fsf/binutils/gprof/vax.c ++fsf/binutils/include/COPYING ++fsf/binutils/include/ChangeLog ++fsf/binutils/include/ansidecl.h ++fsf/binutils/include/aout/ChangeLog ++fsf/binutils/include/aout/adobe.h ++fsf/binutils/include/aout/aout64.h ++fsf/binutils/include/aout/ar.h ++fsf/binutils/include/aout/dynix3.h ++fsf/binutils/include/aout/encap.h ++fsf/binutils/include/aout/host.h ++fsf/binutils/include/aout/hp.h ++fsf/binutils/include/aout/hp300hpux.h ++fsf/binutils/include/aout/hppa.h ++fsf/binutils/include/aout/ranlib.h ++fsf/binutils/include/aout/reloc.h ++fsf/binutils/include/aout/stab.def ++fsf/binutils/include/aout/stab_gnu.h ++fsf/binutils/include/aout/sun4.h ++fsf/binutils/include/bfdlink.h ++fsf/binutils/include/bout.h ++fsf/binutils/include/callback.h ++fsf/binutils/include/coff/ChangeLog ++fsf/binutils/include/coff/a29k.h ++fsf/binutils/include/coff/alpha.h ++fsf/binutils/include/coff/apollo.h ++fsf/binutils/include/coff/arm.h ++fsf/binutils/include/coff/aux-coff.h ++fsf/binutils/include/coff/ecoff.h ++fsf/binutils/include/coff/go32exe.h ++fsf/binutils/include/coff/h8300.h ++fsf/binutils/include/coff/h8500.h ++fsf/binutils/include/coff/i386.h ++fsf/binutils/include/coff/i860.h ++fsf/binutils/include/coff/i960.h ++fsf/binutils/include/coff/internal.h ++fsf/binutils/include/coff/m68k.h ++fsf/binutils/include/coff/m88k.h ++fsf/binutils/include/coff/mips.h ++fsf/binutils/include/coff/pe.h ++fsf/binutils/include/coff/powerpc.h ++fsf/binutils/include/coff/rs6000.h ++fsf/binutils/include/coff/sh.h ++fsf/binutils/include/coff/sparc.h ++fsf/binutils/include/coff/sym.h ++fsf/binutils/include/coff/symconst.h ++fsf/binutils/include/coff/tic30.h ++fsf/binutils/include/coff/w65.h ++fsf/binutils/include/coff/we32k.h ++fsf/binutils/include/coff/z8k.h ++fsf/binutils/include/demangle.h ++fsf/binutils/include/dis-asm.h ++fsf/binutils/include/elf/ChangeLog ++fsf/binutils/include/elf/alpha.h ++fsf/binutils/include/elf/arc.h ++fsf/binutils/include/elf/common.h ++fsf/binutils/include/elf/dwarf.h ++fsf/binutils/include/elf/dwarf2.h ++fsf/binutils/include/elf/external.h ++fsf/binutils/include/elf/hppa.h ++fsf/binutils/include/elf/internal.h ++fsf/binutils/include/elf/m32r.h ++fsf/binutils/include/elf/mips.h ++fsf/binutils/include/elf/ppc.h ++fsf/binutils/include/elf/sparc.h ++fsf/binutils/include/elf/v850.h ++fsf/binutils/include/floatformat.h ++fsf/binutils/include/fnmatch.h ++fsf/binutils/include/fopen-bin.h ++fsf/binutils/include/fopen-same.h ++fsf/binutils/include/fopen-vms.h ++fsf/binutils/include/gdbm.h ++fsf/binutils/include/getopt.h ++fsf/binutils/include/hp-symtab.h ++fsf/binutils/include/ieee.h ++fsf/binutils/include/libiberty.h ++fsf/binutils/include/mpw/ChangeLog ++fsf/binutils/include/mpw/README ++fsf/binutils/include/mpw/dir.h ++fsf/binutils/include/mpw/dirent.h ++fsf/binutils/include/mpw/fcntl.h ++fsf/binutils/include/mpw/grp.h ++fsf/binutils/include/mpw/mpw.h ++fsf/binutils/include/mpw/pwd.h ++fsf/binutils/include/mpw/spin.h ++fsf/binutils/include/mpw/stat.h ++fsf/binutils/include/mpw/sys/file.h ++fsf/binutils/include/mpw/sys/param.h ++fsf/binutils/include/mpw/sys/resource.h ++fsf/binutils/include/mpw/sys/stat.h ++fsf/binutils/include/mpw/sys/time.h ++fsf/binutils/include/mpw/sys/types.h ++fsf/binutils/include/mpw/utime.h ++fsf/binutils/include/mpw/varargs.h ++fsf/binutils/include/nlm/ChangeLog ++fsf/binutils/include/nlm/alpha-ext.h ++fsf/binutils/include/nlm/common.h ++fsf/binutils/include/nlm/external.h ++fsf/binutils/include/nlm/i386-ext.h ++fsf/binutils/include/nlm/internal.h ++fsf/binutils/include/nlm/ppc-ext.h ++fsf/binutils/include/nlm/sparc32-ext.h ++fsf/binutils/include/oasys.h ++fsf/binutils/include/objalloc.h ++fsf/binutils/include/obstack.h ++fsf/binutils/include/opcode/ChangeLog ++fsf/binutils/include/opcode/a29k.h ++fsf/binutils/include/opcode/alpha.h ++fsf/binutils/include/opcode/arc.h ++fsf/binutils/include/opcode/arm.h ++fsf/binutils/include/opcode/cgen.h ++fsf/binutils/include/opcode/convex.h ++fsf/binutils/include/opcode/d10v.h ++fsf/binutils/include/opcode/h8300.h ++fsf/binutils/include/opcode/hppa.h ++fsf/binutils/include/opcode/i386.h ++fsf/binutils/include/opcode/i860.h ++fsf/binutils/include/opcode/i960.h ++fsf/binutils/include/opcode/m68k.h ++fsf/binutils/include/opcode/m88k.h ++fsf/binutils/include/opcode/mips.h ++fsf/binutils/include/opcode/mn10200.h ++fsf/binutils/include/opcode/mn10300.h ++fsf/binutils/include/opcode/np1.h ++fsf/binutils/include/opcode/ns32k.h ++fsf/binutils/include/opcode/pn.h ++fsf/binutils/include/opcode/ppc.h ++fsf/binutils/include/opcode/pyr.h ++fsf/binutils/include/opcode/sparc.h ++fsf/binutils/include/opcode/tahoe.h ++fsf/binutils/include/opcode/tic30.h ++fsf/binutils/include/opcode/v850.h ++fsf/binutils/include/opcode/vax.h ++fsf/binutils/include/os9k.h ++fsf/binutils/include/progress.h ++fsf/binutils/include/regs/ChangeLog ++fsf/binutils/include/remote-sim.h ++fsf/binutils/include/symcat.h ++fsf/binutils/include/wait.h ++fsf/binutils/install-sh ++fsf/binutils/ld/ChangeLog ++fsf/binutils/ld/Makefile.am ++fsf/binutils/ld/Makefile.in ++fsf/binutils/ld/NEWS ++fsf/binutils/ld/README ++fsf/binutils/ld/TODO ++fsf/binutils/ld/acconfig.h ++fsf/binutils/ld/acinclude.m4 ++fsf/binutils/ld/aclocal.m4 ++fsf/binutils/ld/beos-ld.c ++fsf/binutils/ld/config.in ++fsf/binutils/ld/configure ++fsf/binutils/ld/configure.bat ++fsf/binutils/ld/configure.host ++fsf/binutils/ld/configure.in ++fsf/binutils/ld/configure.tgt ++fsf/binutils/ld/dep-in.sed ++fsf/binutils/ld/emulparams/README ++fsf/binutils/ld/emulparams/a29k.sh ++fsf/binutils/ld/emulparams/aixppc.sh ++fsf/binutils/ld/emulparams/aixrs6.sh ++fsf/binutils/ld/emulparams/alpha.sh ++fsf/binutils/ld/emulparams/amiga.sh ++fsf/binutils/ld/emulparams/amiga_bss.sh ++fsf/binutils/ld/emulparams/arcelf.sh ++fsf/binutils/ld/emulparams/armaoutb.sh ++fsf/binutils/ld/emulparams/armaoutl.sh ++fsf/binutils/ld/emulparams/armcoff.sh ++fsf/binutils/ld/emulparams/armpe.sh ++fsf/binutils/ld/emulparams/coff_sparc.sh ++fsf/binutils/ld/emulparams/d10velf.sh ++fsf/binutils/ld/emulparams/delta68.sh ++fsf/binutils/ld/emulparams/ebmon29k.sh ++fsf/binutils/ld/emulparams/elf32_sparc.sh ++fsf/binutils/ld/emulparams/elf32b4300.sh ++fsf/binutils/ld/emulparams/elf32bmip.sh ++fsf/binutils/ld/emulparams/elf32bsmip.sh ++fsf/binutils/ld/emulparams/elf32ebmip.sh ++fsf/binutils/ld/emulparams/elf32elmip.sh ++fsf/binutils/ld/emulparams/elf32l4300.sh ++fsf/binutils/ld/emulparams/elf32lmip.sh ++fsf/binutils/ld/emulparams/elf32lppc.sh ++fsf/binutils/ld/emulparams/elf32lsmip.sh ++fsf/binutils/ld/emulparams/elf32ppc.sh ++fsf/binutils/ld/emulparams/elf64_sparc.sh ++fsf/binutils/ld/emulparams/elf64alpha.sh ++fsf/binutils/ld/emulparams/elf_i386.sh ++fsf/binutils/ld/emulparams/gld960.sh ++fsf/binutils/ld/emulparams/gld960coff.sh ++fsf/binutils/ld/emulparams/go32.sh ++fsf/binutils/ld/emulparams/h8300.sh ++fsf/binutils/ld/emulparams/h8300h.sh ++fsf/binutils/ld/emulparams/h8300s.sh ++fsf/binutils/ld/emulparams/h8500.sh ++fsf/binutils/ld/emulparams/h8500b.sh ++fsf/binutils/ld/emulparams/h8500c.sh ++fsf/binutils/ld/emulparams/h8500m.sh ++fsf/binutils/ld/emulparams/h8500s.sh ++fsf/binutils/ld/emulparams/hp300bsd.sh ++fsf/binutils/ld/emulparams/hp3hpux.sh ++fsf/binutils/ld/emulparams/hppaelf.sh ++fsf/binutils/ld/emulparams/i386aout.sh ++fsf/binutils/ld/emulparams/i386beos.sh ++fsf/binutils/ld/emulparams/i386bsd.sh ++fsf/binutils/ld/emulparams/i386coff.sh ++fsf/binutils/ld/emulparams/i386go32.sh ++fsf/binutils/ld/emulparams/i386linux.sh ++fsf/binutils/ld/emulparams/i386lynx.sh ++fsf/binutils/ld/emulparams/i386mach.sh ++fsf/binutils/ld/emulparams/i386moss.sh ++fsf/binutils/ld/emulparams/i386msdos.sh ++fsf/binutils/ld/emulparams/i386nbsd.sh ++fsf/binutils/ld/emulparams/i386nw.sh ++fsf/binutils/ld/emulparams/i386pe.sh ++fsf/binutils/ld/emulparams/lnk960.sh ++fsf/binutils/ld/emulparams/m32relf.sh ++fsf/binutils/ld/emulparams/m68k4knbsd.sh ++fsf/binutils/ld/emulparams/m68kaout.sh ++fsf/binutils/ld/emulparams/m68kaux.sh ++fsf/binutils/ld/emulparams/m68kcoff.sh ++fsf/binutils/ld/emulparams/m68kelf.sh ++fsf/binutils/ld/emulparams/m68klinux.sh ++fsf/binutils/ld/emulparams/m68klynx.sh ++fsf/binutils/ld/emulparams/m68knbsd.sh ++fsf/binutils/ld/emulparams/m68kpsos.sh ++fsf/binutils/ld/emulparams/m88kbcs.sh ++fsf/binutils/ld/emulparams/mipsbig.sh ++fsf/binutils/ld/emulparams/mipsbsd.sh ++fsf/binutils/ld/emulparams/mipsidt.sh ++fsf/binutils/ld/emulparams/mipsidtl.sh ++fsf/binutils/ld/emulparams/mipslit.sh ++fsf/binutils/ld/emulparams/mipslnews.sh ++fsf/binutils/ld/emulparams/mn10200.sh ++fsf/binutils/ld/emulparams/mn10300.sh ++fsf/binutils/ld/emulparams/news.sh ++fsf/binutils/ld/emulparams/ns32knbsd.sh ++fsf/binutils/ld/emulparams/pc532macha.sh ++fsf/binutils/ld/emulparams/ppcamiga.sh ++fsf/binutils/ld/emulparams/ppcamiga_bss.sh ++fsf/binutils/ld/emulparams/ppcmacos.sh ++fsf/binutils/ld/emulparams/ppcnw.sh ++fsf/binutils/ld/emulparams/ppcpe.sh ++fsf/binutils/ld/emulparams/riscix.sh ++fsf/binutils/ld/emulparams/sa29200.sh ++fsf/binutils/ld/emulparams/sh.sh ++fsf/binutils/ld/emulparams/shelf.sh ++fsf/binutils/ld/emulparams/shl.sh ++fsf/binutils/ld/emulparams/shlelf.sh ++fsf/binutils/ld/emulparams/sparcaout.sh ++fsf/binutils/ld/emulparams/sparclinux.sh ++fsf/binutils/ld/emulparams/sparclynx.sh ++fsf/binutils/ld/emulparams/sparcnbsd.sh ++fsf/binutils/ld/emulparams/st2000.sh ++fsf/binutils/ld/emulparams/sun3.sh ++fsf/binutils/ld/emulparams/sun4.sh ++fsf/binutils/ld/emulparams/tic30aout.sh ++fsf/binutils/ld/emulparams/tic30coff.sh ++fsf/binutils/ld/emulparams/v850.sh ++fsf/binutils/ld/emulparams/vanilla.sh ++fsf/binutils/ld/emulparams/vax.sh ++fsf/binutils/ld/emulparams/vsta.sh ++fsf/binutils/ld/emulparams/w65.sh ++fsf/binutils/ld/emulparams/z8001.sh ++fsf/binutils/ld/emulparams/z8002.sh ++fsf/binutils/ld/emultempl/README ++fsf/binutils/ld/emultempl/aix.em ++fsf/binutils/ld/emultempl/amiga.em ++fsf/binutils/ld/emultempl/armcoff.em ++fsf/binutils/ld/emultempl/beos.em ++fsf/binutils/ld/emultempl/elf32.em ++fsf/binutils/ld/emultempl/generic.em ++fsf/binutils/ld/emultempl/gld960.em ++fsf/binutils/ld/emultempl/gld960c.em ++fsf/binutils/ld/emultempl/hppaelf.em ++fsf/binutils/ld/emultempl/linux.em ++fsf/binutils/ld/emultempl/lnk960.em ++fsf/binutils/ld/emultempl/mipsecoff.em ++fsf/binutils/ld/emultempl/pe.em ++fsf/binutils/ld/emultempl/stringify.sed ++fsf/binutils/ld/emultempl/sunos.em ++fsf/binutils/ld/emultempl/vanilla.em ++fsf/binutils/ld/gen-doc.texi ++fsf/binutils/ld/genscripts.sh ++fsf/binutils/ld/h8-doc.texi ++fsf/binutils/ld/ld.1 ++fsf/binutils/ld/ld.h ++fsf/binutils/ld/ld.texinfo ++fsf/binutils/ld/ldcref.c ++fsf/binutils/ld/ldctor.c ++fsf/binutils/ld/ldctor.h ++fsf/binutils/ld/ldemul.c ++fsf/binutils/ld/ldemul.h ++fsf/binutils/ld/ldexp.c ++fsf/binutils/ld/ldexp.h ++fsf/binutils/ld/ldfile.c ++fsf/binutils/ld/ldfile.h ++fsf/binutils/ld/ldgram.y ++fsf/binutils/ld/ldint.texinfo ++fsf/binutils/ld/ldlang.c ++fsf/binutils/ld/ldlang.h ++fsf/binutils/ld/ldlex.h ++fsf/binutils/ld/ldlex.l ++fsf/binutils/ld/ldmain.c ++fsf/binutils/ld/ldmain.h ++fsf/binutils/ld/ldmisc.c ++fsf/binutils/ld/ldmisc.h ++fsf/binutils/ld/ldver.c ++fsf/binutils/ld/ldver.h ++fsf/binutils/ld/ldwrite.c ++fsf/binutils/ld/ldwrite.h ++fsf/binutils/ld/lexsup.c ++fsf/binutils/ld/mac-ld.r ++fsf/binutils/ld/mpw-config.in ++fsf/binutils/ld/mpw-elfmips.c ++fsf/binutils/ld/mpw-eppcmac.c ++fsf/binutils/ld/mpw-esh.c ++fsf/binutils/ld/mpw-idtmips.c ++fsf/binutils/ld/mpw-make.sed ++fsf/binutils/ld/mri.c ++fsf/binutils/ld/mri.h ++fsf/binutils/ld/scripttempl/README ++fsf/binutils/ld/scripttempl/a29k.sc ++fsf/binutils/ld/scripttempl/aix.sc ++fsf/binutils/ld/scripttempl/alpha.sc ++fsf/binutils/ld/scripttempl/amiga.sc ++fsf/binutils/ld/scripttempl/amiga_bss.sc ++fsf/binutils/ld/scripttempl/aout.sc ++fsf/binutils/ld/scripttempl/armaout.sc ++fsf/binutils/ld/scripttempl/armcoff.sc ++fsf/binutils/ld/scripttempl/delta68.sc ++fsf/binutils/ld/scripttempl/ebmon29k.sc ++fsf/binutils/ld/scripttempl/elf.sc ++fsf/binutils/ld/scripttempl/elfd10v.sc ++fsf/binutils/ld/scripttempl/elfppc.sc ++fsf/binutils/ld/scripttempl/go32coff.sc ++fsf/binutils/ld/scripttempl/h8300.sc ++fsf/binutils/ld/scripttempl/h8300h.sc ++fsf/binutils/ld/scripttempl/h8300s.sc ++fsf/binutils/ld/scripttempl/h8500.sc ++fsf/binutils/ld/scripttempl/h8500b.sc ++fsf/binutils/ld/scripttempl/h8500c.sc ++fsf/binutils/ld/scripttempl/h8500m.sc ++fsf/binutils/ld/scripttempl/h8500s.sc ++fsf/binutils/ld/scripttempl/hppaelf.sc ++fsf/binutils/ld/scripttempl/i386beos.sc ++fsf/binutils/ld/scripttempl/i386coff.sc ++fsf/binutils/ld/scripttempl/i386go32.sc ++fsf/binutils/ld/scripttempl/i386lynx.sc ++fsf/binutils/ld/scripttempl/i386msdos.sc ++fsf/binutils/ld/scripttempl/i960.sc ++fsf/binutils/ld/scripttempl/m68kaux.sc ++fsf/binutils/ld/scripttempl/m68kcoff.sc ++fsf/binutils/ld/scripttempl/m68klynx.sc ++fsf/binutils/ld/scripttempl/m88kbcs.sc ++fsf/binutils/ld/scripttempl/mips.sc ++fsf/binutils/ld/scripttempl/mipsbsd.sc ++fsf/binutils/ld/scripttempl/nw.sc ++fsf/binutils/ld/scripttempl/pe.sc ++fsf/binutils/ld/scripttempl/ppcpe.sc ++fsf/binutils/ld/scripttempl/psos.sc ++fsf/binutils/ld/scripttempl/riscix.sc ++fsf/binutils/ld/scripttempl/sa29200.sc ++fsf/binutils/ld/scripttempl/sh.sc ++fsf/binutils/ld/scripttempl/sparccoff.sc ++fsf/binutils/ld/scripttempl/sparclynx.sc ++fsf/binutils/ld/scripttempl/st2000.sc ++fsf/binutils/ld/scripttempl/tic30aout.sc ++fsf/binutils/ld/scripttempl/tic30coff.sc ++fsf/binutils/ld/scripttempl/v850.sc ++fsf/binutils/ld/scripttempl/vanilla.sc ++fsf/binutils/ld/scripttempl/w65.sc ++fsf/binutils/ld/scripttempl/z8000.sc ++fsf/binutils/ld/stamp-h.in ++fsf/binutils/ld/sysdep.h ++fsf/binutils/ld/testsuite/ChangeLog ++fsf/binutils/ld/testsuite/config/default.exp ++fsf/binutils/ld/testsuite/ld-bootstrap/bootstrap.exp ++fsf/binutils/ld/testsuite/ld-cdtest/cdtest-bar.cc ++fsf/binutils/ld/testsuite/ld-cdtest/cdtest-foo.cc ++fsf/binutils/ld/testsuite/ld-cdtest/cdtest-foo.h ++fsf/binutils/ld/testsuite/ld-cdtest/cdtest-main.cc ++fsf/binutils/ld/testsuite/ld-cdtest/cdtest.dat ++fsf/binutils/ld/testsuite/ld-cdtest/cdtest.exp ++fsf/binutils/ld/testsuite/ld-elfvers/vers.exp ++fsf/binutils/ld/testsuite/ld-elfvers/vers1.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers1.dsym ++fsf/binutils/ld/testsuite/ld-elfvers/vers1.map ++fsf/binutils/ld/testsuite/ld-elfvers/vers1.sym ++fsf/binutils/ld/testsuite/ld-elfvers/vers1.ver ++fsf/binutils/ld/testsuite/ld-elfvers/vers13.asym ++fsf/binutils/ld/testsuite/ld-elfvers/vers15.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers15.dsym ++fsf/binutils/ld/testsuite/ld-elfvers/vers15.sym ++fsf/binutils/ld/testsuite/ld-elfvers/vers15.ver ++fsf/binutils/ld/testsuite/ld-elfvers/vers2.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers2.dsym ++fsf/binutils/ld/testsuite/ld-elfvers/vers2.map ++fsf/binutils/ld/testsuite/ld-elfvers/vers2.ver ++fsf/binutils/ld/testsuite/ld-elfvers/vers3.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers3.dsym ++fsf/binutils/ld/testsuite/ld-elfvers/vers3.ver ++fsf/binutils/ld/testsuite/ld-elfvers/vers4.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers4.sym ++fsf/binutils/ld/testsuite/ld-elfvers/vers4a.dsym ++fsf/binutils/ld/testsuite/ld-elfvers/vers4a.sym ++fsf/binutils/ld/testsuite/ld-elfvers/vers4a.ver ++fsf/binutils/ld/testsuite/ld-elfvers/vers5.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers6.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers6.dsym ++fsf/binutils/ld/testsuite/ld-elfvers/vers6.sym ++fsf/binutils/ld/testsuite/ld-elfvers/vers6.ver ++fsf/binutils/ld/testsuite/ld-elfvers/vers7.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers7.map ++fsf/binutils/ld/testsuite/ld-elfvers/vers7a.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers7a.dsym ++fsf/binutils/ld/testsuite/ld-elfvers/vers7a.sym ++fsf/binutils/ld/testsuite/ld-elfvers/vers7a.ver ++fsf/binutils/ld/testsuite/ld-elfvers/vers8.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers8.map ++fsf/binutils/ld/testsuite/ld-elfvers/vers8.ver ++fsf/binutils/ld/testsuite/ld-elfvers/vers9.c ++fsf/binutils/ld/testsuite/ld-elfvers/vers9.dsym ++fsf/binutils/ld/testsuite/ld-elfvers/vers9.sym ++fsf/binutils/ld/testsuite/ld-elfvers/vers9.ver ++fsf/binutils/ld/testsuite/ld-empic/empic.exp ++fsf/binutils/ld/testsuite/ld-empic/relax.t ++fsf/binutils/ld/testsuite/ld-empic/relax1.c ++fsf/binutils/ld/testsuite/ld-empic/relax2.c ++fsf/binutils/ld/testsuite/ld-empic/relax3.c ++fsf/binutils/ld/testsuite/ld-empic/relax4.c ++fsf/binutils/ld/testsuite/ld-empic/run.c ++fsf/binutils/ld/testsuite/ld-empic/runtest1.c ++fsf/binutils/ld/testsuite/ld-empic/runtest2.c ++fsf/binutils/ld/testsuite/ld-empic/runtesti.s ++fsf/binutils/ld/testsuite/ld-scripts/cross1.c ++fsf/binutils/ld/testsuite/ld-scripts/cross1.t ++fsf/binutils/ld/testsuite/ld-scripts/cross2.c ++fsf/binutils/ld/testsuite/ld-scripts/cross2.t ++fsf/binutils/ld/testsuite/ld-scripts/cross3.c ++fsf/binutils/ld/testsuite/ld-scripts/crossref.exp ++fsf/binutils/ld/testsuite/ld-scripts/defined.exp ++fsf/binutils/ld/testsuite/ld-scripts/defined.s ++fsf/binutils/ld/testsuite/ld-scripts/defined.t ++fsf/binutils/ld/testsuite/ld-scripts/phdrs.exp ++fsf/binutils/ld/testsuite/ld-scripts/phdrs.s ++fsf/binutils/ld/testsuite/ld-scripts/phdrs.t ++fsf/binutils/ld/testsuite/ld-scripts/script.exp ++fsf/binutils/ld/testsuite/ld-scripts/script.s ++fsf/binutils/ld/testsuite/ld-scripts/script.t ++fsf/binutils/ld/testsuite/ld-scripts/scriptm.t ++fsf/binutils/ld/testsuite/ld-scripts/sizeof.exp ++fsf/binutils/ld/testsuite/ld-scripts/sizeof.s ++fsf/binutils/ld/testsuite/ld-scripts/sizeof.t ++fsf/binutils/ld/testsuite/ld-sh/sh.exp ++fsf/binutils/ld/testsuite/ld-sh/sh1.s ++fsf/binutils/ld/testsuite/ld-sh/sh2.c ++fsf/binutils/ld/testsuite/ld-sh/start.s ++fsf/binutils/ld/testsuite/ld-shared/main.c ++fsf/binutils/ld/testsuite/ld-shared/sh1.c ++fsf/binutils/ld/testsuite/ld-shared/sh2.c ++fsf/binutils/ld/testsuite/ld-shared/shared.dat ++fsf/binutils/ld/testsuite/ld-shared/shared.exp ++fsf/binutils/ld/testsuite/ld-shared/sun4.dat ++fsf/binutils/ld/testsuite/ld-shared/xcoff.dat ++fsf/binutils/ld/testsuite/ld-srec/sr1.c ++fsf/binutils/ld/testsuite/ld-srec/sr2.c ++fsf/binutils/ld/testsuite/ld-srec/sr3.cc ++fsf/binutils/ld/testsuite/ld-srec/srec.exp ++fsf/binutils/ld/testsuite/ld-undefined/undefined.c ++fsf/binutils/ld/testsuite/ld-undefined/undefined.exp ++fsf/binutils/ld/testsuite/ld-versados/t1-1.ro ++fsf/binutils/ld/testsuite/ld-versados/t1-2.ro ++fsf/binutils/ld/testsuite/ld-versados/t1.ld ++fsf/binutils/ld/testsuite/ld-versados/t1.ook ++fsf/binutils/ld/testsuite/ld-versados/t2-1.ro ++fsf/binutils/ld/testsuite/ld-versados/t2-2.ro ++fsf/binutils/ld/testsuite/ld-versados/t2-3.ro ++fsf/binutils/ld/testsuite/ld-versados/t2.ld ++fsf/binutils/ld/testsuite/ld-versados/t2.ook ++fsf/binutils/ld/testsuite/ld-versados/versados.exp ++fsf/binutils/ld/testsuite/lib/ld-lib.exp ++fsf/binutils/libiberty/COPYING.LIB ++fsf/binutils/libiberty/ChangeLog ++fsf/binutils/libiberty/Makefile.in ++fsf/binutils/libiberty/README ++fsf/binutils/libiberty/alloca-botch.h ++fsf/binutils/libiberty/alloca-norm.h ++fsf/binutils/libiberty/alloca.c ++fsf/binutils/libiberty/argv.c ++fsf/binutils/libiberty/asprintf.c ++fsf/binutils/libiberty/atexit.c ++fsf/binutils/libiberty/basename.c ++fsf/binutils/libiberty/bcmp.c ++fsf/binutils/libiberty/bcopy.c ++fsf/binutils/libiberty/bzero.c ++fsf/binutils/libiberty/choose-temp.c ++fsf/binutils/libiberty/clock.c ++fsf/binutils/libiberty/concat.c ++fsf/binutils/libiberty/config.h-vms ++fsf/binutils/libiberty/config.table ++fsf/binutils/libiberty/config/mh-a68bsd ++fsf/binutils/libiberty/config/mh-aix ++fsf/binutils/libiberty/config/mh-amigaos ++fsf/binutils/libiberty/config/mh-apollo68 ++fsf/binutils/libiberty/config/mh-beos ++fsf/binutils/libiberty/config/mh-cxux7 ++fsf/binutils/libiberty/config/mh-cygwin32 ++fsf/binutils/libiberty/config/mh-fbsd21 ++fsf/binutils/libiberty/config/mh-go32 ++fsf/binutils/libiberty/config/mh-hpbsd ++fsf/binutils/libiberty/config/mh-irix4 ++fsf/binutils/libiberty/config/mh-ncr3000 ++fsf/binutils/libiberty/config/mh-riscix ++fsf/binutils/libiberty/config/mh-sysv ++fsf/binutils/libiberty/config/mh-sysv4 ++fsf/binutils/libiberty/config/mh-windows ++fsf/binutils/libiberty/config/mt-mingw32 ++fsf/binutils/libiberty/config/mt-sunos4 ++fsf/binutils/libiberty/config/mt-vxworks5 ++fsf/binutils/libiberty/configure.bat ++fsf/binutils/libiberty/configure.in ++fsf/binutils/libiberty/copysign.c ++fsf/binutils/libiberty/cplus-dem.c ++fsf/binutils/libiberty/dummy.c ++fsf/binutils/libiberty/fdmatch.c ++fsf/binutils/libiberty/floatformat.c ++fsf/binutils/libiberty/fnmatch.c ++fsf/binutils/libiberty/functions.def ++fsf/binutils/libiberty/getcwd.c ++fsf/binutils/libiberty/getopt.c ++fsf/binutils/libiberty/getopt1.c ++fsf/binutils/libiberty/getpagesize.c ++fsf/binutils/libiberty/getruntime.c ++fsf/binutils/libiberty/hex.c ++fsf/binutils/libiberty/index.c ++fsf/binutils/libiberty/insque.c ++fsf/binutils/libiberty/makefile.dos ++fsf/binutils/libiberty/makefile.vms ++fsf/binutils/libiberty/memchr.c ++fsf/binutils/libiberty/memcmp.c ++fsf/binutils/libiberty/memcpy.c ++fsf/binutils/libiberty/memmove.c ++fsf/binutils/libiberty/memset.c ++fsf/binutils/libiberty/mpw-config.in ++fsf/binutils/libiberty/mpw-make.sed ++fsf/binutils/libiberty/mpw.c ++fsf/binutils/libiberty/msdos.c ++fsf/binutils/libiberty/objalloc.c ++fsf/binutils/libiberty/obstack.c ++fsf/binutils/libiberty/pexecute.c ++fsf/binutils/libiberty/random.c ++fsf/binutils/libiberty/rename.c ++fsf/binutils/libiberty/rindex.c ++fsf/binutils/libiberty/sigsetmask.c ++fsf/binutils/libiberty/spaces.c ++fsf/binutils/libiberty/strcasecmp.c ++fsf/binutils/libiberty/strchr.c ++fsf/binutils/libiberty/strdup.c ++fsf/binutils/libiberty/strerror.c ++fsf/binutils/libiberty/strncasecmp.c ++fsf/binutils/libiberty/strrchr.c ++fsf/binutils/libiberty/strsignal.c ++fsf/binutils/libiberty/strstr.c ++fsf/binutils/libiberty/strtod.c ++fsf/binutils/libiberty/strtol.c ++fsf/binutils/libiberty/strtoul.c ++fsf/binutils/libiberty/tmpnam.c ++fsf/binutils/libiberty/vasprintf.c ++fsf/binutils/libiberty/vfork.c ++fsf/binutils/libiberty/vfprintf.c ++fsf/binutils/libiberty/vmsbuild.com ++fsf/binutils/libiberty/vprintf.c ++fsf/binutils/libiberty/vsprintf.c ++fsf/binutils/libiberty/waitpid.c ++fsf/binutils/libiberty/xatexit.c ++fsf/binutils/libiberty/xexit.c ++fsf/binutils/libiberty/xmalloc.c ++fsf/binutils/libiberty/xstrdup.c ++fsf/binutils/libiberty/xstrerror.c ++fsf/binutils/ltconfig ++fsf/binutils/ltmain.sh ++fsf/binutils/makeall.bat ++fsf/binutils/makefile.vms ++fsf/binutils/manifests/bin ++fsf/binutils/manifests/src ++fsf/binutils/missing ++fsf/binutils/mkinstalldirs ++fsf/binutils/move-if-change ++fsf/binutils/mpw-README ++fsf/binutils/mpw-build.in ++fsf/binutils/mpw-config.in ++fsf/binutils/mpw-configure ++fsf/binutils/mpw-install ++fsf/binutils/opcodes/ChangeLog ++fsf/binutils/opcodes/Makefile.am ++fsf/binutils/opcodes/Makefile.in ++fsf/binutils/opcodes/a29k-dis.c ++fsf/binutils/opcodes/acconfig.h ++fsf/binutils/opcodes/acinclude.m4 ++fsf/binutils/opcodes/aclocal.m4 ++fsf/binutils/opcodes/alpha-dis.c ++fsf/binutils/opcodes/alpha-opc.c ++fsf/binutils/opcodes/arc-dis.c ++fsf/binutils/opcodes/arc-opc.c ++fsf/binutils/opcodes/arm-dis.c ++fsf/binutils/opcodes/arm-opc.h ++fsf/binutils/opcodes/cgen-asm.c ++fsf/binutils/opcodes/cgen-dis.c ++fsf/binutils/opcodes/cgen-opc.c ++fsf/binutils/opcodes/config.in ++fsf/binutils/opcodes/configure ++fsf/binutils/opcodes/configure.bat ++fsf/binutils/opcodes/configure.in ++fsf/binutils/opcodes/d10v-dis.c ++fsf/binutils/opcodes/d10v-opc.c ++fsf/binutils/opcodes/dep-in.sed ++fsf/binutils/opcodes/dis-buf.c ++fsf/binutils/opcodes/disassemble.c ++fsf/binutils/opcodes/h8300-dis.c ++fsf/binutils/opcodes/h8500-dis.c ++fsf/binutils/opcodes/h8500-opc.h ++fsf/binutils/opcodes/hppa-dis.c ++fsf/binutils/opcodes/i386-dis.c ++fsf/binutils/opcodes/i960-dis.c ++fsf/binutils/opcodes/m10200-dis.c ++fsf/binutils/opcodes/m10200-opc.c ++fsf/binutils/opcodes/m10300-dis.c ++fsf/binutils/opcodes/m10300-opc.c ++fsf/binutils/opcodes/m32r-asm.c ++fsf/binutils/opcodes/m32r-dis.c ++fsf/binutils/opcodes/m32r-opc.c ++fsf/binutils/opcodes/m32r-opc.h ++fsf/binutils/opcodes/m68k-dis.c ++fsf/binutils/opcodes/m68k-opc.c ++fsf/binutils/opcodes/m88k-dis.c ++fsf/binutils/opcodes/makefile.vms ++fsf/binutils/opcodes/mips-dis.c ++fsf/binutils/opcodes/mips-opc.c ++fsf/binutils/opcodes/mips16-opc.c ++fsf/binutils/opcodes/mpw-config.in ++fsf/binutils/opcodes/mpw-make.sed ++fsf/binutils/opcodes/ns32k-dis.c ++fsf/binutils/opcodes/ppc-dis.c ++fsf/binutils/opcodes/ppc-opc.c ++fsf/binutils/opcodes/sh-dis.c ++fsf/binutils/opcodes/sh-opc.h ++fsf/binutils/opcodes/sparc-dis.c ++fsf/binutils/opcodes/sparc-opc.c ++fsf/binutils/opcodes/stamp-h.in ++fsf/binutils/opcodes/sysdep.h ++fsf/binutils/opcodes/tic30-dis.c ++fsf/binutils/opcodes/v850-dis.c ++fsf/binutils/opcodes/v850-opc.c ++fsf/binutils/opcodes/w65-dis.c ++fsf/binutils/opcodes/w65-opc.h ++fsf/binutils/opcodes/z8k-dis.c ++fsf/binutils/opcodes/z8k-opc.h ++fsf/binutils/opcodes/z8kgen.c ++fsf/binutils/setup.com ++fsf/binutils/symlink-tree ++fsf/binutils/texinfo/gpl.texinfo ++fsf/binutils/texinfo/lgpl.texinfo ++fsf/binutils/texinfo/texinfo.tex ++fsf/binutils/ylwrap +diff -rup --new-file binutils-2.9.1/opcodes/ChangeLog binutils-2.9.1/opcodes/ChangeLog +--- binutils-2.9.1/opcodes/ChangeLog Fri May 1 08:48:18 1998 ++++ binutils-2.9.1/opcodes/ChangeLog Sun Aug 23 00:00:00 1998 +@@ -333,6 +333,11 @@ Thu Oct 23 21:13:37 1997 Fred Fish ++ ++ * configure.in (AC_ARFLAGS): Add. ++ * configure: Regenerate. ++ + Mon Dec 8 11:21:07 1997 Nick Clifton + + * disassemble.c: Remove disasm_symaddr() function. +diff -rup --new-file binutils-2.9.1/opcodes/Makefile.in binutils-2.9.1/opcodes/Makefile.in +--- binutils-2.9.1/opcodes/Makefile.in Fri May 1 08:48:18 1998 ++++ binutils-2.9.1/opcodes/Makefile.in Sun Aug 23 00:00:00 1998 +@@ -1,4 +1,4 @@ +-# Makefile.in generated automatically by automake 1.2e from Makefile.am ++# Makefile.in generated automatically by automake 1.3 from Makefile.am + + # Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation +@@ -11,7 +11,7 @@ + # PARTICULAR PURPOSE. + + +-SHELL = @SHELL@ ++SHELL = /bin/sh + + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ +@@ -28,10 +28,16 @@ sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ ++guidedir = @guidedir@ ++htmldir = @htmldir@ ++dvidir = @dvidir@ ++psdir = @psdir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include + ++DISTDIR = ++ + pkgdatadir = $(datadir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ +@@ -64,17 +70,12 @@ target_triplet = @target@ + AR = @AR@ + BFD_MACHINES = @BFD_MACHINES@ + CC = @CC@ ++CC_FOR_BUILD = @CC_FOR_BUILD@ + EXEEXT = @EXEEXT@ ++EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ + HDEFINES = @HDEFINES@ +-LD = @LD@ + LIBTOOL = @LIBTOOL@ +-LN_S = @LN_S@ +-MAINT = @MAINT@ +-MAKEINFO = @MAKEINFO@ +-NM = @NM@ +-PACKAGE = @PACKAGE@ + RANLIB = @RANLIB@ +-VERSION = @VERSION@ + archdefs = @archdefs@ + + AUTOMAKE_OPTIONS = cygnus +@@ -212,6 +213,7 @@ LIBS = @LIBS@ + libopcodes_a_LIBADD = + libopcodes_a_SOURCES = libopcodes.a.c + libopcodes_a_OBJECTS = libopcodes.a.o ++ARFLAGS = @ARFLAGS@ + LTLIBRARIES = $(lib_LTLIBRARIES) + + libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo +@@ -223,21 +225,24 @@ DIST_COMMON = ChangeLog Makefile.am Mak + aclocal.m4 config.in configure configure.in stamp-h.in + + +-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ++PACKAGE = @PACKAGE@ ++VERSION = @VERSION@ + ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) \ ++ $(INFOS) $(GUIDES) $(HTMLS) $(MANS) + TAR = tar + GZIP = --best + SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES) + OBJECTS = libopcodes.a.o $(libopcodes_la_OBJECTS) + +-default: all ++all: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h + + .SUFFIXES: + .SUFFIXES: .S .c .lo .o .s +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile ++$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus --include-deps Makefile + +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +@@ -328,18 +333,18 @@ maintainer-clean-libLTLIBRARIES: + + install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(libdir) ++ $(mkinstalldirs) $(DESTDIR)$(libdir) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ +- echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p"; \ +- $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p; \ ++ echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \ ++ $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \ + else :; fi; \ + done + + uninstall-libLTLIBRARIES: +- $(NORMAL_UNINSTALL) ++ @$(NORMAL_UNINSTALL) + list='$(lib_LTLIBRARIES)'; for p in $$list; do \ +- $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$$p; \ ++ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + done + + libopcodes.la: $(libopcodes_la_OBJECTS) $(libopcodes_la_DEPENDENCIES) +@@ -413,6 +418,9 @@ distdir: $(DISTFILES) + || cp -p $$d/$$file $(distdir)/$$file; \ + done + info: ++guide: ++html: ++ps: + dvi: + check: + $(MAKE) +@@ -429,12 +437,10 @@ install: install-exec install-data all + + uninstall: uninstall-libLTLIBRARIES + +-all: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h +- + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: +- $(mkinstalldirs) $(libdir) ++ $(mkinstalldirs) $(DATADIR)$(libdir) + + + mostlyclean-generic: +@@ -474,18 +480,18 @@ maintainer-clean: maintainer-clean-hdr + @echo "it deletes files that may require special tools to rebuild." + -rm -f config.status + +-.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ +-maintainer-clean-hdr mostlyclean-noinstLIBRARIES \ +-distclean-noinstLIBRARIES clean-noinstLIBRARIES \ +-maintainer-clean-noinstLIBRARIES mostlyclean-compile distclean-compile \ +-clean-compile maintainer-clean-compile mostlyclean-libtool \ +-distclean-libtool clean-libtool maintainer-clean-libtool \ +-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ +-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ +-uninstall-libLTLIBRARIES install-libLTLIBRARIES tags mostlyclean-tags \ +-distclean-tags clean-tags maintainer-clean-tags distdir info dvi \ +-installcheck install-info install-exec install-data install uninstall \ +-all installdirs mostlyclean-generic distclean-generic clean-generic \ ++.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ ++mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ ++clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ ++mostlyclean-compile distclean-compile clean-compile \ ++maintainer-clean-compile mostlyclean-libtool distclean-libtool \ ++clean-libtool maintainer-clean-libtool mostlyclean-libLTLIBRARIES \ ++distclean-libLTLIBRARIES clean-libLTLIBRARIES \ ++maintainer-clean-libLTLIBRARIES uninstall-libLTLIBRARIES \ ++install-libLTLIBRARIES tags mostlyclean-tags distclean-tags clean-tags \ ++maintainer-clean-tags distdir info guide html ps dvi installcheck \ ++install-info install-exec install-data install uninstall all \ ++installdirs mostlyclean-generic distclean-generic clean-generic \ + maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +diff -rup --new-file binutils-2.9.1/opcodes/configure binutils-2.9.1/opcodes/configure +--- binutils-2.9.1/opcodes/configure Fri May 1 08:48:18 1998 ++++ binutils-2.9.1/opcodes/configure Thu Jan 21 19:40:14 1999 +@@ -1,7 +1,7 @@ + #! /bin/sh + + # Guess values for system-dependent variables and create Makefiles. +-# Generated automatically using autoconf version 2.12.1 ++# Generated automatically using autoconf version 2.13 + # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation +@@ -61,6 +61,10 @@ libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' ++guidedir='${prefix}/guide' ++htmldir='${prefix}/html' ++psdir='${prefix}/ps' ++dvidir='${prefix}/dvi' + mandir='${prefix}/man' + + # Initialize some other variables. +@@ -178,6 +182,10 @@ Directory and file names: + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] ++ --guidedir=DIR Amigaguide documentation in DIR [PREFIX/guide] ++ --htmldir=DIR HTML documentation in DIR [PREFIX/html] ++ --psdir=DIR postscript documentation in DIR [PREFIX/ps] ++ --dvidir=DIR TeX dvi documentation in DIR [PREFIX/dvi] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names +@@ -220,6 +228,22 @@ EOF + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + ++ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui) ++ ac_prev=guidedir ;; ++ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+ guidedir="$ac_optarg" ;; ++ ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+ htmldir="$ac_optarg" ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+ psdir="$ac_optarg" ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+ dvidir="$ac_optarg" ;; ++ + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) +@@ -350,7 +374,7 @@ EOF + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) +- echo "configure generated by autoconf version 2.12.1" ++ echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) +@@ -520,9 +544,11 @@ ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + ++ac_exeext= ++ac_objext=o + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then +@@ -584,7 +610,7 @@ else { echo "configure: error: can not r + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 +-echo "configure:588: checking host system type" >&5 ++echo "configure:614: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in +@@ -605,7 +631,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- + echo "$ac_t""$host" 1>&6 + + echo $ac_n "checking target system type""... $ac_c" 1>&6 +-echo "configure:609: checking target system type" >&5 ++echo "configure:635: checking target system type" >&5 + + target_alias=$target + case "$target_alias" in +@@ -623,7 +649,7 @@ target_os=`echo $target | sed 's/^\([^-] + echo "$ac_t""$target" 1>&6 + + echo $ac_n "checking build system type""... $ac_c" 1>&6 +-echo "configure:627: checking build system type" >&5 ++echo "configure:653: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in +@@ -658,21 +684,22 @@ BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir + # SunOS /usr/etc/install + # IRIX /sbin/install + # AIX /bin/install ++# AmigaOS /c/install + # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:667: checking for a BSD compatible install" >&5 ++echo "configure:694: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in +- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; ++ /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root +@@ -711,13 +738,15 @@ echo "$ac_t""$INSTALL" 1>&6 + # It thinks the first close brace ends the variable substitution. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ++ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + + echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +-echo "configure:721: checking whether build environment is sane" >&5 ++echo "configure:750: checking whether build environment is sane" >&5 + # Just in case + sleep 1 + echo timestamp > conftestfile +@@ -774,7 +803,7 @@ test "$program_suffix" != NONE && + test "$program_transform_name" = "" && program_transform_name="s,x,x," + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-echo "configure:778: checking whether ${MAKE-make} sets \${MAKE}" >&5 ++echo "configure:807: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -820,7 +849,7 @@ EOF + + missing_dir=`cd $ac_aux_dir && pwd` + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +-echo "configure:824: checking for working aclocal" >&5 ++echo "configure:853: checking for working aclocal" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -833,7 +862,7 @@ else + fi + + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +-echo "configure:837: checking for working autoconf" >&5 ++echo "configure:866: checking for working autoconf" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -846,7 +875,7 @@ else + fi + + echo $ac_n "checking for working automake""... $ac_c" 1>&6 +-echo "configure:850: checking for working automake" >&5 ++echo "configure:879: checking for working automake" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -859,7 +888,7 @@ else + fi + + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +-echo "configure:863: checking for working autoheader" >&5 ++echo "configure:892: checking for working autoheader" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -872,7 +901,7 @@ else + fi + + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +-echo "configure:876: checking for working makeinfo" >&5 ++echo "configure:905: checking for working makeinfo" >&5 + # Run test in a subshell; some versions of sh will print an error if + # an executable is not found, even if stderr is redirected. + # Redirect stdin to placate older versions of autoconf. Sigh. +@@ -895,15 +924,16 @@ fi + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. + set dummy ${ac_tool_prefix}ar; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:899: checking for $ac_word" >&5 ++echo "configure:928: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AR="${ac_tool_prefix}ar" +@@ -923,18 +953,68 @@ fi + + + ++ if test -z "$AR"; then ++ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. ++set dummy ${ac_tool_prefix}ar; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:961: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$AR"; then ++ ac_cv_prog_AR="$AR" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_AR="${ac_tool_prefix}ar" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" ++fi ++fi ++AR="$ac_cv_prog_AR" ++if test -n "$AR"; then ++ echo "$ac_t""$AR" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ ++ ++fi ++echo $ac_n "checking what flags $AR needs to create archives""... $ac_c" 1>&6 ++echo "configure:992: checking what flags $AR needs to create archives" >&5 ++if eval "test \"`echo '$''{'gg_cv_arflags'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$CC" in ++ mwcc* | bcc*) ARFLAGS=${ARFLAGS-"-xml -o"} ;; ++ *) ARFLAGS=${ARFLAGS-"cr"} ;; ++esac ++gg_cv_arflags=$ARFLAGS ++ ++fi ++ARFLAGS="$gg_cv_arflags" ++echo "$ac_t""$ARFLAGS" 1>&6 ++ + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:930: checking for $ac_word" >&5 ++echo "configure:1009: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +@@ -957,15 +1037,16 @@ if test -n "$ac_tool_prefix"; then + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:961: checking for $ac_word" >&5 ++echo "configure:1041: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" +@@ -1039,15 +1120,16 @@ fi + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1043: checking for $ac_word" >&5 ++echo "configure:1124: 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 + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" +@@ -1068,15 +1150,16 @@ fi + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1072: checking for $ac_word" >&5 ++echo "configure:1154: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -1094,19 +1177,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1184: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1217: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1246: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:1101: checking for $ac_word" >&5 ++echo "configure:1279: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1141,25 +1320,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:1331: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:1362: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 1373 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:1378: \"$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 +@@ -1173,18 +1388,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1183: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:1404: 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:1188: checking whether we are using GNU C" >&5 ++echo "configure:1409: 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 +@@ -1193,7 +1414,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1197: \"$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:1418: \"$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 +@@ -1204,11 +1425,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1212: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:1437: 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 +@@ -1223,18 +1448,45 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + # Check whether --with-gnu-ld or --without-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" +@@ -1248,7 +1500,7 @@ ac_prog=ld + if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +-echo "configure:1252: checking for ld used by GCC" >&5 ++echo "configure:1504: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. +@@ -1266,10 +1518,10 @@ echo "configure:1252: checking for ld us + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +-echo "configure:1270: checking for GNU ld" >&5 ++echo "configure:1522: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +-echo "configure:1273: checking for non-GNU ld" >&5 ++echo "configure:1525: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1305,7 +1557,7 @@ fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +-echo "configure:1309: checking if the linker ($LD) is GNU ld" >&5 ++echo "configure:1561: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1321,7 +1573,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +-echo "configure:1325: checking for BSD-compatible nm" >&5 ++echo "configure:1577: checking for BSD-compatible nm" >&5 + if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1358,7 +1610,7 @@ echo "$ac_t""$NM" 1>&6 + + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:1362: checking whether ln -s works" >&5 ++echo "configure:1614: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1368,14 +1620,24 @@ then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" + else +- ac_cv_prog_LN_S=ln ++ if ln X conftestdata 2>/dev/null ++ then ++ rm -f conftestdata ++ ac_cv_prog_LN_S=ln ++ else ++ ac_cv_prog_LN_S=cp ++ fi + fi + fi + LN_S="$ac_cv_prog_LN_S" + if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 + else +- echo "$ac_t""no" 1>&6 ++ if test "$ac_cv_prog_LN_S" = "ln"; then ++ echo "$ac_t""no, using ln" 1>&6 ++ else ++ echo "$ac_t""no, and neither does ln, so using cp" 1>&6 ++ fi + fi + + # Always use our own libtool. +@@ -1394,8 +1656,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libto + case "$host" in + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 1398 "configure"' > conftest.$ac_ext +- if { (eval echo configure:1399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ echo '#line 1660 "configure"' > conftest.$ac_ext ++ if { (eval echo configure:1661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" +@@ -1473,7 +1735,7 @@ test "$program_transform_name" = "" && p + + + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +-echo "configure:1477: checking whether to enable maintainer-specific portions of Makefiles" >&5 ++echo "configure:1739: 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" +@@ -1491,19 +1753,19 @@ fi + + + echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 +-echo "configure:1495: checking for Cygwin32 environment" >&5 ++echo "configure:1757: checking for Cygwin32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_cygwin32'+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:1769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_cygwin32=yes + else +@@ -1520,19 +1782,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 + CYGWIN32= + test "$am_cv_cygwin32" = yes && CYGWIN32=yes + echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 +-echo "configure:1524: checking for Mingw32 environment" >&5 ++echo "configure:1786: checking for Mingw32 environment" >&5 + if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_mingw32=yes + else +@@ -1551,7 +1813,7 @@ test "$am_cv_mingw32" = yes && MINGW32=y + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +-echo "configure:1555: checking for executable suffix" >&5 ++echo "configure:1817: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1580,15 +1842,16 @@ echo "$ac_t""${am_cv_exeext}" 1>&6 + # 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:1584: checking for $ac_word" >&5 ++echo "configure:1846: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" +@@ -1606,19 +1869,115 @@ else + fi + + if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1876: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="bcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1909: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwccx86" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1938: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="mwcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi ++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:1613: checking for $ac_word" >&5 ++echo "configure:1971: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- for ac_dir in $PATH; do ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +@@ -1653,25 +2012,61 @@ else + echo "$ac_t""no" 1>&6 + fi + +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + fi ++if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # 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:2023: 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 ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++fi ++test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1661: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:2054: 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. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + +-cat > conftest.$ac_ext < conftest.$ac_ext << EOF ++ ++#line 2065 "configure" + #include "confdefs.h" ++ + main(){return(0);} + EOF +-if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ++if { (eval echo configure:2070: \"$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 +@@ -1685,18 +2080,24 @@ else + ac_cv_prog_cc_works=no + fi + rm -fr conftest* ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross + + echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 + if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1695: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:2096: 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:1700: checking whether we are using GNU C" >&5 ++echo "configure:2101: 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 +@@ -1705,7 +2106,7 @@ else + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1709: \"$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:2110: \"$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 +@@ -1716,11 +2117,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + + if test $ac_cv_prog_gcc = yes; then + GCC=yes +- 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:1724: checking whether ${CC-cc} accepts -g" >&5 ++else ++ GCC= ++fi ++ ++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:2129: 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 +@@ -1735,18 +2140,45 @@ rm -f conftest* + fi + + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +- if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" +- elif test $ac_cv_prog_cc_g = yes; then ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then + CFLAGS="-g -O2" + else +- CFLAGS="-O2" ++ CFLAGS="-g" + fi + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi + fi ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + ++ + + . ${srcdir}/../bfd/configure.host + +@@ -1756,7 +2188,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR + + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1760: checking how to run the C preprocessor" >&5 ++echo "configure:2192: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -1771,14 +2203,14 @@ 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:1781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2213: \"$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 + : + else +@@ -1788,14 +2220,31 @@ 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:1798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ++if test -z "$ac_err"; then ++ : ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ 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:2247: \"$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 + : + else +@@ -1808,6 +2257,8 @@ fi + rm -f conftest* + fi + rm -f conftest* ++fi ++rm -f conftest* + ac_cv_prog_CPP="$CPP" + fi + CPP="$ac_cv_prog_CPP" +@@ -1820,18 +2271,18 @@ for ac_hdr in string.h strings.h stdlib. + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1824: checking for $ac_hdr" >&5 ++echo "configure:2275: 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:1834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out` ++{ (eval echo configure:2285: \"$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* + eval "ac_cv_header_$ac_safe=yes" +@@ -1994,7 +2445,7 @@ EOF + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. + (set) 2>&1 | +- case `(ac_space=' '; set) 2>&1 | grep ac_space` in ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). +@@ -2040,7 +2491,9 @@ DEFS=-DHAVE_CONFIG_H + : ${CONFIG_STATUS=./config.status} + + echo creating $CONFIG_STATUS +-rm -f $CONFIG_STATUS ++# Some systems, like AmigaOS, won't allow you to remove a script that is ++# being executed, so just move it out of the way instead. ++if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi + cat > $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h +@@ -2360,6 +2821,7 @@ test -z "$CONFIG_HEADERS" || echo timest + exit 0 + EOF + chmod +x $CONFIG_STATUS ++rm -f CONFIG.STATUS.old + rm -fr confdefs* $ac_clean_files + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +diff -rup --new-file binutils-2.9.1/opcodes/configure.in binutils-2.9.1/opcodes/configure.in +--- binutils-2.9.1/opcodes/configure.in Fri May 1 08:48:19 1998 ++++ binutils-2.9.1/opcodes/configure.in Sun Aug 23 00:00:00 1998 +@@ -18,6 +18,7 @@ AM_INIT_AUTOMAKE(opcodes, ${BFD_VERSION} + dnl These must be called before AM_PROG_LIBTOOL, because it may want + dnl to call AC_CHECK_PROG. + AC_CHECK_TOOL(AR, ar) ++AC_ARFLAGS + AC_CHECK_TOOL(RANLIB, ranlib, :) + + dnl Default to a non shared library. This may be overridden by the +diff -rup --new-file binutils-2.9.1/opcodes/m68k-dis.c binutils-2.9.1/opcodes/m68k-dis.c +--- binutils-2.9.1/opcodes/m68k-dis.c Fri May 1 08:48:20 1998 ++++ binutils-2.9.1/opcodes/m68k-dis.c Sun Aug 23 00:00:00 1998 +@@ -49,7 +49,7 @@ CONST char * CONST fpcr_names[] = { + + static char *const reg_names[] = { + "%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", +- "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp", ++ "%a0", "%a1", "%a2", "%a3", "%a4", "%fp", "%a6", "%sp", + "%ps", "%pc"}; + + /* Sign-extend an (unsigned char). */ diff --git a/patches/gcc-2.95.3/patch b/patches/gcc-2.95.3/patch new file mode 100644 index 0000000..2a316e4 --- /dev/null +++ b/patches/gcc-2.95.3/patch @@ -0,0 +1,31420 @@ +diff -ruN --exclude=CVS gcc-2.95.3/config.guess gcc/config.guess +--- gcc-2.95.3/config.guess Wed Mar 8 05:52:57 2000 ++++ gcc/config.guess Sat Oct 13 18:29:51 2001 +@@ -1,7 +1,10 @@ + #! /bin/sh + # Attempt to guess a canonical system name. +-# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 1999 Free Software Foundation, Inc. +-# ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ++# Free Software Foundation, Inc. ++ ++timestamp='2001-10-13' ++ + # This file 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 +@@ -22,35 +25,153 @@ + # the same distribution terms that you use for the rest of that program. + + # Written by Per Bothner . +-# The master version of this file is at the FSF in /home/gd/gnu/lib. ++# Please send patches to . + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # + # The plan is that this can be called by configure scripts if you +-# don't specify an explicit system type (host/target name). +-# +-# Only a few systems have been added to this list; please add others +-# (but try to keep the structure clean). +-# ++# don't specify an explicit build system type. ++ ++me=`echo "$0" | sed -e 's,.*/,,'` ++ ++usage="\ ++Usage: $0 [OPTION] ++ ++Output the configuration name of the system \`$me' is run on. ++ ++Operation modes: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to ." ++ ++version="\ ++GNU config.guess ($timestamp) ++ ++Originally written by Per Bothner. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ++Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try \`$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit 0 ;; ++ --version | -v ) ++ echo "$version" ; exit 0 ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit 0 ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" >&2 ++ exit 1 ;; ++ * ) ++ break ;; ++ esac ++done ++ ++if test $# != 0; then ++ echo "$me: too many arguments$help" >&2 ++ exit 1 ++fi ++ ++ ++dummy=dummy-$$ ++trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 ++ ++# CC_FOR_BUILD -- compiler used by this script. ++# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still ++# use `HOST_CC' if defined, but it is deprecated. ++ ++set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ++ ,,) echo "int dummy(){}" > $dummy.c ; ++ for c in cc gcc c89 ; do ++ ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; ++ if test $? = 0 ; then ++ CC_FOR_BUILD="$c"; break ; ++ fi ; ++ done ; ++ rm -f $dummy.c $dummy.o $dummy.rel ; ++ if test x"$CC_FOR_BUILD" = x ; then ++ CC_FOR_BUILD=no_compiler_found ; ++ fi ++ ;; ++ ,,*) CC_FOR_BUILD=$CC ;; ++ ,*,*) CC_FOR_BUILD=$HOST_CC ;; ++esac' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. +-# (ghazi@noc.rutgers.edu 8/24/94.) ++# (ghazi@noc.rutgers.edu 1994-08-24) + if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH + fi + + UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown + UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown ++UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 +- + # Note: order is significant - the case branches are not exclusive. + + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ++ *:NetBSD:*:*) ++ # Netbsd (nbsd) targets should (where applicable) match one or ++ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently ++ # switched to ELF, *-*-netbsd* would select the old ++ # object file format. This provides both forward ++ # compatibility and a consistent mechanism for selecting the ++ # object file format. ++ # Determine the machine/vendor (is the vendor relevant). ++ case "${UNAME_MACHINE}" in ++ amiga) machine=m68k-unknown ;; ++ arm32) machine=arm-unknown ;; ++ atari*) machine=m68k-atari ;; ++ sun3*) machine=m68k-sun ;; ++ mac68k) machine=m68k-apple ;; ++ macppc) machine=powerpc-apple ;; ++ hp3[0-9][05]) machine=m68k-hp ;; ++ ibmrt|romp-ibm) machine=romp-ibm ;; ++ *) machine=${UNAME_MACHINE}-unknown ;; ++ esac ++ # The Operating System including object format, if it has switched ++ # to ELF recently, or will in the future. ++ case "${UNAME_MACHINE}" in ++ i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) ++ eval $set_cc_for_build ++ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep __ELF__ >/dev/null ++ then ++ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). ++ # Return netbsd for either. FIX? ++ os=netbsd ++ else ++ os=netbsdelf ++ fi ++ ;; ++ *) ++ os=netbsd ++ ;; ++ esac ++ # The OS release ++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: ++ # contains redundant information, the shorter form: ++ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. ++ echo "${machine}-${os}${release}" ++ exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +@@ -59,68 +180,82 @@ + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- cat <dummy.s ++ cat <$dummy.s ++ .data ++\$Lformat: ++ .byte 37,100,45,37,120,10,0 # "%d-%x\n" ++ ++ .text + .globl main ++ .align 4 + .ent main + main: +- .frame \$30,0,\$26,0 +- .prologue 0 +- .long 0x47e03d80 # implver $0 +- lda \$2,259 +- .long 0x47e20c21 # amask $2,$1 +- srl \$1,8,\$2 +- sll \$2,2,\$2 +- sll \$0,3,\$0 +- addl \$1,\$0,\$0 +- addl \$2,\$0,\$0 +- ret \$31,(\$26),1 ++ .frame \$30,16,\$26,0 ++ ldgp \$29,0(\$27) ++ .prologue 1 ++ .long 0x47e03d80 # implver \$0 ++ lda \$2,-1 ++ .long 0x47e20c21 # amask \$2,\$1 ++ lda \$16,\$Lformat ++ mov \$0,\$17 ++ not \$1,\$18 ++ jsr \$26,printf ++ ldgp \$29,0(\$26) ++ mov 0,\$16 ++ jsr \$26,exit + .end main + EOF +- ${CC-cc} dummy.s -o dummy 2>/dev/null ++ eval $set_cc_for_build ++ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then +- ./dummy +- case "$?" in +- 7) ++ case `./$dummy` in ++ 0-0) + UNAME_MACHINE="alpha" + ;; +- 15) ++ 1-0) + UNAME_MACHINE="alphaev5" + ;; +- 14) ++ 1-1) + UNAME_MACHINE="alphaev56" + ;; +- 10) ++ 1-101) + UNAME_MACHINE="alphapca56" + ;; +- 16) ++ 2-303) + UNAME_MACHINE="alphaev6" + ;; ++ 2-307) ++ UNAME_MACHINE="alphaev67" ++ ;; ++ 2-1307) ++ UNAME_MACHINE="alphaev68" ++ ;; + esac + fi +- rm -f dummy.s dummy ++ rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) +- # How do we know it's Interix rather than generic posix subsystem? +- # Should we change UNAME_MACHINE based on the output of uname +- # instead of the specific alpha model. ++ # How do we know it's Interix rather than the generic POSIX subsystem? ++ # Should we change UNAME_MACHINE based on the output of uname instead ++ # of the specific Alpha model? + echo alpha-pc-interix +- exit 0;; ++ exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) +- echo m68k-cbm-sysv4 ++ echo m68k-unknown-sysv4 + exit 0;; +- amiga:NetBSD:*:*) +- echo m68k-cbm-netbsd${UNAME_RELEASE} +- exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; ++ *:MorphOS:*:*) ++ echo ${UNAME_MACHINE}-unknown-morphos ++ exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; +@@ -139,16 +274,16 @@ + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; ++ *:OS/390:*:*) ++ echo i370-ibm-openedition ++ exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; +- arm32:NetBSD:*:*) +- echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` +- exit 0 ;; +- SR2?01:HI-UX/MPP:*:*) ++ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; +- Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) ++ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 +@@ -156,7 +291,7 @@ + echo pyramid-pyramid-bsd + fi + exit 0 ;; +- NILE:*:*:dcosx) ++ NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) +@@ -201,21 +336,41 @@ + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; +- atari*:NetBSD:*:*) +- echo m68k-atari-netbsd${UNAME_RELEASE} ++ sparc*:NetBSD:*) ++ echo `uname -p`-unknown-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; +- sun3*:NetBSD:*:*) +- echo m68k-sun-netbsd${UNAME_RELEASE} ++ # The situation for MiNT is a little confusing. The machine name ++ # can be virtually everything (everything which is not ++ # "atarist" or "atariste" at least should have a processor ++ # > m68000). The system name ranges from "MiNT" over "FreeMiNT" ++ # to the lowercase version "mint" (or "freemint"). Finally ++ # the system name "TOS" denotes a system which is actually not ++ # MiNT. But MiNT is downward compatible to TOS, so this should ++ # be no problem. ++ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; ++ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit 0 ;; ++ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit 0 ;; ++ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit 0 ;; ++ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit 0 ;; ++ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; +- mac68k:NetBSD:*:*) +- echo m68k-apple-netbsd${UNAME_RELEASE} +- exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; +@@ -237,12 +392,18 @@ + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; +- 2020:CLIX:*:*) ++ 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) +- sed 's/^ //' << EOF >dummy.c +- int main (argc, argv) int argc; char **argv; { ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++#ifdef __cplusplus ++#include /* for printf() prototype */ ++ int main (int argc, char *argv[]) { ++#else ++ int main (argc, argv) int argc; char *argv[]; { ++#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); +@@ -257,12 +418,15 @@ + exit (-1); + } + EOF +- ${CC-cc} dummy.c -o dummy \ +- && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy ++ $CC_FOR_BUILD $dummy.c -o $dummy \ ++ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ++ && rm -f $dummy.c $dummy && exit 0 ++ rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; ++ Motorola:PowerMAX_OS:*:*) ++ echo powerpc-motorola-powermax ++ exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; +@@ -278,15 +442,18 @@ + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` +- if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then +- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ +- -o ${TARGET_BINARY_INTERFACE}x = x ] ; then ++ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] ++ then ++ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ ++ [ ${TARGET_BINARY_INTERFACE}x = x ] ++ then + echo m88k-dg-dgux${UNAME_RELEASE} +- else ++ else + echo m88k-dg-dguxbcs${UNAME_RELEASE} ++ fi ++ else ++ echo i586-dg-dgux${UNAME_RELEASE} + fi +- else echo i586-dg-dgux${UNAME_RELEASE} +- fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 +@@ -307,12 +474,21 @@ + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' +- i?86:AIX:*:*) ++ i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; ++ ia64:AIX:*:*) ++ if [ -x /usr/bin/oslevel ] ; then ++ IBM_REV=`/usr/bin/oslevel` ++ else ++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} ++ fi ++ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} ++ exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then +- sed 's/^ //' << EOF >dummy.c ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c + #include + + main() +@@ -323,8 +499,8 @@ + exit(0); + } + EOF +- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy ++ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ++ rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 +@@ -332,8 +508,9 @@ + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; +- *:AIX:*:4) +- if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then ++ *:AIX:*:[45]) ++ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` ++ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc +@@ -341,7 +518,7 @@ + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else +- IBM_REV=4.${UNAME_RELEASE} ++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; +@@ -351,7 +528,7 @@ + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; +- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and ++ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) +@@ -366,33 +543,50 @@ + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; +- *9??*:MPE/iX:*:*) +- echo hppa1.0-hp-mpeix +- exit 0 ;; + 9000/[34678]??:HP-UX:*:*) ++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; +- 9000/[678][0-9][0-9] ) ++ 9000/[678][0-9][0-9]) ++ case "${HPUX_REV}" in ++ 11.[0-9][0-9]) ++ if [ -x /usr/bin/getconf ]; then ++ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; ++ esac ;; ++ esac ++ fi ;; ++ esac ++ if [ "${HP_ARCH}" = "" ]; then ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c + +- sed 's/^ //' << EOF >dummy.c ++ #define _HPUX_SOURCE + #include + #include +- ++ + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); +- #endif ++ #endif + long cpu = sysconf (_SC_CPU_VERSION); +- +- switch (cpu) ++ ++ switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; +- case CPU_PA_RISC2_0: ++ case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) +- switch (bits) ++ switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; +@@ -400,20 +594,26 @@ + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; +- #endif ++ #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } + EOF +- (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` +- rm -f dummy.c dummy ++ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` ++ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi ++ rm -f $dummy.c $dummy ++ fi ;; + esac +- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; ++ ia64:HP-UX:*:*) ++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` ++ echo ia64-hp-hpux${HPUX_REV} ++ exit 0 ;; + 3050*:HI-UX:*:*) +- sed 's/^ //' << EOF >dummy.c ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c + #include + int + main () +@@ -438,8 +638,8 @@ + exit (0); + } + EOF +- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy ++ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ++ rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) +@@ -448,13 +648,16 @@ + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; ++ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) ++ echo hppa1.0-hp-mpeix ++ exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; +- i?86:OSF1:*:*) ++ i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else +@@ -489,67 +692,73 @@ + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) +- echo ymp-cray-unicos${UNAME_RELEASE} ++ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ +- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ ++ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ ++ -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) +- echo t90-cray-unicos${UNAME_RELEASE} ++ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit 0 ;; ++ CRAY*T3D:*:*:*) ++ echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit 0 ;; ++ CRAY*T3E:*:*:*) ++ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit 0 ;; ++ CRAY*SV1:*:*:*) ++ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; +- F300:UNIX_System_V:*:*) ++ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) ++ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` +- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; +- F301:UNIX_System_V:*:*) +- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` +- exit 0 ;; +- hp3[0-9][05]:NetBSD:*:*) +- echo m68k-hp-netbsd${UNAME_RELEASE} +- exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; +- i?86:BSD/386:*:* | *:BSD/OS:*:*) ++ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; +- *:FreeBSD:*:*) +- if test -x /usr/bin/objformat -a "elf" = "`/usr/bin/objformat`"; then +- echo ${UNAME_MACHINE}-unknown-freebsdelf +- else +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` +- fi ++ sparc*:BSD/OS:*:*) ++ echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; +- *:NetBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ++ *:BSD/OS:*:*) ++ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} ++ exit 0 ;; ++ *:FreeBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) +- echo ${UNAME_MACHINE}-pc-cygwin32 ++ echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; ++ i*:PW*:*) ++ echo ${UNAME_MACHINE}-pc-pw32 ++ exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) +- # How do we know it's Interix rather than generic posix subsystem? ++ # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we +- # change UNAME_MACHINE based on the output of uname instead of +- # i386? ++ # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) +- echo powerpcle-unknown-cygwin32 ++ echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +@@ -557,175 +766,130 @@ + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; +- *:Linux:*:*) +- # uname on the ARM produces all sorts of strangeness, and we need to +- # filter it out. +- case "$UNAME_MACHINE" in +- armv*) UNAME_MACHINE=$UNAME_MACHINE ;; +- arm* | sa110*) UNAME_MACHINE="arm" ;; ++ i*86:Minix:*:*) ++ echo ${UNAME_MACHINE}-pc-minix ++ exit 0 ;; ++ arm*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ ia64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux ++ exit 0 ;; ++ m68*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ mips:Linux:*:*) ++ case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in ++ big) echo mips-unknown-linux-gnu && exit 0 ;; ++ little) echo mipsel-unknown-linux-gnu && exit 0 ;; + esac +- ++ ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu ++ exit 0 ;; ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit 0 ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit 0 ;; ++ parisc:Linux:*:* | hppa:Linux:*:*) ++ # Look for CPU level ++ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in ++ PA7*) echo hppa1.1-unknown-linux-gnu ;; ++ PA8*) echo hppa2.0-unknown-linux-gnu ;; ++ *) echo hppa-unknown-linux-gnu ;; ++ esac ++ exit 0 ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit 0 ;; ++ s390:Linux:*:* | s390x:Linux:*:*) ++ echo ${UNAME_MACHINE}-ibm-linux ++ exit 0 ;; ++ sh*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ sparc:Linux:*:* | sparc64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit 0 ;; ++ x86_64:Linux:*:*) ++ echo x86_64-unknown-linux-gnu ++ exit 0 ;; ++ i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. +- ld_help_string=`ld --help 2>&1` +- ld_supported_emulations=`echo $ld_help_string \ +- | sed -ne '/supported emulations:/!d ++ # first see if it will tell us. cd to the root directory to prevent ++ # problems with other programs or directories called `ld' in the path. ++ ld_supported_targets=`cd /; ld --help 2>&1 \ ++ | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g +- s/.*supported emulations: *// ++ s/.*supported targets: *// + s/ .*// + p'` +- case "$ld_supported_emulations" in +- i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; +- i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; +- sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; +- armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; +- m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; +- elf32ppc | elf32ppclinux) +- # Determine Lib Version +- cat >dummy.c <$dummy.c < +-#if defined(__GLIBC__) +-extern char __libc_version[]; +-extern char __libc_release[]; +-#endif +-main(argc, argv) +- int argc; +- char *argv[]; +-{ +-#if defined(__GLIBC__) +- printf("%s %s\n", __libc_version, __libc_release); ++#ifdef __cplusplus ++#include /* for printf() prototype */ ++ int main (int argc, char *argv[]) { + #else +- printf("unkown\n"); +-#endif +- return 0; +-} +-EOF +- LIBC="" +- ${CC-cc} dummy.c -o dummy 2>/dev/null +- if test "$?" = 0 ; then +- ./dummy | grep 1\.99 > /dev/null +- if test "$?" = 0 ; then +- LIBC="libc1" +- fi +- fi +- rm -f dummy.c dummy +- echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;; +- esac +- +- if test "${UNAME_MACHINE}" = "alpha" ; then +- sed 's/^ //' <dummy.s +- .globl main +- .ent main +- main: +- .frame \$30,0,\$26,0 +- .prologue 0 +- .long 0x47e03d80 # implver $0 +- lda \$2,259 +- .long 0x47e20c21 # amask $2,$1 +- srl \$1,8,\$2 +- sll \$2,2,\$2 +- sll \$0,3,\$0 +- addl \$1,\$0,\$0 +- addl \$2,\$0,\$0 +- ret \$31,(\$26),1 +- .end main +-EOF +- LIBC="" +- ${CC-cc} dummy.s -o dummy 2>/dev/null +- if test "$?" = 0 ; then +- ./dummy +- case "$?" in +- 7) +- UNAME_MACHINE="alpha" +- ;; +- 15) +- UNAME_MACHINE="alphaev5" +- ;; +- 14) +- UNAME_MACHINE="alphaev56" +- ;; +- 10) +- UNAME_MACHINE="alphapca56" +- ;; +- 16) +- UNAME_MACHINE="alphaev6" +- ;; +- esac +- +- objdump --private-headers dummy | \ +- grep ld.so.1 > /dev/null +- if test "$?" = 0 ; then +- LIBC="libc1" +- fi +- fi +- rm -f dummy.s dummy +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 +- elif test "${UNAME_MACHINE}" = "mips" ; then +- cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy +- else +- # Either a pre-BFD a.out linker (linux-gnuoldld) +- # or one that does not give us useful --help. +- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. +- # If ld does not provide *any* "supported emulations:" +- # that means it is gnuoldld. +- echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" +- test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 +- +- case "${UNAME_MACHINE}" in +- i?86) +- VENDOR=pc; +- ;; +- *) +- VENDOR=unknown; +- ;; +- esac +- # Determine whether the default compiler is a.out or elf +- cat >dummy.c < +-main(argc, argv) +- int argc; +- char *argv[]; +-{ + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 +- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); ++ printf ("%s-pc-linux-gnu\n", argv[1]); + # else +- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); ++ printf ("%s-pc-linux-gnulibc1\n", argv[1]); + # endif + # else +- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); ++ printf ("%s-pc-linux-gnulibc1\n", argv[1]); + # endif + #else +- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); ++ printf ("%s-pc-linux-gnuaout\n", argv[1]); + #endif + return 0; + } + EOF +- ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 +- rm -f dummy.c dummy +- fi ;; +-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +-# are messed up and put the nodename in both sysname and nodename. +- i?86:DYNIX/ptx:4*:*) ++ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 ++ rm -f $dummy.c $dummy ++ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ++ ;; ++ i*86:DYNIX/ptx:4*:*) ++ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. ++ # earlier versions are messed up and put the nodename in both ++ # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; +- i?86:UNIX_SV:4.2MP:2.*) ++ i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, +@@ -733,26 +897,23 @@ + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; +- i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) ++ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) ++ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then +- echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} ++ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else +- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} ++ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; +- i?86:*:5:7*) +- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` +- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 +- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ +- && UNAME_MACHINE=i586 +-# 5.0.4c returns "Pent II". 5.0.5 returns PentII +- (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) \ +- && UNAME_MACHINE=i686 +- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ +- && UNAME_MACHINE=i686 +- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE} +- exit 0 ;; +- i?86:*:3.2:*) ++ i*86:*:5:[78]*) ++ case `/bin/uname -X | grep "^Machine"` in ++ *486*) UNAME_MACHINE=i486 ;; ++ *Pentium) UNAME_MACHINE=i586 ;; ++ *Pent*|*Celeron) UNAME_MACHINE=i686 ;; ++ esac ++ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ++ exit 0 ;; ++ i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 +- (/bin/uname -X|egrep '^Machine.*PentII' >/dev/null) \ ++ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 +- (/bin/uname -X|egrep '^Machine.*Pent II' >/dev/null) \ ++ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 +- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ +- && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; ++ i*86:*DOS:*:*) ++ echo ${UNAME_MACHINE}-pc-msdosdjgpp ++ exit 0 ;; + pc:*:*:*) ++ # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp +@@ -796,7 +959,7 @@ + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; +- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) ++ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` +@@ -807,28 +970,31 @@ + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; +- m68*:LynxOS:2.*:*) ++ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; +- i?86:LynxOS:2.*:*) ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; +- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) ++ rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ echo powerpc-unknown-lynxos${UNAME_RELEASE} ++ exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; +- RM*:SINIX-*:*:*) ++ RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; +- RM*:ReliantUNIX-*:*:*) ++ RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) +@@ -839,8 +1005,8 @@ + echo ns32k-sni-sysv + fi + exit 0 ;; +- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort +- # says ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) +@@ -852,13 +1018,17 @@ + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; ++ *:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo hppa1.1-stratus-vos ++ exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; +- news*:NEWS-OS:*:6*) ++ news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; +- R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) ++ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else +@@ -874,12 +1044,89 @@ + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; ++ SX-4:SUPER-UX:*:*) ++ echo sx4-nec-superux${UNAME_RELEASE} ++ exit 0 ;; ++ SX-5:SUPER-UX:*:*) ++ echo sx5-nec-superux${UNAME_RELEASE} ++ exit 0 ;; ++ Power*:Rhapsody:*:*) ++ echo powerpc-apple-rhapsody${UNAME_RELEASE} ++ exit 0 ;; ++ *:Rhapsody:*:*) ++ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} ++ exit 0 ;; ++ *:Darwin:*:*) ++ echo `uname -p`-apple-darwin${UNAME_RELEASE} ++ exit 0 ;; ++ *:procnto*:*:* | *:QNX:[0123456789]*:*) ++ if test "${UNAME_MACHINE}" = "x86pc"; then ++ UNAME_MACHINE=pc ++ fi ++ echo `uname -p`-${UNAME_MACHINE}-nto-qnx ++ exit 0 ;; ++ *:QNX:*:4*) ++ echo i386-pc-qnx ++ exit 0 ;; ++ NSR-[KW]:NONSTOP_KERNEL:*:*) ++ echo nsr-tandem-nsk${UNAME_RELEASE} ++ exit 0 ;; ++ *:NonStop-UX:*:*) ++ echo mips-compaq-nonstopux ++ exit 0 ;; ++ BS2000:POSIX*:*:*) ++ echo bs2000-siemens-sysv ++ exit 0 ;; ++ DS/*:UNIX_System_V:*:*) ++ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} ++ exit 0 ;; ++ *:Plan9:*:*) ++ # "uname -m" is not consistent, so use $cputype instead. 386 ++ # is converted to i386 for consistency with other x86 ++ # operating systems. ++ if test "$cputype" = "386"; then ++ UNAME_MACHINE=i386 ++ else ++ UNAME_MACHINE="$cputype" ++ fi ++ echo ${UNAME_MACHINE}-unknown-plan9 ++ exit 0 ;; ++ i*86:OS/2:*:*) ++ # If we were able to find `uname', then EMX Unix compatibility ++ # is probably installed. ++ echo ${UNAME_MACHINE}-pc-os2-emx ++ exit 0 ;; ++ *:TOPS-10:*:*) ++ echo pdp10-unknown-tops10 ++ exit 0 ;; ++ *:TENEX:*:*) ++ echo pdp10-unknown-tenex ++ exit 0 ;; ++ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) ++ echo pdp10-dec-tops20 ++ exit 0 ;; ++ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) ++ echo pdp10-xkl-tops20 ++ exit 0 ;; ++ *:TOPS-20:*:*) ++ echo pdp10-unknown-tops20 ++ exit 0 ;; ++ *:ITS:*:*) ++ echo pdp10-unknown-its ++ exit 0 ;; ++ i*86:XTS-300:*:STOP) ++ echo ${UNAME_MACHINE}-unknown-stop ++ exit 0 ;; ++ i*86:atheos:*:*) ++ echo ${UNAME_MACHINE}-unknown-atheos ++ exit 0 ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 + #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +-cat >dummy.c <$dummy.c < + # include +@@ -917,7 +1164,10 @@ + #endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; +- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); ++ if (version < 4) ++ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); ++ else ++ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); + #endif + +@@ -962,11 +1212,24 @@ + #endif + + #if defined (vax) +-#if !defined (ultrix) +- printf ("vax-dec-bsd\n"); exit (0); +-#else +- printf ("vax-dec-ultrix\n"); exit (0); +-#endif ++# if !defined (ultrix) ++# include ++# if defined (BSD) ++# if BSD == 43 ++ printf ("vax-dec-bsd4.3\n"); exit (0); ++# else ++# if BSD == 199006 ++ printf ("vax-dec-bsd4.3reno\n"); exit (0); ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# endif ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# else ++ printf ("vax-dec-ultrix\n"); exit (0); ++# endif + #endif + + #if defined (alliant) && defined (i860) +@@ -977,8 +1240,8 @@ + } + EOF + +-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 +-rm -f dummy.c dummy ++$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 ++rm -f $dummy.c $dummy + + # Apollos put the system type in the environment. + +@@ -1010,6 +1273,48 @@ + esac + fi + +-#echo '(Unable to guess system type)' 1>&2 ++cat >&2 < in order to provide the needed ++information to handle your system. ++ ++config.guess timestamp = $timestamp ++ ++uname -m = `(uname -m) 2>/dev/null || echo unknown` ++uname -r = `(uname -r) 2>/dev/null || echo unknown` ++uname -s = `(uname -s) 2>/dev/null || echo unknown` ++uname -v = `(uname -v) 2>/dev/null || echo unknown` ++ ++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` ++/bin/uname -X = `(/bin/uname -X) 2>/dev/null` ++ ++hostinfo = `(hostinfo) 2>/dev/null` ++/bin/universe = `(/bin/universe) 2>/dev/null` ++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` ++/bin/arch = `(/bin/arch) 2>/dev/null` ++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` ++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` ++ ++UNAME_MACHINE = ${UNAME_MACHINE} ++UNAME_RELEASE = ${UNAME_RELEASE} ++UNAME_SYSTEM = ${UNAME_SYSTEM} ++UNAME_VERSION = ${UNAME_VERSION} ++EOF + + exit 1 ++ ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: +diff -ruN --exclude=CVS gcc-2.95.3/config.sub gcc/config.sub +--- gcc-2.95.3/config.sub Wed Aug 4 10:09:26 1999 ++++ gcc/config.sub Sat Oct 13 18:29:48 2001 +@@ -1,6 +1,10 @@ + #! /bin/sh +-# Configuration validation subroutine script, version 1.1. +-# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. ++# Configuration validation subroutine script. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ++# Free Software Foundation, Inc. ++ ++timestamp='2001-10-13' ++ + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software + # can handle that machine. It does not imply ALL GNU software can. +@@ -25,6 +29,8 @@ + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + ++# Please send patches to . ++# + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. +@@ -45,30 +51,73 @@ + # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + # It is wrong to echo any other type of specification. + +-if [ x$1 = x ] +-then +- echo Configuration name missing. 1>&2 +- echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 +- echo "or $0 ALIAS" 1>&2 +- echo where ALIAS is a recognized configuration type. 1>&2 +- exit 1 +-fi ++me=`echo "$0" | sed -e 's,.*/,,'` + +-# First pass through any local machine types. +-case $1 in +- *local*) +- echo $1 +- exit 0 +- ;; +- *) +- ;; ++usage="\ ++Usage: $0 [OPTION] CPU-MFR-OPSYS ++ $0 [OPTION] ALIAS ++ ++Canonicalize a configuration name. ++ ++Operation modes: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to ." ++ ++version="\ ++GNU config.sub ($timestamp) ++ ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ++Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try \`$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit 0 ;; ++ --version | -v ) ++ echo "$version" ; exit 0 ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit 0 ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" ++ exit 1 ;; ++ ++ *local*) ++ # First pass through any local machine types. ++ echo $1 ++ exit 0;; ++ ++ * ) ++ break ;; ++ esac ++done ++ ++case $# in ++ 0) echo "$me: missing argument$help" >&2 ++ exit 1;; ++ 1) ;; ++ *) echo "$me: too many arguments$help" >&2 ++ exit 1;; + esac + + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- linux-gnu*) ++ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -94,20 +143,28 @@ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple) ++ -apple | -axis) + os= + basic_machine=$1 + ;; +- -sim | -cisco | -oki | -wec | -winbond ) # EGCS LOCAL ++ -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; +- -scout) # EGCS LOCAL ++ -scout) + ;; +- -wrs) # EGCS LOCAL ++ -wrs) + os=-vxworks + basic_machine=$1 + ;; ++ -chorusos*) ++ os=-chorusos ++ basic_machine=$1 ++ ;; ++ -chorusrdb) ++ os=-chorusrdb ++ basic_machine=$1 ++ ;; + -hiux*) + os=-hiuxwe2 + ;; +@@ -156,49 +213,60 @@ + -psos*) + os=-psos + ;; ++ -mint | -mint[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint ++ ;; + esac + + # Decode aliases for certain CPU-COMPANY combinations. + case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. +- tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ +- | arme[lb] | pyramid | mn10200 | mn10300 \ +- | tron | a29k | 580 | i960 | h8300 \ +- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ +- | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \ +- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ +- | 1750a | dsp16xx | pdp11 \ +- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ +- | mipstx39 | mipstx39el \ +- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x) +- basic_machine=$basic_machine-unknown +- ;; +- m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \ +- | h8500 | w65) # EGCS LOCAL +- ;; +- thumb) +- basic_machine=$basic_machine-unknown +- ;; +- mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300 +- basic_machine=$basic_machine-unknown +- ;; +- mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100 ++ 1750a | 580 \ ++ | a29k \ ++ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ++ | c4x | clipper \ ++ | d10v | d30v | dsp16xx \ ++ | fr30 \ ++ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ ++ | i370 | i860 | i960 | ia64 \ ++ | m32r | m68000 | m68k | m88k | mcore \ ++ | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ ++ | mips64vr4100 | mips64vr4100el | mips64vr4300 \ ++ | mips64vr4300el | mips64vr5000 | mips64vr5000el \ ++ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ ++ | mipsisa32 \ ++ | mn10200 | mn10300 \ ++ | ns16k | ns32k \ ++ | openrisc \ ++ | pdp10 | pdp11 | pj | pjl \ ++ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ ++ | pyramid \ ++ | s390 | s390x \ ++ | sh | sh[34] | sh[34]eb | shbe | shle \ ++ | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ ++ | stormy16 | strongarm \ ++ | tahoe | thumb | tic80 | tron \ ++ | v850 \ ++ | we32k \ ++ | x86 | xscale \ ++ | z8k) + basic_machine=$basic_machine-unknown + ;; +- mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000 ++ m6811 | m68hc11 | m6812 | m68hc12) ++ # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown ++ os=-none + ;; +- mips16) +- basic_machine=$basic_machine-unknown +- ;; +- d10v) +- basic_machine=$basic_machine-unknown ++ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; ++ + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. +- i[34567]86) ++ i*86 | x86_64 | i*86be ) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. +@@ -207,44 +275,47 @@ + exit 1 + ;; + # Recognize the basic CPU types with company name. +- vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ +- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ +- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ +- | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ +- | xmp-* | ymp-* \ +- | hppa-* | hppa1.0-* | hppa1.1-* \ +- | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ +- | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \ +- | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \ +- | xps100-* | clipper-* | orion-* \ +- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ +- | sparc64-* | sparcv9-* | sparc86x-* | mips64-* | mipsel-* \ +- | mips64el-* | mips64orion-* | mips64orionel-* \ +- | mipstx39-* | mipstx39el-* \ +- | f301-* | arm*-*) +- ;; +- m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # EGCS LOCAL +- ;; +- thumb-*) # EGCS LOCAL angela/thumb +- ;; +- v850-*) # EGCS LOCAL +- ;; +- d30v-*) # EGCS LOCAL +- ;; +- mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300 +- ;; +- mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100 +- ;; +- mips16-*) # EGCS LOCAL krk/mips16 +- ;; +- tic30-*) # EGCS LOCAL ian/tic30 +- ;; +- c30-*) # EGCS LOCAL ian/tic30 +- basic_machine=tic30-unknown ++ 580-* \ ++ | a29k-* \ ++ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ ++ | alphapca5[67]-* | arc-* \ ++ | arm-* | armbe-* | armle-* | armv*-* \ ++ | bs2000-* \ ++ | c[123]* | c30-* | [cjt]90-* | c54x-* \ ++ | clipper-* | cray2-* | cydra-* \ ++ | d10v-* | d30v-* \ ++ | elxsi-* \ ++ | f30[01]-* | f700-* | fr30-* | fx80-* \ ++ | h8300-* | h8500-* \ ++ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ ++ | i*86-* | i860-* | i960-* | ia64-* \ ++ | m32r-* \ ++ | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ ++ | m88110-* | m88k-* | mcore-* \ ++ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ ++ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ ++ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ ++ | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ ++ | none-* | np1-* | ns16k-* | ns32k-* \ ++ | orion-* \ ++ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ ++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ ++ | pyramid-* \ ++ | romp-* | rs6000-* \ ++ | s390-* | s390x-* \ ++ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ ++ | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ ++ | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ ++ | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ ++ | v850-* | vax-* \ ++ | we32k-* \ ++ | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ ++ | ymp-* \ ++ | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. +- 386bsd) # EGCS LOCAL ++ 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; +@@ -254,11 +325,11 @@ + 3b*) + basic_machine=we32k-att + ;; +- a29khif) # EGCS LOCAL ++ a29khif) + basic_machine=a29k-amd + os=-udi + ;; +- adobe68k) # EGCS LOCAL ++ adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; +@@ -277,21 +348,25 @@ + os=-sysv + ;; + amiga | amiga-*) +- basic_machine=m68k-cbm ++ basic_machine=m68k-unknown + ;; + amigaos | amigados) +- basic_machine=m68k-cbm ++ basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) +- basic_machine=m68k-cbm ++ basic_machine=m68k-unknown + os=-sysv4 + ;; ++ amithlon) ++ basic_machine=i386be-unknown ++ os=-amithlon ++ ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; +- apollo68bsd) # EGCS LOCAL ++ apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; +@@ -331,13 +406,16 @@ + basic_machine=cray2-cray + os=-unicos + ;; +- [ctj]90-cray) +- basic_machine=c90-cray ++ [cjt]90) ++ basic_machine=${basic_machine}-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; ++ cris | cris-* | etrax*) ++ basic_machine=cris-axis ++ ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; +@@ -371,7 +449,7 @@ + encore | umax | mmax) + basic_machine=ns32k-encore + ;; +- es1800 | OSE68k | ose68k | ose | OSE) # EGCS LOCAL ++ es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; +@@ -385,6 +463,10 @@ + basic_machine=tron-gmicro + os=-sysv + ;; ++ go32) ++ basic_machine=i386-pc ++ os=-go32 ++ ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 +@@ -393,11 +475,11 @@ + basic_machine=h8300-hitachi + os=-hms + ;; +- h8300xray) # EGCS LOCAL ++ h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; +- h8500hms) # EGCS LOCAL ++ h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; +@@ -416,22 +498,6 @@ + basic_machine=m68k-hp + os=-hpux + ;; +- w89k-*) # EGCS LOCAL +- basic_machine=hppa1.1-winbond +- os=-proelf +- ;; +- op50n-*) # EGCS LOCAL +- basic_machine=hppa1.1-oki +- os=-proelf +- ;; +- op60c-*) # EGCS LOCAL +- basic_machine=hppa1.1-oki +- os=-proelf +- ;; +- hppro) # EGCS LOCAL +- basic_machine=hppa1.1-hp +- os=-proelf +- ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; +@@ -441,22 +507,21 @@ + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; +- hp9k6[0-9][0-9] | hp6[0-9][0-9] ) ++ hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; +- hp9k7[0-79][0-9] | hp7[0-79][0-9] ) ++ hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; +- hp9k78[0-9] | hp78[0-9] ) ++ hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; +- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \ +- hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 ) ++ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; +- hp9k8[0-9][13679] | hp8[0-9][13679] ) ++ hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) +@@ -465,47 +530,42 @@ + hppa-next) + os=-nextstep3 + ;; +- hppaosf) # EGCS LOCAL ++ hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; ++ hppro) ++ basic_machine=hppa1.1-hp ++ os=-proelf ++ ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm +- os=-mvs + ;; + # I'm not sure what "Sysv32" means. Should this be sysv3.2? +- i[34567]86v32) ++ i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; +- i[34567]86v4*) ++ i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; +- i[34567]86v) ++ i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; +- i[34567]86sol2) ++ i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; +- i386mach) # EGCS LOCAL ++ i386mach) + basic_machine=i386-mach + os=-mach + ;; +- i386-vsta | vsta) # EGCS LOCAL ++ i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; +- i386-go32 | go32) # EGCS LOCAL +- basic_machine=i386-unknown +- os=-go32 +- ;; +- i386-mingw32 | mingw32) +- basic_machine=i386-unknown +- os=-mingw32 +- ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in +@@ -531,9 +591,17 @@ + basic_machine=ns32k-utek + os=-sysv + ;; ++ mingw32) ++ basic_machine=i386-pc ++ os=-mingw32 ++ ;; + miniframe) + basic_machine=m68000-convergent + ;; ++ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) ++ basic_machine=m68k-atari ++ os=-mint ++ ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu +@@ -548,24 +616,36 @@ + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; +- monitor) # EGCS LOCAL ++ mmix*) ++ basic_machine=mmix-knuth ++ os=-mmixware ++ ;; ++ monitor) + basic_machine=m68k-rom68k + os=-coff + ;; +- msdos) # EGCS LOCAL +- basic_machine=i386-unknown ++ morphos) ++ basic_machine=powerpc-unknown ++ os=-morphos ++ ;; ++ msdos) ++ basic_machine=i386-pc + os=-msdos + ;; ++ mvs) ++ basic_machine=i370-ibm ++ os=-mvs ++ ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) +- basic_machine=i386-unknown # EGCS LOCAL ++ basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) +- basic_machine=armv4l-corel ++ basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) +@@ -580,7 +660,7 @@ + basic_machine=mips-sony + os=-newsos + ;; +- necv70) # EGCS LOCAL ++ necv70) + basic_machine=v70-nec + os=-sysv + ;; +@@ -609,18 +689,29 @@ + basic_machine=i960-intel + os=-nindy + ;; +- mon960) # EGCS LOCAL ++ mon960) + basic_machine=i960-intel + os=-mon960 + ;; ++ nonstopux) ++ basic_machine=mips-compaq ++ os=-nonstopux ++ ;; + np1) + basic_machine=np1-gould + ;; +- OSE68000 | ose68000) # EGCS LOCAL ++ nsr-tandem) ++ basic_machine=nsr-tandem ++ ;; ++ op50n-* | op60c-*) ++ basic_machine=hppa1.1-oki ++ os=-proelf ++ ;; ++ OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; +- os68k) # EGCS LOCAL ++ os68k) + basic_machine=m68k-none + os=-os68k + ;; +@@ -641,28 +732,28 @@ + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; +- pentium | p5 | k5 | k6 | nexen) ++ pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc + ;; +- pentiumpro | p6 | 6x86) ++ pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) +- basic_machine=i786-pc ++ basic_machine=i686-pc + ;; +- pentium-* | p5-* | k5-* | k6-* | nexen-*) ++ pentium-* | p5-* | k5-* | k6-* | nexgen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; +- pentiumpro-* | p6-* | 6x86-*) ++ pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) +- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; +- power) basic_machine=rs6000-ibm ++ power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; +@@ -674,10 +765,24 @@ + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ++ ppc64) basic_machine=powerpc64-unknown ++ ;; ++ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ ppc64le | powerpc64little | ppc64-le | powerpc64-little) ++ basic_machine=powerpc64le-unknown ++ ;; ++ ppc64le-* | powerpc64little-*) ++ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + ps2) + basic_machine=i386-ibm + ;; +- rom68k) # EGCS LOCAL ++ pw32) ++ basic_machine=i586-unknown ++ os=-pw32 ++ ;; ++ rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; +@@ -687,7 +792,7 @@ + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; +- sa29200) # EGCS LOCAL ++ sa29200) + basic_machine=a29k-amd + os=-udi + ;; +@@ -698,7 +803,7 @@ + basic_machine=sh-hitachi + os=-hms + ;; +- sparclite-wrs) # EGCS LOCAL ++ sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; +@@ -709,10 +814,10 @@ + spur) + basic_machine=spur-unknown + ;; +- st2000) # EGCS LOCAL ++ st2000) + basic_machine=m68k-tandem + ;; +- stratus) # EGCS LOCAL ++ stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; +@@ -756,10 +861,22 @@ + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; ++ sv1) ++ basic_machine=sv1-cray ++ os=-unicos ++ ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; ++ t3e) ++ basic_machine=t3e-cray ++ os=-unicos ++ ;; ++ tic54x | c54x*) ++ basic_machine=tic54x-unknown ++ os=-coff ++ ;; + tx39) + basic_machine=mipstx39-unknown + ;; +@@ -777,7 +894,7 @@ + basic_machine=a29k-nyu + os=-sym1 + ;; +- v810 | necv810) # EGCS LOCAL ++ v810 | necv810) + basic_machine=v810-nec + os=-none + ;; +@@ -804,9 +921,17 @@ + basic_machine=a29k-wrs + os=-vxworks + ;; +- w65*) # EGCS LOCAL +- basic_machine=w65-wdc +- os=-none ++ w65*) ++ basic_machine=w65-wdc ++ os=-none ++ ;; ++ w89k-*) ++ basic_machine=hppa1.1-winbond ++ os=-proelf ++ ;; ++ windows32) ++ basic_machine=i386-pc ++ os=-windows32-msvcrt + ;; + xmp) + basic_machine=xmp-cray +@@ -815,7 +940,7 @@ + xps | xps100) + basic_machine=xps100-honeywell + ;; +- z8k-*-coff) # EGCS LOCAL ++ z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; +@@ -826,13 +951,13 @@ + + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. +- w89k) # EGCS LOCAL ++ w89k) + basic_machine=hppa1.1-winbond + ;; +- op50n) # EGCS LOCAL ++ op50n) + basic_machine=hppa1.1-oki + ;; +- op60c) # EGCS LOCAL ++ op60c) + basic_machine=hppa1.1-oki + ;; + mips) +@@ -851,13 +976,20 @@ + vax) + basic_machine=vax-dec + ;; ++ pdp10) ++ # there are many clones, so DEC is not a safe bet ++ basic_machine=pdp10-unknown ++ ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; +- sparc | sparcv9) ++ sh3 | sh4 | sh3eb | sh4eb) ++ basic_machine=sh-unknown ++ ;; ++ sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) +@@ -869,16 +1001,19 @@ + orion105) + basic_machine=clipper-highlevel + ;; +- mac | mpw | mac-mpw) # EGCS LOCAL ++ mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; +- pmac | pmac-mpw) # EGCS LOCAL ++ pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; +- c4x*) +- basic_machine=c4x-none +- os=-coff +- ;; ++ c4x*) ++ basic_machine=c4x-none ++ os=-coff ++ ;; ++ *-unknown) ++ # Make sure to match an already-canonicalized machine name. ++ ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 +@@ -927,28 +1062,42 @@ + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ +- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ +- | -aos* \ ++ | -amigaos* | -amigados* | -morphos* | -amithlon \ ++ | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ ++ | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ +- | -interix* | -uwin* ) ++ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ ++ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ ++ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ++ | -os2* | -vos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; +- # EGCS LOCAL ++ -qnx*) ++ case $basic_machine in ++ x86-* | i*86-*) ++ ;; ++ *) ++ os=-nto$os ++ ;; ++ esac ++ ;; ++ -nto*) ++ os=-nto-qnx ++ ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ +- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ +- | -macos* | -mpw* | -magic* | -mon960* | -lnews* ) ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ ++ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; +- # END EGCS LOCAL + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; +@@ -958,6 +1107,12 @@ + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; ++ -opened*) ++ os=-openedition ++ ;; ++ -wince*) ++ os=-wince ++ ;; + -osfrose*) + os=-osfrose + ;; +@@ -973,7 +1128,7 @@ + -acis*) + os=-aos + ;; +- -386bsd) # EGCS LOCAL ++ -386bsd) + os=-bsd + ;; + -ctix* | -uts*) +@@ -982,6 +1137,9 @@ + -ns2 ) + os=-nextstep2 + ;; ++ -nsk*) ++ os=-nsk ++ ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` +@@ -1007,15 +1165,18 @@ + # This must come after -sysvr4. + -sysv*) + ;; +- -ose*) # EGCS LOCAL ++ -ose*) + os=-ose + ;; +- -es1800*) # EGCS LOCAL ++ -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ os=-mint ++ ;; + -none) + ;; + *) +@@ -1041,12 +1202,15 @@ + *-acorn) + os=-riscix1.2 + ;; +- arm*-corel) ++ arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; ++ pdp10-*) ++ os=-tops20 ++ ;; + pdp11-*) + os=-none + ;; +@@ -1065,15 +1229,15 @@ + # default. + # os=-sunos4 + ;; +- m68*-cisco) # EGCS LOCAL ++ m68*-cisco) + os=-aout + ;; +- mips*-cisco) # EGCS LOCAL ++ mips*-cisco) ++ os=-elf ++ ;; ++ mips*-*) + os=-elf + ;; +- mips*-*) # EGCS LOCAL +- os=-elf +- ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; +@@ -1086,13 +1250,13 @@ + *-ibm) + os=-aix + ;; +- *-wec) # EGCS LOCAL ++ *-wec) + os=-proelf + ;; +- *-winbond) # EGCS LOCAL ++ *-winbond) + os=-proelf + ;; +- *-oki) # EGCS LOCAL ++ *-oki) + os=-proelf + ;; + *-hp) +@@ -1155,18 +1319,21 @@ + *-masscomp) + os=-rtu + ;; +- f301-fujitsu) ++ f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; +- *-rom68k) # EGCS LOCAL ++ *-rom68k) + os=-coff + ;; +- *-*bug) # EGCS LOCAL ++ *-*bug) + os=-coff + ;; +- *-apple) # EGCS LOCAL ++ *-apple) + os=-macos + ;; ++ *-atari*) ++ os=-mint ++ ;; + *) + os=-none + ;; +@@ -1212,7 +1379,7 @@ + -genix*) + vendor=ns + ;; +- -mvs*) ++ -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) +@@ -1224,15 +1391,29 @@ + -aux*) + vendor=apple + ;; +- -hms*) # EGCS LOCAL ++ -hms*) + vendor=hitachi + ;; +- -mpw* | -macos*) # EGCS LOCAL ++ -mpw* | -macos*) + vendor=apple + ;; ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ++ vendor=atari ++ ;; ++ -vos*) ++ vendor=stratus ++ ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; + esac + + echo $basic_machine$os ++exit 0 ++ ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: +diff -ruN --exclude=CVS gcc-2.95.3/configure.in gcc/configure.in +--- gcc-2.95.3/configure.in Wed Jun 23 00:44:40 1999 ++++ gcc/configure.in Thu Sep 27 19:52:22 2001 +@@ -50,7 +50,7 @@ + # these tools are built for the host environment + # Note, the powerpc-eabi build depends on sim occurring before gdb in order to + # know that we are building the simulator. +-host_tools="texinfo byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip" ++host_tools="byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip" + + + # these libraries are built for the target environment, and are built after +diff -ruN --exclude=CVS gcc-2.95.3/gcc/Makefile.in gcc/gcc/Makefile.in +--- gcc-2.95.3/gcc/Makefile.in Thu Jan 25 15:02:58 2001 ++++ gcc/gcc/Makefile.in Thu Oct 4 17:12:22 2001 +@@ -367,7 +367,7 @@ + LIBGCC2_DEPS = + + # libgcc1-test target (must also be overridable for a target) +-LIBGCC1_TEST = libgcc1-test ++LIBGCC1_TEST = #libgcc1-test + + # List of extra executables that should be compiled for this target machine + # that are used for compiling from source code to object code. +@@ -403,6 +403,12 @@ + # so don't override it here. + USE_COLLECT2 = collect2$(exeext) + ++### begin-GG-local: dynamic libraries ++# List of extra object files that should be compiled and linked with ++# collect2. ++EXTRA_COLLECT2_OBJS = ++### end-GG-local ++ + # List of extra C and assembler files to add to libgcc1.a. + # Assembler files should have names ending in `.asm'. + LIB1FUNCS_EXTRA = +@@ -1359,7 +1365,7 @@ + hard-reg-set.h $(BASIC_BLOCK_H) + sbitmap.o: sbitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H) + +-COLLECT2_OBJS = collect2.o tlink.o hash.o intl.o underscore.o version.o ++COLLECT2_OBJS = collect2.o tlink.o hash.o intl.o underscore.o version.o $(EXTRA_COLLECT2_OBJS) + collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS) + # Don't try modifying collect2 (aka ld) in place--it might be linking this. + -rm -f collect2$(exeext) +diff -ruN --exclude=CVS gcc-2.95.3/gcc/amigacollect2.c gcc/gcc/amigacollect2.c +--- gcc-2.95.3/gcc/amigacollect2.c Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/amigacollect2.c Thu Sep 27 19:35:53 2001 +@@ -0,0 +1,344 @@ ++/* GG-local whole file: dynamic libraries */ ++/* Supplimentary functions that get compiled and linked to collect2 for ++ AmigaOS target. ++ Copyright (C) 1996 Free Software Foundation, Inc. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#include ++#include ++#include ++#include ++ ++/* From collect2.c: */ ++ ++void maybe_unlink(char *); ++char* xmalloc(unsigned); ++void fatal_perror(char *, ...); ++void fork_execute(char *, char **); ++void fatal(char*, ...); ++ ++extern char *c_file_name; ++extern int debug; ++ ++ /* Names of temporary files we create. */ ++#define XLIBS_C_NAME "xlibs.c" ++#define XLIBS_O_NAME "xlibs.o" ++#define SHARED_X_NAME "shared.x" ++ ++/* Suffix which is prepended to "-l" options for dynamic libraries. */ ++#define DYNAMIC_LIB_SUFFIX "_ixlibrary" ++ ++/* Structure that holds library names. */ ++struct liblist ++{ ++ struct liblist *next; ++ char *name; ++ char *cname; ++}; ++ ++/* Not zero if "-static" was specified on GCC command line or if all the ++ libraries are static. */ ++static int flag_static=0; ++ ++/* Not zero if linking a base relative executable. This is recognized by ++ presence of "-m amiga_bss" on the linker's commandline. */ ++static int flag_baserel=0; ++ ++/* Not zero if some of the specified libraries are dynamic. */ ++static int found_dynamic_libs=0; ++ ++/* List of linker libraries. */ ++struct liblist *head = NULL; ++ ++ /* Return 1 if collect2 should do something more apart from tlink. We want it ++ to call "postlink" and "strip" if linking with dynamic libraries. */ ++ ++int ++amigaos_do_collecting(void) ++{ ++ return !flag_static; ++} ++ ++/* Check for presence of "-static" on the GCC command line. We should not do ++ collecting if this flag was specified. */ ++ ++void ++amigaos_gccopts_hook(char* arg) ++{ ++ if (strncmp(arg, "-static", strlen("-static"))==0) ++ flag_static=1; ++} ++ ++/* Replace unprintable characters with underscores. Used by "add_lib()". */ ++ ++static void ++safename(char *p) ++{ ++ if (!isalpha(*p)) ++ *p = '_'; ++ p++; ++ while (*p) ++ { ++ if (!isalnum(*p)) ++ *p = '_'; ++ p++; ++ } ++} ++ ++/* Add a library to the list of dynamic libraries. First make sure that the ++ library is actually dynamic. Used by "amigaos_libname_hook()". */ ++ ++static void ++add_lib(char *name) ++{ ++ struct liblist *lib; ++ static char buf[256]; ++ ++ for (lib = head; lib; lib = lib->next) ++ if (!strcmp(lib->name, name)) ++ return; ++ ++ /* A2IXDIR_PREFIX is passed by "make". */ ++ sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", name); ++ if (access(buf, R_OK)) ++ return; ++ ++ lib = (struct liblist*)xmalloc(sizeof(struct liblist)); ++ lib->name = strdup(name); ++ lib->cname = strdup(name); ++ safename(lib->cname); ++ lib->next = head; ++ head = lib; ++ ++ if (debug) ++ fprintf(stderr, "found dynamic library, name: %s, cname: %s\n", lib->name, ++ lib->cname); ++ ++ found_dynamic_libs=1; ++} ++ ++/* Check if the argument is a linker library. Call "add_lib()" if yes. */ ++ ++void ++amigaos_libname_hook(char* arg) ++{ ++ int len = strlen(arg); ++ if (flag_static) ++ return; ++ ++ if (len > 2 && !memcmp(arg, "-l", 2)) ++ add_lib(arg + 2); ++ else if (len > 2 && !strcmp(arg + len - 2, ".a")) ++ { ++ char *lib; ++ ++ arg[len - 2] = '\0'; ++ lib = strrchr(arg, '/'); ++ if (lib == NULL) ++ lib = strrchr(arg, ':'); ++ if (lib == NULL) ++ lib = arg - 1; ++ if (!strncmp(lib + 1, "lib", 3)) ++ add_lib(lib + 4); ++ arg[len - 2] = '.'; ++ } ++} ++ ++/* Delete temporary files. */ ++ ++void ++amigaos_collect2_cleanup(void) ++{ ++ if (flag_static) ++ return; ++ maybe_unlink(XLIBS_C_NAME); ++ maybe_unlink(XLIBS_O_NAME); ++ maybe_unlink(SHARED_X_NAME); ++} ++ ++/* Copy file named by FNAME to X. */ ++ ++static void ++cat(char *fname, FILE *x) ++{ ++#define BUFSIZE 16384 ++ FILE *in; ++ static char buf[BUFSIZE]; ++ int bytes; ++ ++ in = fopen(fname, "r"); ++ if (in == NULL) ++ fatal_perror("%s", fname); ++ while (!feof(in) && (bytes = fread(buf, 1, BUFSIZE, in))) ++ fwrite(buf, 1, bytes, x); ++ fclose(in); ++} ++ ++/* If no dynamic libraries were found, perform like "-static". Otherwise, ++ create "xlibs.c", "shared.x" and invoke "gcc" to create "xlibs.o". We also ++ have to adjust the linker commandline. */ ++ ++void ++amigaos_prelink_hook(char** ld1_argv, int* strip_flag) ++{ ++ if (flag_static) ++ return; ++ ++ if (!found_dynamic_libs) ++ { ++ flag_static=1; ++ /* If the user has not requested "-static", but has requested "-s", ++ collect2 removes "-s" from the "ld1_argv", and calls "strip" after ++ linking. However, this would not be efficient if we linked the ++ executable without any dynamic library. In this case, we put "-s" ++ back. */ ++ if (*strip_flag) ++ { ++ /* Add "-s" as the last argument on the command line. */ ++ while (*ld1_argv) ++ ld1_argv++; ++ *ld1_argv++="-s"; ++ *ld1_argv=0; ++ *strip_flag=0; ++ } ++ } ++ else ++ { ++ FILE *x, *out; ++ struct liblist *lib; ++ static char* argv[]={0, "-c", XLIBS_C_NAME, 0}; ++ char **ld1_end, **ld1; ++ ++ /* Prepend suffixes to dynamic lib names. In addition, check if we are ++ linking a base relative executable. */ ++ for (ld1=ld1_argv; *ld1; ld1++) ++ { ++ int len=strlen(*ld1); ++ if (strncmp(*ld1, "-l", strlen("-l"))==0) ++ { ++ for (lib=head; lib; lib=lib->next) ++ if (strcmp(*ld1+strlen("-l"), lib->name)==0) ++ { ++ char *newname= ++ xmalloc(strlen(*ld1)+strlen(DYNAMIC_LIB_SUFFIX)+1); ++ strcpy(newname, *ld1); ++ strcat(newname, DYNAMIC_LIB_SUFFIX); ++ *ld1=newname; ++ break; ++ } ++ } ++ else if (len > 2 && !strcmp(*ld1 + len - 2, ".a")) ++ { ++ char *libname; ++ int substituted=0; ++ ++ (*ld1)[len - 2] = '\0'; ++ libname = strrchr(*ld1, '/'); ++ if (libname == NULL) ++ libname = strrchr(*ld1, ':'); ++ if (libname == NULL) ++ libname = *ld1 - 1; ++ if (!strncmp(libname + 1, "lib", 3)) ++ for (lib=head; lib; lib=lib->next) ++ if (strcmp(libname+4, lib->name)==0) ++ { ++ char *newname=xmalloc(strlen(*ld1)+ ++ strlen(DYNAMIC_LIB_SUFFIX)+3); ++ strcpy(newname, *ld1); ++ strcat(newname, DYNAMIC_LIB_SUFFIX); ++ strcat(newname, ".a"); ++ *ld1=newname; ++ substituted=1; ++ break; ++ } ++ if (!substituted) ++ (*ld1)[len - 2] = '.'; ++ } ++ else if (strcmp(ld1[0], "-m")==0 && ld1[1] ++ && strcmp(ld1[1], "amiga_bss")==0) ++ { ++ flag_baserel=1; ++ break; ++ } ++ } ++ ++ out = fopen(XLIBS_C_NAME, "w"); ++ if (out == NULL) ++ fatal_perror("%s", XLIBS_C_NAME); ++ x = fopen(SHARED_X_NAME, "w"); ++ if (x == NULL) ++ fatal_perror("%s", SHARED_X_NAME); ++ ++ cat((flag_baserel ? A2IXDIR_PREFIX "/amiga_exe_baserel_script.x" ++ : A2IXDIR_PREFIX "/amiga_exe_script.x"), x); ++ for (lib = head; lib; lib = lib->next) ++ { ++ static char buf[256]; ++ sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", lib->name); ++ fprintf(out, "extern long %sBase; long *__p%sBase = &%sBase;\n", ++ lib->cname, lib->cname, lib->cname); ++ cat(buf, x); ++ } /* {{ */ ++ fprintf(x, "}}\n"); ++ fclose(out); ++ fclose(x); ++ argv[0]=c_file_name; ++ fork_execute("gcc", argv); ++ ++ /* Unfortunately, unlike "-s", "-T" cannot be specified as the last ++ argument. We put it after "-L" args. */ ++ ld1_end=ld1_argv; ++ while (*ld1_end) ++ ld1_end++; ++ ld1_end++; ++ /* "ld1_end" now points after the terminating 0 of "ld1_argv". */ ++ ++ ld1=ld1_end-2; ++ while (ld1>ld1_argv && strncmp(*ld1, "-L", strlen("-L"))) ++ ld1--; ++ if (ld1==ld1_argv) ++ fatal("no -L arguments"); ++ ld1++; ++ /* "ld1" now points after "-L". */ ++ ++ /* Shift all the arguments after "-L" one position right. */ ++ memmove(ld1+1, ld1, (ld1_end-ld1)*sizeof(*ld1)); ++ /* Put -Tshared.x in the now empty space. */ ++ *ld1="-T" SHARED_X_NAME; ++ } ++} ++ ++/* Be lazy and just call "postlink". */ ++ ++void ++amigaos_postlink_hook(char* output_file) ++{ ++ static char* argv[]={"postlink", 0, 0, 0}; ++ if (flag_static) ++ return; ++ ++ if (flag_baserel) ++ { ++ argv[1]="-baserel"; ++ argv[2]=output_file; ++ } ++ else ++ argv[1]=output_file; ++ fork_execute("postlink", argv); ++} +diff -ruN --exclude=CVS gcc-2.95.3/gcc/c-decl.c gcc/gcc/c-decl.c +--- gcc-2.95.3/gcc/c-decl.c Thu Jan 25 15:02:59 2001 ++++ gcc/gcc/c-decl.c Thu Sep 27 19:35:53 2001 +@@ -4227,8 +4227,10 @@ + record the given order of parms in `parm_order'. */ + + void +-push_parm_decl (parm) +- tree parm; ++/* begin-GG-local: explicit register specification for parameters */ ++push_parm_decl (parm, asmspec) ++ tree parm, asmspec; ++/* end-GG-local */ + { + tree decl; + int old_immediate_size_expand = immediate_size_expand; +@@ -4253,6 +4255,78 @@ + } + #endif + ++ /* begin-GG-local: explicit register specification for parameters */ ++ if (asmspec) ++#ifdef TARGET_AMIGAOS ++ { ++ char *regname=TREE_STRING_POINTER(asmspec); ++ int regnum; ++ if ((regnum=decode_reg_name(regname))>=0) ++ { ++ tree type=TREE_TYPE(decl); ++ if (HARD_REGNO_MODE_OK(regnum, TYPE_MODE(type))) ++ { ++ tree t, attrs; ++ push_obstacks_nochange(); ++ end_temporary_allocation(); ++ /* Build tree for __attribute__ ((asm(regnum))). */ ++#if 0 ++ /* This doesn't work well because of a bug in ++ attribute_list_contained(), which passes list of arguments to ++ simple_cst_equal() instead of passing every argument ++ separately. */ ++ attrs=tree_cons(get_identifier("asm"), tree_cons(NULL_TREE, ++ build_int_2_wide(regnum, 0), NULL_TREE), NULL_TREE); ++#else ++ attrs=tree_cons(get_identifier("asm"), ++ build_int_2_wide(regnum, 0), NULL_TREE); ++#endif ++#if 0 ++ /* build_type_attribute_variant() would seem to be more ++ appropriate here. However, that function does not support ++ attributes for parameters properly. It modifies ++ TYPE_MAIN_VARIANT of a new type. As a result, comptypes() ++ thinks that types of parameters in prototype and definition ++ are different and issues error messages. See also comment ++ below. */ ++ type=build_type_attribute_variant(type, attrs); ++#else ++ /* First check whether such a type already exists - if yes, use ++ that one. This is very important, since otherwise ++ common_type() would think that it sees two different ++ types and would try to merge them - this could result in ++ warning messages. */ ++ for (t=TYPE_MAIN_VARIANT(type); t; t=TYPE_NEXT_VARIANT(t)) ++ if (comptypes(t, type)==1 ++ && attribute_list_equal(TYPE_ATTRIBUTES(t), attrs)) ++ break; ++ if (t) ++ type=t; ++ else ++ { ++ /* Create a new variant, with differing attributes. ++ (Hack! Type with differing attributes should no longer be ++ a variant of its main type. See comment above for ++ explanation why this was necessary). */ ++ type=build_type_copy(type); ++ TYPE_ATTRIBUTES(type)=attrs; ++ } ++#endif ++ TREE_TYPE(decl)=type; ++ pop_obstacks(); ++ } ++ else ++ error_with_decl(decl, ++ "register number for `%s' isn't suitable for the data type"); ++ } ++ else ++ error("invalid register name `%s'", regname); ++ } ++#else /* !TARGET_AMIGAOS */ ++ error("explicit register specification for parameters is not supported for this target"); ++#endif /* !TARGET_AMIGAOS */ ++ /* end-GG-local */ ++ + decl = pushdecl (decl); + + immediate_size_expand = old_immediate_size_expand; +diff -ruN --exclude=CVS gcc-2.95.3/gcc/c-parse.c gcc/gcc/c-parse.c +--- gcc-2.95.3/gcc/c-parse.c Tue Apr 27 00:35:53 1999 ++++ gcc/gcc/c-parse.c Thu Sep 27 19:56:19 2001 +@@ -1,69 +1,68 @@ + + /* A Bison parser, made from c-parse.y +- by GNU Bison version 1.25 +- */ ++ by GNU Bison version 1.28 */ + + #define YYBISON 1 /* Identify Bison output. */ + +-#define IDENTIFIER 258 +-#define TYPENAME 259 +-#define SCSPEC 260 +-#define TYPESPEC 261 +-#define TYPE_QUAL 262 +-#define CONSTANT 263 +-#define STRING 264 +-#define ELLIPSIS 265 +-#define SIZEOF 266 +-#define ENUM 267 +-#define STRUCT 268 +-#define UNION 269 +-#define IF 270 +-#define ELSE 271 +-#define WHILE 272 +-#define DO 273 +-#define FOR 274 +-#define SWITCH 275 +-#define CASE 276 +-#define DEFAULT 277 +-#define BREAK 278 +-#define CONTINUE 279 +-#define RETURN 280 +-#define GOTO 281 +-#define ASM_KEYWORD 282 +-#define TYPEOF 283 +-#define ALIGNOF 284 +-#define ATTRIBUTE 285 +-#define EXTENSION 286 +-#define LABEL 287 +-#define REALPART 288 +-#define IMAGPART 289 +-#define ASSIGN 290 +-#define OROR 291 +-#define ANDAND 292 +-#define EQCOMPARE 293 +-#define ARITHCOMPARE 294 +-#define LSHIFT 295 +-#define RSHIFT 296 +-#define UNARY 297 +-#define PLUSPLUS 298 +-#define MINUSMINUS 299 +-#define HYPERUNARY 300 +-#define POINTSAT 301 +-#define INTERFACE 302 +-#define IMPLEMENTATION 303 +-#define END 304 +-#define SELECTOR 305 +-#define DEFS 306 +-#define ENCODE 307 +-#define CLASSNAME 308 +-#define PUBLIC 309 +-#define PRIVATE 310 +-#define PROTECTED 311 +-#define PROTOCOL 312 +-#define OBJECTNAME 313 +-#define CLASS 314 +-#define ALIAS 315 +-#define OBJC_STRING 316 ++#define IDENTIFIER 257 ++#define TYPENAME 258 ++#define SCSPEC 259 ++#define TYPESPEC 260 ++#define TYPE_QUAL 261 ++#define CONSTANT 262 ++#define STRING 263 ++#define ELLIPSIS 264 ++#define SIZEOF 265 ++#define ENUM 266 ++#define STRUCT 267 ++#define UNION 268 ++#define IF 269 ++#define ELSE 270 ++#define WHILE 271 ++#define DO 272 ++#define FOR 273 ++#define SWITCH 274 ++#define CASE 275 ++#define DEFAULT 276 ++#define BREAK 277 ++#define CONTINUE 278 ++#define RETURN 279 ++#define GOTO 280 ++#define ASM_KEYWORD 281 ++#define TYPEOF 282 ++#define ALIGNOF 283 ++#define ATTRIBUTE 284 ++#define EXTENSION 285 ++#define LABEL 286 ++#define REALPART 287 ++#define IMAGPART 288 ++#define ASSIGN 289 ++#define OROR 290 ++#define ANDAND 291 ++#define EQCOMPARE 292 ++#define ARITHCOMPARE 293 ++#define LSHIFT 294 ++#define RSHIFT 295 ++#define UNARY 296 ++#define PLUSPLUS 297 ++#define MINUSMINUS 298 ++#define HYPERUNARY 299 ++#define POINTSAT 300 ++#define INTERFACE 301 ++#define IMPLEMENTATION 302 ++#define END 303 ++#define SELECTOR 304 ++#define DEFS 305 ++#define ENCODE 306 ++#define CLASSNAME 307 ++#define PUBLIC 308 ++#define PRIVATE 309 ++#define PROTECTED 310 ++#define PROTOCOL 311 ++#define OBJECTNAME 312 ++#define CLASS 313 ++#define ALIAS 314 ++#define OBJC_STRING 315 + + #line 56 "c-parse.y" + +@@ -134,11 +133,11 @@ + + + +-#define YYFINAL 692 ++#define YYFINAL 697 + #define YYFLAG -32768 + #define YYNTBASE 84 + +-#define YYTRANSLATE(x) ((unsigned)(x) <= 316 ? yytranslate[x] : 241) ++#define YYTRANSLATE(x) ((unsigned)(x) <= 315 ? yytranslate[x] : 241) + + static const char yytranslate[] = { 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +@@ -166,13 +165,13 @@ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, +- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, +- 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, +- 39, 40, 44, 45, 46, 47, 53, 54, 55, 56, +- 57, 61, 62, 63, 64, 65, 66, 67, 68, 69, +- 70, 71, 72, 73, 74, 75 ++ 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, ++ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ++ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ++ 27, 28, 29, 30, 31, 32, 33, 34, 35, 39, ++ 40, 44, 45, 46, 47, 53, 54, 55, 56, 57, ++ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, ++ 71, 72, 73, 74, 75 + }; + + #if YYDEBUG != 0 +@@ -216,8 +215,8 @@ + 1164, 1166, 1167, 1174, 1178, 1184, 1187, 1191, 1192, 1194, + 1195, 1197, 1198, 1200, 1202, 1206, 1211, 1213, 1217, 1218, + 1221, 1224, 1225, 1230, 1233, 1234, 1236, 1238, 1242, 1244, +- 1248, 1253, 1258, 1263, 1268, 1273, 1274, 1277, 1279, 1282, +- 1284, 1288, 1290, 1294 ++ 1248, 1254, 1260, 1266, 1272, 1278, 1279, 1282, 1284, 1287, ++ 1289, 1293, 1295, 1299 + }; + + static const short yyrhs[] = { -1, +@@ -346,11 +345,11 @@ + 232, 76, 0, 0, 233, 77, 231, 230, 0, 1, + 76, 0, 0, 10, 0, 233, 0, 233, 81, 10, + 0, 234, 0, 233, 81, 234, 0, 125, 122, 166, +- 142, 0, 125, 122, 167, 142, 0, 125, 122, 186, +- 142, 0, 129, 122, 167, 142, 0, 129, 122, 186, +- 142, 0, 0, 236, 237, 0, 230, 0, 238, 76, +- 0, 3, 0, 238, 81, 3, 0, 97, 0, 239, +- 81, 97, 0, 31, 0 ++ 137, 142, 0, 125, 122, 167, 137, 142, 0, 125, ++ 122, 186, 137, 142, 0, 129, 122, 167, 137, 142, ++ 0, 129, 122, 186, 137, 142, 0, 0, 236, 237, ++ 0, 230, 0, 238, 76, 0, 3, 0, 238, 81, ++ 3, 0, 97, 0, 239, 81, 97, 0, 31, 0 + }; + + #endif +@@ -395,9 +394,9 @@ + 1830, 1835, 1839, 1843, 1854, 1861, 1868, 1875, 1886, 1892, + 1895, 1900, 1923, 1957, 1988, 2019, 2034, 2048, 2052, 2056, + 2059, 2064, 2066, 2069, 2071, 2075, 2080, 2083, 2089, 2094, +- 2099, 2101, 2110, 2111, 2117, 2119, 2129, 2131, 2135, 2138, +- 2144, 2154, 2163, 2172, 2182, 2196, 2201, 2206, 2208, 2217, +- 2220, 2225, 2228, 2232 ++ 2099, 2101, 2110, 2111, 2117, 2119, 2129, 2131, 2135, 2139, ++ 2145, 2156, 2166, 2176, 2187, 2203, 2208, 2213, 2215, 2224, ++ 2227, 2232, 2235, 2239 + }; + #endif + +@@ -525,7 +524,7 @@ + 1, 0, 6, 3, 5, 2, 3, 0, 1, 0, + 1, 0, 1, 1, 3, 4, 1, 3, 0, 2, + 2, 0, 4, 2, 0, 1, 1, 3, 1, 3, +- 4, 4, 4, 4, 4, 0, 2, 1, 2, 1, ++ 5, 5, 5, 5, 5, 0, 2, 1, 2, 1, + 3, 1, 3, 1 + }; + +@@ -570,642 +569,639 @@ + 29, 313, 104, 118, 118, 135, 0, 0, 164, 218, + 0, 266, 272, 326, 268, 170, 170, 281, 278, 170, + 0, 0, 0, 309, 310, 0, 80, 83, 294, 179, +- 0, 181, 229, 288, 379, 119, 170, 170, 170, 288, +- 119, 170, 170, 0, 388, 390, 401, 314, 111, 0, ++ 0, 181, 229, 288, 379, 119, 162, 162, 162, 288, ++ 119, 162, 162, 0, 388, 390, 401, 314, 111, 0, + 112, 0, 135, 133, 189, 187, 186, 168, 21, 0, + 25, 325, 0, 245, 249, 255, 170, 402, 0, 0, + 0, 325, 0, 0, 115, 326, 301, 311, 202, 86, + 0, 0, 199, 0, 201, 0, 257, 192, 198, 0, +- 0, 0, 0, 292, 0, 396, 0, 391, 392, 393, +- 292, 0, 394, 395, 383, 0, 0, 162, 134, 137, ++ 0, 0, 0, 292, 0, 396, 0, 170, 170, 170, ++ 292, 0, 170, 170, 383, 0, 0, 162, 134, 137, + 136, 0, 165, 273, 0, 170, 253, 312, 0, 318, + 117, 116, 305, 0, 319, 303, 326, 302, 0, 205, + 0, 0, 196, 61, 0, 191, 0, 204, 195, 81, +- 180, 227, 228, 223, 0, 226, 0, 109, 110, 0, +- 170, 0, 274, 403, 317, 0, 152, 0, 339, 323, +- 0, 0, 0, 0, 0, 0, 0, 0, 368, 360, +- 0, 0, 113, 118, 118, 332, 337, 0, 0, 329, +- 330, 333, 361, 331, 0, 0, 207, 0, 0, 193, +- 194, 224, 225, 188, 276, 170, 0, 0, 325, 370, +- 0, 0, 366, 350, 351, 352, 0, 0, 0, 369, +- 0, 170, 334, 124, 0, 125, 0, 0, 321, 326, +- 320, 343, 0, 126, 0, 200, 197, 275, 0, 0, +- 0, 371, 45, 0, 0, 0, 364, 353, 0, 358, +- 0, 367, 0, 122, 208, 0, 123, 211, 338, 325, +- 0, 0, 206, 322, 0, 324, 362, 344, 348, 0, +- 359, 0, 120, 0, 121, 0, 336, 327, 325, 0, +- 340, 325, 370, 325, 365, 372, 0, 209, 212, 328, +- 342, 325, 363, 0, 349, 0, 0, 373, 374, 354, +- 0, 0, 341, 345, 0, 372, 0, 0, 210, 213, +- 370, 0, 0, 355, 375, 0, 376, 0, 0, 346, +- 377, 0, 356, 325, 0, 0, 347, 357, 378, 0, +- 0, 0 ++ 180, 227, 228, 223, 0, 226, 0, 391, 392, 393, ++ 394, 395, 109, 110, 0, 170, 0, 274, 403, 317, ++ 0, 152, 0, 339, 323, 0, 0, 0, 0, 0, ++ 0, 0, 0, 368, 360, 0, 0, 113, 118, 118, ++ 332, 337, 0, 0, 329, 330, 333, 361, 331, 0, ++ 0, 207, 0, 0, 193, 194, 224, 225, 188, 276, ++ 170, 0, 0, 325, 370, 0, 0, 366, 350, 351, ++ 352, 0, 0, 0, 369, 0, 170, 334, 124, 0, ++ 125, 0, 0, 321, 326, 320, 343, 0, 126, 0, ++ 200, 197, 275, 0, 0, 0, 371, 45, 0, 0, ++ 0, 364, 353, 0, 358, 0, 367, 0, 122, 208, ++ 0, 123, 211, 338, 325, 0, 0, 206, 322, 0, ++ 324, 362, 344, 348, 0, 359, 0, 120, 0, 121, ++ 0, 336, 327, 325, 0, 340, 325, 370, 325, 365, ++ 372, 0, 209, 212, 328, 342, 325, 363, 0, 349, ++ 0, 0, 373, 374, 354, 0, 0, 341, 345, 0, ++ 372, 0, 0, 210, 213, 370, 0, 0, 355, 375, ++ 0, 376, 0, 0, 346, 377, 0, 356, 325, 0, ++ 0, 347, 357, 378, 0, 0, 0 + }; + +-static const short yydefgoto[] = { 690, ++static const short yydefgoto[] = { 695, + 1, 2, 3, 17, 18, 19, 224, 378, 230, 381, + 112, 308, 454, 85, 144, 276, 87, 88, 89, 90, + 91, 396, 92, 261, 260, 258, 462, 259, 93, 145, +- 94, 211, 212, 213, 373, 441, 442, 20, 107, 543, ++ 94, 211, 212, 213, 373, 441, 442, 20, 107, 548, + 297, 57, 374, 424, 298, 23, 98, 186, 24, 129, + 117, 44, 113, 118, 430, 45, 377, 216, 217, 26, +- 195, 196, 197, 428, 482, 456, 457, 458, 559, 459, +- 502, 460, 461, 614, 634, 661, 617, 636, 662, 202, ++ 195, 196, 197, 428, 482, 456, 457, 458, 564, 459, ++ 502, 460, 461, 619, 639, 666, 622, 641, 667, 202, + 121, 407, 122, 27, 28, 29, 30, 238, 240, 245, + 137, 506, 334, 132, 133, 235, 382, 383, 243, 244, + 100, 184, 101, 103, 185, 443, 444, 494, 214, 337, +- 393, 394, 395, 371, 249, 372, 547, 548, 549, 569, +- 590, 312, 591, 447, 550, 551, 620, 568, 652, 643, +- 671, 684, 644, 552, 553, 642, 554, 581, 604, 657, +- 658, 659, 682, 281, 282, 299, 414, 300, 301, 302, ++ 393, 394, 395, 371, 249, 372, 552, 553, 554, 574, ++ 595, 312, 596, 447, 555, 556, 625, 573, 657, 648, ++ 676, 689, 649, 557, 558, 647, 559, 586, 609, 662, ++ 663, 664, 687, 281, 282, 299, 414, 300, 301, 302, + 205, 206, 303, 304, 439, 95 + }; + +-static const short yypact[] = { 95, +- 110, 2206, 2206, 260,-32768,-32768,-32768,-32768, 40, 40, +- 40, 57, 59, 89,-32768,-32768,-32768,-32768,-32768, 42, +- 99, 2234, 79,-32768, 40,-32768, 87, 93, 108,-32768, +- 2206,-32768,-32768,-32768, 40, 40, 40, 2068, 2002, 125, +--32768,-32768, 42, 147,-32768, 40, 1355,-32768, 257,-32768, +- 42, 79,-32768, 40,-32768,-32768, 696,-32768,-32768,-32768, +--32768, 76,-32768, 124,-32768, 132,-32768,-32768,-32768,-32768, +--32768,-32768, 2068, 2068, 373,-32768,-32768,-32768, 2068,-32768, +--32768, 721,-32768,-32768, 2068, 149, 153,-32768, 2095, 2122, +--32768, 2335, 881, 231, 2068,-32768, 186, 319,-32768, 203, +- 578, 708, 627, 304,-32768, 257, 42,-32768, 194,-32768, +- 1430, 438, 40,-32768,-32768, 257, 177,-32768, 40, 276, +- 398, 417, 188, 1417, 696,-32768,-32768,-32768,-32768, 40, +--32768, 208, 778,-32768, 214,-32768, 468,-32768,-32768,-32768, +--32768,-32768, 223, 269, 288, 312,-32768, 315, 2068, 721, +--32768, 721,-32768, 2068, 2068, 362,-32768,-32768, 2068, 2068, +- 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068, 2068, +--32768,-32768, 373, 373, 2068, 2068,-32768,-32768,-32768,-32768, +- 319, 1457, 40,-32768, 426, 760,-32768,-32768,-32768,-32768, +--32768,-32768,-32768,-32768, 50,-32768, 344,-32768, 417,-32768, +--32768, 385, 417, 419,-32768, 611, 1512,-32768, 349, 361, +--32768, 316, 70,-32768,-32768, 405, 40, 545, 323,-32768, +- 257, 257,-32768, 438, 40,-32768, 1539,-32768,-32768, 438, +- 40,-32768,-32768, 428, 370, 198, 953,-32768, 40,-32768, +--32768, 413, 383,-32768, 468,-32768,-32768,-32768, 376, 391, +- 1891,-32768, 2335, 402, 411, 2335, 2335, 2068, 443, 2068, +- 2068, 1564, 1645, 1859, 1078, 747, 838, 838, 356, 356, +--32768,-32768,-32768,-32768,-32768, 432, 153, 412, 463, 485, +--32768, 871,-32768, 434, 319,-32768, 1594,-32768, 760, 445, +- 708, 2149, 54, 448,-32768,-32768,-32768, 1036,-32768, 450, +- 197,-32768,-32768, 81,-32768,-32768,-32768, 39,-32768,-32768, +--32768, 846,-32768, 398,-32768,-32768, 398,-32768, 483,-32768, +--32768, 452,-32768,-32768,-32768,-32768,-32768,-32768, 461,-32768, +- 473, 2068, 373, 480, 383,-32768, 496,-32768,-32768,-32768, +--32768,-32768, 508, 2068, 2258, 1483,-32768,-32768, 426,-32768, +--32768,-32768, 426,-32768,-32768, 493,-32768,-32768, 85, 510, +--32768,-32768, 550, 497,-32768,-32768, 1006,-32768, 585, 288, +--32768,-32768,-32768, 512, 328,-32768, 1291, 39,-32768,-32768, +- 39, 513,-32768,-32768, 513, 40, 40, 2335,-32768, 40, +- 515, 373, 814, 496,-32768, 1111,-32768, 2351,-32768,-32768, +- 2068,-32768,-32768,-32768, 497, 40, 133, 140, 40,-32768, +- 40, 140, 40, 871,-32768,-32768,-32768,-32768,-32768, 257, +--32768, 42,-32768, 692,-32768,-32768, 2335,-32768,-32768, 1291, +--32768,-32768, 430,-32768,-32768,-32768, 40,-32768, 220, 433, +- 641, 518, 520, 894,-32768,-32768,-32768,-32768,-32768, 563, +- 373, 2068,-32768, 564, 2335, 525, 526,-32768,-32768, 326, +- 1231, 2068, 146, 500, 550,-32768, 1621,-32768,-32768,-32768, +- 423, 497,-32768,-32768,-32768, 237, 250, 112, 692,-32768, +--32768, 1111,-32768,-32768, 2068, 49,-32768,-32768, 373,-32768, +--32768,-32768,-32768, 541,-32768,-32768,-32768,-32768, 1757,-32768, +- 2245, 1111,-32768,-32768, 1171,-32768, 1346,-32768,-32768, 2351, +--32768, 504, 504,-32768, 1676,-32768, 537,-32768,-32768, 544, +- 1778, 2068,-32768,-32768,-32768, 1837, 588, 570,-32768,-32768, +- 572, 576, 2068, 598, 566, 596, 2015, 193, 633,-32768, +- 638, 601,-32768, 602, 2238,-32768, 664, 974, 66,-32768, +--32768,-32768,-32768,-32768, 1948, 2068,-32768, 604, 1346,-32768, +--32768,-32768,-32768,-32768,-32768, 1778, 2068, 624,-32768, 2068, +- 2068, 1701,-32768,-32768,-32768,-32768, 615, 2068, 616,-32768, +- 629, 40,-32768,-32768, 257,-32768, 42, 1054,-32768,-32768, +--32768,-32768, 2068,-32768, 2290,-32768,-32768,-32768, 618, 2068, +- 714,-32768, 687, 659, 662, 2068,-32768,-32768, 666,-32768, +- 2068,-32768, 271,-32768, 266, 284,-32768, 158,-32768,-32768, +- 1837, 663,-32768,-32768, 672,-32768,-32768,-32768,-32768, 2308, +--32768, 24,-32768, 438,-32768, 438,-32768,-32768,-32768, 674, +--32768,-32768, 2068,-32768,-32768, 744, 679,-32768,-32768,-32768, +--32768,-32768,-32768, 681,-32768, 700, 43, 684,-32768,-32768, +- 288, 288,-32768,-32768, 2068, 744, 691, 744,-32768,-32768, +- 2068, 702, 61,-32768,-32768, 705,-32768, 419, 706,-32768, +- 231, 176,-32768,-32768, 709, 419,-32768,-32768, 231, 787, +- 789,-32768 ++static const short yypact[] = { 67, ++ 77, 2230, 2230, 299,-32768,-32768,-32768,-32768, 62, 62, ++ 62, 48, 84, 94,-32768,-32768,-32768,-32768,-32768, 419, ++ 90, 760, 283,-32768, 62,-32768, 97, 108, 131,-32768, ++ 2230,-32768,-32768,-32768, 62, 62, 62, 2092, 2026, 115, ++-32768,-32768, 419, 2,-32768, 62, 1340,-32768, 371,-32768, ++ 419, 283,-32768, 62,-32768,-32768, 518,-32768,-32768,-32768, ++-32768, 96,-32768, 116,-32768, 124,-32768,-32768,-32768,-32768, ++-32768,-32768, 2092, 2092, 376,-32768,-32768,-32768, 2092,-32768, ++-32768, 1092,-32768,-32768, 2092, 149, 220,-32768, 2119, 2146, ++-32768, 2296, 850, 260, 2092,-32768, 231, 423,-32768, 237, ++ 1677, 690, 205, 112,-32768, 371, 419,-32768, 259,-32768, ++ 1454, 179, 62,-32768,-32768, 371, 118,-32768, 62, 1419, ++ 395, 421, 155, 1400, 518,-32768,-32768,-32768,-32768, 62, ++-32768, 268, 485,-32768, 274,-32768, 366,-32768,-32768,-32768, ++-32768,-32768, 249, 288, 309, 305,-32768, 318, 2092, 1092, ++-32768, 1092,-32768, 2092, 2092, 362,-32768,-32768, 2092, 2092, ++ 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, ++-32768,-32768, 376, 376, 2092, 2092,-32768,-32768,-32768,-32768, ++ 423, 1481, 62,-32768, 425, 605,-32768,-32768,-32768,-32768, ++-32768,-32768,-32768,-32768, 65,-32768, 353,-32768, 421,-32768, ++-32768, 389, 421, 414,-32768, 918, 1536,-32768, 350, 365, ++-32768, 392, 46,-32768,-32768, 408, 62, 207, 142,-32768, ++ 371, 371,-32768, 179, 62,-32768, 1563,-32768,-32768, 179, ++ 62,-32768,-32768, 348, 369, 330, 1009,-32768, 62,-32768, ++-32768, 430, 367,-32768, 366,-32768,-32768,-32768, 372, 394, ++ 1915,-32768, 2296, 420, 424, 2296, 2296, 2092, 452, 2092, ++ 2092, 1588, 1346, 1668, 1424, 557, 1022, 1022, 188, 188, ++-32768,-32768,-32768,-32768,-32768, 444, 220, 385, 417, 199, ++-32768, 1163,-32768, 438, 423,-32768, 1618,-32768, 605, 450, ++ 690, 2173, 49, 453,-32768,-32768,-32768, 1438,-32768, 457, ++ 222,-32768,-32768, 81,-32768,-32768,-32768, 58,-32768,-32768, ++-32768, 1013,-32768, 395,-32768,-32768, 395,-32768, 470,-32768, ++-32768, 445,-32768,-32768,-32768,-32768,-32768,-32768, 458,-32768, ++ 461, 2092, 376, 462, 367,-32768, 503,-32768,-32768,-32768, ++-32768,-32768, 512, 2092, 2331, 1507,-32768,-32768, 425,-32768, ++-32768,-32768, 425,-32768,-32768, 471,-32768,-32768, 106, 465, ++-32768,-32768, 193, 224,-32768,-32768, 654,-32768, 552, 309, ++-32768,-32768,-32768, 480, 326,-32768, 847, 58,-32768,-32768, ++ 58, 477,-32768,-32768, 477, 62, 62, 2296,-32768, 62, ++ 481, 376, 702, 503,-32768, 1149,-32768, 2225,-32768,-32768, ++ 2092,-32768,-32768,-32768, 224, 62, 355, 412, 389,-32768, ++ 62, 412, 389, 1163,-32768,-32768,-32768,-32768,-32768, 371, ++-32768, 419,-32768, 673,-32768,-32768, 2296,-32768,-32768, 847, ++-32768,-32768, 827,-32768,-32768,-32768, 62,-32768, 223, 358, ++ 622, 483, 487, 792,-32768,-32768,-32768,-32768,-32768, 530, ++ 376, 2092,-32768, 532, 2296, 494, 493,-32768,-32768, 227, ++ 1269, 2092, 200, 212, 193,-32768, 1645, 62, 62, 62, ++ 381, 224, 62, 62,-32768, 229, 247, 412, 673,-32768, ++-32768, 1149,-32768,-32768, 2092, 68,-32768,-32768, 376,-32768, ++-32768,-32768,-32768, 497,-32768,-32768,-32768,-32768, 1781,-32768, ++ 2269, 1149,-32768,-32768, 1209,-32768, 1329,-32768,-32768, 2225, ++-32768, 443, 443,-32768, 1700,-32768, 498,-32768,-32768,-32768, ++-32768,-32768,-32768,-32768, 499, 1802, 2092,-32768,-32768,-32768, ++ 1861, 538, 523,-32768,-32768, 525, 528, 2092, 551, 537, ++ 539, 2039, 60, 613,-32768, 583, 545,-32768, 547, 937, ++-32768, 638, 953, 59,-32768,-32768,-32768,-32768,-32768, 1972, ++ 2092,-32768, 579, 1329,-32768,-32768,-32768,-32768,-32768,-32768, ++ 1802, 2092, 604,-32768, 2092, 2092, 1725,-32768,-32768,-32768, ++-32768, 592, 2092, 596,-32768, 615, 62,-32768,-32768, 371, ++-32768, 419, 1035,-32768,-32768,-32768,-32768, 2092,-32768, 2251, ++-32768,-32768,-32768, 599, 2092, 666,-32768, 1079, 611, 614, ++ 2092,-32768,-32768, 612,-32768, 2092,-32768, 276,-32768, 383, ++ 282,-32768, 710,-32768,-32768, 1861, 636,-32768,-32768, 642, ++-32768,-32768,-32768,-32768, 2318,-32768, 19,-32768, 179,-32768, ++ 179,-32768,-32768,-32768, 621,-32768,-32768, 2092,-32768,-32768, ++ 725, 661,-32768,-32768,-32768,-32768,-32768,-32768, 662,-32768, ++ 682, 76, 663,-32768,-32768, 309, 309,-32768,-32768, 2092, ++ 725, 670, 725,-32768,-32768, 2092, 667, 99,-32768,-32768, ++ 672,-32768, 414, 676,-32768, 260, 217,-32768,-32768, 677, ++ 414,-32768,-32768, 260, 749, 755,-32768 + }; + + static const short yypgoto[] = {-32768, +--32768,-32768,-32768, 103,-32768,-32768,-32768,-32768,-32768,-32768, +--32768,-32768, -24,-32768, -38, 516, -110, 477,-32768,-32768, +- -21,-32768, 255,-32768,-32768,-32768,-32768,-32768, 232,-32768, +- -194, -199, 591,-32768,-32768, 363,-32768, -3, -60, 252, +- 10, 757,-32768, 389, 19, -14, -90, 635, 27, -169, +- -390, -49, -114, -68,-32768,-32768,-32768, -171, 26, 68, +--32768, 522,-32768, 386,-32768, -347,-32768, 325,-32768, -405, +--32768,-32768, 406,-32768,-32768,-32768,-32768,-32768,-32768, -42, +- -77, 105, -9,-32768,-32768,-32768, -43,-32768,-32768,-32768, +--32768,-32768, 511, -37,-32768, 612, 538, 435, 625, 546, +- -35, -92, -72, -91, -105, 429,-32768,-32768, -185,-32768, +--32768,-32768, 486, 16,-32768, -125,-32768,-32768,-32768,-32768, +- -57, -361, -461, 456,-32768, 261,-32768,-32768,-32768,-32768, +--32768,-32768,-32768,-32768,-32768,-32768, 283,-32768, -503, 226, +--32768, 238,-32768, 621,-32768, -250,-32768,-32768,-32768, 543, +- -193,-32768,-32768,-32768,-32768, 13 ++-32768,-32768,-32768, 101,-32768,-32768,-32768,-32768,-32768,-32768, ++-32768,-32768, -24,-32768, -38, 466, -136, 428,-32768,-32768, ++ -4,-32768, 431,-32768,-32768,-32768,-32768,-32768, 184,-32768, ++ -182, -207, 549,-32768,-32768, 329,-32768, -3, -84, 208, ++ 6, 707,-32768, 354, 11, -1, -83, 587, 14, -138, ++ -396, -49, -93, -60,-32768,-32768,-32768, -108, 23, 51, ++-32768, 489,-32768, 356,-32768, -400,-32768, 273,-32768, -399, ++-32768,-32768, 323,-32768,-32768,-32768,-32768,-32768,-32768, -39, ++ -45, 50, -13,-32768,-32768,-32768, -41,-32768,-32768,-32768, ++-32768,-32768, 454, -14,-32768, 548, 467, 360, 553, 464, ++ -30, -72, -78, -87, -116, 357,-32768,-32768, -171,-32768, ++-32768,-32768, 410, -101,-32768, -114,-32768,-32768,-32768,-32768, ++ -97, -378, -489, 361,-32768, 176,-32768,-32768,-32768,-32768, ++-32768,-32768,-32768,-32768,-32768,-32768, 180,-32768, -587, 151, ++-32768, 147,-32768, 542,-32768, -238,-32768,-32768,-32768, 469, ++ -206,-32768,-32768,-32768,-32768, 9 + }; + + +-#define YYLAST 2403 ++#define YYLAST 2383 + + + static const short yytable[] = { 86, +- 97, 123, 62, 64, 66, 225, 120, 52, 190, 293, +- 47, 21, 21, 131, 31, 31, 288, 49, 51, 250, +- 22, 22, 433, 218, 318, 135, 309, 25, 25, 476, +- 323, 351, 320, 104, 35, 36, 37, 201, 219, 370, +- 21, 124, 234, 31, 41, 46, 146, 54, 53, 22, +- 141, 139, 140, 319, 215, 509, 25, 142, 222, 324, +- 236, 646, 177, 147, 277, 99, 592, 330, 46, 14, +- -102, 14, 209, 178, 119, 280, 46, 194, 14, 310, +- 666, 131, 130, 55, 499, 56, 522, 225, 279, 59, +- 60, 42, 58, 199, -1, 59, 60, 203, 678, 647, +- 43, 561, 58, 58, 58, 32, 104, 601, 99, -2, +- 59, 60, 242, 58, 254, 38, 255, 39, 667, 288, +- 248, 58, 285, 183, 593, 290, 183, 189, 46, 361, +- 291, 119, 46, 67, 520, 526, 679, 278, 109, 654, +- 314, 119, 131, 284, 317, 237, 234, 40, 274, 275, +- 130, -102, 316, 597, 558, 215, 368, 134, 637, 99, +- 400, 369, 14, 475, 236, 401, 215, 676, 61, 14, +- 110, 111, 215, 349, 63, 48, 99, 650, 99, 353, +- 653, 277, 655, 102, 109, 142, 58, -162, 322, 65, +- 663, 466, 467, -162, 613, 59, 60, 58, 110, 111, +- 329, 5, 331, 7, 188, 136, 183, 445, 199, 9, +- 10, 11, 203, 138, 434, 435, 110, 111, 436, 343, +- 242, 511, 687, 105, 148, 13, 149, 106, 621, 340, +- 325, 25, 327, 149, -162, 468, 469, 470, -162, 177, +- 473, 474, 578, 119, 418, 131, 119, 119, 356, 237, +- 58, 685, 204, 220, 481, 491, 686, 221, 496, 41, +- 114, 179, 189, 99, 228, 487, 194, 384, 106, 384, +- 409, 413, 514, 366, -269, -269, 223, 367, 187, -19, +- -19, -19, -19, 52, 58, 231, 14, -19, -19, -19, +- 463, 239, 109, 363, 364, -162, 488, 375, 246, 280, +- 489, -162, 109, -19, 183, -162, 115, 25, 242, 481, +- 183, -162, 464, 518, 523, 116, 210, 221, 471, -105, +- -105, -105, -105, 54, 53, -105, 519, -105, -105, -105, +- 106, 5, 55, 7, 56, 446, 33, 34, 376, 9, +- 10, 11, -162, -105, 247, 465, -162, 633, 14, 565, +- 472, 221, -162, 408, 412, 13, -162, -19, 349, 353, +- 635, 507, 110, 111, 106, 349, 353, 438, 180, 248, +- 420, 422, 477, 546, 384, 59, 60, 181, 182, 200, +- 131, 226, 227, 451, 446, 452, 497, 251, 406, 411, +- 486, 252, 25, 429, 598, 104, 431, -105, 315, -82, +- 546, 423, 292, 253, 421, 168, 169, 170, 256, 257, +- 612, 109, 478, 262, 263, 264, 265, 266, 267, 268, +- 269, 270, 271, 272, 273, 41, 500, 70, 517, 198, +- 411, 306, 41, 114, 648, 131, 649, 307, 210, 25, +- 313, -325, -325, -325, -325, 119, 326, 46, 332, -325, +- -325, -325, 14, 336, 199, 203, 226, 227, 119, 14, +- 542, 199, 203, 333, 524, -325, 338, 485, 241, 198, +- 59, 60, 410, 58, 541, 110, 111, 341, 58, 115, +- 344, 405, 182, 681, 286, 287, 342, 542, 116, 406, +- 406, 689, 14, 142, 348, 546, 411, 411, 577, 41, +- 225, 541, 41, 403, -267, -267, 198, 347, 544, 307, +- 490, 555, 180, 579, 345, 346, 352, 545, 379, -101, +- 357, 181, 182, 362, 25, 365, 14, 392, 599, 14, +- 52, 602, 605, 178, 380, 669, 670, 616, 386, 609, +- 585, 587, 615, 286, 287, 397, 410, 41, 114, 404, +- 387, 198, 41, 403, 622, 405, 182, 390, 405, 182, +- 350, 625, 466, 467, 544, 151, 153, 555, 512, 513, +- 54, 53, 632, 545, 14, 399, 215, 618, 215, 14, +- 25, 5, 542, 7, 188, 402, 388, 417, 419, 9, +- 10, 11, 437, 432, 115, -304, 541, 495, 398, 404, +- -31, 503, 504, 116, 602, 13, 505, 14, 405, 182, +- 119, 294, 46, 295, 5, 6, 7, 8, 525, 563, +- 296, 564, 9, 10, 11, -32, 672, 180, 567, 41, +- 570, 427, 602, 198, 571, 573, 181, 182, 13, 580, +- 14, 210, 574, -114, -114, -114, -114, -114, -114, -114, +- 455, -114, -114, -114, -114, -114, 14, -114, -114, -114, ++ 97, 123, 62, 64, 66, 433, 47, 21, 21, 120, ++ 31, 31, 22, 22, 215, 131, 318, 49, 51, 320, ++ 52, 293, 323, 476, 25, 25, 225, 218, 190, 104, ++ 250, 35, 36, 37, 222, 53, 21, 124, 277, 31, ++ 309, 22, 46, 351, 54, 201, -102, 288, 135, 234, ++ 141, 146, 99, 25, 236, 310, 651, 177, 370, 597, ++ 659, 509, 59, 60, 280, 46, -1, 499, 139, 140, ++ 219, 119, 209, 46, 142, 58, -2, 194, 105, 130, ++ 147, 525, 106, 131, 606, 58, 58, 58, 681, 199, ++ 178, 14, 279, 203, 652, 99, 58, 14, 285, 59, ++ 60, 563, 104, 32, 58, 527, 38, 566, 225, 583, ++ 59, 60, 242, 671, 189, 215, 319, 598, 531, 254, ++ 183, 255, 324, 183, 361, 46, 215, -102, 119, 46, ++ 330, 67, 215, 59, 60, 642, 683, 278, 119, 248, ++ 290, 237, 39, 284, 131, 291, 99, 130, 274, 275, ++ 288, 672, 40, 234, 655, 277, 368, 658, 236, 660, ++ 316, 369, 349, 99, 602, 99, 48, 668, 353, 58, ++ 110, 111, 314, 102, 684, 475, 317, 134, 61, 210, ++ 58, 400, -325, -325, -325, -325, 401, 200, 322, 63, ++ -325, -325, -325, 618, 220, 41, 403, 136, 221, 692, ++ 226, 227, 142, 183, 199, 138, -325, 41, 203, 41, ++ 114, 198, 65, 198, 41, 403, 626, 315, 198, 343, ++ 242, 445, 14, 329, 148, 331, 41, 384, 25, 384, ++ 325, 228, 327, 58, 14, 106, 14, 168, 169, 170, ++ 119, 14, 404, 119, 119, 237, 340, 131, 356, 189, ++ 99, 405, 182, 14, 42, 418, 115, 286, 287, 514, ++ -101, 404, 507, 43, 463, 116, 194, 58, 177, 491, ++ 405, 182, 496, 410, 350, 511, 429, 434, 435, 431, ++ 149, 436, 405, 182, 451, 481, 452, 55, 280, 56, ++ 409, 413, 690, 363, 364, 446, 52, 691, 366, 488, ++ 149, 183, 367, 489, 25, 523, 179, 183, 242, 221, ++ 375, 53, 187, 468, 469, 470, 464, 204, 473, 474, ++ 54, 465, 471, 524, 246, 376, 472, 106, 487, 5, ++ 55, 7, 56, 5, 384, 7, 188, 9, 10, 11, ++ 481, 9, 10, 11, 446, 231, 497, 349, 353, 408, ++ 412, 239, 638, 13, 349, 353, 221, 13, 640, 518, ++ 519, 520, 106, 247, 521, 522, 241, 438, 59, 60, ++ 420, 422, 477, 41, 114, 33, 34, 528, 59, 60, ++ 251, 109, 131, 41, 551, 406, 411, 198, 423, 25, ++ 248, 104, 210, 486, 252, -105, -105, -105, -105, -82, ++ 14, -105, 421, -105, -105, -105, -269, -269, 478, 109, ++ 14, 292, -162, 466, 467, 109, 551, 570, -162, -105, ++ 115, 41, 70, 198, -267, -267, 500, 411, 517, 116, ++ 410, 653, 306, 654, 307, 490, 25, 131, 109, 405, ++ 182, 307, 119, 313, 46, 326, 14, 333, 14, 336, ++ 199, 203, 14, 226, 227, 119, 58, 199, 203, -162, ++ 547, 58, 603, -162, 529, 332, 180, 348, 42, 338, ++ 110, 111, 180, -105, 546, 181, 182, 43, 617, 110, ++ 111, 181, 182, 286, 287, 232, 406, 406, 5, 344, ++ 7, 96, 547, 411, 411, 341, 9, 10, 11, 342, ++ 686, 466, 467, 582, 549, 379, 546, 560, 694, 550, ++ 142, 551, 13, 512, 513, 15, 151, 153, 584, 347, ++ 352, 25, 126, 127, 128, 357, 225, 380, 362, 9, ++ 10, 11, 365, 604, 392, 386, 607, 610, 387, 390, ++ 402, 215, 621, 215, 614, 590, 592, 14, 52, 397, ++ 620, 674, 675, 399, 417, 178, 419, 432, 437, 627, ++ -304, 233, -261, 53, 495, 549, 630, -31, 560, 503, ++ 550, 504, 54, 505, 530, -32, 569, 637, 623, 253, ++ 568, 572, 25, 575, 256, 257, 576, 547, 578, 262, ++ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, ++ 273, 546, 164, 165, 166, 167, 168, 169, 170, 607, ++ 127, 128, 119, 579, 46, 580, 9, 10, 11, 585, ++ 587, 588, 210, 589, -114, -114, -114, -114, -114, -114, ++ -114, 677, -114, -114, -114, -114, -114, 607, -114, -114, + -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, +- -114, -114, 575, -114, -114, 582, 42, 583, 584, 588, +- -114, 596, 600, -114, 427, 43, -385, 611, -114, -114, +- -114, 608, 610, 624, -114, -114, 480, 127, 128, -114, +- 126, 127, 128, 9, 10, 11, 501, 9, 10, 11, +- 59, 60, 191, 192, 193, 455, 510, -114, -114, -114, +- -114, 143, -114, 68, 5, 14, 7, 96, 69, 70, +- 626, 71, 9, 10, 11, 628, 455, 629, 640, 521, +- 171, 172, 631, 173, 174, 175, 176, 641, 13, 72, +- 651, 15, 656, 73, 74, 660, 455, 664, 665, 455, +- 75, 455, 627, 76, 668, 127, 128, 674, 77, 78, +- 79, 9, 10, 11, 80, 81, 566, 677, 232, 82, +- 680, 5, 683, 7, 96, 688, 691, 572, 692, 9, +- 10, 11, 164, 165, 166, 167, 168, 169, 170, 83, +- 84, 603, -91, 311, 492, 13, 594, 360, 15, 125, +- 595, 479, 358, 455, 440, 483, -325, -325, -325, -325, +- -325, -325, -325, 289, -325, -325, -325, -325, -325, 560, +- -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, +- -325, -325, -325, -325, -325, 391, -325, -325, 328, 5, +- 6, 7, 8, -325, 233, -261, -325, 9, 10, 11, +- 630, -325, -325, -325, 385, 508, 484, -325, -325, 335, +- 493, 294, -325, 13, 5, 6, 7, 8, 389, 448, +- 296, 638, 9, 10, 11, 166, 167, 168, 169, 170, +- -325, 673, -325, -325, 210, -325, -325, -325, 13, 498, +- 14, -325, -325, 639, -325, 675, 354, 0, -325, 416, ++ -114, -114, -114, 593, -114, -114, 601, 5, 6, 7, ++ 8, -114, 605, 415, -114, 9, 10, 11, 613, -114, ++ -114, -114, 615, 616, 629, -114, -114, 480, 127, 128, ++ -114, 13, 631, 14, 9, 10, 11, 633, 636, 634, ++ 345, 346, 59, 60, 191, 192, 193, 656, -114, -114, ++ -114, -114, 440, -114, -325, -325, -325, -325, -325, -325, ++ -325, 645, -325, -325, -325, -325, -325, 646, -325, -325, + -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, +- -325, 0, -325, 0, -325, 0, -325, -325, 0, 0, +- 0, 0, 0, -325, 171, 172, -325, 173, 174, 175, +- 176, -325, -325, -325, 0, 0, -385, -325, -325, 0, +- 0, 0, -325, 232, 0, 0, 5, 0, 7, 96, +- 0, 0, 0, 0, 9, 10, 11, 0, 0, 0, +- -325, -300, -325, -325, 589, -325, -325, -325, 0, 0, +- 13, -325, -325, 15, -325, 0, 0, 0, -325, 0, ++ -325, -325, -325, 661, -325, -325, 109, 665, 669, -162, ++ 670, -325, 682, 673, -325, -162, 679, 685, 696, -325, ++ -325, -325, 688, 693, 697, -325, -325, 360, 608, 125, ++ -325, 311, 388, 5, 6, 7, 8, 599, 110, 111, ++ 492, 9, 10, 11, 398, 289, 479, 565, -325, 358, ++ -325, -325, 508, -325, 328, 483, -162, 13, 391, 14, ++ -162, 484, 210, 385, -325, -325, 389, 335, 493, -325, ++ -325, 643, -325, 448, 498, 644, -325, 427, -325, -325, ++ -325, -325, -325, -325, -325, -325, -325, -325, -325, 680, ++ -325, 678, -325, 0, -325, -325, 455, 354, 0, 41, ++ 114, -325, 0, 0, -325, 416, 50, 0, 0, -325, ++ -325, -325, 0, 0, 0, -325, -325, 425, 0, 68, ++ -325, 0, 0, 0, 69, 70, 14, 71, 0, 0, ++ 427, 0, 0, 0, 485, 0, 0, 0, -325, -300, ++ -325, -325, 0, -325, 0, 72, 115, 15, 0, 73, ++ 74, 0, 501, 0, 0, 116, 75, 0, 0, 76, ++ 0, 455, 510, 0, 77, 78, 79, 0, 0, 0, ++ 80, 81, 0, 171, 172, 82, 173, 174, 175, 176, ++ 0, 0, 455, 0, 0, 526, 0, 0, 294, 0, ++ 295, 5, 6, 7, 8, 83, 84, 296, 426, 9, ++ 10, 11, 455, 0, 0, 455, 0, 455, 0, 0, ++ 5, 6, 7, 8, 0, 13, 0, 14, 9, 10, ++ 11, 0, 0, 594, 0, -325, -325, 571, 0, 0, ++ -325, -325, 0, -325, 13, 0, 14, -325, 577, -325, + -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, +- -325, 0, -325, 0, -325, 0, -325, -325, 0, 5, +- 6, 7, 8, -325, 0, 415, -325, 9, 10, 11, +- 0, -325, -325, -325, 0, 0, 0, -325, -325, 0, +- 0, 0, -325, 13, 0, 14, 0, 0, 0, 5, +- 6, 7, 8, 0, 0, 0, 0, 9, 10, 11, +- -325, 0, -325, -325, 619, -325, -335, -335, 0, 0, +- 0, -335, -335, 13, -335, 14, 0, 0, -335, 0, +- -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, +- -335, 0, -335, 0, -335, 0, -335, -335, 0, 0, +- 0, 0, 0, -335, 0, 0, -335, 0, 0, 0, +- 0, -335, -335, -335, 0, 0, 0, -335, -335, 0, +- 0, 449, -335, 450, 60, 0, 0, 0, 69, 70, +- 0, 71, 163, 164, 165, 166, 167, 168, 169, 170, +- -335, 0, -335, -335, 0, -335, 0, 0, 0, 72, +- 0, 15, 0, 73, 74, 0, 0, 0, 0, 0, +- 75, 0, 0, 76, 0, 0, 0, 0, 77, 78, +- 79, 0, 0, 0, 80, 81, 0, 0, 451, 82, +- 452, 449, 0, 450, 60, 0, 0, 0, 69, 70, +- 0, 71, 0, 0, 0, 0, 0, 0, -190, 83, +- 84, 0, 453, 0, 0, 0, 0, 0, 0, 72, +- 0, 15, 0, 73, 74, 0, 0, 0, 0, 0, +- 75, 0, 0, 76, 0, 0, 0, 0, 77, 78, +- 79, 0, 0, 0, 80, 81, 0, 0, 451, 82, +- 452, 449, 0, 68, 0, 0, 0, 0, 69, 70, +- 0, 71, 0, 0, 0, 0, 0, 0, -258, 83, +- 84, 0, 453, 0, 0, 0, 0, 0, 0, 72, +- 0, 15, 0, 73, 74, 0, -203, 0, 0, 0, +- 75, 0, 0, 76, 0, 0, 0, 0, 77, 78, +- 79, 0, 0, 0, 80, 81, 0, 0, -203, 82, +- -203, 425, 0, 68, 0, 0, 0, 0, 69, 70, +- 0, 71, 0, 0, 0, 0, 0, 0, 0, 83, +- 84, 0, 453, 0, 0, 0, 0, 0, 0, 72, +- 0, 15, 0, 73, 74, 0, 0, 0, 0, 0, +- 75, 0, 0, 76, 0, 0, 0, 0, 77, 78, +- 79, 0, 0, 0, 80, 81, 449, 0, 68, 82, +- 0, 0, 0, 69, 70, 108, 71, 0, -27, -27, +- -27, -27, 0, 0, 0, 0, -27, -27, -27, 83, +- 84, 0, 426, 0, 72, 0, 15, 0, 73, 74, +- 0, 109, -27, 0, -162, 75, 0, 0, 76, 0, +- -162, 0, 0, 77, 78, 79, 0, 0, 0, 80, +- 81, 0, 0, 0, 82, 0, 0, 0, 0, 0, +- 0, 0, 0, 110, 111, 0, 0, 229, 0, 0, +- -23, -23, -23, -23, 83, 84, 0, 453, -23, -23, +- -23, -162, 68, 0, 0, -162, -27, 69, 70, 0, +- 71, 0, 0, 109, -23, 0, -162, 0, 0, 0, +- 0, 0, -162, 0, 0, 0, 0, 0, 72, 68, +- 15, 0, 73, 74, 69, 70, 0, 71, 0, 75, +- 0, 0, 76, 0, 0, 110, 111, 77, 78, 207, +- 0, 0, 0, 80, 81, 72, 0, 15, 82, 73, +- 74, 0, 0, -162, 0, 0, 75, -162, -23, 76, +- 0, 0, 0, 0, 77, 78, 79, 0, 83, 84, +- 80, 81, 208, 0, 68, 82, 0, 0, 0, 69, +- 70, 0, 71, 159, 160, 161, 162, 163, 164, 165, +- 166, 167, 168, 169, 170, 83, 84, 0, 0, 283, +- 72, 68, 15, 0, 73, 74, 69, 70, 0, 71, +- 0, 75, 0, 0, 76, 0, 0, 0, 0, 77, +- 78, 79, 0, 0, 0, 80, 81, 72, 0, 15, +- 82, 73, 74, 0, 0, 0, 0, 0, 75, 0, ++ 0, -325, 0, -325, 0, -325, -325, 0, 0, 0, ++ 0, 600, -325, -385, 455, -325, 0, 0, 0, 0, ++ -325, -325, -325, 0, 0, 0, -325, -325, 0, 232, ++ 0, -325, 5, 591, 7, 96, 5, 6, 7, 8, ++ 9, 10, 11, 0, 9, 10, 11, 0, 0, -325, ++ 0, -325, -325, 0, -325, 624, 13, -335, -335, 15, ++ 13, 635, -335, -335, 0, -335, 0, 0, 0, -335, ++ 0, -335, -335, -335, -335, -335, -335, -335, -335, -335, ++ -335, -335, 0, -335, 0, -335, 0, -335, -335, 166, ++ 167, 168, 169, 170, -335, 0, 0, -335, 0, 0, ++ 0, 0, -335, -335, -335, 0, 0, 0, -335, -335, ++ 0, 0, 143, -335, 68, 5, 0, 7, 96, 69, ++ 70, 0, 71, 9, 10, 11, 0, 0, 0, 0, ++ 0, -335, 0, -335, -335, 0, -335, 0, 0, 13, ++ 72, 0, 15, 0, 73, 74, 0, 0, 0, 0, ++ 0, 75, 171, 172, 76, 173, 174, 175, 176, 77, ++ 78, 79, 0, 0, 0, 80, 81, 0, 0, 449, ++ 82, 450, 60, 0, 632, 0, 69, 70, 0, 71, ++ 0, 0, 0, 294, 0, 0, 5, 6, 7, 8, ++ 83, 84, 296, -91, 9, 10, 11, 72, 0, 15, ++ 0, 73, 74, 0, 0, 0, 0, 0, 75, 0, ++ 13, 76, 14, 0, 0, 0, 77, 78, 79, 0, ++ 0, 0, 80, 81, 0, 0, 451, 82, 452, 449, ++ 0, 450, 60, 0, 0, 0, 69, 70, 0, 71, ++ 0, 0, 0, 0, 0, 0, -190, 83, 84, 0, ++ 453, 0, 0, 0, 0, 0, 0, 72, -385, 15, ++ 0, 73, 74, 0, 0, 0, 0, 0, 75, 0, ++ 0, 76, 0, 0, 0, 0, 77, 78, 79, 0, ++ 0, 0, 80, 81, 0, 0, 451, 82, 452, 449, ++ 0, 68, 0, 0, 0, 0, 69, 70, 0, 71, ++ 0, 0, 0, 0, 0, 0, -258, 83, 84, 0, ++ 453, 0, 0, 0, 0, 0, 0, 72, 0, 15, ++ 0, 73, 74, 0, -203, 0, 0, 0, 75, 0, + 0, 76, 0, 0, 0, 0, 77, 78, 79, 0, +- 83, 84, 80, 81, 305, 0, 68, 82, 0, 0, +- 0, 69, 70, 0, 71, 160, 161, 162, 163, 164, +- 165, 166, 167, 168, 169, 170, 0, 83, 84, 0, +- 0, 321, 72, 68, 15, 0, 73, 74, 69, 70, +- 0, 71, 0, 75, 0, 0, 76, 0, 0, 0, +- 0, 77, 78, 79, 0, 0, 0, 80, 81, 72, ++ 0, 0, 80, 81, 0, 0, -203, 82, -203, 449, ++ 0, 68, 0, 0, 0, 0, 69, 70, 0, 71, ++ 108, 0, 0, -27, -27, -27, -27, 83, 84, 0, ++ 453, -27, -27, -27, 0, 0, 0, 72, 0, 15, ++ 0, 73, 74, 0, 0, 0, 109, -27, 75, -162, ++ 0, 76, 0, 0, 0, -162, 77, 78, 79, 0, ++ 0, 0, 80, 81, 0, 0, 0, 82, 161, 162, ++ 163, 164, 165, 166, 167, 168, 169, 170, 110, 111, ++ 229, 0, 0, -23, -23, -23, -23, 83, 84, 0, ++ 453, -23, -23, -23, 0, 0, -162, 0, 0, 223, ++ -162, -27, -19, -19, -19, -19, 109, -23, 0, -162, ++ -19, -19, -19, 0, 0, -162, 0, 0, 0, 0, ++ 0, 5, 6, 7, 8, 109, -19, 0, -162, 9, ++ 10, 11, 0, 0, -162, 0, 68, 0, 110, 111, ++ 0, 69, 70, 0, 71, 13, 0, 14, 163, 164, ++ 165, 166, 167, 168, 169, 170, -162, 0, 0, 0, ++ -162, -23, 72, 68, 15, 0, 73, 74, 69, 70, ++ 0, 71, 0, 75, 0, -162, 76, 0, 0, -162, ++ -19, 77, 78, 207, 0, 0, 0, 80, 81, 72, + 0, 15, 82, 73, 74, 0, 0, 0, 0, 0, + 75, 0, 0, 76, 0, 0, 0, 0, 77, 78, +- 515, 0, 83, 84, 80, 81, 355, 0, 68, 82, +- 0, 0, 0, 69, 70, 0, 71, 161, 162, 163, +- 164, 165, 166, 167, 168, 169, 170, 0, 0, 83, +- 84, 0, 0, 516, 72, 0, 15, 0, 73, 74, +- 606, 0, 0, 0, 0, 75, 0, 0, 76, 0, ++ 79, 0, 83, 84, 80, 81, 208, 0, 68, 82, ++ 0, 0, 0, 69, 70, 0, 71, 159, 160, 161, ++ 162, 163, 164, 165, 166, 167, 168, 169, 170, 83, ++ 84, 0, 0, 283, 72, 68, 15, 0, 73, 74, ++ 69, 70, 0, 71, 0, 75, 0, 0, 76, 0, + 0, 0, 0, 77, 78, 79, 0, 0, 0, 80, +- 81, 0, 0, 0, 82, 154, 155, 156, 607, 157, +- 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, +- 168, 169, 170, 0, 83, 84, 0, 0, 562, 450, +- 527, 6, 7, 8, 69, 70, 0, 71, 9, 10, +- 11, 528, 0, 529, 530, 531, 532, 533, 534, 535, +- 536, 537, 538, 539, 13, 72, 14, 15, 0, 73, +- 74, 0, 0, 0, 0, 0, 75, 0, 0, 76, +- 0, 0, 0, 0, 77, 78, 79, 14, 0, 0, +- 80, 81, 154, 155, 156, 82, 157, 158, 159, 160, ++ 81, 72, 0, 15, 82, 73, 74, 0, 0, 0, ++ 0, 0, 75, 0, 0, 76, 0, 0, 0, 0, ++ 77, 78, 79, 0, 83, 84, 80, 81, 305, 0, ++ 68, 82, 0, 0, 0, 69, 70, 0, 71, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, +- 0, 0, 0, 540, 0, 83, 84, 0, 248, 450, +- 60, 0, 0, 0, 69, 70, 0, 71, 0, 0, +- 0, 528, 0, 529, 530, 531, 532, 533, 534, 535, +- 536, 537, 538, 539, 0, 72, 0, 15, 0, 73, +- 74, 0, 0, 0, 0, 0, 75, 0, 0, 76, +- 0, 0, 0, 0, 77, 78, 79, 0, 0, 0, +- 80, 81, 0, 68, 0, 82, 0, 0, 69, 70, +- 0, 71, 162, 163, 164, 165, 166, 167, 168, 169, +- 170, 0, 0, 540, 0, 83, 84, 0, 248, 72, +- 0, 15, 0, 73, 74, 0, 0, 0, 0, 0, +- 75, 0, 0, 76, 0, 0, 0, 0, 77, 78, +- 79, 0, 0, 0, 80, 81, 0, 0, 0, 82, +- 68, 5, 6, 7, 8, 69, 70, 0, 71, 9, +- 10, 11, 0, 0, 0, 0, 0, 0, 0, 83, +- 84, 0, 339, 0, 0, 13, 72, 14, 15, 0, +- 73, 74, 0, 0, 0, 0, 0, 75, 0, 0, +- 76, 0, 0, 0, 0, 77, 78, 79, 0, 0, +- 0, 80, 81, 0, 68, 5, 82, 7, 96, 69, +- 70, 0, 71, 9, 10, 11, 0, 68, 0, 0, +- 0, 0, 69, 70, 0, 71, 83, 84, 0, 13, +- 72, 0, 15, 0, 73, 74, 0, 0, 0, 0, +- 0, 75, 0, 72, 76, 15, 0, 73, 74, 77, +- 78, 79, 0, 0, 75, 80, 81, 76, 0, 0, +- 82, 0, 77, 78, 79, 0, 0, 0, 80, 81, +- 68, 0, 0, 82, 0, 69, 70, 0, 71, 0, +- 83, 84, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 576, 0, 83, 84, 0, 72, 68, 15, 0, ++ 0, 83, 84, 0, 0, 321, 72, 68, 15, 0, + 73, 74, 69, 70, 0, 71, 0, 75, 0, 0, + 76, 0, 0, 0, 0, 77, 78, 79, 0, 0, +- 0, 80, 81, 72, 68, 15, 82, 73, 74, 69, +- 70, 0, 71, 0, 75, 0, 0, 76, 0, 0, +- 0, 0, 77, 78, 79, 0, 83, 84, 80, 81, +- 72, 359, 15, 150, 73, 74, 69, 70, 0, 71, ++ 0, 80, 81, 72, 0, 15, 82, 73, 74, 0, ++ 5, 0, 7, 188, 75, 0, 0, 76, 9, 10, ++ 11, 0, 77, 78, 515, 0, 83, 84, 80, 81, ++ 355, 0, 68, 82, 13, 0, 14, 69, 70, 0, ++ 71, 162, 163, 164, 165, 166, 167, 168, 169, 170, ++ 0, 0, 0, 83, 84, 0, 180, 516, 72, 0, ++ 15, 0, 73, 74, 611, 181, 182, 0, 0, 75, ++ 0, 0, 76, 0, 0, 0, 0, 77, 78, 79, ++ 0, 0, 0, 80, 81, 0, 0, 0, 82, 154, ++ 155, 156, 612, 157, 158, 159, 160, 161, 162, 163, ++ 164, 165, 166, 167, 168, 169, 170, 0, 83, 84, ++ 0, 0, 567, 450, 532, 6, 7, 8, 69, 70, ++ 0, 71, 9, 10, 11, 533, 0, 534, 535, 536, ++ 537, 538, 539, 540, 541, 542, 543, 544, 13, 72, ++ 14, 15, 0, 73, 74, 0, 0, 0, 0, 0, ++ 75, 0, 0, 76, 0, 0, 0, 0, 77, 78, ++ 79, 14, 0, 0, 80, 81, 154, 155, 156, 82, ++ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, ++ 167, 168, 169, 170, 0, 0, 0, 545, 0, 83, ++ 84, 0, 248, 450, 60, 0, 0, 0, 69, 70, ++ 0, 71, 0, 0, 0, 533, 0, 534, 535, 536, ++ 537, 538, 539, 540, 541, 542, 543, 544, 0, 72, ++ 0, 15, 0, 73, 74, 0, 0, 0, 0, 0, ++ 75, 0, 0, 76, 0, 0, 0, 0, 77, 78, ++ 79, 0, 0, 0, 80, 81, 0, 68, 0, 82, ++ 0, 0, 69, 70, 0, 71, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 545, 0, 83, ++ 84, 0, 248, 72, 0, 15, 0, 73, 74, 0, ++ 0, 0, 0, 0, 75, 0, 0, 76, 0, 0, ++ 0, 0, 77, 78, 79, 0, 0, 0, 80, 81, ++ 0, 0, 0, 82, 68, 5, 6, 7, 8, 69, ++ 70, 0, 71, 9, 10, 11, 0, 0, 0, 0, ++ 0, 0, 0, 83, 84, 0, 339, 0, 0, 13, ++ 72, 14, 15, 0, 73, 74, 0, 0, 0, 0, + 0, 75, 0, 0, 76, 0, 0, 0, 0, 77, +- 78, 79, 0, 83, 84, 80, 81, 72, 0, 15, +- 152, 73, 74, 0, 0, 0, 0, 0, 75, 0, ++ 78, 79, 0, 0, 0, 80, 81, 0, 68, 5, ++ 82, 7, 96, 69, 70, 0, 71, 9, 10, 11, ++ 0, 68, 0, 0, 0, 0, 69, 70, 0, 71, ++ 83, 84, 0, 13, 72, 0, 15, 0, 73, 74, ++ 0, 0, 0, 0, 0, 75, 0, 72, 76, 15, ++ 0, 73, 74, 77, 78, 79, 0, 0, 75, 80, ++ 81, 76, 0, 0, 82, 0, 77, 78, 79, 0, ++ 0, 0, 80, 81, 68, 0, 0, 82, 0, 69, ++ 70, 0, 71, 0, 83, 84, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 581, 0, 83, 84, 0, ++ 72, 68, 15, 0, 73, 74, 69, 70, 0, 71, ++ 0, 75, 0, 0, 76, 0, 0, 0, 0, 77, ++ 78, 79, 0, 0, 0, 80, 81, 72, 68, 15, ++ 82, 73, 74, 69, 70, 0, 71, 0, 75, 0, + 0, 76, 0, 0, 0, 0, 77, 78, 79, 0, +- 83, 84, 80, 81, 0, 0, 4, 82, -118, 5, +- 6, 7, 8, 0, 0, 0, 0, 9, 10, 11, +- 0, 0, 0, 0, 0, 0, 0, 83, 84, 0, +- 0, 0, 12, 13, 0, 14, 15, 5, 6, 7, +- 8, 5, 6, 7, 8, 9, 10, 11, 0, 9, +- 10, 11, 0, 0, 556, -118, 0, 0, 0, 0, +- 0, 13, 0, 14, -118, 13, 0, 14, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, +- 155, 156, 16, 157, 158, 159, 160, 161, 162, 163, +- 164, 165, 166, 167, 168, 169, 170, 158, 159, 160, +- 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, +- 50, 0, 0, 0, 586, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 154, 155, 156, 557, 157, 158, +- 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, +- 169, 170, 154, 155, 156, 645, 157, 158, 159, 160, ++ 83, 84, 80, 81, 72, 359, 15, 150, 73, 74, ++ 69, 70, 0, 71, 0, 75, 0, 0, 76, 0, ++ 0, 0, 0, 77, 78, 79, 0, 83, 84, 80, ++ 81, 72, 0, 15, 152, 73, 74, 0, 0, 0, ++ 0, 0, 75, 0, 0, 76, 0, 0, 0, 0, ++ 77, 78, 79, 0, 83, 84, 80, 81, 0, 0, ++ 4, 82, -118, 5, 6, 7, 8, 0, 0, 0, ++ 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, ++ 0, 83, 84, 0, 0, 0, 12, 13, 0, 14, ++ 15, 156, 0, 157, 158, 159, 160, 161, 162, 163, ++ 164, 165, 166, 167, 168, 169, 170, 0, 561, -118, ++ 0, 0, 0, 0, 0, 154, 155, 156, -118, 157, ++ 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, ++ 168, 169, 170, 154, 155, 156, 16, 157, 158, 159, ++ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, ++ 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 154, 155, 156, 628, 157, 158, 159, 160, 161, 162, ++ 163, 164, 165, 166, 167, 168, 169, 170, 0, 0, ++ 0, 562, 154, 155, 156, 650, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, +- 155, 156, 623, 157, 158, 159, 160, 161, 162, 163, +- 164, 165, 166, 167, 168, 169, 170, 156, 0, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170 + }; + + static const short yycheck[] = { 38, +- 39, 51, 27, 28, 29, 120, 49, 22, 101, 204, +- 20, 2, 3, 57, 2, 3, 186, 21, 22, 145, +- 2, 3, 384, 115, 224, 63, 212, 2, 3, 420, +- 230, 282, 226, 43, 9, 10, 11, 106, 116, 1, +- 31, 51, 133, 31, 3, 20, 82, 22, 22, 31, +- 75, 73, 74, 225, 112, 461, 31, 79, 119, 231, +- 133, 38, 9, 85, 175, 39, 1, 239, 43, 30, +- 1, 30, 111, 95, 49, 181, 51, 102, 30, 10, +- 38, 125, 57, 5, 446, 7, 38, 202, 180, 3, +- 4, 50, 25, 103, 0, 3, 4, 107, 38, 76, +- 59, 507, 35, 36, 37, 3, 116, 569, 82, 0, +- 3, 4, 137, 46, 150, 59, 152, 59, 76, 289, +- 82, 54, 183, 98, 59, 76, 101, 101, 103, 76, +- 81, 106, 107, 31, 482, 497, 76, 176, 27, 643, +- 218, 116, 186, 182, 222, 133, 237, 59, 173, 174, +- 125, 82, 221, 559, 502, 213, 76, 82, 620, 133, +- 76, 81, 30, 414, 237, 81, 224, 671, 82, 30, +- 59, 60, 230, 279, 82, 77, 150, 639, 152, 285, +- 642, 292, 644, 59, 27, 207, 119, 30, 227, 82, +- 652, 59, 60, 36, 585, 3, 4, 130, 59, 60, +- 238, 4, 240, 6, 7, 82, 181, 393, 218, 12, +- 13, 14, 222, 82, 386, 387, 59, 60, 390, 258, +- 245, 76, 684, 77, 76, 28, 81, 81, 590, 251, +- 234, 206, 236, 81, 77, 407, 408, 409, 81, 9, +- 412, 413, 50, 218, 370, 289, 221, 222, 287, 237, +- 183, 76, 59, 77, 424, 441, 81, 81, 444, 3, +- 4, 76, 236, 237, 77, 437, 291, 325, 81, 327, +- 363, 364, 466, 77, 77, 78, 1, 81, 76, 4, +- 5, 6, 7, 298, 217, 78, 30, 12, 13, 14, +- 401, 78, 27, 297, 298, 30, 77, 312, 76, 405, +- 81, 36, 27, 28, 279, 30, 50, 282, 333, 479, +- 285, 36, 404, 77, 486, 59, 1, 81, 410, 4, +- 5, 6, 7, 298, 298, 10, 77, 12, 13, 14, +- 81, 4, 5, 6, 7, 393, 77, 78, 312, 12, +- 13, 14, 77, 28, 76, 406, 81, 77, 30, 521, +- 411, 81, 77, 363, 364, 28, 81, 82, 464, 465, +- 77, 36, 59, 60, 81, 471, 472, 392, 50, 82, +- 374, 375, 422, 499, 432, 3, 4, 59, 60, 76, +- 424, 59, 60, 58, 442, 60, 444, 76, 363, 364, +- 433, 77, 367, 378, 566, 405, 381, 82, 76, 38, +- 526, 375, 59, 149, 77, 50, 51, 52, 154, 155, +- 582, 27, 422, 159, 160, 161, 162, 163, 164, 165, +- 166, 167, 168, 169, 170, 3, 451, 9, 467, 7, +- 405, 83, 3, 4, 634, 479, 636, 77, 1, 414, +- 36, 4, 5, 6, 7, 420, 77, 422, 36, 12, +- 13, 14, 30, 78, 464, 465, 59, 60, 433, 30, +- 499, 471, 472, 81, 489, 28, 76, 38, 1, 7, +- 3, 4, 50, 406, 499, 59, 60, 76, 411, 50, +- 38, 59, 60, 678, 59, 60, 76, 526, 59, 464, +- 465, 686, 30, 515, 83, 621, 471, 472, 537, 3, +- 615, 526, 3, 4, 77, 78, 7, 76, 499, 77, +- 78, 499, 50, 538, 260, 261, 83, 499, 36, 82, +- 76, 59, 60, 76, 499, 76, 30, 32, 567, 30, +- 545, 570, 571, 555, 83, 661, 662, 587, 78, 578, +- 544, 545, 585, 59, 60, 38, 50, 3, 4, 50, +- 78, 7, 3, 4, 593, 59, 60, 78, 59, 60, +- 76, 600, 59, 60, 555, 89, 90, 555, 464, 465, +- 545, 545, 611, 555, 30, 83, 634, 587, 636, 30, +- 555, 4, 621, 6, 7, 76, 332, 3, 77, 12, +- 13, 14, 78, 81, 50, 78, 621, 78, 344, 50, +- 38, 38, 78, 59, 643, 28, 81, 30, 59, 60, +- 585, 1, 587, 3, 4, 5, 6, 7, 78, 83, +- 10, 78, 12, 13, 14, 38, 665, 50, 59, 3, +- 59, 377, 671, 7, 59, 38, 59, 60, 28, 7, +- 30, 1, 77, 3, 4, 5, 6, 7, 8, 9, +- 396, 11, 12, 13, 14, 15, 30, 17, 18, 19, +- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, +- 30, 31, 77, 33, 34, 38, 50, 77, 77, 16, +- 40, 78, 59, 43, 430, 59, 76, 59, 48, 49, +- 50, 77, 77, 76, 54, 55, 5, 6, 7, 59, +- 5, 6, 7, 12, 13, 14, 452, 12, 13, 14, +- 3, 4, 5, 6, 7, 461, 462, 77, 78, 79, +- 80, 1, 82, 3, 4, 30, 6, 7, 8, 9, +- 17, 11, 12, 13, 14, 77, 482, 76, 76, 485, +- 54, 55, 77, 57, 58, 59, 60, 76, 28, 29, +- 77, 31, 9, 33, 34, 77, 502, 77, 59, 505, +- 40, 507, 76, 43, 81, 6, 7, 77, 48, 49, +- 50, 12, 13, 14, 54, 55, 522, 76, 1, 59, +- 76, 4, 77, 6, 7, 77, 0, 533, 0, 12, +- 13, 14, 46, 47, 48, 49, 50, 51, 52, 79, +- 80, 570, 82, 213, 442, 28, 555, 292, 31, 53, +- 556, 423, 291, 559, 1, 430, 3, 4, 5, 6, +- 7, 8, 9, 189, 11, 12, 13, 14, 15, 505, +- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, +- 27, 28, 29, 30, 31, 335, 33, 34, 237, 4, +- 5, 6, 7, 40, 77, 78, 43, 12, 13, 14, +- 606, 48, 49, 50, 327, 460, 432, 54, 55, 245, +- 442, 1, 59, 28, 4, 5, 6, 7, 333, 394, +- 10, 621, 12, 13, 14, 48, 49, 50, 51, 52, +- 77, 666, 79, 80, 1, 82, 3, 4, 28, 444, +- 30, 8, 9, 621, 11, 668, 286, -1, 15, 367, +- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, +- 27, -1, 29, -1, 31, -1, 33, 34, -1, -1, +- -1, -1, -1, 40, 54, 55, 43, 57, 58, 59, +- 60, 48, 49, 50, -1, -1, 76, 54, 55, -1, +- -1, -1, 59, 1, -1, -1, 4, -1, 6, 7, +- -1, -1, -1, -1, 12, 13, 14, -1, -1, -1, +- 77, 78, 79, 80, 1, 82, 3, 4, -1, -1, +- 28, 8, 9, 31, 11, -1, -1, -1, 15, -1, +- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, +- 27, -1, 29, -1, 31, -1, 33, 34, -1, 4, +- 5, 6, 7, 40, -1, 10, 43, 12, 13, 14, +- -1, 48, 49, 50, -1, -1, -1, 54, 55, -1, +- -1, -1, 59, 28, -1, 30, -1, -1, -1, 4, +- 5, 6, 7, -1, -1, -1, -1, 12, 13, 14, +- 77, -1, 79, 80, 1, 82, 3, 4, -1, -1, +- -1, 8, 9, 28, 11, 30, -1, -1, 15, -1, +- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, +- 27, -1, 29, -1, 31, -1, 33, 34, -1, -1, +- -1, -1, -1, 40, -1, -1, 43, -1, -1, -1, +- -1, 48, 49, 50, -1, -1, -1, 54, 55, -1, +- -1, 1, 59, 3, 4, -1, -1, -1, 8, 9, +- -1, 11, 45, 46, 47, 48, 49, 50, 51, 52, +- 77, -1, 79, 80, -1, 82, -1, -1, -1, 29, +- -1, 31, -1, 33, 34, -1, -1, -1, -1, -1, +- 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, +- 50, -1, -1, -1, 54, 55, -1, -1, 58, 59, +- 60, 1, -1, 3, 4, -1, -1, -1, 8, 9, +- -1, 11, -1, -1, -1, -1, -1, -1, 78, 79, +- 80, -1, 82, -1, -1, -1, -1, -1, -1, 29, +- -1, 31, -1, 33, 34, -1, -1, -1, -1, -1, +- 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, +- 50, -1, -1, -1, 54, 55, -1, -1, 58, 59, +- 60, 1, -1, 3, -1, -1, -1, -1, 8, 9, +- -1, 11, -1, -1, -1, -1, -1, -1, 78, 79, +- 80, -1, 82, -1, -1, -1, -1, -1, -1, 29, +- -1, 31, -1, 33, 34, -1, 36, -1, -1, -1, +- 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, +- 50, -1, -1, -1, 54, 55, -1, -1, 58, 59, +- 60, 1, -1, 3, -1, -1, -1, -1, 8, 9, +- -1, 11, -1, -1, -1, -1, -1, -1, -1, 79, +- 80, -1, 82, -1, -1, -1, -1, -1, -1, 29, +- -1, 31, -1, 33, 34, -1, -1, -1, -1, -1, +- 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, +- 50, -1, -1, -1, 54, 55, 1, -1, 3, 59, +- -1, -1, -1, 8, 9, 1, 11, -1, 4, 5, +- 6, 7, -1, -1, -1, -1, 12, 13, 14, 79, +- 80, -1, 82, -1, 29, -1, 31, -1, 33, 34, +- -1, 27, 28, -1, 30, 40, -1, -1, 43, -1, +- 36, -1, -1, 48, 49, 50, -1, -1, -1, 54, +- 55, -1, -1, -1, 59, -1, -1, -1, -1, -1, +- -1, -1, -1, 59, 60, -1, -1, 1, -1, -1, +- 4, 5, 6, 7, 79, 80, -1, 82, 12, 13, +- 14, 77, 3, -1, -1, 81, 82, 8, 9, -1, +- 11, -1, -1, 27, 28, -1, 30, -1, -1, -1, +- -1, -1, 36, -1, -1, -1, -1, -1, 29, 3, +- 31, -1, 33, 34, 8, 9, -1, 11, -1, 40, +- -1, -1, 43, -1, -1, 59, 60, 48, 49, 50, +- -1, -1, -1, 54, 55, 29, -1, 31, 59, 33, +- 34, -1, -1, 77, -1, -1, 40, 81, 82, 43, +- -1, -1, -1, -1, 48, 49, 50, -1, 79, 80, +- 54, 55, 83, -1, 3, 59, -1, -1, -1, 8, +- 9, -1, 11, 41, 42, 43, 44, 45, 46, 47, +- 48, 49, 50, 51, 52, 79, 80, -1, -1, 83, +- 29, 3, 31, -1, 33, 34, 8, 9, -1, 11, +- -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, +- 49, 50, -1, -1, -1, 54, 55, 29, -1, 31, +- 59, 33, 34, -1, -1, -1, -1, -1, 40, -1, ++ 39, 51, 27, 28, 29, 384, 20, 2, 3, 49, ++ 2, 3, 2, 3, 112, 57, 224, 21, 22, 226, ++ 22, 204, 230, 420, 2, 3, 120, 115, 101, 43, ++ 145, 9, 10, 11, 119, 22, 31, 51, 175, 31, ++ 212, 31, 20, 282, 22, 106, 1, 186, 63, 133, ++ 75, 82, 39, 31, 133, 10, 38, 9, 1, 1, ++ 648, 461, 3, 4, 181, 43, 0, 446, 73, 74, ++ 116, 49, 111, 51, 79, 25, 0, 102, 77, 57, ++ 85, 482, 81, 125, 574, 35, 36, 37, 676, 103, ++ 95, 30, 180, 107, 76, 82, 46, 30, 183, 3, ++ 4, 502, 116, 3, 54, 38, 59, 507, 202, 50, ++ 3, 4, 137, 38, 101, 213, 225, 59, 497, 150, ++ 98, 152, 231, 101, 76, 103, 224, 82, 106, 107, ++ 239, 31, 230, 3, 4, 625, 38, 176, 116, 82, ++ 76, 133, 59, 182, 186, 81, 133, 125, 173, 174, ++ 289, 76, 59, 237, 644, 292, 76, 647, 237, 649, ++ 221, 81, 279, 150, 564, 152, 77, 657, 285, 119, ++ 59, 60, 218, 59, 76, 414, 222, 82, 82, 1, ++ 130, 76, 4, 5, 6, 7, 81, 76, 227, 82, ++ 12, 13, 14, 590, 77, 3, 4, 82, 81, 689, ++ 59, 60, 207, 181, 218, 82, 28, 3, 222, 3, ++ 4, 7, 82, 7, 3, 4, 595, 76, 7, 258, ++ 245, 393, 30, 238, 76, 240, 3, 325, 206, 327, ++ 234, 77, 236, 183, 30, 81, 30, 50, 51, 52, ++ 218, 30, 50, 221, 222, 237, 251, 289, 287, 236, ++ 237, 59, 60, 30, 50, 370, 50, 59, 60, 466, ++ 82, 50, 36, 59, 401, 59, 291, 217, 9, 441, ++ 59, 60, 444, 50, 76, 76, 378, 386, 387, 381, ++ 81, 390, 59, 60, 58, 424, 60, 5, 405, 7, ++ 363, 364, 76, 297, 298, 393, 298, 81, 77, 77, ++ 81, 279, 81, 81, 282, 77, 76, 285, 333, 81, ++ 312, 298, 76, 407, 408, 409, 404, 59, 412, 413, ++ 298, 406, 410, 77, 76, 312, 411, 81, 437, 4, ++ 5, 6, 7, 4, 432, 6, 7, 12, 13, 14, ++ 479, 12, 13, 14, 442, 78, 444, 464, 465, 363, ++ 364, 78, 77, 28, 471, 472, 81, 28, 77, 468, ++ 469, 470, 81, 76, 473, 474, 1, 392, 3, 4, ++ 374, 375, 422, 3, 4, 77, 78, 486, 3, 4, ++ 76, 27, 424, 3, 499, 363, 364, 7, 375, 367, ++ 82, 405, 1, 433, 77, 4, 5, 6, 7, 38, ++ 30, 10, 77, 12, 13, 14, 77, 78, 422, 27, ++ 30, 59, 30, 59, 60, 27, 531, 526, 36, 28, ++ 50, 3, 9, 7, 77, 78, 451, 405, 467, 59, ++ 50, 639, 83, 641, 77, 78, 414, 479, 27, 59, ++ 60, 77, 420, 36, 422, 77, 30, 81, 30, 78, ++ 464, 465, 30, 59, 60, 433, 406, 471, 472, 77, ++ 499, 411, 571, 81, 489, 36, 50, 83, 50, 76, ++ 59, 60, 50, 82, 499, 59, 60, 59, 587, 59, ++ 60, 59, 60, 59, 60, 1, 464, 465, 4, 38, ++ 6, 7, 531, 471, 472, 76, 12, 13, 14, 76, ++ 683, 59, 60, 542, 499, 36, 531, 499, 691, 499, ++ 515, 626, 28, 464, 465, 31, 89, 90, 543, 76, ++ 83, 499, 5, 6, 7, 76, 620, 83, 76, 12, ++ 13, 14, 76, 572, 32, 78, 575, 576, 78, 78, ++ 76, 639, 592, 641, 583, 549, 550, 30, 550, 38, ++ 590, 666, 667, 83, 3, 560, 77, 81, 78, 598, ++ 78, 77, 78, 550, 78, 560, 605, 38, 560, 38, ++ 560, 78, 550, 81, 78, 38, 78, 616, 592, 149, ++ 83, 59, 560, 59, 154, 155, 59, 626, 38, 159, ++ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, ++ 170, 626, 46, 47, 48, 49, 50, 51, 52, 648, ++ 6, 7, 590, 77, 592, 77, 12, 13, 14, 7, ++ 38, 77, 1, 77, 3, 4, 5, 6, 7, 8, ++ 9, 670, 11, 12, 13, 14, 15, 676, 17, 18, ++ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, ++ 29, 30, 31, 16, 33, 34, 78, 4, 5, 6, ++ 7, 40, 59, 10, 43, 12, 13, 14, 77, 48, ++ 49, 50, 77, 59, 76, 54, 55, 5, 6, 7, ++ 59, 28, 17, 30, 12, 13, 14, 77, 77, 76, ++ 260, 261, 3, 4, 5, 6, 7, 77, 77, 78, ++ 79, 80, 1, 82, 3, 4, 5, 6, 7, 8, ++ 9, 76, 11, 12, 13, 14, 15, 76, 17, 18, ++ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, ++ 29, 30, 31, 9, 33, 34, 27, 77, 77, 30, ++ 59, 40, 76, 81, 43, 36, 77, 76, 0, 48, ++ 49, 50, 77, 77, 0, 54, 55, 292, 575, 53, ++ 59, 213, 332, 4, 5, 6, 7, 560, 59, 60, ++ 442, 12, 13, 14, 344, 189, 423, 505, 77, 291, ++ 79, 80, 460, 82, 237, 430, 77, 28, 335, 30, ++ 81, 432, 1, 327, 3, 4, 333, 245, 442, 8, ++ 9, 626, 11, 394, 444, 626, 15, 377, 17, 18, ++ 19, 20, 21, 22, 23, 24, 25, 26, 27, 673, ++ 29, 671, 31, -1, 33, 34, 396, 286, -1, 3, ++ 4, 40, -1, -1, 43, 367, 77, -1, -1, 48, ++ 49, 50, -1, -1, -1, 54, 55, 1, -1, 3, ++ 59, -1, -1, -1, 8, 9, 30, 11, -1, -1, ++ 430, -1, -1, -1, 38, -1, -1, -1, 77, 78, ++ 79, 80, -1, 82, -1, 29, 50, 31, -1, 33, ++ 34, -1, 452, -1, -1, 59, 40, -1, -1, 43, ++ -1, 461, 462, -1, 48, 49, 50, -1, -1, -1, ++ 54, 55, -1, 54, 55, 59, 57, 58, 59, 60, ++ -1, -1, 482, -1, -1, 485, -1, -1, 1, -1, ++ 3, 4, 5, 6, 7, 79, 80, 10, 82, 12, ++ 13, 14, 502, -1, -1, 505, -1, 507, -1, -1, ++ 4, 5, 6, 7, -1, 28, -1, 30, 12, 13, ++ 14, -1, -1, 1, -1, 3, 4, 527, -1, -1, ++ 8, 9, -1, 11, 28, -1, 30, 15, 538, 17, ++ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ++ -1, 29, -1, 31, -1, 33, 34, -1, -1, -1, ++ -1, 561, 40, 76, 564, 43, -1, -1, -1, -1, ++ 48, 49, 50, -1, -1, -1, 54, 55, -1, 1, ++ -1, 59, 4, 77, 6, 7, 4, 5, 6, 7, ++ 12, 13, 14, -1, 12, 13, 14, -1, -1, 77, ++ -1, 79, 80, -1, 82, 1, 28, 3, 4, 31, ++ 28, 611, 8, 9, -1, 11, -1, -1, -1, 15, ++ -1, 17, 18, 19, 20, 21, 22, 23, 24, 25, ++ 26, 27, -1, 29, -1, 31, -1, 33, 34, 48, ++ 49, 50, 51, 52, 40, -1, -1, 43, -1, -1, ++ -1, -1, 48, 49, 50, -1, -1, -1, 54, 55, ++ -1, -1, 1, 59, 3, 4, -1, 6, 7, 8, ++ 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, ++ -1, 77, -1, 79, 80, -1, 82, -1, -1, 28, ++ 29, -1, 31, -1, 33, 34, -1, -1, -1, -1, ++ -1, 40, 54, 55, 43, 57, 58, 59, 60, 48, ++ 49, 50, -1, -1, -1, 54, 55, -1, -1, 1, ++ 59, 3, 4, -1, 76, -1, 8, 9, -1, 11, ++ -1, -1, -1, 1, -1, -1, 4, 5, 6, 7, ++ 79, 80, 10, 82, 12, 13, 14, 29, -1, 31, ++ -1, 33, 34, -1, -1, -1, -1, -1, 40, -1, ++ 28, 43, 30, -1, -1, -1, 48, 49, 50, -1, ++ -1, -1, 54, 55, -1, -1, 58, 59, 60, 1, ++ -1, 3, 4, -1, -1, -1, 8, 9, -1, 11, ++ -1, -1, -1, -1, -1, -1, 78, 79, 80, -1, ++ 82, -1, -1, -1, -1, -1, -1, 29, 76, 31, ++ -1, 33, 34, -1, -1, -1, -1, -1, 40, -1, ++ -1, 43, -1, -1, -1, -1, 48, 49, 50, -1, ++ -1, -1, 54, 55, -1, -1, 58, 59, 60, 1, ++ -1, 3, -1, -1, -1, -1, 8, 9, -1, 11, ++ -1, -1, -1, -1, -1, -1, 78, 79, 80, -1, ++ 82, -1, -1, -1, -1, -1, -1, 29, -1, 31, ++ -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, + -1, 43, -1, -1, -1, -1, 48, 49, 50, -1, +- 79, 80, 54, 55, 83, -1, 3, 59, -1, -1, +- -1, 8, 9, -1, 11, 42, 43, 44, 45, 46, +- 47, 48, 49, 50, 51, 52, -1, 79, 80, -1, +- -1, 83, 29, 3, 31, -1, 33, 34, 8, 9, +- -1, 11, -1, 40, -1, -1, 43, -1, -1, -1, +- -1, 48, 49, 50, -1, -1, -1, 54, 55, 29, ++ -1, -1, 54, 55, -1, -1, 58, 59, 60, 1, ++ -1, 3, -1, -1, -1, -1, 8, 9, -1, 11, ++ 1, -1, -1, 4, 5, 6, 7, 79, 80, -1, ++ 82, 12, 13, 14, -1, -1, -1, 29, -1, 31, ++ -1, 33, 34, -1, -1, -1, 27, 28, 40, 30, ++ -1, 43, -1, -1, -1, 36, 48, 49, 50, -1, ++ -1, -1, 54, 55, -1, -1, -1, 59, 43, 44, ++ 45, 46, 47, 48, 49, 50, 51, 52, 59, 60, ++ 1, -1, -1, 4, 5, 6, 7, 79, 80, -1, ++ 82, 12, 13, 14, -1, -1, 77, -1, -1, 1, ++ 81, 82, 4, 5, 6, 7, 27, 28, -1, 30, ++ 12, 13, 14, -1, -1, 36, -1, -1, -1, -1, ++ -1, 4, 5, 6, 7, 27, 28, -1, 30, 12, ++ 13, 14, -1, -1, 36, -1, 3, -1, 59, 60, ++ -1, 8, 9, -1, 11, 28, -1, 30, 45, 46, ++ 47, 48, 49, 50, 51, 52, 77, -1, -1, -1, ++ 81, 82, 29, 3, 31, -1, 33, 34, 8, 9, ++ -1, 11, -1, 40, -1, 77, 43, -1, -1, 81, ++ 82, 48, 49, 50, -1, -1, -1, 54, 55, 29, + -1, 31, 59, 33, 34, -1, -1, -1, -1, -1, + 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, + 50, -1, 79, 80, 54, 55, 83, -1, 3, 59, +- -1, -1, -1, 8, 9, -1, 11, 43, 44, 45, +- 46, 47, 48, 49, 50, 51, 52, -1, -1, 79, +- 80, -1, -1, 83, 29, -1, 31, -1, 33, 34, +- 10, -1, -1, -1, -1, 40, -1, -1, 43, -1, ++ -1, -1, -1, 8, 9, -1, 11, 41, 42, 43, ++ 44, 45, 46, 47, 48, 49, 50, 51, 52, 79, ++ 80, -1, -1, 83, 29, 3, 31, -1, 33, 34, ++ 8, 9, -1, 11, -1, 40, -1, -1, 43, -1, + -1, -1, -1, 48, 49, 50, -1, -1, -1, 54, +- 55, -1, -1, -1, 59, 35, 36, 37, 38, 39, +- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, +- 50, 51, 52, -1, 79, 80, -1, -1, 83, 3, +- 4, 5, 6, 7, 8, 9, -1, 11, 12, 13, +- 14, 15, -1, 17, 18, 19, 20, 21, 22, 23, +- 24, 25, 26, 27, 28, 29, 30, 31, -1, 33, +- 34, -1, -1, -1, -1, -1, 40, -1, -1, 43, +- -1, -1, -1, -1, 48, 49, 50, 30, -1, -1, +- 54, 55, 35, 36, 37, 59, 39, 40, 41, 42, ++ 55, 29, -1, 31, 59, 33, 34, -1, -1, -1, ++ -1, -1, 40, -1, -1, 43, -1, -1, -1, -1, ++ 48, 49, 50, -1, 79, 80, 54, 55, 83, -1, ++ 3, 59, -1, -1, -1, 8, 9, -1, 11, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, +- -1, -1, -1, 77, -1, 79, 80, -1, 82, 3, +- 4, -1, -1, -1, 8, 9, -1, 11, -1, -1, +- -1, 15, -1, 17, 18, 19, 20, 21, 22, 23, +- 24, 25, 26, 27, -1, 29, -1, 31, -1, 33, +- 34, -1, -1, -1, -1, -1, 40, -1, -1, 43, +- -1, -1, -1, -1, 48, 49, 50, -1, -1, -1, +- 54, 55, -1, 3, -1, 59, -1, -1, 8, 9, +- -1, 11, 44, 45, 46, 47, 48, 49, 50, 51, +- 52, -1, -1, 77, -1, 79, 80, -1, 82, 29, +- -1, 31, -1, 33, 34, -1, -1, -1, -1, -1, +- 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, +- 50, -1, -1, -1, 54, 55, -1, -1, -1, 59, +- 3, 4, 5, 6, 7, 8, 9, -1, 11, 12, +- 13, 14, -1, -1, -1, -1, -1, -1, -1, 79, +- 80, -1, 82, -1, -1, 28, 29, 30, 31, -1, +- 33, 34, -1, -1, -1, -1, -1, 40, -1, -1, +- 43, -1, -1, -1, -1, 48, 49, 50, -1, -1, +- -1, 54, 55, -1, 3, 4, 59, 6, 7, 8, +- 9, -1, 11, 12, 13, 14, -1, 3, -1, -1, +- -1, -1, 8, 9, -1, 11, 79, 80, -1, 28, +- 29, -1, 31, -1, 33, 34, -1, -1, -1, -1, +- -1, 40, -1, 29, 43, 31, -1, 33, 34, 48, +- 49, 50, -1, -1, 40, 54, 55, 43, -1, -1, +- 59, -1, 48, 49, 50, -1, -1, -1, 54, 55, +- 3, -1, -1, 59, -1, 8, 9, -1, 11, -1, +- 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, +- -1, 77, -1, 79, 80, -1, 29, 3, 31, -1, ++ -1, 79, 80, -1, -1, 83, 29, 3, 31, -1, + 33, 34, 8, 9, -1, 11, -1, 40, -1, -1, + 43, -1, -1, -1, -1, 48, 49, 50, -1, -1, +- -1, 54, 55, 29, 3, 31, 59, 33, 34, 8, +- 9, -1, 11, -1, 40, -1, -1, 43, -1, -1, +- -1, -1, 48, 49, 50, -1, 79, 80, 54, 55, +- 29, 3, 31, 59, 33, 34, 8, 9, -1, 11, ++ -1, 54, 55, 29, -1, 31, 59, 33, 34, -1, ++ 4, -1, 6, 7, 40, -1, -1, 43, 12, 13, ++ 14, -1, 48, 49, 50, -1, 79, 80, 54, 55, ++ 83, -1, 3, 59, 28, -1, 30, 8, 9, -1, ++ 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, ++ -1, -1, -1, 79, 80, -1, 50, 83, 29, -1, ++ 31, -1, 33, 34, 10, 59, 60, -1, -1, 40, ++ -1, -1, 43, -1, -1, -1, -1, 48, 49, 50, ++ -1, -1, -1, 54, 55, -1, -1, -1, 59, 35, ++ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, ++ 46, 47, 48, 49, 50, 51, 52, -1, 79, 80, ++ -1, -1, 83, 3, 4, 5, 6, 7, 8, 9, ++ -1, 11, 12, 13, 14, 15, -1, 17, 18, 19, ++ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ++ 30, 31, -1, 33, 34, -1, -1, -1, -1, -1, ++ 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, ++ 50, 30, -1, -1, 54, 55, 35, 36, 37, 59, ++ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, ++ 49, 50, 51, 52, -1, -1, -1, 77, -1, 79, ++ 80, -1, 82, 3, 4, -1, -1, -1, 8, 9, ++ -1, 11, -1, -1, -1, 15, -1, 17, 18, 19, ++ 20, 21, 22, 23, 24, 25, 26, 27, -1, 29, ++ -1, 31, -1, 33, 34, -1, -1, -1, -1, -1, ++ 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, ++ 50, -1, -1, -1, 54, 55, -1, 3, -1, 59, ++ -1, -1, 8, 9, -1, 11, -1, -1, -1, -1, ++ -1, -1, -1, -1, -1, -1, -1, 77, -1, 79, ++ 80, -1, 82, 29, -1, 31, -1, 33, 34, -1, ++ -1, -1, -1, -1, 40, -1, -1, 43, -1, -1, ++ -1, -1, 48, 49, 50, -1, -1, -1, 54, 55, ++ -1, -1, -1, 59, 3, 4, 5, 6, 7, 8, ++ 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, ++ -1, -1, -1, 79, 80, -1, 82, -1, -1, 28, ++ 29, 30, 31, -1, 33, 34, -1, -1, -1, -1, ++ -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, ++ 49, 50, -1, -1, -1, 54, 55, -1, 3, 4, ++ 59, 6, 7, 8, 9, -1, 11, 12, 13, 14, ++ -1, 3, -1, -1, -1, -1, 8, 9, -1, 11, ++ 79, 80, -1, 28, 29, -1, 31, -1, 33, 34, ++ -1, -1, -1, -1, -1, 40, -1, 29, 43, 31, ++ -1, 33, 34, 48, 49, 50, -1, -1, 40, 54, ++ 55, 43, -1, -1, 59, -1, 48, 49, 50, -1, ++ -1, -1, 54, 55, 3, -1, -1, 59, -1, 8, ++ 9, -1, 11, -1, 79, 80, -1, -1, -1, -1, ++ -1, -1, -1, -1, -1, 77, -1, 79, 80, -1, ++ 29, 3, 31, -1, 33, 34, 8, 9, -1, 11, + -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, +- 49, 50, -1, 79, 80, 54, 55, 29, -1, 31, +- 59, 33, 34, -1, -1, -1, -1, -1, 40, -1, ++ 49, 50, -1, -1, -1, 54, 55, 29, 3, 31, ++ 59, 33, 34, 8, 9, -1, 11, -1, 40, -1, + -1, 43, -1, -1, -1, -1, 48, 49, 50, -1, +- 79, 80, 54, 55, -1, -1, 1, 59, 3, 4, +- 5, 6, 7, -1, -1, -1, -1, 12, 13, 14, +- -1, -1, -1, -1, -1, -1, -1, 79, 80, -1, +- -1, -1, 27, 28, -1, 30, 31, 4, 5, 6, +- 7, 4, 5, 6, 7, 12, 13, 14, -1, 12, +- 13, 14, -1, -1, 10, 50, -1, -1, -1, -1, +- -1, 28, -1, 30, 59, 28, -1, 30, -1, -1, +- -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, +- 36, 37, 77, 39, 40, 41, 42, 43, 44, 45, +- 46, 47, 48, 49, 50, 51, 52, 40, 41, 42, +- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, +- 77, -1, -1, -1, 77, -1, -1, -1, -1, -1, +- -1, -1, -1, -1, 35, 36, 37, 83, 39, 40, +- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, +- 51, 52, 35, 36, 37, 38, 39, 40, 41, 42, ++ 79, 80, 54, 55, 29, 3, 31, 59, 33, 34, ++ 8, 9, -1, 11, -1, 40, -1, -1, 43, -1, ++ -1, -1, -1, 48, 49, 50, -1, 79, 80, 54, ++ 55, 29, -1, 31, 59, 33, 34, -1, -1, -1, ++ -1, -1, 40, -1, -1, 43, -1, -1, -1, -1, ++ 48, 49, 50, -1, 79, 80, 54, 55, -1, -1, ++ 1, 59, 3, 4, 5, 6, 7, -1, -1, -1, ++ -1, 12, 13, 14, -1, -1, -1, -1, -1, -1, ++ -1, 79, 80, -1, -1, -1, 27, 28, -1, 30, ++ 31, 37, -1, 39, 40, 41, 42, 43, 44, 45, ++ 46, 47, 48, 49, 50, 51, 52, -1, 10, 50, ++ -1, -1, -1, -1, -1, 35, 36, 37, 59, 39, ++ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, ++ 50, 51, 52, 35, 36, 37, 77, 39, 40, 41, ++ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, ++ 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, ++ 35, 36, 37, 83, 39, 40, 41, 42, 43, 44, ++ 45, 46, 47, 48, 49, 50, 51, 52, -1, -1, ++ -1, 83, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, +- -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, +- 36, 37, 83, 39, 40, 41, 42, 43, 44, 45, +- 46, 47, 48, 49, 50, 51, 52, 37, -1, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52 + }; + /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ + #line 3 "/usr/lib/bison.simple" ++/* This file comes from bison-1.28. */ + + /* Skeleton output parser for bison, + Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. +@@ -1222,46 +1218,66 @@ + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ ++ Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. */ + + /* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +-#ifndef alloca ++/* This is the parser code that is written into each bison parser ++ when the %semantic_parser declaration is not specified in the grammar. ++ It was written by Richard Stallman by simplifying the hairy parser ++ used when %semantic_parser is specified. */ ++ ++#ifndef YYSTACK_USE_ALLOCA ++#ifdef alloca ++#define YYSTACK_USE_ALLOCA ++#else /* alloca not defined */ + #ifdef __GNUC__ ++#define YYSTACK_USE_ALLOCA + #define alloca __builtin_alloca + #else /* not GNU C. */ +-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) ++#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) ++#define YYSTACK_USE_ALLOCA + #include + #else /* not sparc */ +-#if defined (MSDOS) && !defined (__TURBOC__) ++/* We think this test detects Watcom and Microsoft C. */ ++/* This used to test MSDOS, but that is a bad idea ++ since that symbol is in the user namespace. */ ++#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) ++#if 0 /* No need for malloc.h, which pollutes the namespace; ++ instead, just don't use alloca. */ + #include ++#endif + #else /* not MSDOS, or __TURBOC__ */ + #if defined(_AIX) +-#include ++/* I don't know what this was needed for, but it pollutes the namespace. ++ So I turned it off. rms, 2 May 1997. */ ++/* #include */ + #pragma alloca +-#else /* not MSDOS, __TURBOC__, or _AIX */ +-#ifdef __hpux +-#ifdef __cplusplus +-extern "C" { +-void *alloca (unsigned int); +-}; +-#else /* not __cplusplus */ +-void *alloca (); +-#endif /* not __cplusplus */ ++#define YYSTACK_USE_ALLOCA ++#else /* not MSDOS, or __TURBOC__, or _AIX */ ++#if 0 ++#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, ++ and on HPUX 10. Eventually we can turn this on. */ ++#define YYSTACK_USE_ALLOCA ++#define alloca __builtin_alloca + #endif /* __hpux */ ++#endif + #endif /* not _AIX */ + #endif /* not MSDOS, or __TURBOC__ */ +-#endif /* not sparc. */ +-#endif /* not GNU C. */ +-#endif /* alloca not defined. */ ++#endif /* not sparc */ ++#endif /* not GNU C */ ++#endif /* alloca not defined */ ++#endif /* YYSTACK_USE_ALLOCA not defined */ + +-/* This is the parser code that is written into each bison parser +- when the %semantic_parser declaration is not specified in the grammar. +- It was written by Richard Stallman by simplifying the hairy parser +- used when %semantic_parser is specified. */ ++#ifdef YYSTACK_USE_ALLOCA ++#define YYSTACK_ALLOC alloca ++#else ++#define YYSTACK_ALLOC malloc ++#endif + + /* Note: there must be only one dollar sign in this file. + It is replaced by the list of actions, each action +@@ -1271,8 +1287,8 @@ + #define yyclearin (yychar = YYEMPTY) + #define YYEMPTY -2 + #define YYEOF 0 +-#define YYACCEPT return(0) +-#define YYABORT return(1) ++#define YYACCEPT goto yyacceptlab ++#define YYABORT goto yyabortlab + #define YYERROR goto yyerrlab1 + /* Like YYERROR except do call yyerror. + This remains here temporarily to ease the +@@ -1353,12 +1369,12 @@ + #ifndef YYMAXDEPTH + #define YYMAXDEPTH 10000 + #endif +- +-/* Prevent warning if -Wstrict-prototypes. */ +-#ifdef __GNUC__ +-int yyparse (void); +-#endif + ++/* Define __yy_memcpy. Note that the size argument ++ should be passed with type unsigned int, because that is what the non-GCC ++ definitions require. With GCC, __builtin_memcpy takes an arg ++ of type size_t, but it can handle unsigned int. */ ++ + #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ + #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) + #else /* not GNU C or C++ */ +@@ -1370,7 +1386,7 @@ + __yy_memcpy (to, from, count) + char *to; + char *from; +- int count; ++ unsigned int count; + { + register char *f = from; + register char *t = to; +@@ -1385,10 +1401,10 @@ + /* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ + static void +-__yy_memcpy (char *to, char *from, int count) ++__yy_memcpy (char *to, char *from, unsigned int count) + { +- register char *f = from; + register char *t = to; ++ register char *f = from; + register int i = count; + + while (i-- > 0) +@@ -1398,7 +1414,7 @@ + #endif + #endif + +-#line 196 "/usr/lib/bison.simple" ++#line 217 "/usr/lib/bison.simple" + + /* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. +@@ -1419,6 +1435,15 @@ + #define YYPARSE_PARAM_DECL + #endif /* not YYPARSE_PARAM */ + ++/* Prevent warning if -Wstrict-prototypes. */ ++#ifdef __GNUC__ ++#ifdef YYPARSE_PARAM ++int yyparse (void *); ++#else ++int yyparse (void); ++#endif ++#endif ++ + int + yyparse(YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL +@@ -1447,6 +1472,7 @@ + #endif + + int yystacksize = YYINITDEPTH; ++ int yyfree_stacks = 0; + + #ifdef YYPURE + int yychar; +@@ -1531,18 +1557,32 @@ + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); ++ if (yyfree_stacks) ++ { ++ free (yyss); ++ free (yyvs); ++#ifdef YYLSP_NEEDED ++ free (yyls); ++#endif ++ } + return 2; + } + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + yystacksize = YYMAXDEPTH; +- yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); +- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); +- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); +- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); ++#ifndef YYSTACK_USE_ALLOCA ++ yyfree_stacks = 1; ++#endif ++ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); ++ __yy_memcpy ((char *)yyss, (char *)yyss1, ++ size * (unsigned int) sizeof (*yyssp)); ++ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); ++ __yy_memcpy ((char *)yyvs, (char *)yyvs1, ++ size * (unsigned int) sizeof (*yyvsp)); + #ifdef YYLSP_NEEDED +- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); +- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); ++ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); ++ __yy_memcpy ((char *)yyls, (char *)yyls1, ++ size * (unsigned int) sizeof (*yylsp)); + #endif + #endif /* no yyoverflow */ + +@@ -3640,82 +3680,88 @@ + { yyval.ttype = get_parm_info (0); ; + break;} + case 389: +-#line 2137 "c-parse.y" +-{ push_parm_decl (yyvsp[0].ttype); ; ++#line 2138 "c-parse.y" ++{ push_parm_decl (TREE_PURPOSE(yyvsp[0].ttype), TREE_VALUE(yyvsp[0].ttype)); ; + break;} + case 390: +-#line 2139 "c-parse.y" +-{ push_parm_decl (yyvsp[0].ttype); ; ++#line 2140 "c-parse.y" ++{ push_parm_decl (TREE_PURPOSE(yyvsp[0].ttype), TREE_VALUE(yyvsp[0].ttype)); ; + break;} + case 391: +-#line 2146 "c-parse.y" +-{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, +- yyvsp[-1].ttype), +- build_tree_list (prefix_attributes, +- yyvsp[0].ttype)); ++#line 2147 "c-parse.y" ++{ yyval.ttype = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ yyvsp[-2].ttype), ++ build_tree_list (prefix_attributes, ++ yyvsp[0].ttype)), yyvsp[-1].ttype); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); +- resume_momentary (yyvsp[-2].itype); ; ++ resume_momentary (yyvsp[-3].itype); ; + break;} + case 392: +-#line 2155 "c-parse.y" +-{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, +- yyvsp[-1].ttype), +- build_tree_list (prefix_attributes, +- yyvsp[0].ttype)); ++#line 2157 "c-parse.y" ++{ yyval.ttype = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ yyvsp[-2].ttype), ++ build_tree_list (prefix_attributes, ++ yyvsp[0].ttype)), yyvsp[-1].ttype); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); +- resume_momentary (yyvsp[-2].itype); ; ++ resume_momentary (yyvsp[-3].itype); ; + break;} + case 393: +-#line 2164 "c-parse.y" +-{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, +- yyvsp[-1].ttype), +- build_tree_list (prefix_attributes, +- yyvsp[0].ttype)); ++#line 2167 "c-parse.y" ++{ yyval.ttype = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ yyvsp[-2].ttype), ++ build_tree_list (prefix_attributes, ++ yyvsp[0].ttype)), yyvsp[-1].ttype); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); +- resume_momentary (yyvsp[-2].itype); ; ++ resume_momentary (yyvsp[-3].itype); ; + break;} + case 394: +-#line 2173 "c-parse.y" +-{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, +- yyvsp[-1].ttype), +- build_tree_list (prefix_attributes, +- yyvsp[0].ttype)); ++#line 2177 "c-parse.y" ++{ yyval.ttype = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ yyvsp[-2].ttype), ++ build_tree_list (prefix_attributes, ++ yyvsp[0].ttype)), yyvsp[-1].ttype); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); +- resume_momentary (yyvsp[-2].itype); ; ++ resume_momentary (yyvsp[-3].itype); ; + break;} + case 395: +-#line 2183 "c-parse.y" +-{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, +- yyvsp[-1].ttype), +- build_tree_list (prefix_attributes, +- yyvsp[0].ttype)); ++#line 2188 "c-parse.y" ++{ yyval.ttype = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ yyvsp[-2].ttype), ++ build_tree_list (prefix_attributes, ++ yyvsp[0].ttype)), yyvsp[-1].ttype); ++/* end-GG-local */ + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); +- resume_momentary (yyvsp[-2].itype); ; ++ resume_momentary (yyvsp[-3].itype); ; + break;} + case 396: +-#line 2197 "c-parse.y" ++#line 2204 "c-parse.y" + { pushlevel (0); + clear_parm_order (); + declare_parm_level (1); ; + break;} + case 397: +-#line 2201 "c-parse.y" ++#line 2208 "c-parse.y" + { yyval.ttype = yyvsp[0].ttype; + parmlist_tags_warning (); + poplevel (0, 0, 0); ; + break;} + case 399: +-#line 2209 "c-parse.y" ++#line 2216 "c-parse.y" + { tree t; + for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) + if (TREE_VALUE (t) == NULL_TREE) +@@ -3723,29 +3769,29 @@ + yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; + break;} + case 400: +-#line 2219 "c-parse.y" ++#line 2226 "c-parse.y" + { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; + break;} + case 401: +-#line 2221 "c-parse.y" ++#line 2228 "c-parse.y" + { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; + break;} + case 402: +-#line 2227 "c-parse.y" ++#line 2234 "c-parse.y" + { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; + break;} + case 403: +-#line 2229 "c-parse.y" ++#line 2236 "c-parse.y" + { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; + break;} + case 404: +-#line 2234 "c-parse.y" ++#line 2241 "c-parse.y" + { yyval.itype = pedantic; + pedantic = 0; ; + break;} + } + /* the action file gets copied in in place of this dollarsign */ +-#line 498 "/usr/lib/bison.simple" ++#line 543 "/usr/lib/bison.simple" + + yyvsp -= yylen; + yyssp -= yylen; +@@ -3940,6 +3986,30 @@ + + yystate = yyn; + goto yynewstate; ++ ++ yyacceptlab: ++ /* YYACCEPT comes here. */ ++ if (yyfree_stacks) ++ { ++ free (yyss); ++ free (yyvs); ++#ifdef YYLSP_NEEDED ++ free (yyls); ++#endif ++ } ++ return 0; ++ ++ yyabortlab: ++ /* YYABORT comes here. */ ++ if (yyfree_stacks) ++ { ++ free (yyss); ++ free (yyvs); ++#ifdef YYLSP_NEEDED ++ free (yyls); ++#endif ++ } ++ return 1; + } +-#line 2238 "c-parse.y" ++#line 2245 "c-parse.y" + +diff -ruN --exclude=CVS gcc-2.95.3/gcc/c-parse.h gcc/gcc/c-parse.h +--- gcc-2.95.3/gcc/c-parse.h Fri Mar 16 15:13:48 2001 ++++ gcc/gcc/c-parse.h Thu Sep 27 19:56:19 2001 +@@ -1,64 +1,64 @@ + typedef union {long itype; tree ttype; enum tree_code code; + char *filename; int lineno; int ends_in_label; } YYSTYPE; +-#define IDENTIFIER 258 +-#define TYPENAME 259 +-#define SCSPEC 260 +-#define TYPESPEC 261 +-#define TYPE_QUAL 262 +-#define CONSTANT 263 +-#define STRING 264 +-#define ELLIPSIS 265 +-#define SIZEOF 266 +-#define ENUM 267 +-#define STRUCT 268 +-#define UNION 269 +-#define IF 270 +-#define ELSE 271 +-#define WHILE 272 +-#define DO 273 +-#define FOR 274 +-#define SWITCH 275 +-#define CASE 276 +-#define DEFAULT 277 +-#define BREAK 278 +-#define CONTINUE 279 +-#define RETURN 280 +-#define GOTO 281 +-#define ASM_KEYWORD 282 +-#define TYPEOF 283 +-#define ALIGNOF 284 +-#define ATTRIBUTE 285 +-#define EXTENSION 286 +-#define LABEL 287 +-#define REALPART 288 +-#define IMAGPART 289 +-#define ASSIGN 290 +-#define OROR 291 +-#define ANDAND 292 +-#define EQCOMPARE 293 +-#define ARITHCOMPARE 294 +-#define LSHIFT 295 +-#define RSHIFT 296 +-#define UNARY 297 +-#define PLUSPLUS 298 +-#define MINUSMINUS 299 +-#define HYPERUNARY 300 +-#define POINTSAT 301 +-#define INTERFACE 302 +-#define IMPLEMENTATION 303 +-#define END 304 +-#define SELECTOR 305 +-#define DEFS 306 +-#define ENCODE 307 +-#define CLASSNAME 308 +-#define PUBLIC 309 +-#define PRIVATE 310 +-#define PROTECTED 311 +-#define PROTOCOL 312 +-#define OBJECTNAME 313 +-#define CLASS 314 +-#define ALIAS 315 +-#define OBJC_STRING 316 ++#define IDENTIFIER 257 ++#define TYPENAME 258 ++#define SCSPEC 259 ++#define TYPESPEC 260 ++#define TYPE_QUAL 261 ++#define CONSTANT 262 ++#define STRING 263 ++#define ELLIPSIS 264 ++#define SIZEOF 265 ++#define ENUM 266 ++#define STRUCT 267 ++#define UNION 268 ++#define IF 269 ++#define ELSE 270 ++#define WHILE 271 ++#define DO 272 ++#define FOR 273 ++#define SWITCH 274 ++#define CASE 275 ++#define DEFAULT 276 ++#define BREAK 277 ++#define CONTINUE 278 ++#define RETURN 279 ++#define GOTO 280 ++#define ASM_KEYWORD 281 ++#define TYPEOF 282 ++#define ALIGNOF 283 ++#define ATTRIBUTE 284 ++#define EXTENSION 285 ++#define LABEL 286 ++#define REALPART 287 ++#define IMAGPART 288 ++#define ASSIGN 289 ++#define OROR 290 ++#define ANDAND 291 ++#define EQCOMPARE 292 ++#define ARITHCOMPARE 293 ++#define LSHIFT 294 ++#define RSHIFT 295 ++#define UNARY 296 ++#define PLUSPLUS 297 ++#define MINUSMINUS 298 ++#define HYPERUNARY 299 ++#define POINTSAT 300 ++#define INTERFACE 301 ++#define IMPLEMENTATION 302 ++#define END 303 ++#define SELECTOR 304 ++#define DEFS 305 ++#define ENCODE 306 ++#define CLASSNAME 307 ++#define PUBLIC 308 ++#define PRIVATE 309 ++#define PROTECTED 310 ++#define PROTOCOL 311 ++#define OBJECTNAME 312 ++#define CLASS 313 ++#define ALIAS 314 ++#define OBJC_STRING 315 + + + extern YYSTYPE yylval; +diff -ruN --exclude=CVS gcc-2.95.3/gcc/c-parse.in gcc/gcc/c-parse.in +--- gcc-2.95.3/gcc/c-parse.in Tue Apr 27 00:35:50 1999 ++++ gcc/gcc/c-parse.in Thu Sep 27 19:35:53 2001 +@@ -2329,56 +2329,63 @@ + + parms: + parm +- { push_parm_decl ($1); } ++/* begin-GG-local: explicit register specification for parameters */ ++ { push_parm_decl (TREE_PURPOSE($1), TREE_VALUE($1)); } + | parms ',' parm +- { push_parm_decl ($3); } ++ { push_parm_decl (TREE_PURPOSE($3), TREE_VALUE($3)); } + ; + + /* A single parameter declaration or parameter type name, + as found in a parmlist. */ + parm: +- typed_declspecs setspecs parm_declarator maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ typed_declspecs setspecs parm_declarator maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary ($2); } +- | typed_declspecs setspecs notype_declarator maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ | typed_declspecs setspecs notype_declarator maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary ($2); } +- | typed_declspecs setspecs absdcl maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ | typed_declspecs setspecs absdcl maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary ($2); } +- | declmods setspecs notype_declarator maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ | declmods setspecs notype_declarator maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary ($2); } + +- | declmods setspecs absdcl maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ | declmods setspecs absdcl maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); ++/* end-GG-local */ + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); +@@ -2871,30 +2878,35 @@ + + myparms: + myparm +- { push_parm_decl ($1); } ++/* begin-GG-local: explicit register specification for parameters */ ++ { push_parm_decl (TREE_PURPOSE($1), TREE_VALUE($1)); } + | myparms ',' myparm +- { push_parm_decl ($3); } ++ { push_parm_decl (TREE_PURPOSE($3), TREE_VALUE($3)); } + ; + + /* A single parameter declaration or parameter type name, +- as found in a parmlist. DOES NOT ALLOW AN INITIALIZER OR ASMSPEC */ ++ as found in a parmlist. DOES NOT ALLOW AN INITIALIZER */ + + myparm: +- parm_declarator maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, ++ parm_declarator maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, + $1), +- build_tree_list (prefix_attributes, +- $2)); } +- | notype_declarator maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $1), +- build_tree_list (prefix_attributes, +- $2)); } +- | absdcl maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $1), +- build_tree_list (prefix_attributes, +- $2)); } ++ build_tree_list (prefix_attributes, ++ $3)), $2); } ++ | notype_declarator maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $1), ++ build_tree_list (prefix_attributes, ++ $3)), $2); } ++ | absdcl maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $1), ++ build_tree_list (prefix_attributes, ++ $3)), $2); } ++/* end-GG-local */ + ; + + optparmlist: +diff -ruN --exclude=CVS gcc-2.95.3/gcc/c-parse.y gcc/gcc/c-parse.y +--- gcc-2.95.3/gcc/c-parse.y Tue Apr 27 00:35:51 1999 ++++ gcc/gcc/c-parse.y Thu Sep 27 19:56:19 2001 +@@ -2134,56 +2134,63 @@ + + parms: + parm +- { push_parm_decl ($1); } ++/* begin-GG-local: explicit register specification for parameters */ ++ { push_parm_decl (TREE_PURPOSE($1), TREE_VALUE($1)); } + | parms ',' parm +- { push_parm_decl ($3); } ++ { push_parm_decl (TREE_PURPOSE($3), TREE_VALUE($3)); } + ; + + /* A single parameter declaration or parameter type name, + as found in a parmlist. */ + parm: +- typed_declspecs setspecs parm_declarator maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ typed_declspecs setspecs parm_declarator maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary ($2); } +- | typed_declspecs setspecs notype_declarator maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ | typed_declspecs setspecs notype_declarator maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary ($2); } +- | typed_declspecs setspecs absdcl maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ | typed_declspecs setspecs absdcl maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary ($2); } +- | declmods setspecs notype_declarator maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ | declmods setspecs notype_declarator maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary ($2); } + +- | declmods setspecs absdcl maybe_attribute +- { $$ = build_tree_list (build_tree_list (current_declspecs, +- $3), +- build_tree_list (prefix_attributes, +- $4)); ++ | declmods setspecs absdcl maybeasm maybe_attribute ++ { $$ = build_tree_list ( ++ build_tree_list (build_tree_list (current_declspecs, ++ $3), ++ build_tree_list (prefix_attributes, ++ $5)), $4); ++/* end-GG-local */ + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); +diff -ruN --exclude=CVS gcc-2.95.3/gcc/c-tree.h gcc/gcc/c-tree.h +--- gcc-2.95.3/gcc/c-tree.h Thu Feb 18 21:38:43 1999 ++++ gcc/gcc/c-tree.h Thu Sep 27 19:35:53 2001 +@@ -331,7 +331,9 @@ + extern void print_lang_type PROTO((FILE *, tree, int)); + extern void push_c_function_context PROTO((void)); + extern void push_label_level PROTO((void)); +-extern void push_parm_decl PROTO((tree)); ++/* begin-GG-local: explicit register specification for parameters */ ++extern void push_parm_decl PROTO((tree, tree)); ++/* end-GG-local */ + extern tree pushdecl PROTO((tree)); + extern tree pushdecl_top_level PROTO((tree)); + extern void pushlevel PROTO((int)); +diff -ruN --exclude=CVS gcc-2.95.3/gcc/calls.c gcc/gcc/calls.c +--- gcc-2.95.3/gcc/calls.c Thu Jan 25 15:03:00 2001 ++++ gcc/gcc/calls.c Thu Sep 27 19:35:54 2001 +@@ -2613,6 +2613,10 @@ + + fun = orgfun; + ++#ifdef LIBCALL_ENCODE_SECTION_INFO ++ LIBCALL_ENCODE_SECTION_INFO (fun); ++#endif ++ + /* Copy all the libcall-arguments out of the varargs data + and into a vector ARGVEC. + +@@ -3113,6 +3117,10 @@ + is_const = no_queue; + fun = orgfun; + ++#ifdef LIBCALL_ENCODE_SECTION_INFO ++ LIBCALL_ENCODE_SECTION_INFO (fun); ++#endif ++ + /* If this kind of value comes back in memory, + decide where in memory it should come back. */ + if (aggregate_value_p (type_for_mode (outmode, 0))) +diff -ruN --exclude=CVS gcc-2.95.3/gcc/cccp.c gcc/gcc/cccp.c +--- gcc-2.95.3/gcc/cccp.c Thu Jan 25 15:03:00 2001 ++++ gcc/gcc/cccp.c Thu Sep 27 19:35:54 2001 +@@ -85,7 +85,7 @@ + + /* Windows does not natively support inodes, and neither does MSDOS. */ + #if (defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN)) \ +- || defined (__MSDOS__) ++ || defined (__MSDOS__) || defined (__amigaos__) || defined (__morphos__) + #define INO_T_EQ(a, b) 0 + #endif + +@@ -103,6 +103,11 @@ + + /* External declarations. */ + ++#ifndef OPEN_CASE_SENSITIVE ++/* Default is standard open() */ ++#define OPEN_CASE_SENSITIVE open ++#endif ++ + extern char *version_string; + HOST_WIDEST_INT parse_escape PROTO((char **, HOST_WIDEST_INT)); + HOST_WIDEST_INT parse_c_expression PROTO((char *, int)); +@@ -403,6 +408,10 @@ + /* This is another place that the target system's headers might be. */ + { TOOL_INCLUDE_DIR, "BINUTILS", 0, 0, 0 }, + #endif ++ /* Some systems have an extra dir of include files. */ ++#ifdef SYSTEM_INCLUDE_DIR ++ { SYSTEM_INCLUDE_DIR, 0, 0, 0, 0 }, ++#endif + #else /* not CROSS_COMPILE */ + #ifdef LOCAL_INCLUDE_DIR + /* This should be /usr/local/include and should come before +@@ -1124,7 +1133,7 @@ + printf ("Usage: %s [switches] input output\n", progname); + printf ("Switches:\n"); + printf (" -include Include the contents of before other files\n"); +- printf (" -imacros Accept definition of marcos in \n"); ++ printf (" -imacros Accept definition of macros in \n"); + printf (" -iprefix Specify as a prefix for next two options\n"); + printf (" -iwithprefix Add to the end of the system include paths\n"); + printf (" -iwithprefixbefore Add to the end of the main include paths\n"); +@@ -1918,7 +1927,12 @@ + notice ("#include <...> search starts here:\n"); + if (!p->fname[0]) + fprintf (stderr, " .\n"); +- else if (!strcmp (p->fname, "/") || !strcmp (p->fname, "//")) ++ else if (!strcmp (p->fname, "/") || !strcmp (p->fname, "//") ++#ifdef VOL_SEPARATOR ++ /* Don't omit the last character if it's not a '/'. */ ++ || p->fname[strlen (p->fname) - 1] != '/' ++#endif ++ ) + fprintf (stderr, " %s\n", p->fname); + else + /* Omit trailing '/'. */ +@@ -4785,6 +4799,9 @@ + #ifdef DIR_SEPARATOR + if ((p = rindex (s, DIR_SEPARATOR))) s = p + 1; + #endif ++#ifdef VOL_SEPARATOR ++ if ((p = rindex (s, VOL_SEPARATOR))) s = p + 1; ++#endif + return s; + } + +@@ -4794,6 +4811,7 @@ + absolute_filename (filename) + char *filename; + { ++#ifndef FILE_NAME_ABSOLUTE_P + #if defined (__MSDOS__) \ + || (defined (_WIN32) && !defined (__CYGWIN__) && !defined (_UWIN)) + if (ISALPHA (filename[0]) && filename[1] == ':') filename += 2; +@@ -4810,6 +4828,9 @@ + if (filename[0] == DIR_SEPARATOR) return 1; + #endif + return 0; ++#else /* FILE_NAME_ABSOLUTE_P */ ++ return FILE_NAME_ABSOLUTE_P (filename); ++#endif /* FILE_NAME_ABSOLUTE_P */ + } + + /* Returns whether or not a given character is a directory separator. +@@ -4888,10 +4909,12 @@ + return to - filename; + } + } ++#if !defined (__amigaos__) && !defined (__morphos__) /* Don't convert ':' on Amiga! */ + #if defined(DIR_SEPARATOR_2) + /* Simplify to one directory separator. */ + to[-1] = DIR_SEPARATOR; + #endif ++#endif + } + + /* Skip /s after a /. */ +@@ -5072,7 +5095,7 @@ + || ! inc->control_macro + || (inc->control_macro[0] && ! lookup (inc->control_macro, -1, -1))) { + +- fd = open (fname, O_RDONLY, 0); ++ fd = OPEN_CASE_SENSITIVE (fname, O_RDONLY, 0); + + if (fd < 0) + { +@@ -10406,7 +10429,11 @@ + len = simplify_filename (dir->fname); + + /* Convert directory name to a prefix. */ +- if (len && dir->fname[len - 1] != DIR_SEPARATOR) { ++ if (len && dir->fname[len - 1] != DIR_SEPARATOR ++#ifdef VOL_SEPARATOR ++ && dir->fname[len - 1] != VOL_SEPARATOR ++#endif ++ ) { + if (len == 1 && dir->fname[len - 1] == '.') + len = 0; + else +diff -ruN --exclude=CVS gcc-2.95.3/gcc/collect2.c gcc/gcc/collect2.c +--- gcc-2.95.3/gcc/collect2.c Thu Jan 25 15:03:01 2001 ++++ gcc/gcc/collect2.c Thu Sep 27 19:35:54 2001 +@@ -157,6 +157,12 @@ + #else + int do_collecting = 0; + #endif ++ ++/* begin-GG-local: dynamic libraries */ ++#ifndef DO_COLLECTING ++#define DO_COLLECTING do_collecting ++#endif ++/* end-GG-local */ + + /* Linked lists of constructor and destructor names. */ + +@@ -278,8 +284,10 @@ + static void prefix_from_env PROTO((char *, struct path_prefix *)); + static void prefix_from_string PROTO((char *, struct path_prefix *)); + static void do_wait PROTO((char *)); +-static void fork_execute PROTO((char *, char **)); +-static void maybe_unlink PROTO((char *)); ++/* begin-GG-local: dynamic libraries */ ++void fork_execute PROTO((char *, char **)); ++void maybe_unlink PROTO((char *)); ++/* end-GG-local */ + static void add_to_list PROTO((struct head *, char *)); + static int extract_init_priority PROTO((char *)); + static void sort_ids PROTO((struct head *)); +@@ -399,6 +407,12 @@ + if (status != 0 && output_file != 0 && output_file[0]) + maybe_unlink (output_file); + ++/* begin-GG-local: dynamic libraries */ ++#ifdef COLLECT2_EXTRA_CLEANUP ++ COLLECT2_EXTRA_CLEANUP(); ++#endif ++/* end-GG-local */ ++ + exit (status); + } + +@@ -523,6 +537,12 @@ + maybe_unlink (import_file); + #endif + ++/* begin-GG-local: dynamic libraries */ ++#ifdef COLLECT2_EXTRA_CLEANUP ++ COLLECT2_EXTRA_CLEANUP(); ++#endif ++/* end-GG-local */ ++ + signal (signo, SIG_DFL); + kill (getpid (), signo); + } +@@ -823,11 +843,15 @@ + + /* Determine the filename to execute (special case for absolute paths). */ + ++#ifndef FILE_NAME_ABSOLUTE_P + if (*name == '/' + #ifdef HAVE_DOS_BASED_FILE_SYSTEM + || (*name && name[1] == ':') + #endif + ) ++#else ++ if (FILE_NAME_ABSOLUTE_P (name)) ++#endif + { + if (access (name, X_OK) == 0) + { +@@ -1063,6 +1087,11 @@ + char *q = extract_string (&p); + if (*q == '-' && (q[1] == 'm' || q[1] == 'f')) + num_c_args++; ++/* begin-GG-local: dynamic libraries */ ++#ifdef COLLECT2_GCC_OPTIONS_HOOK ++ COLLECT2_GCC_OPTIONS_HOOK(q); ++#endif ++/* end-GG-local */ + } + obstack_free (&temporary_obstack, temporary_firstobj); + ++num_c_args; +@@ -1340,6 +1369,11 @@ + add_to_list (&libs, s); + } + #endif ++/* begin-GG-local: dynamic libraries */ ++#ifdef COLLECT2_LIBNAME_HOOK ++ COLLECT2_LIBNAME_HOOK(arg); ++#endif ++/* end-GG-local */ + break; + + #ifdef COLLECT_EXPORT_LIST +@@ -1362,7 +1396,9 @@ + break; + + case 's': +- if (arg[2] == '\0' && do_collecting) ++/* begin-GG-local: dynamic libraries */ ++ if (arg[2] == '\0' && DO_COLLECTING) ++/* end-GG-local */ + { + /* We must strip after the nm run, otherwise C++ linking + will not work. Thus we strip in the second ld run, or +@@ -1413,6 +1449,11 @@ + add_to_list (&libs, arg); + } + #endif ++/* begin-GG-local: dynamic libraries */ ++#ifdef COLLECT2_LIBNAME_HOOK ++ COLLECT2_LIBNAME_HOOK(arg); ++#endif ++/* end-GG-local */ + } + } + +@@ -1511,6 +1552,12 @@ + fprintf (stderr, "\n"); + } + ++/* begin-GG-local: dynamic libraries */ ++#ifdef COLLECT2_PRELINK_HOOK ++ COLLECT2_PRELINK_HOOK(ld1_argv, &strip_flag); ++#endif ++/* end-GG-local */ ++ + /* Load the program, searching all libraries and attempting to provide + undefined symbols from repository information. */ + +@@ -1523,7 +1570,9 @@ + constructor or destructor list, just return now. */ + if (rflag + #ifndef COLLECT_EXPORT_LIST +- || ! do_collecting ++/* begin-GG-local: dynamic libraries */ ++ || ! DO_COLLECTING ++/* end-GG-local */ + #endif + ) + { +@@ -1542,6 +1591,8 @@ + return 0; + } + ++/* begin-GG-local: dynamic libraries */ ++#ifndef COLLECT2_POSTLINK_HOOK + /* Examine the namelist with nm and search it for static constructors + and destructors to call. + Write the constructor and destructor tables to a .s file and reload. */ +@@ -1561,6 +1612,10 @@ + notice ("%d destructor(s) found\n", destructors.number); + notice ("%d frame table(s) found\n", frame_tables.number); + } ++#else /* COLLECT2_POSTLINK_HOOK */ ++ COLLECT2_POSTLINK_HOOK(output_file); ++#endif ++/* end-GG-local */ + + if (constructors.number == 0 && destructors.number == 0 + && frame_tables.number == 0 +@@ -1592,6 +1647,11 @@ + #endif + maybe_unlink (c_file); + maybe_unlink (o_file); ++/* begin-GG-local: dynamic libraries */ ++#ifdef COLLECT2_EXTRA_CLEANUP ++ COLLECT2_EXTRA_CLEANUP(); ++#endif ++/* end-GG-local */ + return 0; + } + +@@ -1671,6 +1731,11 @@ + maybe_unlink (import_file); + #endif + ++/* begin-GG-local: dynamic libraries */ ++#ifdef COLLECT2_EXTRA_CLEANUP ++ COLLECT2_EXTRA_CLEANUP(); ++#endif ++/* end-GG-local */ + return 0; + } + +@@ -1793,7 +1858,9 @@ + fatal_perror (errmsg_fmt, errmsg_arg); + } + +-static void ++/* begin-GG-local: dynamic libraries */ ++void ++/* end-GG-local */ + fork_execute (prog, argv) + char *prog; + char **argv; +@@ -1804,7 +1871,9 @@ + + /* Unlink a file unless we are debugging. */ + +-static void ++/* begin-GG-local: dynamic libraries */ ++void ++/* end-GG-local */ + maybe_unlink (file) + char *file; + { +diff -ruN --exclude=CVS gcc-2.95.3/gcc/combine.c gcc/gcc/combine.c +--- gcc-2.95.3/gcc/combine.c Thu Jan 25 15:03:01 2001 ++++ gcc/gcc/combine.c Thu Sep 27 19:35:54 2001 +@@ -122,6 +122,11 @@ + #ifndef REVERSIBLE_CC_MODE + #define REVERSIBLE_CC_MODE(MODE) 0 + #endif ++ ++#ifndef GET_MIN_MODE_ALIGNMENT ++#define GET_MIN_MODE_ALIGNMENT(mode) 1 ++#endif ++ + + /* Vector mapping INSN_UIDs to cuids. + The cuids are like uids but increase monotonically always. +@@ -5626,7 +5631,7 @@ + || (GET_CODE (inner) == MEM && pos_rtx == 0 + && (pos + % (STRICT_ALIGNMENT ? GET_MODE_ALIGNMENT (tmode) +- : BITS_PER_UNIT)) == 0 ++ : GET_MIN_MODE_ALIGNMENT (tmode))) == 0 + /* We can't do this if we are widening INNER_MODE (it + may not be aligned, for one thing). */ + && GET_MODE_BITSIZE (inner_mode) >= GET_MODE_BITSIZE (tmode) +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/#linux.h# gcc/gcc/config/#linux.h# +--- gcc-2.95.3/gcc/config/#linux.h# Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/#linux.h# Tue Jun 4 19:45:11 2002 +@@ -0,0 +1,115 @@ ++/* Definitions for Linux-based GNU systems with ELF format ++ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. ++ Contributed by Eric Youngdale. ++ Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org). ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++/* Don't assume anything about the header files. */ ++#define NO_IMPLICIT_EXTERN_C ++ ++#undef HAVE_ATEXIT ++#define HAVE_ATEXIT ++ ++/* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is. ++ For now, we play safe. It may change later. */ ++ ++#if 0 ++#undef MULTIBYTE_CHARS ++#define MULTIBYTE_CHARS 1 ++#endif ++ ++#undef ASM_APP_ON ++#define ASM_APP_ON "#APP\n" ++ ++#undef ASM_APP_OFF ++#define ASM_APP_OFF "#NO_APP\n" ++ ++#define SET_ASM_OP ".set" ++ ++/* Use stabs instead of DWARF debug format. */ ++#undef PREFERRED_DEBUGGING_TYPE ++#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG ++#include "svr4.h" ++ ++#undef MD_EXEC_PREFIX ++#undef MD_STARTFILE_PREFIX ++ ++/* Output at beginning of assembler file. */ ++/* The .file command should always begin the output. */ ++#undef ASM_FILE_START ++#define ASM_FILE_START(FILE) \ ++ do { \ ++ output_file_directive (FILE, main_input_filename); \ ++ fprintf (FILE, "\t.version\t\"01.01\"\n"); \ ++ } while (0) ++ ++/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add ++ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which ++ provides part of the support for getting C++ file-scope static ++ object constructed before entering `main'. */ ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC \ ++ "%{!shared: \ ++ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ ++ %{!p:%{profile:gcrt1.o%s} \ ++ %{!profile:crt1.o%s}}}} \ ++ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" ++ ++/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on ++ the GNU/Linux magical crtend.o file (see crtstuff.c) which ++ provides part of the support for getting C++ file-scope static ++ object constructed before entering `main', followed by a normal ++ GNU/Linux "finalizer" file, `crtn.o'. */ ++ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC \ ++ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" ++ ++/* This is for -profile to use -lc_p instead of -lc. */ ++#ifndef CC1_SPEC ++#define CC1_SPEC "%{profile:-p}" ++#endif ++ ++#ifndef USE_GNULIBC_1 ++#undef DEFAULT_VTABLE_THUNKS ++#define DEFAULT_VTABLE_THUNKS 1 ++#endif ++ ++#undef LIB_SPEC ++/* We no longer link with libc_p.a or libg.a by default. If you ++ want to profile or debug the GNU/Linux C library, please add ++ -profile or -ggdb to LDFLAGS at the link time, respectively. */ ++#if 1 ++#ifdef USE_GNULIBC_1 ++#define LIB_SPEC \ ++ "%{!shared: %{p:-lgmon} %{pg:-lgmon} %{profile:-lgmon -lc_p} \ ++ %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}" ++#else ++#define LIB_SPEC \ ++ "%{shared: -lc} \ ++ %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ ++ %{profile:-lc_p} %{!profile: -lc}}" ++#endif ++#else ++#define LIB_SPEC \ ++ "%{!shared: \ ++ %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ ++ %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}" ++#endif +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/i386/amithlon.h gcc/gcc/config/i386/amithlon.h +--- gcc-2.95.3/gcc/config/i386/amithlon.h Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/i386/amithlon.h Tue Jun 4 19:39:04 2002 +@@ -0,0 +1,355 @@ ++/* Definitions for Intel 386 running Linux-based GNU systems with ELF format. ++ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. ++ Contributed by Eric Youngdale. ++ Modified for stabs-in-ELF by H.J. Lu. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++/* Amithlon is basically just a Linux process, so lets act as one... */ ++ ++#include ++ ++/* Now undo and redefine */ ++#undef LINUX_DEFAULT_ELF ++ ++#undef TARGET_VERSION ++#define TARGET_VERSION fprintf (stderr, " (i386be Amithlon/ELF)"); ++ ++/* Some predicates used in i386be.md */ ++#undef PREDICATE_CODES ++#define PREDICATE_CODES \ ++ {"cint_operand", {CONST_INT}}, \ ++ {"reg_or_cint_operand", {SUBREG, REG, CONST_INT}}, \ ++ ++/* Now the fun part: let's use big endian integers, but little endian ++ floats and instructions ... */ ++ ++/* Define this if most significant byte of a word is the lowest numbered. */ ++#undef BYTES_BIG_ENDIAN ++#define BYTES_BIG_ENDIAN 1 ++ ++/* Define this if most significant word of a multiword number is the lowest ++ numbered. */ ++#undef WORDS_BIG_ENDIAN ++#define WORDS_BIG_ENDIAN 1 ++ ++/* Define this if most significant word of doubles is the lowest numbered. */ ++#undef FLOAT_WORDS_BIG_ENDIAN ++#define FLOAT_WORDS_BIG_ENDIAN 0 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++#if 0 ++ ++/* Since GCC assumes the endian word order for registers is the same as for ++ memory, we have to swap eax and edx :( */ ++ ++This turned out to be WAY to difficult .... ++ ++ ++/* 1 for registers that have pervasive standard uses ++ and are not available for the register allocator. ++ On the 80386, the stack pointer is such, as is the arg pointer. */ ++ ++#undef FIXED_REGISTERS ++#define FIXED_REGISTERS \ ++/*dx,ax,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \ ++{ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 } ++ ++/* 1 for registers not available across function calls. ++ These must include the FIXED_REGISTERS and also any ++ registers that can be used without being saved. ++ The latter must include the registers where values are returned ++ and the register where structure-value addresses are passed. ++ Aside from that, you can include as many other registers as you like. */ ++ ++#undef CALL_USED_REGISTERS ++#define CALL_USED_REGISTERS \ ++/*dx,ax,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \ ++{ 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ++ ++/* Order in which to allocate registers. Each register must be ++ listed once, even those in FIXED_REGISTERS. List frame pointer ++ late and fixed registers last. Note that, in general, we prefer ++ registers listed in CALL_USED_REGISTERS, keeping the others ++ available for storage of persistent values. ++ ++ Three different versions of REG_ALLOC_ORDER have been tried: ++ ++ If the order is edx, ecx, eax, ... it produces a slightly faster compiler, ++ but slower code on simple functions returning values in eax. ++ ++ If the order is eax, ecx, edx, ... it causes reload to abort when compiling ++ perl 4.036 due to not being able to create a DImode register (to hold a 2 ++ word union). ++ ++ If the order is eax, edx, ecx, ... it produces better code for simple ++ functions, and a slightly slower compiler. Users complained about the code ++ generated by allocating edx first, so restore the 'natural' order of things. */ ++ ++#undef REG_ALLOC_ORDER ++#define REG_ALLOC_ORDER \ ++/*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \ ++{ 1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 } ++ ++/* How to refer to registers in assembler output. ++ This sequence is indexed by compiler's hard-register-number (see above). */ ++ ++/* In order to refer to the first 8 regs as 32 bit regs prefix an "e" ++ For non floating point regs, the following are the HImode names. ++ ++ For float regs, the stack top is sometimes referred to as "%st(0)" ++ instead of just "%st". PRINT_REG handles this with the "y" code. */ ++ ++#undef HI_REGISTER_NAMES ++#define HI_REGISTER_NAMES \ ++{"dx","ax","cx","bx","si","di","bp","sp", \ ++ "st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)","" } ++ ++#define REGISTER_NAMES HI_REGISTER_NAMES ++ ++/* Table of additional register names to use in user input. */ ++ ++#undef ADDITIONAL_REGISTER_NAMES ++#define ADDITIONAL_REGISTER_NAMES \ ++{ { "edx", 0 }, { "eax", 1 }, { "ecx", 2 }, { "ebx", 3 }, \ ++ { "esi", 4 }, { "edi", 5 }, { "ebp", 6 }, { "esp", 7 }, \ ++ { "al", 0 }, { "dl", 1 }, { "cl", 2 }, { "bl", 3 }, \ ++ { "ah", 0 }, { "dh", 1 }, { "ch", 2 }, { "bh", 3 } } ++ ++/* Note we are omitting these since currently I don't know how ++to get gcc to use these, since they want the same but different ++number as al, and ax. ++*/ ++ ++/* note the last four are not really qi_registers, but ++ the md will have to never output movb into one of them ++ only a movw . There is no movb into the last four regs */ ++ ++#undef QI_REGISTER_NAMES ++#define QI_REGISTER_NAMES \ ++{"dl", "al", "cl", "bl", "si", "di", "bp", "sp",} ++ ++/* These parallel the array above, and can be used to access bits 8:15 ++ of regs 0 through 3. */ ++ ++#undef QI_HIGH_REGISTER_NAMES ++#define QI_HIGH_REGISTER_NAMES \ ++{"dh", "ah", "ch", "bh", } ++ ++/* How to renumber registers for dbx and gdb. */ ++ ++/* {1,2,0,3,6,7,4,5,12,13,14,15,16,17} */ ++#undef DBX_REGISTER_NUMBER ++#define DBX_REGISTER_NUMBER(n) \ ++((n) == 0 ? 1 : \ ++ (n) == 1 ? 2 : \ ++ (n) == 2 ? 0 : \ ++ (n) == 3 ? 3 : \ ++ (n) == 4 ? 6 : \ ++ (n) == 5 ? 7 : \ ++ (n) == 6 ? 4 : \ ++ (n) == 7 ? 5 : \ ++ (n) + 4) ++ ++#endif // 0 ++ ++ ++ ++ ++ ++ ++ ++/* The assembler will use big endian for data section, but we must ++ * swap the words in 64 bit integers ourself. We also have to "undo" ++ * the byteswap in the individual words for floats ++ */ ++ ++/* This is how to output an assembler line defining an `long long' ++ constant. */ ++ ++#undef ASM_OUTPUT_DOUBLE_INT ++#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE) \ ++do { \ ++ assemble_integer (operand_subword ((VALUE), 0, 0, DImode), \ ++ UNITS_PER_WORD, 1); \ ++ assemble_integer (operand_subword ((VALUE), 1, 0, DImode), \ ++ UNITS_PER_WORD, 1); \ ++} while (0) ++ ++ ++/* This is how to output an assembler line defining a `double' constant. */ ++ ++#undef ASM_OUTPUT_DOUBLE ++#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ++do { long l[2]; \ ++ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ ++ fprintf (FILE, "%s 0x%lx,0x%lx\n", ASM_LONG, bswap_32(l[0]), bswap_32(l[1])); \ ++ } while (0) ++ ++/* This is how to output a `long double' extended real constant. */ ++ ++#undef ASM_OUTPUT_LONG_DOUBLE ++#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ ++do { long l[3]; \ ++ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ ++ fprintf (FILE, "%s 0x%lx,0x%lx,0x%lx\n", ASM_LONG, bswap_32(l[0]), bswap_32(l[1]), bswap_32(l[2])); \ ++ } while (0) ++ ++/* This is how to output an assembler line defining a `float' constant. */ ++ ++#undef ASM_OUTPUT_FLOAT ++#define ASM_OUTPUT_FLOAT(FILE,VALUE) \ ++do { long l; \ ++ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ ++ fprintf ((FILE), "%s 0x%lx\n", ASM_LONG, bswap_32(l)); \ ++ } while (0) ++ ++ ++#undef CPP_SPEC ++#define CPP_SPEC \ ++ "%(cpp_cpu) " \ ++ "-D__BIG_ENDIAN__ -Amachine(bigendian) " \ ++ "%{!ansi: " \ ++ "%{!noixemul:-Dixemul} " \ ++ "%{noixemul:-Dlibnix}} " \ ++ "%{!noixemul:-D__ixemul__ -D__ixemul} " \ ++ "%{noixemul:-D__libnix__ -D__libnix} " \ ++ "%{msoft-float: -D_SOFT_FLOAT}" ++ ++ ++/* amiga/amigaos are the new "standard" defines for the Amiga. ++ * MCH_AMIGA, AMIGA, __chip etc. are used in other compilers and are ++ * provided for compatibility reasons. ++ * We define both AmigaOS and Amithlon systems. */ ++ ++#undef CPP_PREDEFINES ++#define CPP_PREDEFINES \ ++ "-D__ELF__ " \ ++ "-Damiga -Damigaos -DMCH_AMIGA -DAMIGA " \ ++ "-Damithlon " \ ++ "-Asystem(amigaos) -Asystem(amithlon) " ++ ++#undef CC1_SPEC ++#define CC1_SPEC "%(cc1_cpu)" ++ ++/* Choose the right startup file, depending on whether we use base relative ++ code, base relative code with automatic relocation (-resident), or plain ++ crt0.o. ++ ++ Profiling is currently only available for plain startup. ++ mcrt0.o does not exist, but at least we get an error message when using ++ the -p flag */ ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC \ ++ "%{!noixemul: " \ ++ "%{pg:gcrt0.o%s} " \ ++ "%{!pg: %{p:mcrt0.o%s} " \ ++ "%{!p:crt0.o%s}}} " \ ++ "%{noixemul:" \ ++ "%{resident:libnix/nrcrt0.o%s} " \ ++ "%{!resident:%{fbaserel:libnix/nbcrt0.o%s}%{!fbaserel:libnix/ncrt0.o%s}} " \ ++ "libnix/crti.o%s} " \ ++ "%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" ++ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC "%{noixemul:-lstubs} " \ ++ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} " \ ++ "%{noixemul:libnix/crtn.o%s}" ++ ++/* Automatically search libamiga.a for AmigaOS specific functions. Note ++ that we first search the standard C library to resolve as much as ++ possible from there, since it has names that are duplicated in libamiga.a ++ which we *don't* want from there. Then search libamiga.a for any calls ++ that were not generated inline, and finally search the standard C library ++ again to resolve any references that libamiga.a might have generated. ++ This may only be a temporary solution since it might be better to simply ++ remove the things from libamiga.a that should be pulled in from libc.a ++ instead, which would eliminate the first reference to libc.a. Note that ++ if we don't search it automatically, it is very easy for the user to try ++ to put in a -lamiga himself and get it in the wrong place, so that (for ++ example) calls like sprintf come from -lamiga rather than -lc. */ ++ ++#undef LIB_SPEC ++#define LIB_SPEC \ ++ "%{!noixemul: " \ ++ "%{!p:%{!pg:-lc -lamiga -lc}} " \ ++ "%{p:-lc_p}%{pg:-lc_p}} " \ ++ "%{noixemul:-lnixmain -lnix -lamiga " \ ++ "%{mstackcheck:-lstack} " \ ++ "%{mstackextend:-lstack}} -lamigastubs" ++ ++/* Pass appropriate linker flavours depending on user-supplied ++ commandline options. */ ++ ++#undef LINK_SPEC ++#define LINK_SPEC \ ++ "%{noixemul:-fl libnix} " \ ++ "%{shared:-shared} " \ ++ "%{!shared: " \ ++ "%{!static: " \ ++ "%{rdynamic:-export-dynamic} " \ ++ "%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} " \ ++ "%{static:-static}} " ++ ++/* Get perform_* macros to build libgcc.a. */ ++/* Do I have to? #include "i386/perform.h" */ ++ ++ ++/* begin-GG-local: dynamic libraries */ ++ ++/* This macro is used to check if all collect2 facilities should be used. ++ We need a few special ones, like stripping after linking. */ ++ ++#define DO_COLLECTING (do_collecting || amigaos_do_collecting()) ++ ++/* This macro is called in collect2 for every GCC argument name. ++ ARG is a part of commandline (without '\0' at the end). */ ++ ++#define COLLECT2_GCC_OPTIONS_HOOK(ARG) amigaos_gccopts_hook(ARG) ++ ++/* This macro is called in collect2 for every ld's "-l" or "*.o" or "*.a" ++ argument. ARG is a complete argument, with '\0' at the end. */ ++ ++#define COLLECT2_LIBNAME_HOOK(ARG) amigaos_libname_hook(ARG) ++ ++/* This macro is called at collect2 exit, to clean everything up. */ ++ ++#define COLLECT2_EXTRA_CLEANUP amigaos_collect2_cleanup ++ ++/* This macro is called just before the first linker invocation. ++ LD1_ARGV is "char** argv", which will be passed to "ld". STRIP is an ++ *address* of "strip_flag" variable. */ ++ ++#define COLLECT2_PRELINK_HOOK(LD1_ARGV, STRIP) \ ++amigaos_prelink_hook((LD1_ARGV), (STRIP)) ++ ++/* This macro is called just after the first linker invocation, in place of ++ "nm" and "ldd". OUTPUT_FILE is the executable's filename. */ ++ ++#define COLLECT2_POSTLINK_HOOK(OUTPUT_FILE) amigaos_postlink_hook(OUTPUT_FILE) ++/* end-GG-local */ ++ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/i386/amithlon.h-new gcc/gcc/config/i386/amithlon.h-new +--- gcc-2.95.3/gcc/config/i386/amithlon.h-new Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/i386/amithlon.h-new Tue Jun 4 19:44:45 2002 +@@ -0,0 +1,356 @@ ++/* Definitions for Intel 386 running Linux-based GNU systems with ELF format. ++ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. ++ Contributed by Eric Youngdale. ++ Modified for stabs-in-ELF by H.J. Lu. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++/* Amithlon is basically just a Linux process, so lets act as one... */ ++ ++#include ++ ++/* Now undo and redefine */ ++#undef LINUX_DEFAULT_ELF ++ ++#undef TARGET_VERSION ++#define TARGET_VERSION fprintf (stderr, " (i386be Amithlon/ELF)"); ++ ++/* Some predicates used in i386be.md */ ++#undef PREDICATE_CODES ++#define PREDICATE_CODES \ ++ {"cint_operand", {CONST_INT}}, \ ++ {"reg_or_cint_operand", {SUBREG, REG, CONST_INT}}, \ ++ ++/* Now the fun part: let's use big endian integers, but little endian ++ floats and instructions ... */ ++ ++/* Define this if most significant byte of a word is the lowest numbered. */ ++#undef BYTES_BIG_ENDIAN ++#define BYTES_BIG_ENDIAN 1 ++ ++/* Define this if most significant word of a multiword number is the lowest ++ numbered. */ ++#undef WORDS_BIG_ENDIAN ++#define WORDS_BIG_ENDIAN 1 ++ ++/* Define this if most significant word of doubles is the lowest numbered. */ ++#undef FLOAT_WORDS_BIG_ENDIAN ++#define FLOAT_WORDS_BIG_ENDIAN 0 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++#if 0 ++ ++/* Since GCC assumes the endian word order for registers is the same as for ++ memory, we have to swap eax and edx :( */ ++ ++This turned out to be WAY to difficult .... ++ ++ ++/* 1 for registers that have pervasive standard uses ++ and are not available for the register allocator. ++ On the 80386, the stack pointer is such, as is the arg pointer. */ ++ ++#undef FIXED_REGISTERS ++#define FIXED_REGISTERS \ ++/*dx,ax,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \ ++{ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 } ++ ++/* 1 for registers not available across function calls. ++ These must include the FIXED_REGISTERS and also any ++ registers that can be used without being saved. ++ The latter must include the registers where values are returned ++ and the register where structure-value addresses are passed. ++ Aside from that, you can include as many other registers as you like. */ ++ ++#undef CALL_USED_REGISTERS ++#define CALL_USED_REGISTERS \ ++/*dx,ax,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \ ++{ 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ++ ++/* Order in which to allocate registers. Each register must be ++ listed once, even those in FIXED_REGISTERS. List frame pointer ++ late and fixed registers last. Note that, in general, we prefer ++ registers listed in CALL_USED_REGISTERS, keeping the others ++ available for storage of persistent values. ++ ++ Three different versions of REG_ALLOC_ORDER have been tried: ++ ++ If the order is edx, ecx, eax, ... it produces a slightly faster compiler, ++ but slower code on simple functions returning values in eax. ++ ++ If the order is eax, ecx, edx, ... it causes reload to abort when compiling ++ perl 4.036 due to not being able to create a DImode register (to hold a 2 ++ word union). ++ ++ If the order is eax, edx, ecx, ... it produces better code for simple ++ functions, and a slightly slower compiler. Users complained about the code ++ generated by allocating edx first, so restore the 'natural' order of things. */ ++ ++#undef REG_ALLOC_ORDER ++#define REG_ALLOC_ORDER \ ++/*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \ ++{ 1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 } ++ ++/* How to refer to registers in assembler output. ++ This sequence is indexed by compiler's hard-register-number (see above). */ ++ ++/* In order to refer to the first 8 regs as 32 bit regs prefix an "e" ++ For non floating point regs, the following are the HImode names. ++ ++ For float regs, the stack top is sometimes referred to as "%st(0)" ++ instead of just "%st". PRINT_REG handles this with the "y" code. */ ++ ++#undef HI_REGISTER_NAMES ++#define HI_REGISTER_NAMES \ ++{"dx","ax","cx","bx","si","di","bp","sp", \ ++ "st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)","" } ++ ++#define REGISTER_NAMES HI_REGISTER_NAMES ++ ++/* Table of additional register names to use in user input. */ ++ ++#undef ADDITIONAL_REGISTER_NAMES ++#define ADDITIONAL_REGISTER_NAMES \ ++{ { "edx", 0 }, { "eax", 1 }, { "ecx", 2 }, { "ebx", 3 }, \ ++ { "esi", 4 }, { "edi", 5 }, { "ebp", 6 }, { "esp", 7 }, \ ++ { "al", 0 }, { "dl", 1 }, { "cl", 2 }, { "bl", 3 }, \ ++ { "ah", 0 }, { "dh", 1 }, { "ch", 2 }, { "bh", 3 } } ++ ++/* Note we are omitting these since currently I don't know how ++to get gcc to use these, since they want the same but different ++number as al, and ax. ++*/ ++ ++/* note the last four are not really qi_registers, but ++ the md will have to never output movb into one of them ++ only a movw . There is no movb into the last four regs */ ++ ++#undef QI_REGISTER_NAMES ++#define QI_REGISTER_NAMES \ ++{"dl", "al", "cl", "bl", "si", "di", "bp", "sp",} ++ ++/* These parallel the array above, and can be used to access bits 8:15 ++ of regs 0 through 3. */ ++ ++#undef QI_HIGH_REGISTER_NAMES ++#define QI_HIGH_REGISTER_NAMES \ ++{"dh", "ah", "ch", "bh", } ++ ++/* How to renumber registers for dbx and gdb. */ ++ ++/* {1,2,0,3,6,7,4,5,12,13,14,15,16,17} */ ++#undef DBX_REGISTER_NUMBER ++#define DBX_REGISTER_NUMBER(n) \ ++((n) == 0 ? 1 : \ ++ (n) == 1 ? 2 : \ ++ (n) == 2 ? 0 : \ ++ (n) == 3 ? 3 : \ ++ (n) == 4 ? 6 : \ ++ (n) == 5 ? 7 : \ ++ (n) == 6 ? 4 : \ ++ (n) == 7 ? 5 : \ ++ (n) + 4) ++ ++#endif // 0 ++ ++ ++ ++ ++ ++ ++ ++/* The assembler will use big endian for data section, but we must ++ * swap the words in 64 bit integers ourself. We also have to "undo" ++ * the byteswap in the individual words for floats ++ */ ++ ++/* This is how to output an assembler line defining an `long long' ++ constant. */ ++ ++#undef ASM_OUTPUT_DOUBLE_INT ++#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE) \ ++do { \ ++ assemble_integer (operand_subword ((VALUE), 0, 0, DImode), \ ++ UNITS_PER_WORD, 1); \ ++ assemble_integer (operand_subword ((VALUE), 1, 0, DImode), \ ++ UNITS_PER_WORD, 1); \ ++} while (0) ++ ++ ++/* This is how to output an assembler line defining a `double' constant. */ ++ ++#undef ASM_OUTPUT_DOUBLE ++#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ++do { long l[2]; \ ++ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ ++ fprintf (FILE, "%s 0x%lx,0x%lx\n", ASM_LONG, bswap_32(l[0]), bswap_32(l[1])); \ ++ } while (0) ++ ++/* This is how to output a `long double' extended real constant. */ ++ ++#undef ASM_OUTPUT_LONG_DOUBLE ++#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ ++do { long l[3]; \ ++ REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ ++ fprintf (FILE, "%s 0x%lx,0x%lx,0x%lx\n", ASM_LONG, bswap_32(l[0]), bswap_32(l[1]), bswap_32(l[2])); \ ++ } while (0) ++ ++/* This is how to output an assembler line defining a `float' constant. */ ++ ++#undef ASM_OUTPUT_FLOAT ++#define ASM_OUTPUT_FLOAT(FILE,VALUE) \ ++do { long l; \ ++ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ ++ fprintf ((FILE), "%s 0x%lx\n", ASM_LONG, bswap_32(l)); \ ++ } while (0) ++ ++ ++#undef CPP_SPEC ++#define CPP_SPEC \ ++ "%(cpp_cpu) " \ ++ "-D__BIG_ENDIAN__ -Amachine(bigendian) " \ ++ "%{!ansi: " \ ++ "%{!noixemul:-Dixemul} " \ ++ "%{noixemul:-Dlibnix}} " \ ++ "%{!noixemul:-D__ixemul__ -D__ixemul} " \ ++ "%{noixemul:-D__libnix__ -D__libnix} " \ ++ "%{msoft-float: -D_SOFT_FLOAT}" ++ ++ ++/* amiga/amigaos are the new "standard" defines for the Amiga. ++ * MCH_AMIGA, AMIGA, __chip etc. are used in other compilers and are ++ * provided for compatibility reasons. ++ * We define both AmigaOS and Amithlon systems. */ ++ ++#undef CPP_PREDEFINES ++#define CPP_PREDEFINES \ ++ "-D__ELF__ " \ ++ "-Damiga -Damigaos -DMCH_AMIGA -DAMIGA " \ ++ "-Damithlon " \ ++ "-Asystem(amigaos) -Asystem(amithlon) " ++ ++#undef CC1_SPEC ++#define CC1_SPEC "%(cc1_cpu)" ++ ++/* Choose the right startup file, depending on whether we use base relative ++ code, base relative code with automatic relocation (-resident), or plain ++ crt0.o. ++ ++ Profiling is currently only available for plain startup. ++ mcrt0.o does not exist, but at least we get an error message when using ++ the -p flag */ ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC \ ++ "%{!shared: " \ ++ "%{!noixemul: " \ ++ "%{pg:gcrt0.o%s} " \ ++ "%{!pg: %{p:mcrt0.o%s} " \ ++ "%{!p:crt0.o%s}}} " \ ++ "%{noixemul:" \ ++ "%{resident:libnix/nrcrt0.o%s} " \ ++ "%{!resident:%{fbaserel:libnix/nbcrt0.o%s}%{!fbaserel:libnix/ncrt0.o%s}} " \ ++ "libnix/crti.o%s}} " \ ++ "%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" ++ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC "%{noixemul:-lstubs} " \ ++ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} " \ ++ "%{noixemul:libnix/crtn.o%s}" ++ ++/* Automatically search libamiga.a for AmigaOS specific functions. Note ++ that we first search the standard C library to resolve as much as ++ possible from there, since it has names that are duplicated in libamiga.a ++ which we *don't* want from there. Then search libamiga.a for any calls ++ that were not generated inline, and finally search the standard C library ++ again to resolve any references that libamiga.a might have generated. ++ This may only be a temporary solution since it might be better to simply ++ remove the things from libamiga.a that should be pulled in from libc.a ++ instead, which would eliminate the first reference to libc.a. Note that ++ if we don't search it automatically, it is very easy for the user to try ++ to put in a -lamiga himself and get it in the wrong place, so that (for ++ example) calls like sprintf come from -lamiga rather than -lc. */ ++ ++#undef LIB_SPEC ++#define LIB_SPEC \ ++ "%{!noixemul: " \ ++ "%{!p:%{!pg:-lc -lamiga -lc}} " \ ++ "%{p:-lc_p}%{pg:-lc_p}} " \ ++ "%{noixemul:-lnixmain -lnix -lamiga " \ ++ "%{mstackcheck:-lstack} " \ ++ "%{mstackextend:-lstack}} -lamigastubs" ++ ++/* Pass appropriate linker flavours depending on user-supplied ++ commandline options. */ ++ ++#undef LINK_SPEC ++#define LINK_SPEC \ ++ "%{noixemul:-fl libnix} " \ ++ "%{shared:-shared} " \ ++ "%{!shared: " \ ++ "%{!static: " \ ++ "%{rdynamic:-export-dynamic} " \ ++ "%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} " \ ++ "%{static:-static}} " ++ ++/* Get perform_* macros to build libgcc.a. */ ++/* Do I have to? #include "i386/perform.h" */ ++ ++ ++/* begin-GG-local: dynamic libraries */ ++ ++/* This macro is used to check if all collect2 facilities should be used. ++ We need a few special ones, like stripping after linking. */ ++ ++#define DO_COLLECTING (do_collecting || amigaos_do_collecting()) ++ ++/* This macro is called in collect2 for every GCC argument name. ++ ARG is a part of commandline (without '\0' at the end). */ ++ ++#define COLLECT2_GCC_OPTIONS_HOOK(ARG) amigaos_gccopts_hook(ARG) ++ ++/* This macro is called in collect2 for every ld's "-l" or "*.o" or "*.a" ++ argument. ARG is a complete argument, with '\0' at the end. */ ++ ++#define COLLECT2_LIBNAME_HOOK(ARG) amigaos_libname_hook(ARG) ++ ++/* This macro is called at collect2 exit, to clean everything up. */ ++ ++#define COLLECT2_EXTRA_CLEANUP amigaos_collect2_cleanup ++ ++/* This macro is called just before the first linker invocation. ++ LD1_ARGV is "char** argv", which will be passed to "ld". STRIP is an ++ *address* of "strip_flag" variable. */ ++ ++#define COLLECT2_PRELINK_HOOK(LD1_ARGV, STRIP) \ ++amigaos_prelink_hook((LD1_ARGV), (STRIP)) ++ ++/* This macro is called just after the first linker invocation, in place of ++ "nm" and "ldd". OUTPUT_FILE is the executable's filename. */ ++ ++#define COLLECT2_POSTLINK_HOOK(OUTPUT_FILE) amigaos_postlink_hook(OUTPUT_FILE) ++/* end-GG-local */ ++ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/i386/i386.c gcc/gcc/config/i386/i386.c +--- gcc-2.95.3/gcc/config/i386/i386.c Tue Sep 7 09:38:56 1999 ++++ gcc/gcc/config/i386/i386.c Fri Apr 12 18:07:31 2002 +@@ -876,21 +876,84 @@ + rtx *operands; + { + rtx x; ++ + if (GET_CODE (operands[0]) == MEM + && GET_CODE (x = XEXP (operands[0], 0)) == PRE_DEC) + { + if (XEXP (x, 0) != stack_pointer_rtx) + abort (); +- return "push%L1 %1"; ++ ++ if (BYTES_BIG_ENDIAN) ++ { ++ if (REG_P (operands[1])) ++ { ++ // lcs: AFAIK, we never push a half-word with this function ++ output_asm_insn (AS1 (bswap,%1), operands); ++ output_asm_insn (AS1 (push%L1,%1), operands); ++ output_asm_insn (AS1 (bswap,%1), operands); ++ RET; ++ } ++ else if (GET_CODE (operands[1]) == CONST_INT ) ++ { ++ operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]))); ++ return "push%L1 %1"; ++ } ++ else ++ { ++ abort (); ++ } ++ } ++ else ++ return "push%L1 %1"; + } + else if (GET_CODE (operands[1]) == CONST_DOUBLE) ++ { + return output_move_const_single (operands); ++ } + else if (GET_CODE (operands[0]) == REG || GET_CODE (operands[1]) == REG) +- return AS2 (mov%L0,%1,%0); ++ { ++ if (!BYTES_BIG_ENDIAN || ++ (GET_CODE (operands[0]) == REG && GET_CODE (operands[1]) == REG)) ++ return AS2 (mov%L0,%1,%0); ++ else ++ { ++ if (GET_CODE (operands[0]) == REG) ++ { ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ ++ if (GET_CODE (operands[1]) == MEM) ++ { ++ output_asm_insn (AS1 (bswap,%0), operands); ++ } ++ RET; ++ } ++ else ++ { ++ output_asm_insn (AS1 (bswap,%1), operands); ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ output_asm_insn (AS1 (bswap,%1), operands); ++ RET; ++ } ++ } ++ } ++ else if (BYTES_BIG_ENDIAN && GET_CODE (operands[1]) == CONST_INT) ++ { ++ operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) ); ++ return AS2 (mov%L0,%1,%0); ++ } + else if (CONSTANT_P (operands[1])) +- return AS2 (mov%L0,%1,%0); ++ { ++ // lcs: What is this? a label/symbol move to memory? Symbols ++ // should be fine, I suppose, but labels will be little endian? ++ if (BYTES_BIG_ENDIAN && GET_CODE (operands[0]) != GET_CODE (operands[1])) ++ abort(); ++ ++ return AS2 (mov%L0,%1,%0); ++ RET; ++ } + else + { ++ // lcs: WTF is this? Memory to memory move? Floating point move? + output_asm_insn ("push%L1 %1", operands); + return "pop%L0 %0"; + } +@@ -1056,9 +1119,21 @@ + + REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); + REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l); +- operands[1] = GEN_INT (l[0]); +- middlehalf[1] = GEN_INT (l[1]); +- latehalf[1] = GEN_INT (l[2]); ++ ++ if (BYTES_BIG_ENDIAN) ++ { ++ // lcs: We have changed the data type from double to interger: ++ // we have to compensate for the different byte order ++ operands[1] = GEN_INT (bswap_32 (l[0])); ++ middlehalf[1] = GEN_INT (bswap_32 (l[1])); ++ latehalf[1] = GEN_INT (bswap_32 (l[2])); ++ } ++ else ++ { ++ operands[1] = GEN_INT (l[0]); ++ middlehalf[1] = GEN_INT (l[1]); ++ latehalf[1] = GEN_INT (l[2]); ++ } + } + else if (CONSTANT_P (operands[1])) + /* No non-CONST_DOUBLE constant should ever appear here. */ +@@ -1076,18 +1151,81 @@ + /* Size is not 12. */ + + if (optype0 == REGOP) +- latehalf[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); ++ { ++// printf( "move double src: reg %d\n", REGNO (operands[0])); ++ if (0 && WORDS_BIG_ENDIAN) ++ { ++ latehalf[0] = operands[0]; ++ operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); ++ } ++ else ++ { ++ latehalf[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); ++ } ++ } + else if (optype0 == OFFSOP) +- latehalf[0] = adj_offsettable_operand (operands[0], 4); ++ { ++// printf( "move double src: mem\n"); ++ if (0 && WORDS_BIG_ENDIAN) ++ { ++ latehalf[0] = operands[0]; ++ operands[0] = adj_offsettable_operand (operands[0], 4); ++ } ++ else ++ { ++ latehalf[0] = adj_offsettable_operand (operands[0], 4); ++ } ++ } + else + latehalf[0] = operands[0]; + + if (optype1 == REGOP) +- latehalf[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); ++ { ++// printf( "move double dst: reg %d\n", REGNO (operands[0])); ++ if (0 && WORDS_BIG_ENDIAN) ++ { ++ latehalf[1] = operands[1]; ++ operands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); ++ } ++ else ++ { ++ latehalf[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1); ++ } ++ } + else if (optype1 == OFFSOP) +- latehalf[1] = adj_offsettable_operand (operands[1], 4); ++ { ++// printf( "move double dst: mem\n"); ++ if (0 && WORDS_BIG_ENDIAN) ++ { ++ latehalf[1] = operands[1]; ++ operands[1] = adj_offsettable_operand (operands[1], 4); ++ } ++ else ++ { ++ latehalf[1] = adj_offsettable_operand (operands[1], 4); ++ } ++ } + else if (optype1 == CNSTOP) +- split_double (operands[1], &operands[1], &latehalf[1]); ++ { ++ if (BYTES_BIG_ENDIAN && GET_CODE (operands[1]) == CONST_DOUBLE) ++ { ++ split_double (operands[1], &operands[1], &latehalf[1]); ++ ++ // lcs: We have changed the data type from double to interger: ++ // we have to compensate for the different byte order ++ operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) ); ++ latehalf[1] = GEN_INT ( bswap_32 (INTVAL (latehalf[1]) ) ); ++ } ++ else ++ if (0 && WORDS_BIG_ENDIAN) ++ { ++ split_double (operands[1], &latehalf[1], &operands[1]); ++ } ++ else ++ { ++ split_double (operands[1], &operands[1], &latehalf[1]); ++ } ++ } + else + latehalf[1] = operands[1]; + } +@@ -1126,6 +1264,9 @@ + } + else + { ++ if (0 && WORDS_BIG_ENDIAN) ++ abort (); // lcs: I have no idea what to do here, so I abort! ++ + operands[1] = gen_rtx_MEM (DImode, latehalf[0]); + latehalf[1] = adj_offsettable_operand (operands[1], size-4); + } +@@ -1335,8 +1476,14 @@ + + REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); + REAL_VALUE_TO_TARGET_SINGLE (r, l); +- operands[1] = GEN_INT (l); ++ ++ if (BYTES_BIG_ENDIAN) // Compensate for bswap in singlemove_string(); ++ operands[1] = GEN_INT (bswap_32(l)); ++ else ++ operands[1] = GEN_INT (l); + } ++ else if (BYTES_BIG_ENDIAN) ++ abort (); + + return singlemove_string (operands); + } +@@ -3793,24 +3940,52 @@ + while (num--) + { + rtx op = operands[num]; ++ + if (! reload_completed) +- { ++ { + lo_half[num] = gen_lowpart (SImode, op); + hi_half[num] = gen_highpart (SImode, op); + } + else if (GET_CODE (op) == REG) + { +- lo_half[num] = gen_rtx_REG (SImode, REGNO (op)); +- hi_half[num] = gen_rtx_REG (SImode, REGNO (op) + 1); ++ if (WORDS_BIG_ENDIAN) ++ { ++ lo_half[num] = gen_rtx_REG (SImode, REGNO (op) + 1); ++ hi_half[num] = gen_rtx_REG (SImode, REGNO (op)); ++ } ++ else ++ { ++ lo_half[num] = gen_rtx_REG (SImode, REGNO (op)); ++ hi_half[num] = gen_rtx_REG (SImode, REGNO (op) + 1); ++ } + } + else if (CONSTANT_P (op)) +- split_double (op, &lo_half[num], &hi_half[num]); ++ { ++ if (WORDS_BIG_ENDIAN) ++ { ++ split_double (op, &hi_half[num], &lo_half[num]); ++ } ++ else ++ { ++ split_double (op, &lo_half[num], &hi_half[num]); ++ } ++ } + else if (offsettable_memref_p (op)) + { +- rtx lo_addr = XEXP (op, 0); +- rtx hi_addr = XEXP (adj_offsettable_operand (op, 4), 0); +- lo_half[num] = change_address (op, SImode, lo_addr); +- hi_half[num] = change_address (op, SImode, hi_addr); ++ if (WORDS_BIG_ENDIAN) ++ { ++ rtx lo_addr = XEXP (adj_offsettable_operand (op, 4), 0); ++ rtx hi_addr = XEXP (op, 0); ++ lo_half[num] = change_address (op, SImode, lo_addr); ++ hi_half[num] = change_address (op, SImode, hi_addr); ++ } ++ else ++ { ++ rtx lo_addr = XEXP (op, 0); ++ rtx hi_addr = XEXP (adj_offsettable_operand (op, 4), 0); ++ lo_half[num] = change_address (op, SImode, lo_addr); ++ hi_half[num] = change_address (op, SImode, hi_addr); ++ } + } + else + abort(); +@@ -4033,11 +4208,43 @@ + output_asm_insn (AS2 (mov%L0,%4,%0), operands); + else + { +- xops[0] = operands[0]; +- xops[1] = operands[4]; +- output_asm_insn (output_move_double (xops), xops); ++ if( WORDS_BIG_ENDIAN ) ++ { ++ if( REG_P ((operands[0]))) ++ { ++ // Move LITTLE ENDIAN double word ++ ++ xops[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1); ++ xops[1] = operands[4]; ++ output_asm_insn (AS2 (mov%L0,%1,%0), xops); ++ ++ xops[0] = operands[0]; ++ xops[1] = adj_offsettable_operand (operands[4], 4); ++ output_asm_insn (AS2 (mov%L0,%1,%0), xops); ++ } ++ else ++ { ++ // Should not happen? ++ abort(); ++ } ++ } ++ else ++ { ++ xops[0] = operands[0]; ++ xops[1] = operands[4]; ++ output_asm_insn (output_move_double (xops), xops); ++ } + } + } ++ else ++ { ++ if (WORDS_BIG_ENDIAN) ++ { ++ // Can this ever happen? ++ ++ abort(); ++ } ++ } + + return AS1 (fldc%W2,%2); + } +@@ -5739,3 +5946,31 @@ + + return len; + } ++ ++/* Functions to convert between little and endian modes */ ++ ++short ++bswap_16( x ) ++ short x; ++{ ++ return ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)); ++} ++ ++long ++bswap_32( x ) ++ long x; ++{ ++ return ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | ++ (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)); ++} ++ ++/* Return 1 is the operand is either a non-special register or ANY ++ constant integer. */ ++ ++int ++reg_or_cint_operand (op, mode) ++ register rtx op; ++ enum machine_mode mode; ++{ ++ return (GET_CODE (op) == CONST_INT || register_operand (op, mode)); ++} +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/i386/i386.h gcc/gcc/config/i386/i386.h +--- gcc-2.95.3/gcc/config/i386/i386.h Sun Apr 25 13:43:49 1999 ++++ gcc/gcc/config/i386/i386.h Mon Sep 24 12:24:43 2001 +@@ -2766,6 +2766,9 @@ + extern int small_shift_operand (); + extern char *output_ashl (); + extern int memory_address_info (); ++extern short bswap_16 (); ++extern long bswap_32 (); ++extern int reg_or_cint_operand (); + + #ifdef NOTYET + extern struct rtx_def *copy_all_rtx (); +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/i386/i386be.md gcc/gcc/config/i386/i386be.md +--- gcc-2.95.3/gcc/config/i386/i386be.md Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/i386/i386be.md Tue Apr 9 23:07:39 2002 +@@ -0,0 +1,8714 @@ ++; GCC machine description for Intel X86. ++;; Copyright (C) 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software ++;; Foundation, Inc. ++;; Mostly by William Schelter. ++ ++;; This file is part of GNU CC. ++ ++;; GNU CC is free software; you can redistribute it and/or modify ++;; it under the terms of the GNU General Public License as published by ++;; the Free Software Foundation; either version 2, or (at your option) ++;; any later version. ++ ++;; GNU CC is distributed in the hope that it will be useful, ++;; but WITHOUT ANY WARRANTY; without even the implied warranty of ++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++;; GNU General Public License for more details. ++ ++;; You should have received a copy of the GNU General Public License ++;; along with GNU CC; see the file COPYING. If not, write to ++;; the Free Software Foundation, 59 Temple Place - Suite 330, ++;; Boston, MA 02111-1307, USA. */ ++ ++;; The original PO technology requires these to be ordered by speed, ++;; so that assigner will pick the fastest. ++ ++;; See file "rtl.def" for documentation on define_insn, match_*, et. al. ++ ++;; Macro #define NOTICE_UPDATE_CC in file i386.h handles condition code ++;; updates for most instructions. ++ ++;; Macro REG_CLASS_FROM_LETTER in file i386.h defines the register ++;; constraint letters. ++ ++;; the special asm out single letter directives following a '%' are: ++;; 'z' mov%z1 would be movl, movw, or movb depending on the mode of ++;; operands[1]. ++;; 'L' Print the opcode suffix for a 32-bit integer opcode. ++;; 'W' Print the opcode suffix for a 16-bit integer opcode. ++;; 'B' Print the opcode suffix for an 8-bit integer opcode. ++;; 'Q' Print the opcode suffix for a 64-bit float opcode. ++;; 'S' Print the opcode suffix for a 32-bit float opcode. ++;; 'T' Print the opcode suffix for an 80-bit extended real XFmode float opcode. ++;; 'J' Print the appropriate jump operand. ++ ++;; 'b' Print the QImode name of the register for the indicated operand. ++;; %b0 would print %al if operands[0] is reg 0. ++;; 'w' Likewise, print the HImode name of the register. ++;; 'k' Likewise, print the SImode name of the register. ++;; 'h' Print the QImode name for a "high" register, either ah, bh, ch or dh. ++;; 'y' Print "st(0)" instead of "st" as a register. ++ ++;; UNSPEC usage: ++;; 0 This is a `scas' operation. The mode of the UNSPEC is always SImode. ++;; operand 0 is the memory address to scan. ++;; operand 1 is a register containing the value to scan for. The mode ++;; of the scas opcode will be the same as the mode of this operand. ++;; operand 2 is the known alignment of operand 0. ++;; 1 This is a `sin' operation. The mode of the UNSPEC is MODE_FLOAT. ++;; operand 0 is the argument for `sin'. ++;; 2 This is a `cos' operation. The mode of the UNSPEC is MODE_FLOAT. ++;; operand 0 is the argument for `cos'. ++;; 3 This is part of a `stack probe' operation. The mode of the UNSPEC is ++;; always SImode. operand 0 is the size of the stack allocation. ++;; 4 This is the source of a fake SET of the frame pointer which is used to ++;; prevent insns referencing it being scheduled across the initial ++;; decrement of the stack pointer. ++;; 5 This is a `bsf' operation. ++;; 6 This is the @GOT offset of a PIC address. ++;; 7 This is the @GOTOFF offset of a PIC address. ++;; 8 This is a reference to a symbol's @PLT address. ++ ++;; This shadows the processor_type enumeration, so changes must be made ++;; to i386.h at the same time. ++ ++(define_attr "type" ++ "integer,binary,memory,test,compare,fcompare,idiv,imul,lea,fld,fpop,fpdiv,fpmul" ++ (const_string "integer")) ++ ++(define_attr "memory" "none,load,store" ++ (cond [(eq_attr "type" "idiv,lea") ++ (const_string "none") ++ ++ (eq_attr "type" "fld") ++ (const_string "load") ++ ++ (eq_attr "type" "test") ++ (if_then_else (match_operand 0 "memory_operand" "") ++ (const_string "load") ++ (const_string "none")) ++ ++ (eq_attr "type" "compare,fcompare") ++ (if_then_else (ior (match_operand 0 "memory_operand" "") ++ (match_operand 1 "memory_operand" "")) ++ (const_string "load") ++ (const_string "none")) ++ ++ (and (eq_attr "type" "integer,memory,fpop") ++ (match_operand 0 "memory_operand" "")) ++ (const_string "store") ++ ++ (and (eq_attr "type" "integer,memory,fpop") ++ (match_operand 1 "memory_operand" "")) ++ (const_string "load") ++ ++ (and (eq_attr "type" "binary,imul,fpmul,fpdiv") ++ (ior (match_operand 1 "memory_operand" "") ++ (match_operand 2 "memory_operand" ""))) ++ (const_string "load")] ++ ++ (const_string "none"))) ++ ++;; Functional units ++ ++; (define_function_unit NAME MULTIPLICITY SIMULTANEITY ++; TEST READY-DELAY ISSUE-DELAY [CONFLICT-LIST]) ++ ++; pentiumpro has a reservation station with 5 ports ++; port 0 has integer, float add, integer divide, float divide, float ++; multiply, and shifter units. ++; port 1 has integer, and jump units. ++; port 2 has the load address generation unit ++; ports 3 and 4 have the store address generation units ++ ++; pentium has two integer pipelines, the main u pipe and the secondary v pipe. ++; and a float pipeline ++ ++;; Floating point ++ ++(define_function_unit "fp" 1 0 ++ (and (eq_attr "type" "fpop,fcompare") (eq_attr "cpu" "i386,i486")) ++ 5 5) ++ ++(define_function_unit "fp" 1 0 ++ (and (eq_attr "type" "fpop,fcompare") (eq_attr "cpu" "pentium,pentiumpro")) ++ 3 0) ++ ++(define_function_unit "fp" 1 0 ++ (and (eq_attr "type" "fpmul") (eq_attr "cpu" "pentium")) ++ 7 0) ++ ++(define_function_unit "fp" 1 0 ++ (and (eq_attr "type" "fpmul") (eq_attr "cpu" "pentiumpro")) ++ 5 0) ++ ++(define_function_unit "fp" 1 0 ++ (and (eq_attr "type" "idiv") (eq_attr "cpu" "pentiumpro")) ++ 10 10) ++ ++(define_function_unit "fp" 1 0 ++ (and (eq_attr "type" "imul") (eq_attr "cpu" "pentiumpro")) ++ 6 0) ++ ++(define_function_unit "fp" 1 0 ++ (eq_attr "type" "fpdiv") ++ 10 10) ++ ++(define_function_unit "fp" 1 0 ++ (and (eq_attr "type" "fld") (eq_attr "cpu" "!pentiumpro,k6")) ++ 1 0) ++ ++;; K6 FPU is not pipelined. ++(define_function_unit "fp" 1 0 ++ (and (eq_attr "type" "fpop,fpmul,fcompare") (eq_attr "cpu" "k6")) ++ 2 2) ++ ++;; i386 and i486 have one integer unit, which need not be modeled ++ ++(define_function_unit "integer" 2 0 ++ (and (eq_attr "type" "integer,binary,test,compare,lea") (eq_attr "cpu" "pentium,pentiumpro")) ++ 1 0) ++ ++(define_function_unit "integer" 2 0 ++ (and (eq_attr "cpu" "k6") ++ (and (eq_attr "type" "integer,binary,test,compare") ++ (eq_attr "memory" "!load"))) ++ 1 0) ++ ++;; Internally, K6 converts REG OP MEM instructions into a load (2 cycles) ++;; and a register operation (1 cycle). ++(define_function_unit "integer" 2 0 ++ (and (eq_attr "cpu" "k6") ++ (and (eq_attr "type" "integer,binary,test,compare") ++ (eq_attr "memory" "load"))) ++ 3 0) ++ ++;; Multiplies use one of the integer units ++(define_function_unit "integer" 2 0 ++ (and (eq_attr "cpu" "pentium") (eq_attr "type" "imul")) ++ 11 11) ++ ++(define_function_unit "integer" 2 0 ++ (and (eq_attr "cpu" "k6") (eq_attr "type" "imul")) ++ 2 2) ++ ++(define_function_unit "integer" 2 0 ++ (and (eq_attr "cpu" "pentium") (eq_attr "type" "idiv")) ++ 25 25) ++ ++(define_function_unit "integer" 2 0 ++ (and (eq_attr "cpu" "k6") (eq_attr "type" "idiv")) ++ 17 17) ++ ++;; Pentium Pro and K6 have a separate load unit. ++(define_function_unit "load" 1 0 ++ (and (eq_attr "cpu" "pentiumpro") (eq_attr "memory" "load")) ++ 3 0) ++ ++(define_function_unit "load" 1 0 ++ (and (eq_attr "cpu" "k6") (eq_attr "memory" "load")) ++ 2 0) ++ ++;; Pentium Pro and K6 have a separate store unit. ++(define_function_unit "store" 1 0 ++ (and (eq_attr "cpu" "pentiumpro,k6") (eq_attr "memory" "store")) ++ 1 0) ++ ++;; lea executes in the K6 store unit with 1 cycle latency ++(define_function_unit "store" 1 0 ++ (and (eq_attr "cpu" "k6") (eq_attr "type" "lea")) ++ 1 0) ++ ++ ++;; "movl MEM,REG / testl REG,REG" is faster on a 486 than "cmpl $0,MEM". ++;; But restricting MEM here would mean that gcc could not remove a redundant ++;; test in cases like "incl MEM / je TARGET". ++;; ++;; We don't want to allow a constant operand for test insns because ++;; (set (cc0) (const_int foo)) has no mode information. Such insns will ++;; be folded while optimizing anyway. ++ ++;; All test insns have expanders that save the operands away without ++;; actually generating RTL. The bCOND or sCOND (emitted immediately ++;; after the tstM or cmp) will actually emit the tstM or cmpM. ++ ++;; Processor type -- this attribute must exactly match the processor_type ++;; enumeration in i386.h. ++ ++(define_attr "cpu" "i386,i486,pentium,pentiumpro,k6" ++ (const (symbol_ref "ix86_cpu"))) ++ ++(define_insn "tstsi_1" ++ [(set (cc0) ++ (match_operand:SI 0 "register_operand" "r"))] ++ "" ++ "* ++{ ++ if (REG_P (operands[0])) ++ return AS2 (test%L0,%0,%0); ++ ++ operands[1] = const0_rtx; ++ return AS2 (cmp%L0,%1,%0); ++}" ++ [(set_attr "type" "test")]) ++ ++(define_expand "tstsi" ++ [(set (cc0) ++ (match_operand:SI 0 "register_operand" ""))] ++ "" ++ " ++{ ++ i386_compare_gen = gen_tstsi_1; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = const0_rtx; ++ DONE; ++}") ++ ++(define_insn "tsthi_1" ++ [(set (cc0) ++ (match_operand:HI 0 "register_operand" "r"))] ++ "" ++ "* ++{ ++ if (REG_P (operands[0])) ++ return AS2 (test%W0,%0,%0); ++ ++ operands[1] = const0_rtx; ++ return AS2 (cmp%W0,%1,%0); ++}" ++ [(set_attr "type" "test")]) ++ ++(define_expand "tsthi" ++ [(set (cc0) ++ (match_operand:HI 0 "register_operand" ""))] ++ "" ++ " ++{ ++ i386_compare_gen = gen_tsthi_1; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = const0_rtx; ++ DONE; ++}") ++ ++(define_insn "tstqi_1" ++ [(set (cc0) ++ (match_operand:QI 0 "nonimmediate_operand" "qm"))] ++ "" ++ "* ++{ ++ if (REG_P (operands[0])) ++ return AS2 (test%B0,%0,%0); ++ ++ operands[1] = const0_rtx; ++ return AS2 (cmp%B0,%1,%0); ++}" ++ [(set_attr "type" "test")]) ++ ++(define_expand "tstqi" ++ [(set (cc0) ++ (match_operand:QI 0 "nonimmediate_operand" ""))] ++ "" ++ " ++{ ++ i386_compare_gen = gen_tstqi_1; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = const0_rtx; ++ DONE; ++}") ++ ++(define_insn "tstsf_cc" ++ [(set (cc0) ++ (match_operand:SF 0 "register_operand" "f")) ++ (clobber (match_scratch:HI 1 "=a"))] ++ "TARGET_80387 && ! TARGET_IEEE_FP" ++ "* ++{ ++ if (! STACK_TOP_P (operands[0])) ++ abort (); ++ ++ output_asm_insn (\"ftst\", operands); ++ ++ if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG)) ++ output_asm_insn (AS1 (fstp,%y0), operands); ++ ++ return output_fp_cc0_set (insn); ++}" ++ [(set_attr "type" "test")]) ++ ++;; Don't generate tstsf if generating IEEE code, since the `ftst' opcode ++;; isn't IEEE compliant. ++ ++(define_expand "tstsf" ++ [(parallel [(set (cc0) ++ (match_operand:SF 0 "register_operand" "")) ++ (clobber (match_scratch:HI 1 ""))])] ++ "TARGET_80387 && ! TARGET_IEEE_FP" ++ " ++{ ++ i386_compare_gen = gen_tstsf_cc; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = const0_rtx; ++ DONE; ++}") ++ ++(define_insn "tstdf_cc" ++ [(set (cc0) ++ (match_operand:DF 0 "register_operand" "f")) ++ (clobber (match_scratch:HI 1 "=a"))] ++ "TARGET_80387 && ! TARGET_IEEE_FP" ++ "* ++{ ++ if (! STACK_TOP_P (operands[0])) ++ abort (); ++ ++ output_asm_insn (\"ftst\", operands); ++ ++ if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG)) ++ output_asm_insn (AS1 (fstp,%y0), operands); ++ ++ return output_fp_cc0_set (insn); ++}" ++ [(set_attr "type" "test")]) ++ ++;; Don't generate tstdf if generating IEEE code, since the `ftst' opcode ++;; isn't IEEE compliant. ++ ++(define_expand "tstdf" ++ [(parallel [(set (cc0) ++ (match_operand:DF 0 "register_operand" "")) ++ (clobber (match_scratch:HI 1 ""))])] ++ "TARGET_80387 && ! TARGET_IEEE_FP" ++ " ++{ ++ i386_compare_gen = gen_tstdf_cc; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = const0_rtx; ++ DONE; ++}") ++ ++(define_insn "tstxf_cc" ++ [(set (cc0) ++ (match_operand:XF 0 "register_operand" "f")) ++ (clobber (match_scratch:HI 1 "=a"))] ++ "TARGET_80387 && ! TARGET_IEEE_FP" ++ "* ++{ ++ if (! STACK_TOP_P (operands[0])) ++ abort (); ++ ++ output_asm_insn (\"ftst\", operands); ++ ++ if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG)) ++ output_asm_insn (AS1 (fstp,%y0), operands); ++ ++ return output_fp_cc0_set (insn); ++}" ++ [(set_attr "type" "test")]) ++ ++;; Don't generate tstxf if generating IEEE code, since the `ftst' opcode ++;; isn't IEEE compliant. ++ ++(define_expand "tstxf" ++ [(parallel [(set (cc0) ++ (match_operand:XF 0 "register_operand" "")) ++ (clobber (match_scratch:HI 1 ""))])] ++ "TARGET_80387 && ! TARGET_IEEE_FP" ++ " ++{ ++ i386_compare_gen = gen_tstxf_cc; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = const0_rtx; ++ DONE; ++}") ++ ++;;- compare instructions. See comments above tstM patterns about ++;; expansion of these insns. ++ ++(define_insn "cmpsi_1" ++ [(set (cc0) ++ (compare (match_operand:SI 0 "nonimmediate_operand" "r") ++ (match_operand:SI 1 "general_operand" "ri")))] ++ "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" ++ "* return AS2 (cmp%L0,%1,%0);" ++ [(set_attr "type" "compare")]) ++ ++(define_expand "cmpsi" ++ [(set (cc0) ++ (compare (match_operand:SI 0 "nonimmediate_operand" "") ++ (match_operand:SI 1 "general_operand" "")))] ++ "" ++ " ++{ ++ if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) ++ operands[0] = force_reg (SImode, operands[0]); ++ ++ i386_compare_gen = gen_cmpsi_1; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = operands[1]; ++ DONE; ++}") ++ ++(define_insn "cmphi_1" ++ [(set (cc0) ++ (compare (match_operand:HI 0 "nonimmediate_operand" "r") ++ (match_operand:HI 1 "general_operand" "ri")))] ++ "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" ++ "* return AS2 (cmp%W0,%1,%0);" ++ [(set_attr "type" "compare")]) ++ ++(define_expand "cmphi" ++ [(set (cc0) ++ (compare (match_operand:HI 0 "nonimmediate_operand" "") ++ (match_operand:HI 1 "general_operand" "")))] ++ "" ++ " ++{ ++ if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) ++ operands[0] = force_reg (HImode, operands[0]); ++ ++ i386_compare_gen = gen_cmphi_1; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = operands[1]; ++ DONE; ++}") ++ ++(define_insn "cmpqi_1" ++ [(set (cc0) ++ (compare (match_operand:QI 0 "nonimmediate_operand" "q,mq") ++ (match_operand:QI 1 "general_operand" "qm,nq")))] ++ "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" ++ "* return AS2 (cmp%B0,%1,%0);" ++ [(set_attr "type" "compare")]) ++ ++(define_expand "cmpqi" ++ [(set (cc0) ++ (compare (match_operand:QI 0 "nonimmediate_operand" "") ++ (match_operand:QI 1 "general_operand" "")))] ++ "" ++ " ++{ ++ if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) ++ operands[0] = force_reg (QImode, operands[0]); ++ ++ i386_compare_gen = gen_cmpqi_1; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = operands[1]; ++ DONE; ++}") ++ ++;; These implement float point compares. For each of DFmode and ++;; SFmode, there is the normal insn, and an insn where the second operand ++;; is converted to the desired mode. ++ ++(define_insn "" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(match_operand:XF 0 "register_operand" "f") ++ (match_operand:XF 1 "register_operand" "f")])) ++ (clobber (match_scratch:HI 3 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(match_operand:XF 0 "register_operand" "f") ++ (float_extend:XF ++ (match_operand:DF 1 "nonimmediate_operand" "fm"))])) ++ (clobber (match_scratch:HI 3 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(float_extend:XF ++ (match_operand:DF 0 "nonimmediate_operand" "fm")) ++ (match_operand:XF 1 "register_operand" "f")])) ++ (clobber (match_scratch:HI 3 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(match_operand:XF 0 "register_operand" "f") ++ (float_extend:XF ++ (match_operand:SF 1 "nonimmediate_operand" "fm"))])) ++ (clobber (match_scratch:HI 3 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(float_extend:XF ++ (match_operand:SF 0 "nonimmediate_operand" "fm")) ++ (match_operand:XF 1 "register_operand" "f")])) ++ (clobber (match_scratch:HI 3 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (compare:CCFPEQ (match_operand:XF 0 "register_operand" "f") ++ (match_operand:XF 1 "register_operand" "f"))) ++ (clobber (match_scratch:HI 2 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(match_operand:DF 0 "nonimmediate_operand" "f,fm") ++ (match_operand:DF 1 "nonimmediate_operand" "fm,f")])) ++ (clobber (match_scratch:HI 3 "=a,a"))] ++ "TARGET_80387 ++ && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(match_operand:DF 0 "register_operand" "f") ++ (float_extend:DF ++ (match_operand:SF 1 "nonimmediate_operand" "fm"))])) ++ (clobber (match_scratch:HI 3 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(float_extend:DF ++ (match_operand:SF 0 "nonimmediate_operand" "fm")) ++ (match_operand:DF 1 "register_operand" "f")])) ++ (clobber (match_scratch:HI 3 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(float_extend:DF ++ (match_operand:SF 0 "register_operand" "f")) ++ (match_operand:DF 1 "nonimmediate_operand" "fm")])) ++ (clobber (match_scratch:HI 3 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (compare:CCFPEQ (match_operand:DF 0 "register_operand" "f") ++ (match_operand:DF 1 "register_operand" "f"))) ++ (clobber (match_scratch:HI 2 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++;; These two insns will never be generated by combine due to the mode of ++;; the COMPARE. ++;(define_insn "" ++; [(set (cc0) ++; (compare:CCFPEQ (match_operand:DF 0 "register_operand" "f") ++; (float_extend:DF ++; (match_operand:SF 1 "register_operand" "f")))) ++; (clobber (match_scratch:HI 2 "=a"))] ++; "TARGET_80387" ++; "* return output_float_compare (insn, operands);") ++; ++;(define_insn "" ++; [(set (cc0) ++; (compare:CCFPEQ (float_extend:DF ++; (match_operand:SF 0 "register_operand" "f")) ++; (match_operand:DF 1 "register_operand" "f"))) ++; (clobber (match_scratch:HI 2 "=a"))] ++; "TARGET_80387" ++; "* return output_float_compare (insn, operands);") ++ ++(define_insn "*cmpsf_cc_1" ++ [(set (cc0) ++ (match_operator 2 "VOIDmode_compare_op" ++ [(match_operand:SF 0 "nonimmediate_operand" "f,fm") ++ (match_operand:SF 1 "nonimmediate_operand" "fm,f")])) ++ (clobber (match_scratch:HI 3 "=a,a"))] ++ "TARGET_80387 ++ && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (compare:CCFPEQ (match_operand:SF 0 "register_operand" "f") ++ (match_operand:SF 1 "register_operand" "f"))) ++ (clobber (match_scratch:HI 2 "=a"))] ++ "TARGET_80387" ++ "* return output_float_compare (insn, operands);" ++ [(set_attr "type" "fcompare")]) ++ ++(define_expand "cmpxf" ++ [(set (cc0) ++ (compare (match_operand:XF 0 "register_operand" "") ++ (match_operand:XF 1 "register_operand" "")))] ++ "TARGET_80387" ++ " ++{ ++ i386_compare_gen = gen_cmpxf_cc; ++ i386_compare_gen_eq = gen_cmpxf_ccfpeq; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = operands[1]; ++ DONE; ++}") ++ ++(define_expand "cmpdf" ++ [(set (cc0) ++ (compare (match_operand:DF 0 "register_operand" "") ++ (match_operand:DF 1 "general_operand" "")))] ++ "TARGET_80387" ++ " ++{ ++ i386_compare_gen = gen_cmpdf_cc; ++ i386_compare_gen_eq = gen_cmpdf_ccfpeq; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = (immediate_operand (operands[1], DFmode)) ++ ? copy_to_mode_reg (DFmode, operands[1]) : operands[1]; ++ DONE; ++}") ++ ++(define_expand "cmpsf" ++ [(set (cc0) ++ (compare (match_operand:SF 0 "register_operand" "") ++ (match_operand:SF 1 "general_operand" "")))] ++ "TARGET_80387" ++ " ++{ ++ i386_compare_gen = gen_cmpsf_cc; ++ i386_compare_gen_eq = gen_cmpsf_ccfpeq; ++ i386_compare_op0 = operands[0]; ++ i386_compare_op1 = (immediate_operand (operands[1], SFmode)) ++ ? copy_to_mode_reg (SFmode, operands[1]) : operands[1]; ++ DONE; ++}") ++ ++(define_expand "cmpxf_cc" ++ [(parallel [(set (cc0) ++ (compare (match_operand:XF 0 "register_operand" "") ++ (match_operand:XF 1 "register_operand" ""))) ++ (clobber (match_scratch:HI 2 ""))])] ++ "TARGET_80387" ++ "") ++ ++(define_expand "cmpxf_ccfpeq" ++ [(parallel [(set (cc0) ++ (compare:CCFPEQ (match_operand:XF 0 "register_operand" "") ++ (match_operand:XF 1 "register_operand" ""))) ++ (clobber (match_scratch:HI 2 ""))])] ++ "TARGET_80387" ++ "") ++ ++(define_expand "cmpdf_cc" ++ [(parallel [(set (cc0) ++ (compare (match_operand:DF 0 "register_operand" "") ++ (match_operand:DF 1 "register_operand" ""))) ++ (clobber (match_scratch:HI 2 ""))])] ++ "TARGET_80387" ++ "") ++ ++(define_expand "cmpdf_ccfpeq" ++ [(parallel [(set (cc0) ++ (compare:CCFPEQ (match_operand:DF 0 "register_operand" "") ++ (match_operand:DF 1 "register_operand" ""))) ++ (clobber (match_scratch:HI 2 ""))])] ++ "TARGET_80387" ++ " ++{ ++ if (! register_operand (operands[1], DFmode)) ++ operands[1] = copy_to_mode_reg (DFmode, operands[1]); ++}") ++ ++(define_expand "cmpsf_cc" ++ [(parallel [(set (cc0) ++ (compare (match_operand:SF 0 "register_operand" "") ++ (match_operand:SF 1 "register_operand" ""))) ++ (clobber (match_scratch:HI 2 ""))])] ++ "TARGET_80387" ++ "") ++ ++(define_expand "cmpsf_ccfpeq" ++ [(parallel [(set (cc0) ++ (compare:CCFPEQ (match_operand:SF 0 "register_operand" "") ++ (match_operand:SF 1 "register_operand" ""))) ++ (clobber (match_scratch:HI 2 ""))])] ++ "TARGET_80387" ++ " ++{ ++ if (! register_operand (operands[1], SFmode)) ++ operands[1] = copy_to_mode_reg (SFmode, operands[1]); ++}") ++ ++;; logical compare ++ ++(define_insn "" ++ [(set (cc0) ++ (and:SI (match_operand:SI 0 "general_operand" "%ro") ++ (match_operand:SI 1 "nonmemory_operand" "ri")))] ++ "" ++ "* ++{ ++ /* For small integers, we may actually use testb. */ ++ if (GET_CODE (operands[1]) == CONST_INT ++ && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])) ++ && (! REG_P (operands[0]) || QI_REG_P (operands[0])) ++ /* A Pentium test is pairable only with eax. Not with ah or al. */ ++ && (! REG_P (operands[0]) || REGNO (operands[0]) || !TARGET_PENTIUM ++ || optimize_size)) ++ { ++ /* We may set the sign bit spuriously. */ ++ ++ if ((INTVAL (operands[1]) & ~0xff) == 0) ++ { ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ return AS2 (test%B0,%1,%b0); ++ } ++ ++ if ((INTVAL (operands[1]) & ~0xff00) == 0) ++ { ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ operands[1] = GEN_INT (INTVAL (operands[1]) >> 8); ++ ++ if (QI_REG_P (operands[0])) ++ return AS2 (test%B0,%1,%h0); ++ else ++ { ++ operands[0] = adj_offsettable_operand (operands[0], 1); ++ return AS2 (test%B0,%1,%b0); ++ } ++ } ++ ++ if (GET_CODE (operands[0]) == MEM ++ && (INTVAL (operands[1]) & ~0xff0000) == 0) ++ { ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ operands[1] = GEN_INT (INTVAL (operands[1]) >> 16); ++ operands[0] = adj_offsettable_operand (operands[0], 2); ++ return AS2 (test%B0,%1,%b0); ++ } ++ ++ if (GET_CODE (operands[0]) == MEM ++ && (INTVAL (operands[1]) & ~0xff000000) == 0) ++ { ++ operands[1] = GEN_INT ((INTVAL (operands[1]) >> 24) & 0xff); ++ operands[0] = adj_offsettable_operand (operands[0], 3); ++ return AS2 (test%B0,%1,%b0); ++ } ++ } ++ ++ if (CONSTANT_P (operands[1]) || GET_CODE (operands[0]) == MEM) ++ return AS2 (test%L0,%1,%0); ++ ++ return AS2 (test%L1,%0,%1); ++}" ++ [(set_attr "type" "compare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (and:HI (match_operand:HI 0 "general_operand" "%ro") ++ (match_operand:HI 1 "nonmemory_operand" "ri")))] ++ "" ++ "* ++{ ++ if (GET_CODE (operands[1]) == CONST_INT ++ && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])) ++ && (! REG_P (operands[0]) || QI_REG_P (operands[0]))) ++ { ++ if ((INTVAL (operands[1]) & 0xff00) == 0) ++ { ++ /* ??? This might not be necessary. */ ++ if (INTVAL (operands[1]) & 0xffff0000) ++ operands[1] = GEN_INT (INTVAL (operands[1]) & 0xff); ++ ++ /* We may set the sign bit spuriously. */ ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ return AS2 (test%B0,%1,%b0); ++ } ++ ++ if ((INTVAL (operands[1]) & 0xff) == 0) ++ { ++ operands[1] = GEN_INT ((INTVAL (operands[1]) >> 8) & 0xff); ++ ++ if (QI_REG_P (operands[0])) ++ return AS2 (test%B0,%1,%h0); ++ else ++ { ++ operands[0] = adj_offsettable_operand (operands[0], 1); ++ return AS2 (test%B0,%1,%b0); ++ } ++ } ++ } ++ ++ /* use 32-bit test instruction if there are no sign issues */ ++ if (GET_CODE (operands[1]) == CONST_INT ++ && !(INTVAL (operands[1]) & ~0x7fff) ++ && i386_aligned_p (operands[0])) ++ return AS2 (test%L0,%1,%k0); ++ ++ if (CONSTANT_P (operands[1]) || GET_CODE (operands[0]) == MEM) ++ return AS2 (test%W0,%1,%0); ++ ++ return AS2 (test%W1,%0,%1); ++}" ++ [(set_attr "type" "compare")]) ++ ++(define_insn "" ++ [(set (cc0) ++ (and:QI (match_operand:QI 0 "nonimmediate_operand" "%qm") ++ (match_operand:QI 1 "nonmemory_operand" "qi")))] ++ "" ++ "* ++{ ++ if (CONSTANT_P (operands[1]) || GET_CODE (operands[0]) == MEM) ++ return AS2 (test%B0,%1,%0); ++ ++ return AS2 (test%B1,%0,%1); ++}" ++ [(set_attr "type" "compare")]) ++ ++;; move instructions. ++;; There is one for each machine mode, ++;; and each is preceded by a corresponding push-insn pattern ++;; (since pushes are not general_operands on the 386). ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "push_operand" "=<") ++ (match_operand:SI 1 "reg_or_cint_operand" "rn"))] ++ "flag_pic" ++ "* ++{ ++ if (GET_CODE (operands[1]) == CONST_INT ) ++ { ++ operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) ); ++ output_asm_insn (AS1 (push%L0,%1), operands); ++ RET; ++ } ++ else ++ { ++ //lcs: I'd like to remove the last bswap... ++ output_asm_insn (AS1 (bswap,%1), operands); ++ output_asm_insn (AS1 (push%L0,%1), operands); ++ output_asm_insn (AS1 (bswap,%1), operands); ++ RET; ++ } ++}" ++ [(set_attr "memory" "store")]) ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "push_operand" "=<") ++ (match_operand:SI 1 "reg_or_cint_operand" "rn"))] ++ "!flag_pic" ++ "* ++{ ++ if (GET_CODE (operands[1]) == CONST_INT ) ++ { ++ operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) ); ++ output_asm_insn (AS1 (push%L0,%1), operands); ++ RET; ++ } ++ else ++ { ++ //lcs: I'd like to remove the last bswap... ++ output_asm_insn (AS1 (bswap,%1), operands); ++ output_asm_insn (AS1 (push%L0,%1), operands); ++ output_asm_insn (AS1 (bswap,%1), operands); ++ RET; ++ } ++}" ++ [(set_attr "memory" "store")]) ++ ++;; On a 386, it is faster to push MEM directly. ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "push_operand" "=<") ++ (match_operand:SI 1 "memory_operand" "m"))] ++ "TARGET_PUSH_MEMORY" ++ "* return AS1 (push%L0,%1);" ++ [(set_attr "type" "memory") ++ (set_attr "memory" "load")]) ++ ++;; General case of fullword move. ++ ++;; If generating PIC code and operands[1] is a symbolic CONST, emit a ++;; move to get the address of the symbolic object from the GOT. ++ ++(define_expand "movsi" ++ [(set (match_operand:SI 0 "general_operand" "") ++ (match_operand:SI 1 "general_operand" ""))] ++ "" ++ " ++{ ++ extern int flag_pic; ++ ++ if (flag_pic && SYMBOLIC_CONST (operands[1])) ++ emit_pic_move (operands, SImode); ++ ++ /* Don't generate memory->memory moves, go through a register */ ++ else if (TARGET_MOVE ++ && no_new_pseudos == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ operands[1] = force_reg (SImode, operands[1]); ++ } ++ else if ( GET_CODE (operands[0]) == MEM && ++ SYMBOLIC_CONST (operands[1]) ) ++ { ++ operands[1] = force_reg (SImode, operands[1]); ++ } ++}") ++ ++ ++;; On i486, incl reg is faster than movl $1,reg. ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "general_operand" "=g,r,r") ++ (match_operand:SI 1 "general_operand" "rn,i,m"))] ++ "((!TARGET_MOVE || GET_CODE (operands[0]) != MEM) ++ || (GET_CODE (operands[1]) != MEM)) ++ && flag_pic" ++ "* ++{ ++ rtx link; ++ ++ /* K6: mov reg,0 is slightly faster than xor reg,reg but is 3 bytes ++ longer. */ ++ if ((ix86_cpu != PROCESSOR_K6 || optimize_size) ++ && operands[1] == const0_rtx && REG_P (operands[0])) ++ return AS2 (xor%L0,%0,%0); ++ ++ if (operands[1] == const1_rtx ++ /* PPRO and K6 prefer mov to inc to reduce dependencies. */ ++ && (optimize_size || (int)ix86_cpu < (int)PROCESSOR_PENTIUMPRO) ++ && (link = find_reg_note (insn, REG_WAS_0, 0)) ++ /* Make sure the insn that stored the 0 is still present. */ ++ && ! INSN_DELETED_P (XEXP (link, 0)) ++ && GET_CODE (XEXP (link, 0)) != NOTE ++ /* Make sure cross jumping didn't happen here. */ ++ && no_labels_between_p (XEXP (link, 0), insn) ++ /* Make sure the reg hasn't been clobbered. */ ++ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn)) ++ /* Fastest way to change a 0 to a 1. */ ++ return AS1 (inc%L0,%0); ++ ++ if (SYMBOLIC_CONST (operands[1])) ++ return AS2 (lea%L0,%a1,%0); ++ ++ if ((GET_CODE (operands[0]) != MEM) && (GET_CODE (operands[1]) != MEM)) ++ return AS2 (mov%L0,%1,%0); ++ else if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE (operands[1]) == CONST_INT ) ++ { ++ operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) ); ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ RET; ++ } ++ else ++ { ++ if (REGNO (operands[1]) == STACK_POINTER_REGNUM || ++ ( GET_CODE( operands[0] ) == MEM && REG_P( operands[1] ) && ++ GET_CODE( XEXP( operands[0], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 0) ) == REGNO( operands[1] ) ) ++ || ++ ( REG_P( XEXP( XEXP( operands[0], 0), 1) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 1) ) == REGNO( operands[1] ) ) ) )) ++ { ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ output_asm_insn (AS2 (rol%W0,$8,%0), operands); ++ output_asm_insn (AS2 (rol%L0,$16,%0), operands); ++ output_asm_insn (AS2 (rol%W0,$8,%0), operands); ++ } ++ else ++ { ++ //lcs: I'd like to remove the last bswap... ++ output_asm_insn (AS1 (bswap,%1), operands); ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ output_asm_insn (AS1 (bswap,%1), operands); ++ } ++ RET; ++ } ++ } ++ else if (GET_CODE (operands[1]) == MEM) ++ { ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ output_asm_insn (AS1 (bswap,%0), operands); ++ RET; ++ } ++}" ++ [(set_attr "type" "integer,integer,memory") ++ (set_attr "memory" "*,*,load")]) ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "general_operand" "=g,r,r") ++ (match_operand:SI 1 "general_operand" "rn,i,m"))] ++ "((!TARGET_MOVE || GET_CODE (operands[0]) != MEM) ++ || (GET_CODE (operands[1]) != MEM)) ++ && !flag_pic" ++ "* ++{ ++ rtx link; ++ ++ /* Use of xor was disabled for AMD K6 as recommended by the Optimization ++ Manual. My test shows, that this generally hurts the performance, because ++ mov is longer and takes longer to decode and decoding is the main ++ bottleneck of K6 when executing GCC code. */ ++ if (operands[1] == const0_rtx && REG_P (operands[0])) ++ return AS2 (xor%L0,%0,%0); ++ ++ if (operands[1] == const1_rtx ++ /* PPRO and K6 prefer mov to inc to reduce dependencies. */ ++ && (optimize_size || (int)ix86_cpu < (int)PROCESSOR_PENTIUMPRO) ++ && (link = find_reg_note (insn, REG_WAS_0, 0)) ++ /* Make sure the insn that stored the 0 is still present. */ ++ && ! INSN_DELETED_P (XEXP (link, 0)) ++ && GET_CODE (XEXP (link, 0)) != NOTE ++ /* Make sure cross jumping didn't happen here. */ ++ && no_labels_between_p (XEXP (link, 0), insn) ++ /* Make sure the reg hasn't been clobbered. */ ++ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn)) ++ /* Fastest way to change a 0 to a 1. */ ++ return AS1 (inc%L0,%0); ++ ++ if (SYMBOLIC_CONST (operands[1])) ++ return AS2 (lea%L0,%a1,%0); ++ ++ if ((GET_CODE (operands[0]) != MEM) && (GET_CODE (operands[1]) != MEM)) ++ return AS2 (mov%L0,%1,%0); ++ else if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE (operands[1]) == CONST_INT ) ++ { ++ operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) ); ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ RET; ++ } ++ else ++ { ++ if (REGNO (operands[1]) == STACK_POINTER_REGNUM || ++ ( GET_CODE( operands[0] ) == MEM && REG_P( operands[1] ) && ++ GET_CODE( XEXP( operands[0], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 0) ) == REGNO( operands[1] ) ) ++ || ++ ( REG_P( XEXP( XEXP( operands[0], 0), 1) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 1) ) == REGNO( operands[1] ) ) ) )) ++ { ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ output_asm_insn (AS2 (rol%W0,$8,%0), operands); ++ output_asm_insn (AS2 (rol%L0,$16,%0), operands); ++ output_asm_insn (AS2 (rol%W0,$8,%0), operands); ++ } ++ else ++ { ++ //lcs: I'd like to remove the last bswap... ++ output_asm_insn (AS1 (bswap,%1), operands); ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ output_asm_insn (AS1 (bswap,%1), operands); ++ } ++ RET; ++ } ++ } ++ else if (GET_CODE (operands[1]) == MEM) ++ { ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ output_asm_insn (AS1 (bswap,%0), operands); ++ RET; ++ } ++}" ++ [(set_attr "type" "integer,integer,memory") ++ (set_attr "memory" "*,*,load")]) ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "push_operand" "=<") ++ (match_operand:HI 1 "nonmemory_operand" "ri"))] ;; lcs -- ri -> qi ++ "" ++ "* ++{ ++ if (GET_CODE (operands[1]) == CONST_INT ) ++ { ++ operands[1] = GEN_INT ( bswap_16 (INTVAL (operands[1]) ) ); ++ output_asm_insn (AS1 (push%W0,%1), operands); ++ RET; ++ } ++ else ++ { ++ //lcs: I'd like to remove the last xchg... ++ output_asm_insn (AS2 (xchg,%b1,%h1), operands); ++ output_asm_insn (AS1 (push%W0,%1), operands); ++ output_asm_insn (AS2 (xchg,%b1,%h1), operands); ++ RET; ++ } ++}" ++ [(set_attr "type" "memory") ++ (set_attr "memory" "store")]) ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "push_operand" "=<") ++ (match_operand:HI 1 "memory_operand" "m"))] ++ "TARGET_PUSH_MEMORY" ++ "* return AS1 (push%W0,%1);" ++ [(set_attr "type" "memory") ++ (set_attr "memory" "load")]) ++ ++;; On i486, an incl and movl are both faster than incw and movw. ++ ++(define_expand "movhi" ++ [(set (match_operand:HI 0 "general_operand" "") ++ (match_operand:HI 1 "general_operand" ""))] ++ "" ++ " ++{ ++ /* Don't generate memory->memory moves, go through a register */ ++ if (TARGET_MOVE ++ && no_new_pseudos == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ operands[1] = force_reg (HImode, operands[1]); ++ } ++}") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "general_operand" "=g,r") ++ (match_operand:HI 1 "general_operand" "ri,m"))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ rtx link; ++ if (REG_P (operands[0]) && operands[1] == const0_rtx) ++ return AS2 (xor%L0,%k0,%k0); ++ ++ if (REG_P (operands[0]) && operands[1] == const1_rtx ++ /* PPRO and K6 prefer mov to inc to reduce dependencies. */ ++ && (optimize_size || (int)ix86_cpu < (int)PROCESSOR_PENTIUMPRO) ++ && (link = find_reg_note (insn, REG_WAS_0, 0)) ++ /* Make sure the insn that stored the 0 is still present. */ ++ && ! INSN_DELETED_P (XEXP (link, 0)) ++ && GET_CODE (XEXP (link, 0)) != NOTE ++ /* Make sure cross jumping didn't happen here. */ ++ && no_labels_between_p (XEXP (link, 0), insn) ++ /* Make sure the reg hasn't been clobbered. */ ++ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn)) ++ /* Fastest way to change a 0 to a 1. */ ++ return AS1 (inc%L0,%k0); ++ ++ if (REG_P (operands[0])) ++ { ++ if (i386_aligned_p (operands[1])) ++ { ++ operands[1] = i386_sext16_if_const (operands[1]); ++ output_asm_insn (AS2 (mov%L0,%k1,%k0), operands); ++ if (GET_CODE (operands[1]) == MEM) ++ { ++ if (QI_REG_P (operands[0]) ) ++ { ++ output_asm_insn (AS2 (xchg,%b0,%h0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS2 (rol%W0,$8,%w0), operands); ++ } ++ } ++ RET; ++ } ++ if (! TARGET_ZERO_EXTEND_WITH_AND) ++ { ++ /* movzwl is faster than movw on the Pentium Pro, ++ * although not as fast as an aligned movl. */ ++#ifdef INTEL_SYNTAX ++ output_asm_insn (AS2 (movzx,%1,%k0), operands); ++#else ++ output_asm_insn (AS2 (movz%W0%L0,%1,%k0), operands); ++#endif ++ if (QI_REG_P (operands[0]) ) ++ { ++ output_asm_insn (AS2 (xchg,%b0,%h0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS2 (rol%W0,$8,%w0), operands); ++ } ++ RET; ++ } ++ } ++ ++ if ((GET_CODE (operands[0]) != MEM) && (GET_CODE (operands[1]) != MEM)) ++ return AS2 (mov%W0,%1,%0); ++ else if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE (operands[1]) == CONST_INT ) ++ { ++ operands[1] = GEN_INT ( bswap_16 (INTVAL (operands[1]) ) ); ++ output_asm_insn (AS2 (mov%W0,%1,%0), operands); ++ RET; ++ } ++ else ++ { ++ output_asm_insn (AS2 (mov%W0,%1,%0), operands); ++ output_asm_insn (AS2 (rol%W0,$8,%0), operands); ++ RET; ++ } ++ } ++ else if (GET_CODE (operands[1]) == MEM) ++ { ++ output_asm_insn (AS2 (mov%W0,%1,%0), operands); ++ ++ if (QI_REG_P (operands[0]) ) ++ { ++ output_asm_insn (AS2 (xchg,%b0,%h0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS2 (rol%W0,$8,%w0), operands); ++ } ++ RET; ++ } ++}" ++ [(set_attr "type" "integer,memory") ++ (set_attr "memory" "*,load")]) ++ ++(define_expand "movstricthi" ++ [(set (strict_low_part (match_operand:HI 0 "general_operand" "")) ++ (match_operand:HI 1 "general_operand" ""))] ++ "" ++ " ++{ ++ /* Don't generate memory->memory moves, go through a register */ ++ if (TARGET_MOVE ++ && no_new_pseudos == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ operands[1] = force_reg (HImode, operands[1]); ++ } ++}") ++ ++(define_insn "" ++ [(set (strict_low_part (match_operand:HI 0 "general_operand" "+g,r")) ++ (match_operand:HI 1 "general_operand" "ri,m"))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ rtx link; ++ ++ /* Use of xor was disabled for AMD K6 as recommended by the Optimization ++ Manual. My test shows, that this generally hurts the performance, because ++ mov is longer and takes longer to decode and decoding is the main ++ bottleneck of K6 when executing GCC code. */ ++ ++ if (operands[1] == const0_rtx && REG_P (operands[0])) ++ return AS2 (xor%W0,%0,%0); ++ ++ if (operands[1] == const1_rtx ++ /* PPRO and K6 prefer mov to inc to reduce dependencies. */ ++ && (optimize_size || (int)ix86_cpu < (int)PROCESSOR_PENTIUMPRO) ++ && (link = find_reg_note (insn, REG_WAS_0, 0)) ++ /* Make sure the insn that stored the 0 is still present. */ ++ && ! INSN_DELETED_P (XEXP (link, 0)) ++ && GET_CODE (XEXP (link, 0)) != NOTE ++ /* Make sure cross jumping didn't happen here. */ ++ && no_labels_between_p (XEXP (link, 0), insn) ++ /* Make sure the reg hasn't been clobbered. */ ++ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn)) ++ /* Fastest way to change a 0 to a 1. */ ++ return AS1 (inc%W0,%0); ++ ++ if ((GET_CODE (operands[0]) != MEM) && (GET_CODE (operands[1]) != MEM)) ++ return AS2 (mov%W0,%1,%0); ++ else if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE (operands[1]) == CONST_INT ) ++ { ++ operands[1] = GEN_INT ( bswap_16 (INTVAL (operands[1]) ) ); ++ output_asm_insn (AS2 (mov%W0,%1,%0), operands); ++ RET; ++ } ++ else ++ { ++ //lcs: Can the xchg destroy the memory base register here? I doubt it, but... ++ //lcs: I'd like to remove the last xchg... ++ output_asm_insn (AS2 (xchg,%b1,%h1), operands); ++ output_asm_insn (AS2 (mov%W0,%1,%0), operands); ++ output_asm_insn (AS2 (xchg,%b1,%h1), operands); ++ ++ /* The following code will not work on write-only memory ++ output_asm_insn (AS2 (mov%W0,%1,%0), operands); ++ output_asm_insn (AS2 (rol%W0,$8,%0), operands); ++ */ ++ RET; ++ } ++ } ++ else if (GET_CODE (operands[1]) == MEM) ++ { ++ output_asm_insn (AS2 (mov%W0,%1,%0), operands); ++ if (QI_REG_P (operands[0]) ) ++ { ++ output_asm_insn (AS2 (xchg,%b0,%h0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS2 (rol%W0,$8,%0), operands); ++ } ++ RET; ++ } ++}" ++ [(set_attr "type" "integer,memory")]) ++ ++;; emit_push_insn when it calls move_by_pieces ++;; requires an insn to "push a byte". ++;; But actually we use pushw, which has the effect of rounding ++;; the amount pushed up to a halfword. ++(define_insn "" ++ [(set (match_operand:QI 0 "push_operand" "=<") ++ (match_operand:QI 1 "const_int_operand" "n"))] ++ "" ++ "* return AS1(push%W0,%1);") ++ ++(define_insn "" ++ [(set (match_operand:QI 0 "push_operand" "=<") ++ (match_operand:QI 1 "register_operand" "q"))] ++ "" ++ "* ++{ ++ operands[1] = gen_rtx_REG (HImode, REGNO (operands[1])); ++ return AS1 (push%W0,%1); ++}") ++ ++;; On i486, incb reg is faster than movb $1,reg. ++ ++;; ??? Do a recognizer for zero_extract that looks just like this, but reads ++;; or writes %ah, %bh, %ch, %dh. ++ ++(define_expand "movqi" ++ [(set (match_operand:QI 0 "general_operand" "") ++ (match_operand:QI 1 "general_operand" ""))] ++ "" ++ " ++{ ++ /* Don't generate memory->memory moves, go through a register */ ++ if (TARGET_MOVE ++ && no_new_pseudos == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ operands[1] = force_reg (QImode, operands[1]); ++ } ++}") ++ ++(define_insn "" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=q,*r,qm") ++ (match_operand:QI 1 "general_operand" "*g,*rn,qn"))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ rtx link; ++ ++ /* movb $0,reg8 is 2 bytes, the same as xorl reg8,reg8. ++ It is at least as fast as xor on any processor except a Pentium. */ ++ ++ if (operands[1] == const1_rtx ++ && TARGET_PENTIUM ++ && (link = find_reg_note (insn, REG_WAS_0, 0)) ++ /* Make sure the insn that stored the 0 is still present. */ ++ && ! INSN_DELETED_P (XEXP (link, 0)) ++ && GET_CODE (XEXP (link, 0)) != NOTE ++ /* Make sure cross jumping didn't happen here. */ ++ && no_labels_between_p (XEXP (link, 0), insn) ++ /* Make sure the reg hasn't been clobbered. */ ++ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn)) ++ { ++ /* Fastest way to change a 0 to a 1. ++ If inc%B0 isn't allowed, use inc%L0. */ ++ if (NON_QI_REG_P (operands[0])) ++ return AS1 (inc%L0,%k0); ++ else ++ return AS1 (inc%B0,%0); ++ } ++ ++ /* If mov%B0 isn't allowed for one of these regs, use mov%L0. */ ++ if (NON_QI_REG_P (operands[0]) || NON_QI_REG_P (operands[1])) ++ return (AS2 (mov%L0,%k1,%k0)); ++ ++ return (AS2 (mov%B0,%1,%0)); ++}") ++ ++;; If it becomes necessary to support movstrictqi into %esi or %edi, ++;; use the insn sequence: ++;; ++;; shrdl $8,srcreg,dstreg ++;; rorl $24,dstreg ++;; ++;; If operands[1] is a constant, then an andl/orl sequence would be ++;; faster. ++ ++(define_expand "movstrictqi" ++ [(set (strict_low_part (match_operand:QI 0 "general_operand" "")) ++ (match_operand:QI 1 "general_operand" ""))] ++ "" ++ " ++{ ++ /* Don't generate memory->memory moves, go through a register */ ++ if (TARGET_MOVE ++ && no_new_pseudos == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ operands[1] = force_reg (QImode, operands[1]); ++ } ++}") ++ ++(define_insn "" ++ [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm,q")) ++ (match_operand:QI 1 "general_operand" "*qn,m"))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ rtx link; ++ ++ /* movb $0,reg8 is 2 bytes, the same as xorl reg8,reg8. */ ++ ++ if (operands[1] == const1_rtx ++ && TARGET_PENTIUM ++ && ! NON_QI_REG_P (operands[0]) ++ && (link = find_reg_note (insn, REG_WAS_0, 0)) ++ /* Make sure the insn that stored the 0 is still present. */ ++ && ! INSN_DELETED_P (XEXP (link, 0)) ++ && GET_CODE (XEXP (link, 0)) != NOTE ++ /* Make sure cross jumping didn't happen here. */ ++ && no_labels_between_p (XEXP (link, 0), insn) ++ /* Make sure the reg hasn't been clobbered. */ ++ && ! reg_set_between_p (operands[0], XEXP (link, 0), insn)) ++ /* Fastest way to change a 0 to a 1. */ ++ return AS1 (inc%B0,%0); ++ ++ /* If mov%B0 isn't allowed for one of these regs, use mov%L0. */ ++ if (NON_QI_REG_P (operands[0]) || NON_QI_REG_P (operands[1])) ++ { ++ abort (); ++ return (AS2 (mov%L0,%k1,%k0)); ++ } ++ ++ return AS2 (mov%B0,%1,%0); ++}") ++ ++(define_insn "movsf_push" ++ [(set (match_operand:SF 0 "push_operand" "=<,<") ++ (match_operand:SF 1 "general_operand" "*rfF,m"))] ++ "TARGET_PUSH_MEMORY || GET_CODE (operands[1]) != MEM ++ || reload_in_progress || reload_completed" ++ "* ++{ ++ if (STACK_REG_P (operands[1])) ++ { ++ rtx xops[3]; ++ ++ if (! STACK_TOP_P (operands[1])) ++ abort (); ++ ++ xops[0] = AT_SP (SFmode); ++ xops[1] = GEN_INT (4); ++ xops[2] = stack_pointer_rtx; ++ ++ output_asm_insn (AS2 (sub%L2,%1,%2), xops); ++ ++ if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG)) ++ output_asm_insn (AS1 (fstp%S0,%0), xops); ++ else ++ output_asm_insn (AS1 (fst%S0,%0), xops); ++ ++ RET; ++ } ++ ++ return AS1 (push%L0,%1); ++}") ++ ++(define_split ++ [(set (match_operand:SF 0 "push_operand" "") ++ (match_operand:SF 1 "general_operand" ""))] ++ "reload_completed && STACK_REG_P (operands[1])" ++ [(set (reg:SI 7) ++ (minus:SI (reg:SI 7) (const_int 4))) ++ (set (mem:SF (reg:SI 7)) ++ (match_dup 1))] ++ "") ++ ++(define_expand "movsf" ++ [(set (match_operand:SF 0 "general_operand" "") ++ (match_operand:SF 1 "general_operand" ""))] ++ "" ++ " ++{ ++ /* Don't generate memory->memory moves, go through a register */ ++ if (TARGET_MOVE ++ && no_new_pseudos == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ operands[1] = force_reg (SFmode, operands[1]); ++ } ++ ++ /* If we are loading a floating point constant that isn't 0 or 1 ++ into a register, force the value to memory now, since we'll ++ get better code out the back end. */ ++ else if ((reload_in_progress | reload_completed) == 0 ++ && GET_CODE (operands[0]) != MEM ++ && GET_CODE (operands[1]) == CONST_DOUBLE ++ && !standard_80387_constant_p (operands[1])) ++ { ++ operands[1] = validize_mem (force_const_mem (SFmode, operands[1])); ++ } ++}") ++ ++;; For the purposes of regclass, prefer FLOAT_REGS. ++(define_insn "" ++ [(set (match_operand:SF 0 "nonimmediate_operand" "=f,m,!*r,!m") ++ (match_operand:SF 1 "general_operand" "fmG,f,*rmF,*rF"))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0; ++ ++ /* First handle a `pop' insn or a `fld %st(0)' */ ++ ++ if (STACK_TOP_P (operands[0]) && STACK_TOP_P (operands[1])) ++ { ++ if (stack_top_dies) ++ return AS1 (fstp,%y0); ++ else ++ return AS1 (fld,%y0); ++ } ++ ++ /* Handle other kinds of writes from the 387 */ ++ ++ if (STACK_TOP_P (operands[1])) ++ { ++ if (stack_top_dies) ++ return AS1 (fstp%z0,%y0); ++ else ++ return AS1 (fst%z0,%y0); ++ } ++ ++ /* Handle other kinds of reads to the 387 */ ++ ++ if (STACK_TOP_P (operands[0]) && GET_CODE (operands[1]) == CONST_DOUBLE) ++ return output_move_const_single (operands); ++ ++ if (STACK_TOP_P (operands[0])) ++ return AS1 (fld%z1,%y1); ++ ++ /* Handle all SFmode moves not involving the 387 */ ++ ++ return singlemove_string (operands); ++}" ++ [(set_attr "type" "fld")]) ++ ++ ++(define_insn "swapsf" ++ [(set (match_operand:SF 0 "register_operand" "f") ++ (match_operand:SF 1 "register_operand" "f")) ++ (set (match_dup 1) ++ (match_dup 0))] ++ "" ++ "* ++{ ++ if (STACK_TOP_P (operands[0])) ++ return AS1 (fxch,%1); ++ else ++ return AS1 (fxch,%0); ++}") ++ ++ ++(define_insn "movdf_push" ++ [(set (match_operand:DF 0 "push_operand" "=<,<") ++ (match_operand:DF 1 "general_operand" "*rfF,o"))] ++ "TARGET_PUSH_MEMORY || GET_CODE (operands[1]) != MEM ++ || reload_in_progress || reload_completed" ++ "* ++{ ++ if (STACK_REG_P (operands[1])) ++ { ++ rtx xops[3]; ++ ++ xops[0] = AT_SP (DFmode); ++ xops[1] = GEN_INT (8); ++ xops[2] = stack_pointer_rtx; ++ ++ output_asm_insn (AS2 (sub%L2,%1,%2), xops); ++ ++ if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG)) ++ output_asm_insn (AS1 (fstp%Q0,%0), xops); ++ else ++ output_asm_insn (AS1 (fst%Q0,%0), xops); ++ ++ RET; ++ } ++ ++ if (which_alternative == 1) ++ return output_move_pushmem (operands, insn, GET_MODE_SIZE (DFmode), 0, 0); ++ ++ return output_move_double (operands); ++}") ++ ++(define_split ++ [(set (match_operand:DF 0 "push_operand" "") ++ (match_operand:DF 1 "register_operand" ""))] ++ "reload_completed && STACK_REG_P (operands[1])" ++ [(set (reg:SI 7) ++ (minus:SI (reg:SI 7) (const_int 8))) ++ (set (mem:DF (reg:SI 7)) ++ (match_dup 1))] ++ "") ++ ++(define_expand "movdf" ++ [(set (match_operand:DF 0 "general_operand" "") ++ (match_operand:DF 1 "general_operand" ""))] ++ "" ++ " ++{ ++ /* Don't generate memory->memory moves, go through a register */ ++ if (TARGET_MOVE ++ && no_new_pseudos == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ operands[1] = force_reg (DFmode, operands[1]); ++ } ++ ++ /* If we are loading a floating point constant that isn't 0 or 1 into a ++ register, indicate we need the pic register loaded. This could be ++ optimized into stores of constants if the target eventually moves to ++ memory, but better safe than sorry. */ ++ else if ((reload_in_progress | reload_completed) == 0 ++ && GET_CODE (operands[0]) != MEM ++ && GET_CODE (operands[1]) == CONST_DOUBLE ++ && !standard_80387_constant_p (operands[1])) ++ { ++ operands[1] = validize_mem (force_const_mem (DFmode, operands[1])); ++ } ++}") ++ ++;; For the purposes of regclass, prefer FLOAT_REGS. ++(define_insn "" ++ [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m,!*r,!o") ++ (match_operand:DF 1 "general_operand" "fmG,f,*roF,*rF"))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) ++ || (GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0; ++ ++ /* First handle a `pop' insn or a `fld %st(0)' */ ++ ++ if (STACK_TOP_P (operands[0]) && STACK_TOP_P (operands[1])) ++ { ++ if (stack_top_dies) ++ return AS1 (fstp,%y0); ++ else ++ return AS1 (fld,%y0); ++ } ++ ++ /* Handle other kinds of writes from the 387 */ ++ ++ if (STACK_TOP_P (operands[1])) ++ { ++ if (stack_top_dies) ++ return AS1 (fstp%z0,%y0); ++ else ++ return AS1 (fst%z0,%y0); ++ } ++ ++ /* Handle other kinds of reads to the 387 */ ++ ++ if (STACK_TOP_P (operands[0]) && GET_CODE (operands[1]) == CONST_DOUBLE) ++ return output_move_const_single (operands); ++ ++ if (STACK_TOP_P (operands[0])) ++ return AS1 (fld%z1,%y1); ++ ++ /* Handle all DFmode moves not involving the 387 */ ++ ++ return output_move_double (operands); ++}" ++ [(set_attr "type" "fld")]) ++ ++ ++ ++(define_insn "swapdf" ++ [(set (match_operand:DF 0 "register_operand" "f") ++ (match_operand:DF 1 "register_operand" "f")) ++ (set (match_dup 1) ++ (match_dup 0))] ++ "" ++ "* ++{ ++ if (STACK_TOP_P (operands[0])) ++ return AS1 (fxch,%1); ++ else ++ return AS1 (fxch,%0); ++}") ++ ++(define_insn "movxf_push" ++ [(set (match_operand:XF 0 "push_operand" "=<,<") ++ (match_operand:XF 1 "general_operand" "*rfF,o"))] ++ "TARGET_PUSH_MEMORY || GET_CODE (operands[1]) != MEM ++ || reload_in_progress || reload_completed" ++ "* ++{ ++ if (STACK_REG_P (operands[1])) ++ { ++ rtx xops[3]; ++ ++ xops[0] = AT_SP (XFmode); ++ xops[1] = GEN_INT (12); ++ xops[2] = stack_pointer_rtx; ++ ++ output_asm_insn (AS2 (sub%L2,%1,%2), xops); ++ ++ output_asm_insn (AS1 (fstp%T0,%0), xops); ++ if (! find_regno_note (insn, REG_DEAD, FIRST_STACK_REG)) ++ output_asm_insn (AS1 (fld%T0,%0), xops); ++ ++ RET; ++ } ++ ++ if (which_alternative == 1) ++ return output_move_pushmem (operands, insn, GET_MODE_SIZE (XFmode), 0, 0); ++ ++ return output_move_double (operands); ++ }") ++ ++(define_split ++ [(set (match_operand:XF 0 "push_operand" "") ++ (match_operand:XF 1 "register_operand" ""))] ++ "reload_completed && STACK_REG_P (operands[1])" ++ [(set (reg:SI 7) ++ (minus:SI (reg:SI 7) (const_int 12))) ++ (set (mem:XF (reg:SI 7)) ++ (match_dup 1))] ++ "") ++ ++(define_expand "movxf" ++ [(set (match_operand:XF 0 "general_operand" "") ++ (match_operand:XF 1 "general_operand" ""))] ++ "" ++ " ++{ ++ /* Don't generate memory->memory moves, go through a register */ ++ if (TARGET_MOVE ++ && no_new_pseudos == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ operands[1] = force_reg (XFmode, operands[1]); ++ } ++ ++ /* If we are loading a floating point constant that isn't 0 or 1 ++ into a register, indicate we need the pic register loaded. This could ++ be optimized into stores of constants if the target eventually moves ++ to memory, but better safe than sorry. */ ++ else if ((reload_in_progress | reload_completed) == 0 ++ && GET_CODE (operands[0]) != MEM ++ && GET_CODE (operands[1]) == CONST_DOUBLE ++ && !standard_80387_constant_p (operands[1])) ++ { ++ operands[1] = validize_mem (force_const_mem (XFmode, operands[1])); ++ } ++}") ++ ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,!*r,!o") ++ (match_operand:XF 1 "general_operand" "fmG,f,*roF,*rF"))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) ++ || (GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0; ++ ++ /* First handle a `pop' insn or a `fld %st(0)' */ ++ ++ if (STACK_TOP_P (operands[0]) && STACK_TOP_P (operands[1])) ++ { ++ if (stack_top_dies) ++ return AS1 (fstp,%y0); ++ else ++ return AS1 (fld,%y0); ++ } ++ ++ /* Handle other kinds of writes from the 387 */ ++ ++ if (STACK_TOP_P (operands[1])) ++ { ++ output_asm_insn (AS1 (fstp%z0,%y0), operands); ++ if (! stack_top_dies) ++ return AS1 (fld%z0,%y0); ++ ++ RET; ++ } ++ ++ /* Handle other kinds of reads to the 387 */ ++ ++ if (STACK_TOP_P (operands[0]) && GET_CODE (operands[1]) == CONST_DOUBLE) ++ return output_move_const_single (operands); ++ ++ if (STACK_TOP_P (operands[0])) ++ return AS1 (fld%z1,%y1); ++ ++ /* Handle all XFmode moves not involving the 387 */ ++ ++ return output_move_double (operands); ++}") ++ ++(define_insn "swapxf" ++ [(set (match_operand:XF 0 "register_operand" "f") ++ (match_operand:XF 1 "register_operand" "f")) ++ (set (match_dup 1) ++ (match_dup 0))] ++ "" ++ "* ++{ ++ if (STACK_TOP_P (operands[0])) ++ return AS1 (fxch,%1); ++ else ++ return AS1 (fxch,%0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:DI 0 "push_operand" "=<") ++ (match_operand:DI 1 "general_operand" "riF"))] ++ "" ++ "* return output_move_double (operands);") ++ ++(define_insn "" ++ [(set (match_operand:DI 0 "push_operand" "=<") ++ (match_operand:DI 1 "memory_operand" "o"))] ++ "TARGET_PUSH_MEMORY" ++ "* return output_move_pushmem (operands, insn, GET_MODE_SIZE (DImode),0,0);") ++ ++(define_expand "movdi" ++ [(set (match_operand:DI 0 "general_operand" "") ++ (match_operand:DI 1 "general_operand" ""))] ++ "" ++ " ++{ ++ /* Don't generate memory->memory moves, go through a register */ ++ if (TARGET_MOVE ++ && no_new_pseudos == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ operands[1] = force_reg (DImode, operands[1]); ++ } ++}") ++ ++(define_insn "" ++ [(set (match_operand:DI 0 "general_operand" "=g,r") ++ (match_operand:DI 1 "general_operand" "riF,m"))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) ++ || (GET_CODE (operands[1]) != MEM)" ++ "* return output_move_double (operands);" ++ [(set_attr "type" "integer,memory") ++ (set_attr "memory" "*,load")]) ++ ++(define_split ++ [(set (match_operand:DI 0 "nonimmediate_operand" "") ++ (match_operand:DI 1 "general_operand" ""))] ++ "reload_completed ++ && (offsettable_memref_p (operands[0]) ++ || nonmemory_operand (operands[0], DImode)) ++ && (offsettable_memref_p (operands[1]) ++ || nonmemory_operand (operands[1], DImode)) ++ && (! reg_overlap_mentioned_p (gen_lowpart (SImode, operands[0]), ++ operands[1]) ++ || ! reg_overlap_mentioned_p (gen_highpart (SImode, operands[0]), ++ operands[1]))" ++ [(set (match_dup 2) ++ (match_dup 4)) ++ (set (match_dup 3) ++ (match_dup 5))] ++ " ++{ ++ split_di (&operands[0], 1, &operands[2], &operands[3]); ++ split_di (&operands[1], 1, &operands[4], &operands[5]); ++ ++ if (reg_overlap_mentioned_p (operands[2], operands[1])) ++ { ++ rtx tmp; ++ ++ tmp = operands[2]; ++ operands[2] = operands[3]; ++ operands[3] = tmp; ++ ++ tmp = operands[4]; ++ operands[4] = operands[5]; ++ operands[5] = tmp; ++ } ++}") ++ ++;;- conversion instructions ++;;- NONE ++ ++;;- zero extension instructions ++;; See comments by `andsi' for when andl is faster than movzx. ++ ++(define_expand "zero_extendhisi2" ++ [(set (match_operand:SI 0 "register_operand" "") ++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))] ++ "" ++ "") ++ ++;; When optimizing for the PPro/PII or code size, always use movzwl. ++;; We want to use a different pattern so we can use different constraints ++;; than the generic pattern. ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))] ++ "(optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO)" ++ "* return AS2 (movz%W0%L0,%1,%0);") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=r,&r,?r") ++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,r,r")))] ++ "! (optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO)" ++ "* ++ { ++ rtx xops[2]; ++ ++ if ((TARGET_ZERO_EXTEND_WITH_AND || REGNO (operands[0]) == 0) ++ && REG_P (operands[1]) && REGNO (operands[0]) == REGNO (operands[1])) ++ { ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xffff); ++ output_asm_insn (AS2 (and%L0,%1,%k0), xops); ++ RET; ++ } ++ if (TARGET_ZERO_EXTEND_WITH_AND && !reg_overlap_mentioned_p (operands[0], operands[1])) ++ { ++ output_asm_insn (AS2 (xor%L0,%0,%0),operands); ++ output_asm_insn (AS2 (mov%W0,%1,%w0),operands); ++ RET; ++ } ++ ++ if (TARGET_ZERO_EXTEND_WITH_AND) ++ { ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xffff); ++ if (i386_aligned_p (operands[1])) ++ output_asm_insn (AS2 (mov%L0,%k1,%k0),operands); ++ else ++ output_asm_insn (AS2 (mov%W0,%1,%w0),operands); ++ output_asm_insn (AS2 (and%L0,%1,%k0), xops); ++ RET; ++ } ++ ++#ifdef INTEL_SYNTAX ++ return AS2 (movzx,%1,%0); ++#else ++ return AS2 (movz%W0%L0,%1,%0); ++#endif ++}") ++ ++(define_split ++ [(set (match_operand:SI 0 "register_operand" "") ++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))] ++ "reload_completed && TARGET_ZERO_EXTEND_WITH_AND && !reg_overlap_mentioned_p (operands[0], operands[1])" ++ [(set (match_dup 0) ++ (const_int 0)) ++ (set (strict_low_part (match_dup 2)) ++ (match_dup 1))] ++ "operands[2] = gen_rtx_REG (HImode, true_regnum (operands[0]));") ++ ++ ++(define_split ++ [(set (match_operand:SI 0 "register_operand" "") ++ (zero_extend:SI (match_operand:HI 1 "memory_operand" "")))] ++ "reload_completed && TARGET_ZERO_EXTEND_WITH_AND && reg_overlap_mentioned_p (operands[0], operands[1])" ++ [(set (strict_low_part (match_dup 2)) ++ (match_dup 1)) ++ (set (match_dup 0) ++ (and:SI (match_dup 0) ++ (const_int 65535)))] ++ "operands[2] = gen_rtx_REG (HImode, true_regnum (operands[0]));") ++ ++(define_expand "zero_extendqihi2" ++ [(set (match_operand:HI 0 "register_operand" "") ++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))] ++ "" ++ "") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "register_operand" "=r") ++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "q")))] ++ "optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO" ++ ++ "* return AS2 (movz%B0%W0,%1,%0);") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "register_operand" "=q,&q,?r") ++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "0,q,q")))] ++ "! (optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO)" ++ "* ++ { ++ rtx xops[2]; ++ ++ if ((TARGET_ZERO_EXTEND_WITH_AND || REGNO (operands[0]) == 0) ++ && REG_P (operands[1]) ++ && REGNO (operands[0]) == REGNO (operands[1])) ++ { ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xff); ++ output_asm_insn (AS2 (and%L0,%1,%k0), xops); ++ RET; ++ } ++ if (TARGET_ZERO_EXTEND_WITH_AND && QI_REG_P (operands[0])) ++ { ++ if(!reg_overlap_mentioned_p(operands[0],operands[1])) ++ { ++ output_asm_insn (AS2 (xor%L0,%k0,%k0), operands); ++ output_asm_insn (AS2 (mov%B0,%1,%b0), operands); ++ } ++ else ++ { ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xff); ++ output_asm_insn (AS2 (mov%B0,%1,%b0),operands); ++ output_asm_insn (AS2 (and%L0,%1,%k0), xops); ++ } ++ RET; ++ } ++ ++#ifdef INTEL_SYNTAX ++ return AS2 (movzx,%1,%0); ++#else ++ return AS2 (movz%B0%W0,%1,%0); ++#endif ++}") ++ ++(define_split ++ [(set (match_operand:HI 0 "register_operand" "") ++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))] ++ "reload_completed && QI_REG_P (operands[0]) && TARGET_ZERO_EXTEND_WITH_AND ++ && !reg_overlap_mentioned_p (operands[0], operands[1])" ++ [(set (match_dup 0) ++ (const_int 0)) ++ (set (strict_low_part (match_dup 2)) ++ (match_dup 1))] ++ "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0]));") ++ ++ ++(define_split ++ [(set (match_operand:HI 0 "register_operand" "") ++ (zero_extend:HI (match_operand:QI 1 "memory_operand" "")))] ++ "reload_completed && QI_REG_P (operands[0]) && TARGET_ZERO_EXTEND_WITH_AND ++ && reg_overlap_mentioned_p (operands[0], operands[1])" ++ [(set (strict_low_part (match_dup 2)) ++ (match_dup 1)) ++ (set (match_dup 0) ++ (and:HI (match_dup 0) ++ (const_int 255)))] ++ "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0]));") ++ ++(define_split ++ [(set (match_operand:HI 0 "register_operand" "") ++ (zero_extend:HI (match_operand:QI 1 "register_operand" "")))] ++ "reload_completed && TARGET_ZERO_EXTEND_WITH_AND" ++ [(set (match_dup 0) ++ (match_dup 2)) ++ (set (match_dup 0) ++ (and:HI (match_dup 0) ++ (const_int 255)))] ++ "if (GET_CODE (operands[1]) == SUBREG && SUBREG_WORD (operands[1]) == 0) ++ operands[1] = SUBREG_REG (operands[1]); ++ if (GET_CODE (operands[0]) != REG || GET_CODE (operands[1]) != REG ++ ++ || REGNO (operands[0]) == REGNO (operands[1])) ++ FAIL; ++ operands[2] = gen_rtx_REG (HImode, REGNO (operands[1]));") ++ ++(define_expand "zero_extendqisi2" ++ [(set (match_operand:SI 0 "register_operand" "") ++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))] ++ "" ++ "") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "q")))] ++ "optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO" ++ "* return AS2 (movz%B0%L0,%1,%0);") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=q,&q,?r") ++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "0,q,q")))] ++ "! (optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO)" ++ "* ++ { ++ rtx xops[2]; ++ ++ if ((TARGET_ZERO_EXTEND_WITH_AND || REGNO (operands[0]) == 0) ++ && REG_P (operands[1]) ++ && REGNO (operands[0]) == REGNO (operands[1])) ++ { ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xff); ++ output_asm_insn (AS2 (and%L0,%1,%k0), xops); ++ RET; ++ } ++ if (TARGET_ZERO_EXTEND_WITH_AND && QI_REG_P (operands[0])) ++ { ++ if(!reg_overlap_mentioned_p (operands[0], operands[1])) ++ { ++ output_asm_insn (AS2 (xor%L0,%0,%0),operands); ++ output_asm_insn (AS2 (mov%B0,%1,%b0),operands); ++ } ++ else ++ { ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xff); ++ output_asm_insn (AS2 (mov%B0,%1,%b0), operands); ++ output_asm_insn (AS2 (and%L0,%1,%k0), xops); ++ } ++ RET; ++ } ++ ++ if (TARGET_ZERO_EXTEND_WITH_AND && GET_CODE (operands[1]) == REG) ++ { ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xff); ++ operands[1] = gen_rtx_REG (SImode, REGNO (operands[1])); ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ output_asm_insn (AS2 (and%L0,%1,%k0), xops); ++ RET; ++ } ++ ++#ifdef INTEL_SYNTAX ++ return AS2 (movzx,%1,%0); ++#else ++ return AS2 (movz%B0%L0,%1,%0); ++#endif ++}") ++ ++(define_split ++ [(set (match_operand:SI 0 "register_operand" "") ++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))] ++ "reload_completed && QI_REG_P (operands[0]) && TARGET_ZERO_EXTEND_WITH_AND ++ && !reg_overlap_mentioned_p (operands[0], operands[1])" ++ [(set (match_dup 0) ++ (const_int 0)) ++ (set (strict_low_part (match_dup 2)) ++ (match_dup 1))] ++ "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0]));") ++ ++ ++(define_split ++ [(set (match_operand:SI 0 "register_operand" "") ++ (zero_extend:SI (match_operand:QI 1 "memory_operand" "")))] ++ "reload_completed && QI_REG_P (operands[0]) && TARGET_ZERO_EXTEND_WITH_AND ++ && reg_overlap_mentioned_p (operands[0], operands[1])" ++ [(set (strict_low_part (match_dup 2)) ++ (match_dup 1)) ++ (set (match_dup 0) ++ (and:SI (match_dup 0) ++ (const_int 255)))] ++ "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0]));") ++ ++(define_split ++ [(set (match_operand:SI 0 "register_operand" "") ++ (zero_extend:SI (match_operand:QI 1 "register_operand" "")))] ++ "reload_completed && TARGET_ZERO_EXTEND_WITH_AND ++ && ! reg_overlap_mentioned_p (operands[0], operands[1])" ++ [(set (match_dup 0) ++ (match_dup 2)) ++ (set (match_dup 0) ++ (and:SI (match_dup 0) ++ (const_int 255)))] ++ "operands[2] = gen_rtx_REG (SImode, true_regnum (operands[1]));") ++ ++(define_insn "zero_extendsidi2" ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?*o") ++ (zero_extend:DI (match_operand:SI 1 "general_operand" "0,rm,r")))] ++ "" ++ "#") ++ ++;; lcs: Is "true_regnum (operands[0]) + 1" right? I think so! ++(define_split ++ [(set (match_operand:DI 0 "register_operand" "") ++ (zero_extend:DI (match_operand:SI 1 "register_operand" "")))] ++ "reload_completed && true_regnum (operands[0]) + 1 == true_regnum (operands[1])" ++ [(set (match_dup 4) (const_int 0))] ++ "split_di (&operands[0], 1, &operands[3], &operands[4]);") ++ ++(define_split ++ [(set (match_operand:DI 0 "nonimmediate_operand" "") ++ (zero_extend:DI (match_operand:SI 1 "general_operand" "")))] ++ "reload_completed" ++ [(set (match_dup 3) (match_dup 1)) ++ (set (match_dup 4) (const_int 0))] ++ "split_di (&operands[0], 1, &operands[3], &operands[4]);") ++ ++;;- sign extension instructions ++ ++(define_insn "extendsidi2" ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=A,?r,?Ar,*o") ++ (sign_extend:DI (match_operand:SI 1 "register_operand" "0,0,r,*r"))) ++ (clobber (match_scratch:SI 2 "=X,X,X,&r"))] ++ "" ++ "#") ++ ++;; Extend to memory case when source register does die. ++(define_split ++ [(set (match_operand:DI 0 "memory_operand" "") ++ (sign_extend:DI (match_operand:SI 1 "register_operand" ""))) ++ (clobber (match_operand:SI 2 "register_operand" ""))] ++ "(flow2_completed ++ && dead_or_set_p (insn, operands[1]) ++ && !reg_mentioned_p (operands[1], operands[0]))" ++ [(set (match_dup 3) (match_dup 1)) ++ (set (match_dup 1) (ashiftrt:SI (match_dup 1) (const_int 31))) ++ (set (match_dup 4) (match_dup 1))] ++ "split_di (&operands[0], 1, &operands[3], &operands[4]);") ++ ++;; Extend to memory case when source register does not die. ++(define_split ++ [(set (match_operand:DI 0 "memory_operand" "") ++ (sign_extend:DI (match_operand:SI 1 "register_operand" ""))) ++ (clobber (match_operand:SI 2 "register_operand" ""))] ++ "flow2_completed" ++ [(const_int 0)] ++ " ++{ ++ split_di (&operands[0], 1, &operands[3], &operands[4]); ++ ++ emit_move_insn (operands[3], operands[1]); ++ ++ /* Generate a cltd if possible and doing so it profitable. */ ++ if (true_regnum (operands[1]) == 0 ++ && true_regnum (operands[2]) == 1 ++ && (optimize_size || !TARGET_PENTIUM)) ++ { ++ emit_insn (gen_ashrsi3_31 (operands[2], operands[1])); ++ } ++ else ++ { ++ emit_move_insn (operands[2], operands[1]); ++ emit_insn (gen_ashrsi3_31 (operands[2], operands[2])); ++ } ++ emit_move_insn (operands[4], operands[2]); ++ DONE; ++}") ++ ++;; Extend to register case. Optimize case where source and destination ++;; registers match and cases where we can use cltd. ++(define_split ++ [(set (match_operand:DI 0 "register_operand" "") ++ (sign_extend:DI (match_operand:SI 1 "register_operand" ""))) ++ (clobber (match_scratch:SI 2 ""))] ++ "reload_completed" ++ [(const_int 0)] ++ " ++{ ++ split_di (&operands[0], 1, &operands[3], &operands[4]); ++ ++ if (true_regnum (operands[3]) != true_regnum (operands[1])) ++ emit_move_insn (operands[3], operands[1]); ++ ++ /* Generate a cltd if possible and doing so it profitable. */ ++ if (true_regnum (operands[3]) == 0 ++ && (optimize_size || !TARGET_PENTIUM)) ++ { ++ emit_insn (gen_ashrsi3_31 (operands[4], operands[3])); ++ DONE; ++ } ++ ++ if (true_regnum (operands[4]) != true_regnum (operands[1])) ++ emit_move_insn (operands[4], operands[1]); ++ ++ emit_insn (gen_ashrsi3_31 (operands[4], operands[4])); ++ DONE; ++}") ++ ++;; Note that the i386 programmers' manual says that the opcodes ++;; are named movsx..., but the assembler on Unix does not accept that. ++;; We use what the Unix assembler expects. ++ ++(define_insn "extendhisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))] ++ "" ++ "* ++{ ++ if (REGNO (operands[0]) == 0 ++ && REG_P (operands[1]) && REGNO (operands[1]) == 0 ++ && (optimize_size || ix86_cpu != PROCESSOR_K6)) ++#ifdef INTEL_SYNTAX ++ return \"cwde\"; ++#else ++ return \"cwtl\"; ++#endif ++ ++#ifdef INTEL_SYNTAX ++ return AS2 (movsx,%1,%0); ++#else ++ return AS2 (movs%W0%L0,%1,%0); ++#endif ++}") ++ ++(define_insn "extendqihi2" ++ [(set (match_operand:HI 0 "register_operand" "=r") ++ (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "q")))] ++ "" ++ "* ++{ ++ if (REGNO (operands[0]) == 0 ++ && REG_P (operands[1]) && REGNO (operands[1]) == 0 ++ && (optimize_size || ix86_cpu != PROCESSOR_K6)) ++ return \"cbtw\"; ++ ++#ifdef INTEL_SYNTAX ++ return AS2 (movsx,%1,%0); ++#else ++ return AS2 (movs%B0%W0,%1,%0); ++#endif ++}") ++ ++(define_insn "extendqisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "q")))] ++ "" ++ "* ++{ ++#ifdef INTEL_SYNTAX ++ return AS2 (movsx,%1,%0); ++#else ++ return AS2 (movs%B0%L0,%1,%0); ++#endif ++}") ++ ++ ++;; Truncation of long long -> 32 bit ++ ++(define_expand "truncdisi2" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (truncate:SI (match_operand:DI 1 "nonimmediate_operand" "ro")))] ++ "" ++ " ++{ ++ /* Don't generate memory->memory moves, go through a register */ ++ if (TARGET_MOVE ++ && (reload_in_progress | reload_completed) == 0 ++ && GET_CODE (operands[0]) == MEM ++ && GET_CODE (operands[1]) == MEM) ++ { ++ rtx target = gen_reg_rtx (SImode); ++ emit_insn (gen_truncdisi2 (target, operands[1])); ++ emit_move_insn (operands[0], target); ++ DONE; ++ } ++}") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (truncate:SI (match_operand:DI 1 "nonimmediate_operand" "ro")))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ rtx low[2], high[2], xops[2]; ++ ++ split_di (&operands[1], 1, low, high); ++ xops[0] = operands[0]; ++ xops[1] = low[0]; ++ if (!rtx_equal_p (xops[0], xops[1])) ++ { ++ output_asm_insn (AS2 (mov%L0,%1,%0), xops); ++ ++ if (GET_CODE (operands[1]) == MEM) ++ { ++ output_asm_insn (AS1 (bswap,%0), xops); ++ } ++ } ++ ++ RET; ++}") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (truncate:SI (lshiftrt:DI (match_operand:DI 1 "nonimmediate_operand" "ro") ++ (const_int 32))))] ++ "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ rtx low[2], high[2], xops[2]; ++ ++ split_di (&operands[1], 1, low, high); ++ xops[0] = operands[0]; ++ xops[1] = high[0]; ++ if (!rtx_equal_p (xops[0], xops[1])) ++ { ++ output_asm_insn (AS2 (mov%L0,%1,%0), xops); ++ ++ if (GET_CODE (operands[1]) == MEM) ++ { ++ output_asm_insn (AS1 (bswap,%0), xops); ++ } ++ } ++ ++ RET; ++}") ++ ++ ++ ++;; Conversions between float and double. ++ ++(define_expand "extendsfdf2" ++ [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "") ++ (float_extend:DF ++ (match_operand:SF 1 "nonimmediate_operand" ""))) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3))])] ++ "TARGET_80387" ++ " ++{ ++ if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) ++ operands[1] = force_reg (SFmode, operands[1]); ++ ++ operands[2] = assign_386_stack_local (SFmode, 0); ++ operands[3] = assign_386_stack_local (DFmode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m,!f,!*r") ++ (float_extend:DF ++ (match_operand:SF 1 "nonimmediate_operand" "fm,f,*r,f"))) ++ (clobber (match_operand:SF 2 "memory_operand" "m,m,m,m")) ++ (clobber (match_operand:DF 3 "memory_operand" "m,m,m,o"))] ++ "TARGET_80387 && (GET_CODE (operands[0]) != MEM ++ || GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ output_float_extend (insn, operands); ++ return \"\"; ++}" ++ [(set_attr "type" "fld,fpop,fld,fpop")]) ++ ++(define_split ++ [(set (match_operand:DF 0 "register_operand" "") ++ (float_extend:DF (match_operand:SF 1 "register_operand" ""))) ++ (clobber (match_operand:SF 2 "memory_operand" "")) ++ (clobber (match_operand:DF 3 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[1])" ++ [(set (match_dup 2) ++ (match_dup 1)) ++ (set (match_dup 0) ++ (float_extend:DF (match_dup 2)))] ++ "") ++ ++(define_split ++ [(set (match_operand:DF 0 "register_operand" "") ++ (float_extend:DF (match_operand:SF 1 "register_operand" ""))) ++ (clobber (match_operand:SF 2 "memory_operand" "")) ++ (clobber (match_operand:DF 3 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[0])" ++ [(set (match_dup 3) ++ (float_extend:DF (match_dup 1))) ++ (set (match_dup 0) ++ (match_dup 3))] ++ "") ++ ++(define_split ++ [(set (match_operand:DF 0 "nonimmediate_operand" "") ++ (float_extend:DF (match_operand:SF 1 "nonimmediate_operand" ""))) ++ (clobber (match_operand:SF 2 "memory_operand" "")) ++ (clobber (match_operand:DF 3 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed" ++ [(set (match_dup 0) ++ (float_extend:DF (match_dup 1)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m") ++ (float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,f")))] ++ "TARGET_80387 && (GET_CODE (operands[0]) != MEM ++ || GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ output_float_extend (insn, operands); ++ return \"\"; ++}" ++ [(set_attr "type" "fld,fpop")]) ++ ++(define_expand "extenddfxf2" ++ [(parallel [(set (match_operand:XF 0 "nonimmediate_operand" "") ++ (float_extend:XF ++ (match_operand:DF 1 "nonimmediate_operand" ""))) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3))])] ++ "TARGET_80387" ++ " ++{ ++ if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) ++ operands[1] = force_reg (DFmode, operands[1]); ++ ++ operands[2] = assign_386_stack_local (DFmode, 0); ++ operands[3] = assign_386_stack_local (XFmode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,!f,!*r") ++ (float_extend:XF ++ (match_operand:DF 1 "nonimmediate_operand" "fm,f,*r,f"))) ++ (clobber (match_operand:DF 2 "memory_operand" "m,m,o,m")) ++ (clobber (match_operand:XF 3 "memory_operand" "m,m,m,o"))] ++ "TARGET_80387 && (GET_CODE (operands[0]) != MEM ++ || GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ output_float_extend (insn, operands); ++ return \"\"; ++}" ++ [(set_attr "type" "fld,fpop,fld,fpop")]) ++ ++(define_split ++ [(set (match_operand:XF 0 "register_operand" "") ++ (float_extend:XF (match_operand:DF 1 "register_operand" ""))) ++ (clobber (match_operand:DF 2 "memory_operand" "")) ++ (clobber (match_operand:XF 3 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[1])" ++ [(set (match_dup 2) ++ (match_dup 1)) ++ (set (match_dup 0) ++ (float_extend:XF (match_dup 2)))] ++ "") ++ ++(define_split ++ [(set (match_operand:XF 0 "register_operand" "") ++ (float_extend:XF (match_operand:DF 1 "register_operand" ""))) ++ (clobber (match_operand:DF 2 "memory_operand" "")) ++ (clobber (match_operand:XF 3 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[0])" ++ [(set (match_dup 3) ++ (float_extend:XF (match_dup 1))) ++ (set (match_dup 0) ++ (match_dup 3))] ++ "") ++ ++(define_split ++ [(set (match_operand:XF 0 "nonimmediate_operand" "") ++ (float_extend:XF (match_operand:DF 1 "nonimmediate_operand" ""))) ++ (clobber (match_operand:DF 2 "memory_operand" "")) ++ (clobber (match_operand:XF 3 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed" ++ [(set (match_dup 0) ++ (float_extend:XF (match_dup 1)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m") ++ (float_extend:XF (match_operand:DF 1 "nonimmediate_operand" "fm,f")))] ++ "TARGET_80387 && (GET_CODE (operands[0]) != MEM ++ || GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ output_float_extend (insn, operands); ++ return \"\"; ++}" ++ [(set_attr "type" "fld,fpop")]) ++ ++(define_expand "extendsfxf2" ++ [(parallel [(set (match_operand:XF 0 "nonimmediate_operand" "") ++ (float_extend:XF ++ (match_operand:SF 1 "nonimmediate_operand" ""))) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3))])] ++ "TARGET_80387" ++ " ++{ ++ if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) ++ operands[1] = force_reg (SFmode, operands[1]); ++ ++ operands[2] = assign_386_stack_local (SFmode, 0); ++ operands[3] = assign_386_stack_local (XFmode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,!f,!*r") ++ (float_extend:XF ++ (match_operand:SF 1 "nonimmediate_operand" "fm,f,*r,f"))) ++ (clobber (match_operand:SF 2 "memory_operand" "m,m,m,m")) ++ (clobber (match_operand:XF 3 "memory_operand" "m,m,m,o"))] ++ "TARGET_80387 && (GET_CODE (operands[0]) != MEM ++ || GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ output_float_extend (insn, operands); ++ return \"\"; ++}" ++ [(set_attr "type" "fld,fpop,fld,fpop")]) ++ ++(define_split ++ [(set (match_operand:XF 0 "register_operand" "") ++ (float_extend:XF (match_operand:SF 1 "register_operand" ""))) ++ (clobber (match_operand:SF 2 "memory_operand" "")) ++ (clobber (match_operand:XF 3 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[1])" ++ [(set (match_dup 2) ++ (match_dup 1)) ++ (set (match_dup 0) ++ (float_extend:XF (match_dup 2)))] ++ "") ++ ++(define_split ++ [(set (match_operand:XF 0 "register_operand" "") ++ (float_extend:XF (match_operand:SF 1 "register_operand" ""))) ++ (clobber (match_operand:SF 2 "memory_operand" "")) ++ (clobber (match_operand:XF 3 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[0])" ++ [(set (match_dup 3) ++ (float_extend:XF (match_dup 1))) ++ (set (match_dup 0) ++ (match_dup 3))] ++ "") ++ ++(define_split ++ [(set (match_operand:XF 0 "nonimmediate_operand" "") ++ (float_extend:XF (match_operand:SF 1 "nonimmediate_operand" ""))) ++ (clobber (match_operand:SF 2 "memory_operand" "")) ++ (clobber (match_operand:XF 3 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed" ++ [(set (match_dup 0) ++ (float_extend:XF (match_dup 1)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m") ++ (float_extend:XF ++ (match_operand:SF 1 "nonimmediate_operand" "fm,f")))] ++ "TARGET_80387 && (GET_CODE (operands[0]) != MEM ++ || GET_CODE (operands[1]) != MEM)" ++ "* ++{ ++ output_float_extend (insn, operands); ++ return \"\"; ++}" ++ [(set_attr "type" "fld,fpop")]) ++ ++(define_expand "truncdfsf2" ++ [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "") ++ (float_truncate:SF ++ (match_operand:DF 1 "register_operand" ""))) ++ (clobber (match_dup 2))])] ++ "TARGET_80387" ++ " ++{ ++ operands[2] = (rtx) assign_386_stack_local (SFmode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:SF 0 "nonimmediate_operand" "=f,m,!*r") ++ (float_truncate:SF ++ (match_operand:DF 1 "register_operand" "0,f,f"))) ++ (clobber (match_operand:SF 2 "memory_operand" "m,m,m"))] ++ "TARGET_80387" ++ "* ++{ ++ int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0; ++ rtx xops[1]; ++ ++ xops[0] = GET_CODE (operands[0]) == MEM ? operands[0] : operands[2]; ++ ++ if (stack_top_dies || STACK_REG_P (operands[0])) ++ output_asm_insn (AS1 (fstp%z0,%0), xops); ++ else ++ output_asm_insn (AS1 (fst%z0,%0), xops); ++ ++ if (STACK_REG_P (operands[0])) ++ return AS1 (fld%z2,%2); ++ else if (NON_STACK_REG_P (operands[0])) ++ return AS2 (mov%L0,%2,%0); ++ ++ return \"\"; ++}" ++ [(set_attr "type" "fpop")]) ++ ++;;(define_split ++;; [(set (match_operand:SF 0 "register_operand" "") ++;; (float_truncate:SF (match_operand:DF 1 "register_operand" ""))) ++;; (clobber (match_operand:SF 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (float_truncate:SF (match_dup 1))) ++;; (set (match_dup 0) ++;; (match_dup 2))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:SF 0 "memory_operand" "") ++;; (float_truncate:SF (match_operand:DF 1 "register_operand" ""))) ++;; (clobber (match_operand:SF 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float_truncate:SF (match_dup 1)))] ++;; "") ++ ++;; This cannot output into an f-reg because there is no way to be sure ++;; of truncating in that case. ++ ++(define_insn "" ++ [(set (match_operand:SF 0 "memory_operand" "=m") ++ (float_truncate:SF (match_operand:DF 1 "register_operand" "f")))] ++ "TARGET_80387" ++ "* ++{ ++ int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0; ++ ++ if (stack_top_dies) ++ return AS1 (fstp%z0,%0); ++ else ++ return AS1 (fst%z0,%0); ++}" ++ [(set_attr "type" "fpop")]) ++ ++(define_expand "truncxfsf2" ++ [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "") ++ (float_truncate:SF ++ (match_operand:XF 1 "register_operand" ""))) ++ (clobber (match_dup 2))])] ++ "TARGET_80387" ++ " ++{ ++ operands[2] = (rtx) assign_386_stack_local (SFmode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:SF 0 "nonimmediate_operand" "=f,m,!*r") ++ (float_truncate:SF ++ (match_operand:XF 1 "register_operand" "0,f,f"))) ++ (clobber (match_operand:SF 2 "memory_operand" "m,m,m"))] ++ "TARGET_80387" ++ "* ++{ ++ int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0; ++ rtx xops[1]; ++ ++ xops[0] = GET_CODE (operands[0]) == MEM ? operands[0] : operands[2]; ++ ++ if (stack_top_dies || STACK_REG_P (operands[0])) ++ output_asm_insn (AS1 (fstp%z0,%0), xops); ++ else ++ output_asm_insn (AS1 (fst%z0,%0), xops); ++ ++ if (STACK_REG_P (operands[0])) ++ return AS1 (fld%z2,%2); ++ else if (NON_STACK_REG_P (operands[0])) ++ return AS2 (mov%L0,%2,%0); ++ ++ return \"\"; ++}" ++ [(set_attr "type" "fpop")]) ++ ++(define_split ++ [(set (match_operand:SF 0 "register_operand" "") ++ (float_truncate:SF (match_operand:XF 1 "register_operand" ""))) ++ (clobber (match_operand:SF 2 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed" ++ [(set (match_dup 2) ++ (float_truncate:SF (match_dup 1))) ++ (set (match_dup 0) ++ (match_dup 2))] ++ "") ++ ++(define_split ++ [(set (match_operand:SF 0 "memory_operand" "") ++ (float_truncate:SF (match_operand:XF 1 "register_operand" ""))) ++ (clobber (match_operand:SF 2 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed" ++ [(set (match_dup 0) ++ (float_truncate:SF (match_dup 1)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:SF 0 "memory_operand" "=m") ++ (float_truncate:SF (match_operand:XF 1 "register_operand" "f")))] ++ "TARGET_80387" ++ "* ++{ ++ int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0; ++ ++ if (stack_top_dies) ++ return AS1 (fstp%z0,%0); ++ else ++ return AS1 (fst%z0,%0); ++}" ++ [(set_attr "type" "fpop")]) ++ ++(define_expand "truncxfdf2" ++ [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "") ++ (float_truncate:DF ++ (match_operand:XF 1 "register_operand" ""))) ++ (clobber (match_dup 2))])] ++ "TARGET_80387" ++ " ++{ ++ operands[2] = (rtx) assign_386_stack_local (DFmode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m,!*r") ++ (float_truncate:DF ++ (match_operand:XF 1 "register_operand" "0,f,f"))) ++ (clobber (match_operand:DF 2 "memory_operand" "m,m,o"))] ++ "TARGET_80387" ++ "* ++{ ++ int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0; ++ rtx xops[2]; ++ ++ xops[0] = GET_CODE (operands[0]) == MEM ? operands[0] : operands[2]; ++ ++ if (stack_top_dies || STACK_REG_P (operands[0])) ++ output_asm_insn (AS1 (fstp%z0,%0), xops); ++ else ++ output_asm_insn (AS1 (fst%z0,%0), xops); ++ ++ if (STACK_REG_P (operands[0])) ++ return AS1 (fld%z2,%2); ++ else if (NON_STACK_REG_P (operands[0])) ++ { ++ xops[0] = operands[0]; ++ xops[1] = operands[2]; ++ output_asm_insn (output_move_double (xops), xops); ++ } ++ ++ return \"\"; ++}" ++ [(set_attr "type" "fpop")]) ++ ++(define_split ++ [(set (match_operand:DF 0 "register_operand" "") ++ (float_truncate:DF (match_operand:XF 1 "register_operand" ""))) ++ (clobber (match_operand:DF 2 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed" ++ [(set (match_dup 2) ++ (float_truncate:DF (match_dup 1))) ++ (set (match_dup 0) ++ (match_dup 2))] ++ "") ++ ++(define_split ++ [(set (match_operand:DF 0 "memory_operand" "") ++ (float_truncate:DF (match_operand:XF 1 "register_operand" ""))) ++ (clobber (match_operand:DF 2 "memory_operand" ""))] ++ "TARGET_80387 && reload_completed" ++ [(set (match_dup 0) ++ (float_truncate:DF (match_dup 1)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "memory_operand" "=m") ++ (float_truncate:DF (match_operand:XF 1 "register_operand" "f")))] ++ "TARGET_80387" ++ "* ++{ ++ int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0; ++ ++ if (stack_top_dies) ++ return AS1 (fstp%z0,%0); ++ else ++ return AS1 (fst%z0,%0); ++}" ++ [(set_attr "type" "fpop")]) ++ ++;; Conversions between floating point and fix point. ++ ++(define_expand "fix_truncsfsi2" ++ [(parallel [(set (match_operand:SI 0 "register_operand" "") ++ (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "")))) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3)) ++ (clobber (match_dup 4)) ++ (clobber (match_scratch:HI 5 ""))])] ++ "TARGET_80387" ++ " ++{ ++ operands[2] = (rtx) assign_386_stack_local (HImode, 0); ++ operands[3] = (rtx) assign_386_stack_local (HImode, 1); ++ operands[4] = (rtx) assign_386_stack_local (SImode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=&r") ++ (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "f")))) ++ (clobber (match_operand:HI 2 "memory_operand" "m")) ++ (clobber (match_operand:HI 3 "memory_operand" "m")) ++ (clobber (match_operand:SI 4 "memory_operand" "m")) ++ (clobber (match_scratch:HI 5 "=&r"))] ++ "TARGET_80387" ++ "* return output_fix_trunc (insn, operands);" ++ [(set_attr "type" "fpop")]) ++ ++(define_expand "fix_truncsfdi2" ++ [(parallel [(set (match_operand:DI 0 "nonimmediate_operand" "") ++ (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "")))) ++ (clobber (match_dup 1)) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3)) ++ (clobber (match_dup 4)) ++ (clobber (match_scratch:HI 5 ""))])] ++ "TARGET_80387" ++ " ++{ ++ operands[1] = copy_to_mode_reg (SFmode, operands[1]); ++ operands[2] = (rtx) assign_386_stack_local (HImode, 0); ++ operands[3] = (rtx) assign_386_stack_local (HImode, 1); ++ operands[4] = (rtx) assign_386_stack_local (DImode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=m,!&r") ++ (fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f,f")))) ++ (clobber (match_dup 1)) ++ (clobber (match_operand:HI 2 "memory_operand" "m,m")) ++ (clobber (match_operand:HI 3 "memory_operand" "m,m")) ++ (clobber (match_operand:DI 4 "memory_operand" "m,o")) ++ (clobber (match_scratch:HI 5 "=&r,&r"))] ++ "TARGET_80387" ++ "* return output_fix_trunc (insn, operands);" ++ [(set_attr "type" "fpop")]) ++ ++(define_expand "fix_truncdfsi2" ++ [(parallel [(set (match_operand:SI 0 "register_operand" "") ++ (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "")))) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3)) ++ (clobber (match_dup 4)) ++ (clobber (match_scratch:HI 5 ""))])] ++ "TARGET_80387" ++ " ++{ ++ operands[2] = (rtx) assign_386_stack_local (HImode, 0); ++ operands[3] = (rtx) assign_386_stack_local (HImode, 1); ++ operands[4] = (rtx) assign_386_stack_local (SImode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=&r") ++ (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "f")))) ++ (clobber (match_operand:HI 2 "memory_operand" "m")) ++ (clobber (match_operand:HI 3 "memory_operand" "m")) ++ (clobber (match_operand:SI 4 "memory_operand" "m")) ++ (clobber (match_scratch:HI 5 "=&r"))] ++ "TARGET_80387" ++ "* return output_fix_trunc (insn, operands);" ++ [(set_attr "type" "fpop")]) ++ ++(define_expand "fix_truncdfdi2" ++ [(parallel [(set (match_operand:DI 0 "nonimmediate_operand" "") ++ (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "")))) ++ (clobber (match_dup 1)) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3)) ++ (clobber (match_dup 4)) ++ (clobber (match_scratch:HI 5 ""))])] ++ "TARGET_80387" ++ " ++{ ++ operands[1] = copy_to_mode_reg (DFmode, operands[1]); ++ operands[2] = (rtx) assign_386_stack_local (HImode, 0); ++ operands[3] = (rtx) assign_386_stack_local (HImode, 1); ++ operands[4] = (rtx) assign_386_stack_local (DImode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=m,!&r") ++ (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "f,f")))) ++ (clobber (match_dup 1)) ++ (clobber (match_operand:HI 2 "memory_operand" "m,m")) ++ (clobber (match_operand:HI 3 "memory_operand" "m,m")) ++ (clobber (match_operand:DI 4 "memory_operand" "m,o")) ++ (clobber (match_scratch:HI 5 "=&r,&r"))] ++ "TARGET_80387" ++ "* return output_fix_trunc (insn, operands);" ++ [(set_attr "type" "fpop")]) ++ ++(define_expand "fix_truncxfsi2" ++ [(parallel [(set (match_operand:SI 0 "register_operand" "") ++ (fix:SI (fix:XF (match_operand:XF 1 "register_operand" "")))) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3)) ++ (clobber (match_dup 4)) ++ (clobber (match_scratch:HI 5 ""))])] ++ "TARGET_80387" ++ " ++{ ++ operands[2] = (rtx) assign_386_stack_local (HImode, 0); ++ operands[3] = (rtx) assign_386_stack_local (HImode, 1); ++ operands[4] = (rtx) assign_386_stack_local (SImode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=&r") ++ (fix:SI (fix:XF (match_operand:XF 1 "register_operand" "f")))) ++ (clobber (match_operand:HI 2 "memory_operand" "m")) ++ (clobber (match_operand:HI 3 "memory_operand" "m")) ++ (clobber (match_operand:SI 4 "memory_operand" "m")) ++ (clobber (match_scratch:HI 5 "=&r"))] ++ "TARGET_80387" ++ "* return output_fix_trunc (insn, operands);" ++ [(set_attr "type" "fpop")]) ++ ++(define_expand "fix_truncxfdi2" ++ [(parallel [(set (match_operand:DI 0 "nonimmediate_operand" "") ++ (fix:DI (fix:XF (match_operand:XF 1 "register_operand" "")))) ++ (clobber (match_dup 1)) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3)) ++ (clobber (match_dup 4)) ++ (clobber (match_scratch:HI 5 ""))])] ++ "TARGET_80387" ++ " ++{ ++ operands[1] = copy_to_mode_reg (XFmode, operands[1]); ++ operands[2] = (rtx) assign_386_stack_local (HImode, 0); ++ operands[3] = (rtx) assign_386_stack_local (HImode, 1); ++ operands[4] = (rtx) assign_386_stack_local (DImode, 0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=m,!&r") ++ (fix:DI (fix:XF (match_operand:XF 1 "register_operand" "f,f")))) ++ (clobber (match_dup 1)) ++ (clobber (match_operand:HI 2 "memory_operand" "m,m")) ++ (clobber (match_operand:HI 3 "memory_operand" "m,m")) ++ (clobber (match_operand:DI 4 "memory_operand" "m,o")) ++ (clobber (match_scratch:HI 5 "=&r,&r"))] ++ "TARGET_80387" ++ "* return output_fix_trunc (insn, operands);" ++ [(set_attr "type" "fpop")]) ++ ++;; Conversion between fixed point and floating point. ++ ++;; ??? Possibly represent floatunssidf2 here in gcc2. ++ ++;;(define_expand "floatsisf2" ++;; [(parallel [(set (match_operand:SF 0 "register_operand" "") ++;; (float:SF (match_operand:SI 1 "nonimmediate_operand" ""))) ++;; (clobber (match_dup 2))])] ++;; "TARGET_80387" ++;; "operands[2] = assign_386_stack_local (SImode, 0);") ++ ++;;(define_insn "" ++;; [(set (match_operand:SF 0 "register_operand" "=f,f") ++;; (float:SF (match_operand:SI 1 "nonimmediate_operand" "m,!r"))) ++;; (clobber (match_operand:SI 2 "memory_operand" "m,m"))] ++;; "TARGET_80387" ++;; "#") ++ ++;;(define_split ++;; [(set (match_operand:SF 0 "register_operand" "") ++;; (float:SF (match_operand:SI 1 "memory_operand" ""))) ++;; (clobber (match_operand:SI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float:SF (match_dup 1)))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:SF 0 "register_operand" "") ++;; (float:SF (match_operand:SI 1 "register_operand" ""))) ++;; (clobber (match_operand:SI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (match_dup 1)) ++;; (set (match_dup 0) ++;; (float:SF (match_dup 2)))] ++;; "") ++ ++(define_insn "floatsisf2" ++ [(set (match_operand:SF 0 "register_operand" "=f") ++ (float:SF (match_operand:SI 1 "register_operand" "r")))] ++ "TARGET_80387" ++ "* ++{ ++ output_asm_insn (AS1 (push%z1,%1), operands); ++ output_asm_insn (AS1 (fild%z1,(%%esp)), operands); ++ output_asm_insn (AS2 (add%L0,$4,%%esp), operands); ++ RET; ++}" ++ [(set_attr "type" "fpop")]) ++ ++;;(define_expand "floathisf2" ++;; [(parallel [(set (match_operand:SF 0 "register_operand" "") ++;; (float:SF (match_operand:HI 1 "nonimmediate_operand" ""))) ++;; (clobber (match_dup 2))])] ++;; "TARGET_80387" ++;; "operands[2] = assign_386_stack_local (HImode, 0);") ++ ++;;(define_insn "" ++;; [(set (match_operand:SF 0 "register_operand" "=f,f") ++;; (float:SF (match_operand:HI 1 "nonimmediate_operand" "m,!r"))) ++;; (clobber (match_operand:HI 2 "memory_operand" "m,m"))] ++;; "TARGET_80387" ++;; "#") ++ ++;;(define_split ++;; [(set (match_operand:SF 0 "register_operand" "") ++;; (float:SF (match_operand:HI 1 "memory_operand" ""))) ++;; (clobber (match_operand:HI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float:SF (match_dup 1)))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:SF 0 "register_operand" "") ++;; (float:SF (match_operand:HI 1 "register_operand" ""))) ++;; (clobber (match_operand:HI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (match_dup 1)) ++;; (set (match_dup 0) ++;; (float:SF (match_dup 2)))] ++;; "") ++ ++(define_insn "floathisf2" ++ [(set (match_operand:SF 0 "register_operand" "=f") ++ (float:SF (match_operand:HI 1 "register_operand" "r")))] ++ "TARGET_80387" ++ "* ++{ ++ output_asm_insn (AS1 (push%z1,%1), operands); ++ output_asm_insn (AS1 (fild%z1,(%%esp)), operands); ++ output_asm_insn (AS2 (add%L0,$2,%%esp), operands); ++ RET; ++}" ++ [(set_attr "type" "fpop")]) ++ ++;;(define_expand "floatdisf2" ++;; [(parallel [(set (match_operand:SF 0 "register_operand" "") ++;; (float:SF (match_operand:DI 1 "nonimmediate_operand" ""))) ++;; (clobber (match_dup 2))])] ++;; "TARGET_80387" ++;; "operands[2] = assign_386_stack_local (DImode, 0);") ++ ++;;(define_insn "" ++;; [(set (match_operand:SF 0 "register_operand" "=f,f") ++;; (float:SF (match_operand:DI 1 "nonimmediate_operand" "m,!r"))) ++;; (clobber (match_operand:DI 2 "memory_operand" "m,o"))] ++;; "TARGET_80387" ++;; "#") ++ ++;;(define_split ++;; [(set (match_operand:SF 0 "register_operand" "") ++;; (float:SF (match_operand:DI 1 "memory_operand" ""))) ++;; (clobber (match_operand:DI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float:SF (match_dup 1)))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:SF 0 "register_operand" "") ++;; (float:SF (match_operand:DI 1 "register_operand" ""))) ++;; (clobber (match_operand:DI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (match_dup 1)) ++;; (set (match_dup 0) ++;; (float:SF (match_dup 2)))] ++;; "") ++ ++;;(define_insn "" ++;; [(set (match_operand:SF 0 "register_operand" "=f") ++;; (float:SF (match_operand:DI 1 "register_operand" "")))] ++;; "TARGET_80387" ++;; "* return AS1 (fild%z1,%1);" ++;; [(set_attr "type" "fpop")]) ++ ++;;(define_expand "floatsidf2" ++;; [(parallel [(set (match_operand:DF 0 "register_operand" "") ++;; (float:DF (match_operand:SI 1 "nonimmediate_operand" ""))) ++;; (clobber (match_dup 2))])] ++;; "TARGET_80387" ++;; "operands[2] = assign_386_stack_local (SImode, 0);") ++ ++;;(define_insn "" ++;; [(set (match_operand:DF 0 "register_operand" "=f,f") ++;; (float:DF (match_operand:SI 1 "nonimmediate_operand" "m,!r"))) ++;; (clobber (match_operand:SI 2 "memory_operand" "m,m"))] ++;; "TARGET_80387" ++;; "#") ++ ++;;(define_split ++;; [(set (match_operand:DF 0 "register_operand" "") ++;; (float:DF (match_operand:SI 1 "memory_operand" ""))) ++;; (clobber (match_operand:SI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float:DF (match_dup 1)))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:DF 0 "register_operand" "") ++;; (float:DF (match_operand:SI 1 "register_operand" ""))) ++;; (clobber (match_operand:SI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (match_dup 1)) ++;; (set (match_dup 0) ++;; (float:DF (match_dup 2)))] ++;; "") ++ ++(define_insn "floatsidf2" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (float:DF (match_operand:SI 1 "register_operand" "r")))] ++ "TARGET_80387" ++ "* ++{ ++ output_asm_insn (AS1 (push%z1,%1), operands); ++ output_asm_insn (AS1 (fild%z1,(%%esp)), operands); ++ output_asm_insn (AS2 (add%L0,$4,%%esp), operands); ++ RET; ++}" ++ [(set_attr "type" "fpop")]) ++ ++;;(define_expand "floathidf2" ++;; [(parallel [(set (match_operand:DF 0 "register_operand" "") ++;; (float:DF (match_operand:HI 1 "nonimmediate_operand" ""))) ++;; (clobber (match_dup 2))])] ++;; "TARGET_80387" ++;; "operands[2] = assign_386_stack_local (HImode, 0);") ++ ++;;(define_insn "" ++;; [(set (match_operand:DF 0 "register_operand" "=f,f") ++;; (float:DF (match_operand:HI 1 "nonimmediate_operand" "m,!r"))) ++;; (clobber (match_operand:HI 2 "memory_operand" "m,m"))] ++;; "TARGET_80387" ++;; "#") ++ ++;;(define_split ++;; [(set (match_operand:DF 0 "register_operand" "") ++;; (float:DF (match_operand:HI 1 "memory_operand" ""))) ++;; (clobber (match_operand:HI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float:DF (match_dup 1)))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:DF 0 "register_operand" "") ++;; (float:DF (match_operand:HI 1 "register_operand" ""))) ++;; (clobber (match_operand:HI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (match_dup 1)) ++;; (set (match_dup 0) ++;; (float:DF (match_dup 2)))] ++;; "") ++ ++(define_insn "floathidf2" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (float:DF (match_operand:HI 1 "register_operand" "r")))] ++ "TARGET_80387" ++ "* ++{ ++ output_asm_insn (AS1 (push%z1,%1), operands); ++ output_asm_insn (AS1 (fild%z1,(%%esp)), operands); ++ output_asm_insn (AS2 (add%L0,$2,%%esp), operands); ++ RET; ++}" ++ [(set_attr "type" "fpop")]) ++ ++;;(define_expand "floatdidf2" ++;; [(parallel [(set (match_operand:DF 0 "register_operand" "") ++;; (float:DF (match_operand:DI 1 "nonimmediate_operand" ""))) ++;; (clobber (match_dup 2))])] ++;; "TARGET_80387" ++;; "operands[2] = assign_386_stack_local (DImode, 0);") ++ ++;;(define_insn "" ++;; [(set (match_operand:DF 0 "register_operand" "=f,f") ++;; (float:DF (match_operand:DI 1 "nonimmediate_operand" "m,!r"))) ++;; (clobber (match_operand:DI 2 "memory_operand" "m,o"))] ++;; "TARGET_80387" ++;; "#") ++ ++;;(define_split ++;; [(set (match_operand:DF 0 "register_operand" "") ++;; (float:DF (match_operand:DI 1 "memory_operand" ""))) ++;; (clobber (match_operand:DI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float:DF (match_dup 1)))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:DF 0 "register_operand" "") ++;; (float:DF (match_operand:DI 1 "register_operand" ""))) ++;; (clobber (match_operand:DI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (match_dup 1)) ++;; (set (match_dup 0) ++;; (float:DF (match_dup 2)))] ++;; "") ++ ++;;(define_insn "" ++;; [(set (match_operand:DF 0 "register_operand" "=f") ++;; (float:DF (match_operand:DI 1 "memory_operand" "m")))] ++;; "TARGET_80387" ++;; "* return AS1 (fild%z1,%1);" ++;; [(set_attr "type" "fpop")]) ++ ++;;(define_expand "floatsixf2" ++;; [(parallel [(set (match_operand:XF 0 "register_operand" "") ++;; (float:XF (match_operand:SI 1 "nonimmediate_operand" ""))) ++;; (clobber (match_dup 2))])] ++;; "TARGET_80387" ++;; "operands[2] = assign_386_stack_local (SImode, 0);") ++ ++;;(define_insn "" ++;; [(set (match_operand:XF 0 "register_operand" "=f,f") ++;; (float:XF (match_operand:SI 1 "nonimmediate_operand" "m,!r"))) ++;; (clobber (match_operand:SI 2 "memory_operand" "m,m"))] ++;; "TARGET_80387" ++;; "#") ++ ++;;(define_split ++;; [(set (match_operand:XF 0 "register_operand" "") ++;; (float:XF (match_operand:SI 1 "memory_operand" ""))) ++;; (clobber (match_operand:SI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float:XF (match_dup 1)))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:XF 0 "register_operand" "") ++;; (float:XF (match_operand:SI 1 "register_operand" ""))) ++;; (clobber (match_operand:SI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (match_dup 1)) ++;; (set (match_dup 0) ++;; (float:XF (match_dup 2)))] ++;; "") ++ ++(define_insn "floatsixf2" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (float:XF (match_operand:SI 1 "register_operand" "r")))] ++ "TARGET_80387" ++ "* ++{ ++ output_asm_insn (AS1 (push%z1,%1), operands); ++ output_asm_insn (AS1 (fild%z1,(%%esp)), operands); ++ output_asm_insn (AS2 (add%L0,$4,%%esp), operands); ++ RET; ++}" ++ [(set_attr "type" "fpop")]) ++ ++;;(define_expand "floathixf2" ++;; [(parallel [(set (match_operand:XF 0 "register_operand" "") ++;; (float:XF (match_operand:HI 1 "nonimmediate_operand" ""))) ++;; (clobber (match_dup 2))])] ++;; "TARGET_80387" ++;; "operands[2] = assign_386_stack_local (HImode, 0);") ++ ++;;(define_insn "" ++;; [(set (match_operand:XF 0 "register_operand" "=f,f") ++;; (float:XF (match_operand:HI 1 "nonimmediate_operand" "m,!r"))) ++;; (clobber (match_operand:HI 2 "memory_operand" "m,m"))] ++;; "TARGET_80387" ++;; "#") ++ ++;;(define_split ++;; [(set (match_operand:XF 0 "register_operand" "") ++;; (float:XF (match_operand:HI 1 "memory_operand" ""))) ++;; (clobber (match_operand:HI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float:XF (match_dup 1)))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:XF 0 "register_operand" "") ++;; (float:XF (match_operand:HI 1 "register_operand" ""))) ++;; (clobber (match_operand:HI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (match_dup 1)) ++;; (set (match_dup 0) ++;; (float:XF (match_dup 2)))] ++;; "") ++ ++(define_insn "floathixf2" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (float:XF (match_operand:HI 1 "register_operand" "r")))] ++ "TARGET_80387" ++ "* ++{ ++ output_asm_insn (AS1 (push%z1,%1), operands); ++ output_asm_insn (AS1 (fild%z1,(%%esp)), operands); ++ output_asm_insn (AS2 (add%L0,$2,%%esp), operands); ++ RET; ++}" ++ [(set_attr "type" "fpop")]) ++ ++;;(define_expand "floatdixf2" ++;; [(parallel [(set (match_operand:XF 0 "register_operand" "") ++;; (float:XF (match_operand:DI 1 "nonimmediate_operand" ""))) ++;; (clobber (match_dup 2))])] ++;; "TARGET_80387" ++;; "operands[2] = assign_386_stack_local (DImode, 0);") ++ ++;;(define_insn "" ++;; [(set (match_operand:XF 0 "register_operand" "=f,f") ++;; (float:XF (match_operand:DI 1 "nonimmediate_operand" "m,!r"))) ++;; (clobber (match_operand:DI 2 "memory_operand" "m,o"))] ++;; "TARGET_80387" ++;; "#") ++ ++;;(define_split ++;; [(set (match_operand:XF 0 "register_operand" "") ++;; (float:XF (match_operand:DI 1 "memory_operand" ""))) ++;; (clobber (match_operand:DI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 0) ++;; (float:XF (match_dup 1)))] ++;; "") ++ ++;;(define_split ++;; [(set (match_operand:XF 0 "register_operand" "") ++;; (float:XF (match_operand:DI 1 "register_operand" ""))) ++;; (clobber (match_operand:DI 2 "memory_operand" ""))] ++;; "TARGET_80387 && reload_completed" ++;; [(set (match_dup 2) ++;; (match_dup 1)) ++;; (set (match_dup 0) ++;; (float:XF (match_dup 2)))] ++;; "") ++ ++;;(define_insn "" ++;; [(set (match_operand:XF 0 "register_operand" "=f") ++;; (float:XF (match_operand:DI 1 "register_operand" "")))] ++;; "TARGET_80387" ++;; "* return AS1 (fild%z1,%1);" ++;; [(set_attr "type" "fpop")]) ++ ++;;- add instructions ++ ++;;(define_insn "*addsidi3_1" ++;; [(set (match_operand:DI 0 "nonimmediate_operand" "=&r,r,o,!&r,!r,o,!o") ++;; (plus:DI (match_operand:DI 1 "general_operand" "0,0,0,o,riF,riF,o") ++;; (zero_extend:DI (match_operand:SI 2 "general_operand" "o,ri,ri,roi,roi,ri,ri")))) ++;; (clobber (match_scratch:SI 3 "=X,X,X,X,X,X,&r"))] ++(define_insn "*addsidi3_1" ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,!r") ++ (plus:DI (match_operand:DI 1 "general_operand" "0,riF") ++ (zero_extend:DI (match_operand:SI 2 "general_operand" "ri,ri")))) ++ (clobber (match_scratch:SI 3 "=X,X"))] ++ "" ++ "* ++{ ++ rtx low[3], high[3], xops[7]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 2, low, high); ++ high[2] = const0_rtx; ++ low[2] = operands[2]; ++ ++ if (!rtx_equal_p (operands[0], operands[1])) ++ { ++ xops[0] = high[0]; ++ xops[1] = low[0]; ++ xops[2] = high[1]; ++ xops[3] = low[1]; ++ ++ if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) ++ { ++ output_asm_insn (AS2 (mov%L1,%3,%1), xops); ++ output_asm_insn (AS2 (mov%L0,%2,%0), xops); ++ } ++ else ++ { ++ xops[4] = high[2]; ++ xops[5] = low[2]; ++ xops[6] = operands[3]; ++ output_asm_insn (AS2 (mov%L6,%3,%6), xops); ++ output_asm_insn (AS2 (add%L6,%5,%6), xops); ++ output_asm_insn (AS2 (mov%L1,%6,%1), xops); ++ output_asm_insn (AS2 (mov%L6,%2,%6), xops); ++ output_asm_insn (AS2 (adc%L6,%4,%6), xops); ++ output_asm_insn (AS2 (mov%L0,%6,%0), xops); ++ RET; ++ } ++ } ++ ++ output_asm_insn (AS2 (add%L0,%2,%0), low); ++ output_asm_insn (AS2 (adc%L0,%2,%0), high); ++ cc_status.value1 = high[0]; ++ cc_status.flags = CC_NO_OVERFLOW; ++ RET; ++}" ++ [(set_attr "type" "binary")]) ++ ++;;(define_insn "addsidi3_2" ++;; [(set (match_operand:DI 0 "nonimmediate_operand" "=&r,r,o,&r,!&r,&r,o,o,!o") ++;; (plus:DI (zero_extend:DI (match_operand:SI 2 "general_operand" "o,ri,ri,o,o,ri,ri,i,r")) ++;; (match_operand:DI 1 "general_operand" "0,0,0,iF,ro,roiF,riF,o,o"))) ++;; (clobber (match_scratch:SI 3 "=X,X,X,X,X,X,X,&r,&r"))] ++(define_insn "addsidi3_2" ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=r") ++ (plus:DI (zero_extend:DI (match_operand:SI 2 "general_operand" "ri")) ++ (match_operand:DI 1 "general_operand" "0"))) ++ (clobber (match_scratch:SI 3 "=X"))] ++ "" ++ "* ++{ ++ rtx low[3], high[3], xops[7]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 2, low, high); ++ high[2] = const0_rtx; ++ low[2] = operands[2]; ++ ++ if (!rtx_equal_p (operands[0], operands[1])) ++ { ++ xops[0] = high[0]; ++ xops[1] = low[0]; ++ xops[2] = high[1]; ++ xops[3] = low[1]; ++ ++ if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) ++ { ++ if (rtx_equal_p (low[0], operands[2])) ++ { ++ output_asm_insn (AS2 (mov%L0,%2,%0), high); ++ output_asm_insn (AS2 (add%L0,%1,%0), low); ++ output_asm_insn (AS2 (adc%L0,%1,%0), high); ++ RET; ++ } ++ if (rtx_equal_p (high[0], operands[2])) ++ { ++ if (GET_CODE (operands[0]) != MEM) ++ { ++ output_asm_insn (AS2 (mov%L0,%2,%0), low); ++ output_asm_insn (AS2 (mov%L0,%2,%0), high); ++ output_asm_insn (AS2 (add%L0,%1,%0), low); ++ output_asm_insn (AS2 (adc%L0,%1,%0), high); ++ } ++ else ++ { ++ /* It's too late to ask for a scratch now - but this ++ will probably not happen too often. */ ++ output_asm_insn (AS2 (add%L1,%2,%1), low); ++ output_asm_insn (AS2 (mov%L0,%1,%0), low); ++ output_asm_insn (AS2 (mov%L1,%2,%1), low); ++ output_asm_insn (AS2 (mov%L0,%2,%0), high); ++ output_asm_insn (AS2 (adc%L0,%1,%0), high); ++ output_asm_insn (AS2 (sub%L1,%0,%1), low); ++ output_asm_insn (AS1 (neg%L1,%1), low); ++ } ++ RET; ++ } ++ output_asm_insn (AS2 (mov%L1,%3,%1), xops); ++ output_asm_insn (AS2 (mov%L0,%2,%0), xops); ++ } ++ else ++ { ++ xops[4] = high[2]; ++ xops[5] = low[2]; ++ xops[6] = operands[3]; ++ output_asm_insn (AS2 (mov%L6,%3,%6), xops); ++ output_asm_insn (AS2 (add%L6,%5,%6), xops); ++ output_asm_insn (AS2 (mov%L1,%6,%1), xops); ++ output_asm_insn (AS2 (mov%L6,%2,%6), xops); ++ output_asm_insn (AS2 (adc%L6,%4,%6), xops); ++ output_asm_insn (AS2 (mov%L0,%6,%0), xops); ++ RET; ++ } ++ } ++ ++ output_asm_insn (AS2 (add%L0,%2,%0), low); ++ output_asm_insn (AS2 (adc%L0,%2,%0), high); ++ cc_status.value1 = high[0]; ++ cc_status.flags = CC_NO_OVERFLOW; ++ RET; ++}" ++ [(set_attr "type" "binary")]) ++ ++;;(define_insn "adddi3" ++;; [(set (match_operand:DI 0 "general_operand" "=&r,&ro,!r,o,!&r,!o,!o") ++;; (plus:DI (match_operand:DI 1 "general_operand" "%0,0,0,0iF,or,riF,o") ++;; (match_operand:DI 2 "general_operand" "o,riF,0,or,or,oriF,o"))) ++;; (clobber (match_scratch:SI 3 "=X,X,X,&r,X,&r,&r"))] ++(define_insn "adddi3" ++ [(set (match_operand:DI 0 "general_operand" "=&r,!r,!&r") ++ (plus:DI (match_operand:DI 1 "general_operand" "%0,0,r") ++ (match_operand:DI 2 "general_operand" "riF,0,r"))) ++ (clobber (match_scratch:SI 3 "=X,X,X"))] ++ "" ++ "* ++{ ++ rtx low[3], high[3], xops[7], temp; ++ ++ CC_STATUS_INIT; ++ ++ if (rtx_equal_p (operands[0], operands[2])) ++ { ++ temp = operands[1]; ++ operands[1] = operands[2]; ++ operands[2] = temp; ++ } ++ ++ split_di (operands, 3, low, high); ++ if (!rtx_equal_p (operands[0], operands[1])) ++ { ++ xops[0] = high[0]; ++ xops[1] = low[0]; ++ xops[2] = high[1]; ++ xops[3] = low[1]; ++ ++ if (GET_CODE (operands[0]) != MEM) ++ { ++ output_asm_insn (AS2 (mov%L1,%3,%1), xops); ++ output_asm_insn (AS2 (mov%L0,%2,%0), xops); ++ } ++ else ++ { ++ xops[4] = high[2]; ++ xops[5] = low[2]; ++ xops[6] = operands[3]; ++ output_asm_insn (AS2 (mov%L6,%3,%6), xops); ++ output_asm_insn (AS2 (add%L6,%5,%6), xops); ++ output_asm_insn (AS2 (mov%L1,%6,%1), xops); ++ output_asm_insn (AS2 (mov%L6,%2,%6), xops); ++ output_asm_insn (AS2 (adc%L6,%4,%6), xops); ++ output_asm_insn (AS2 (mov%L0,%6,%0), xops); ++ RET; ++ } ++ } ++ ++ cc_status.value1 = high[0]; ++ cc_status.flags = CC_NO_OVERFLOW; ++ ++ if (GET_CODE (operands[3]) == REG && GET_CODE (operands[2]) != REG) ++ { ++ xops[0] = high[0]; ++ xops[1] = low[0]; ++ xops[2] = high[2]; ++ xops[3] = low[2]; ++ xops[4] = operands[3]; ++ ++ output_asm_insn (AS2 (mov%L4,%3,%4), xops); ++ output_asm_insn (AS2 (add%L1,%4,%1), xops); ++ output_asm_insn (AS2 (mov%L4,%2,%4), xops); ++ output_asm_insn (AS2 (adc%L0,%4,%0), xops); ++ } ++ ++ else if (GET_CODE (low[2]) != CONST_INT || INTVAL (low[2]) != 0) ++ { ++ output_asm_insn (AS2 (add%L0,%2,%0), low); ++ output_asm_insn (AS2 (adc%L0,%2,%0), high); ++ } ++ ++ else ++ output_asm_insn (AS2 (add%L0,%2,%0), high); ++ ++ RET; ++}" ++ [(set_attr "type" "binary")]) ++ ++;; On a 486, it is faster to do movl/addl than to do a single leal if ++;; operands[1] and operands[2] are both registers. ++ ++(define_expand "addsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "") ++ (plus:SI (match_operand:SI 1 "nonimmediate_operand" "") ++ (match_operand:SI 2 "general_operand" "")))] ++ "" ++ "IX86_EXPAND_BINARY_OPERATOR (PLUS, SImode, operands);") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r") ++ (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,r") ++ (match_operand:SI 2 "general_operand" "ri,ri,ri")))] ++ "ix86_binary_operator_ok (PLUS, SImode, operands)" ++ "* ++{ ++ if (REG_P (operands[0]) && REG_P (operands[1]) ++ && (REG_P (operands[2]) || CONSTANT_P (operands[2])) ++ && REGNO (operands[0]) != REGNO (operands[1])) ++ { ++ if (REG_P (operands[2]) && REGNO (operands[0]) == REGNO (operands[2])) ++ return AS2 (add%L0,%1,%0); ++ ++ if (operands[2] == stack_pointer_rtx) ++ { ++ rtx temp; ++ ++ temp = operands[1]; ++ operands[1] = operands[2]; ++ operands[2] = temp; ++ } ++ ++ if (operands[2] != stack_pointer_rtx) ++ { ++ CC_STATUS_INIT; ++ operands[1] = SET_SRC (PATTERN (insn)); ++ return AS2 (lea%L0,%a1,%0); ++ } ++ } ++ ++ if (!rtx_equal_p (operands[0], operands[1])) ++ output_asm_insn (AS2 (mov%L0,%1,%0), operands); ++ ++ if (operands[2] == const1_rtx) ++ return AS1 (inc%L0,%0); ++ ++ if (operands[2] == constm1_rtx) ++ return AS1 (dec%L0,%0); ++ ++ /* subl $-128,%ebx is smaller than addl $128,%ebx. */ ++ if (GET_CODE (operands[2]) == CONST_INT ++ && INTVAL (operands[2]) == 128) ++ { ++ /* This doesn't compute the carry bit in the same way ++ * as add%L0, but we use inc and dec above and they ++ * don't set the carry bit at all. If inc/dec don't need ++ * a CC_STATUS_INIT, this doesn't either... */ ++ operands[2] = GEN_INT (-128); ++ return AS2 (sub%L0,%2,%0); ++ } ++ ++ return AS2 (add%L0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++;; addsi3 is faster, so put this after. ++ ++(define_insn "movsi_lea" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (match_operand:QI 1 "address_operand" "p"))] ++ "" ++ "* ++{ ++ /* Adding a constant to a register is faster with an add. */ ++ /* ??? can this ever happen? */ ++ if (GET_CODE (operands[1]) == PLUS ++ && GET_CODE (XEXP (operands[1], 1)) == CONST_INT ++ && rtx_equal_p (operands[0], XEXP (operands[1], 0))) ++ { ++ operands[1] = XEXP (operands[1], 1); ++ ++ if (operands[1] == const1_rtx) ++ return AS1 (inc%L0,%0); ++ ++ if (operands[1] == constm1_rtx) ++ return AS1 (dec%L0,%0); ++ ++ return AS2 (add%L0,%1,%0); ++ } ++ ++ CC_STATUS_INIT; ++ return AS2 (lea%L0,%a1,%0); ++}" ++ [(set_attr "type" "lea")]) ++ ++;; ??? `lea' here, for three operand add? If leaw is used, only %bx, ++;; %si and %di can appear in SET_SRC, and output_asm_insn might not be ++;; able to handle the operand. But leal always works? ++ ++(define_expand "addhi3" ++ [(set (match_operand:HI 0 "general_operand" "") ++ (plus:HI (match_operand:HI 1 "nonimmediate_operand" "") ++ (match_operand:HI 2 "general_operand" "")))] ++ "" ++ "IX86_EXPAND_BINARY_OPERATOR (PLUS, HImode, operands);") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,?r") ++ (plus:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0,r") ++ (match_operand:HI 2 "general_operand" "ri,r,ri")))] ++ "ix86_binary_operator_ok (PLUS, HImode, operands)" ++ "* ++{ ++ if (REG_P (operands[0]) && REG_P (operands[1]) ++ && (REG_P (operands[2]) || CONSTANT_P (operands[2])) ++ && REGNO (operands[0]) != REGNO (operands[1])) ++ { ++ if (operands[2] == stack_pointer_rtx) ++ abort (); ++ ++ CC_STATUS_INIT; ++ operands[1] ++ = gen_rtx_PLUS (SImode, ++ gen_rtx_REG (SImode, REGNO (operands[1])), ++ (! REG_P (operands[2]) ++ ? operands[2] ++ : gen_rtx_REG (SImode, REGNO (operands[2])))); ++ operands[0] = gen_rtx_REG (SImode, REGNO (operands[0])); ++ return AS2 (lea%L0,%a1,%0); ++ } ++ ++ /* ??? what about offsettable memory references? */ ++ if (!TARGET_PENTIUMPRO /* partial stalls are just too painful to risk. */ ++ && QI_REG_P (operands[0]) ++ && GET_CODE (operands[2]) == CONST_INT ++ && (INTVAL (operands[2]) & 0xff) == 0 ++ && i386_cc_probably_useless_p (insn)) ++ { ++ int byteval = (INTVAL (operands[2]) >> 8) & 0xff; ++ CC_STATUS_INIT; ++ ++ if (byteval == 1) ++ return AS1 (inc%B0,%h0); ++ else if (byteval == 255) ++ return AS1 (dec%B0,%h0); ++ ++ operands[2] = GEN_INT (byteval); ++ return AS2 (add%B0,%2,%h0); ++ } ++ ++ /* Use a 32-bit operation when possible, to avoid the prefix penalty. */ ++ if (REG_P (operands[0]) ++ && i386_aligned_p (operands[2]) ++ && i386_cc_probably_useless_p (insn)) ++ { ++ CC_STATUS_INIT; ++ ++ if (GET_CODE (operands[2]) == CONST_INT) ++ { ++ HOST_WIDE_INT intval = 0xffff & INTVAL (operands[2]); ++ ++ if (intval == 1) ++ return AS1 (inc%L0,%k0); ++ ++ if (intval == 0xffff) ++ return AS1 (dec%L0,%k0); ++ ++ operands[2] = i386_sext16_if_const (operands[2]); ++ } ++ return AS2 (add%L0,%k2,%k0); ++ } ++ ++ if (operands[2] == const1_rtx) ++ return AS1 (inc%W0,%0); ++ ++ if (operands[2] == constm1_rtx ++ || (GET_CODE (operands[2]) == CONST_INT ++ && INTVAL (operands[2]) == 65535)) ++ return AS1 (dec%W0,%0); ++ ++ return AS2 (add%W0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++(define_expand "addqi3" ++ [(set (match_operand:QI 0 "general_operand" "") ++ (plus:QI (match_operand:QI 1 "general_operand" "") ++ (match_operand:QI 2 "general_operand" "")))] ++ "" ++ "IX86_EXPAND_BINARY_OPERATOR (PLUS, QImode, operands);") ++ ++(define_insn "" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q,?q") ++ (plus:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0,q") ++ (match_operand:QI 2 "general_operand" "qn,qn,qn")))] ++ "ix86_binary_operator_ok (PLUS, QImode, operands)" ++ "* ++{ ++ if (REG_P (operands[0]) && REG_P (operands[1]) ++ && (REG_P (operands[2]) || CONSTANT_P (operands[2])) ++ && (REGNO (operands[0]) != REGNO (operands[1]) ++ || NON_QI_REG_P (operands[1]) ++ || (REG_P (operands[2]) && NON_QI_REG_P (operands[2])))) ++ { ++ if (operands[2] == stack_pointer_rtx) ++ abort (); ++ ++ CC_STATUS_INIT; ++ operands[1] ++ = gen_rtx_PLUS (SImode, ++ gen_rtx_REG (SImode, REGNO (operands[1])), ++ (! REG_P (operands[2]) ++ ? operands[2] ++ : gen_rtx_REG (SImode, REGNO (operands[2])))); ++ operands[0] = gen_rtx_REG (SImode, REGNO (operands[0])); ++ return AS2 (lea%L0,%a1,%0); ++ } ++ if (operands[2] == const1_rtx) ++ return AS1 (inc%B0,%0); ++ ++ if (operands[2] == constm1_rtx ++ || (GET_CODE (operands[2]) == CONST_INT ++ && INTVAL (operands[2]) == 255)) ++ return AS1 (dec%B0,%0); ++ ++ return AS2 (add%B0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++;Lennart Augustsson ++;says this pattern just makes slower code: ++; pushl %ebp ++; addl $-80,(%esp) ++;instead of ++; leal -80(%ebp),%eax ++; pushl %eax ++; ++;(define_insn "" ++; [(set (match_operand:SI 0 "push_operand" "=<") ++; (plus:SI (match_operand:SI 1 "register_operand" "%r") ++; (match_operand:SI 2 "nonmemory_operand" "ri")))] ++; "" ++; "* ++;{ ++; rtx xops[4]; ++; xops[0] = operands[0]; ++; xops[1] = operands[1]; ++; xops[2] = operands[2]; ++; xops[3] = gen_rtx_MEM (SImode, stack_pointer_rtx); ++; output_asm_insn (\"push%z1 %1\", xops); ++; output_asm_insn (AS2 (add%z3,%2,%3), xops); ++; RET; ++;}") ++ ++;; The patterns that match these are at the end of this file. ++ ++(define_expand "addxf3" ++ [(set (match_operand:XF 0 "register_operand" "") ++ (plus:XF (match_operand:XF 1 "register_operand" "") ++ (match_operand:XF 2 "register_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++(define_expand "adddf3" ++ [(set (match_operand:DF 0 "register_operand" "") ++ (plus:DF (match_operand:DF 1 "nonimmediate_operand" "") ++ (match_operand:DF 2 "nonimmediate_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++(define_expand "addsf3" ++ [(set (match_operand:SF 0 "register_operand" "") ++ (plus:SF (match_operand:SF 1 "nonimmediate_operand" "") ++ (match_operand:SF 2 "nonimmediate_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++;;- subtract instructions ++ ++;;(define_insn "subsidi3" ++;; [(set (match_operand:DI 0 "general_operand" "=&r,&ro,&r,!&r,o,o,!o") ++;; (minus:DI (match_operand:DI 1 "general_operand" "0iF,0,roiF,roiF,riF,o,o") ++;; (zero_extend:DI (match_operand:SI 2 "general_operand" "o,ri,ri,o,ri,i,r")))) ++;; (clobber (match_scratch:SI 3 "=X,X,X,X,X,&r,&r"))] ++(define_insn "subsidi3" ++ [(set (match_operand:DI 0 "general_operand" "=&r,&r") ++ (minus:DI (match_operand:DI 1 "general_operand" "0,riF") ++ (zero_extend:DI (match_operand:SI 2 "general_operand" "ri,ri")))) ++ (clobber (match_scratch:SI 3 "=X,X"))] ++ "" ++ "* ++{ ++ rtx low[3], high[3], xops[7]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 2, low, high); ++ high[2] = const0_rtx; ++ low[2] = operands[2]; ++ ++ if (!rtx_equal_p (operands[0], operands[1])) ++ { ++ xops[0] = high[0]; ++ xops[1] = low[0]; ++ xops[2] = high[1]; ++ xops[3] = low[1]; ++ ++ if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM) ++ { ++ output_asm_insn (AS2 (mov%L1,%3,%1), xops); ++ output_asm_insn (AS2 (mov%L0,%2,%0), xops); ++ } ++ else ++ { ++ xops[4] = high[2]; ++ xops[5] = low[2]; ++ xops[6] = operands[3]; ++ output_asm_insn (AS2 (mov%L6,%3,%6), xops); ++ output_asm_insn (AS2 (sub%L6,%5,%6), xops); ++ output_asm_insn (AS2 (mov%L1,%6,%1), xops); ++ output_asm_insn (AS2 (mov%L6,%2,%6), xops); ++ output_asm_insn (AS2 (sbb%L6,%4,%6), xops); ++ output_asm_insn (AS2 (mov%L0,%6,%0), xops); ++ RET; ++ } ++ } ++ ++ output_asm_insn (AS2 (sub%L0,%2,%0), low); ++ output_asm_insn (AS2 (sbb%L0,%2,%0), high); ++ cc_status.value1 = high[0]; ++ cc_status.flags = CC_NO_OVERFLOW; ++ ++ RET; ++}" ++ [(set_attr "type" "binary")]) ++ ++;;(define_insn "subdi3" ++;; [(set (match_operand:DI 0 "general_operand" "=&r,&ro,o,o,!&r,!o") ++;; (minus:DI (match_operand:DI 1 "general_operand" "0,0,0iF,or,roiF,roiF") ++;; (match_operand:DI 2 "general_operand" "or,riF,or,iF,roiF,roiF"))) ++;; (clobber (match_scratch:SI 3 "=X,X,&r,&r,X,&r"))] ++(define_insn "subdi3" ++ [(set (match_operand:DI 0 "general_operand" "=&r,&r,!&r") ++ (minus:DI (match_operand:DI 1 "general_operand" "0,0,riF") ++ (match_operand:DI 2 "general_operand" "r,riF,riF"))) ++ (clobber (match_scratch:SI 3 "=X,X,X"))] ++ "" ++ "* ++{ ++ rtx low[3], high[3], xops[7]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 3, low, high); ++ ++ if (!rtx_equal_p (operands[0], operands[1])) ++ { ++ xops[0] = high[0]; ++ xops[1] = low[0]; ++ xops[2] = high[1]; ++ xops[3] = low[1]; ++ ++ if (GET_CODE (operands[0]) != MEM) ++ { ++ output_asm_insn (AS2 (mov%L1,%3,%1), xops); ++ output_asm_insn (AS2 (mov%L0,%2,%0), xops); ++ } ++ else ++ { ++ xops[4] = high[2]; ++ xops[5] = low[2]; ++ xops[6] = operands[3]; ++ output_asm_insn (AS2 (mov%L6,%3,%6), xops); ++ output_asm_insn (AS2 (sub%L6,%5,%6), xops); ++ output_asm_insn (AS2 (mov%L1,%6,%1), xops); ++ output_asm_insn (AS2 (mov%L6,%2,%6), xops); ++ output_asm_insn (AS2 (sbb%L6,%4,%6), xops); ++ output_asm_insn (AS2 (mov%L0,%6,%0), xops); ++ RET; ++ } ++ } ++ ++ cc_status.value1 = high[0]; ++ cc_status.flags = CC_NO_OVERFLOW; ++ ++ if (GET_CODE (operands[3]) == REG) ++ { ++ xops[0] = high[0]; ++ xops[1] = low[0]; ++ xops[2] = high[2]; ++ xops[3] = low[2]; ++ xops[4] = operands[3]; ++ ++ output_asm_insn (AS2 (mov%L4,%3,%4), xops); ++ output_asm_insn (AS2 (sub%L1,%4,%1), xops); ++ output_asm_insn (AS2 (mov%L4,%2,%4), xops); ++ output_asm_insn (AS2 (sbb%L0,%4,%0), xops); ++ } ++ ++ else if (GET_CODE (low[2]) != CONST_INT || INTVAL (low[2]) != 0) ++ { ++ output_asm_insn (AS2 (sub%L0,%2,%0), low); ++ output_asm_insn (AS2 (sbb%L0,%2,%0), high); ++ } ++ ++ else ++ output_asm_insn (AS2 (sub%L0,%2,%0), high); ++ ++ ++ RET; ++}" ++ [(set_attr "type" "binary")]) ++ ++(define_expand "subsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "") ++ (minus:SI (match_operand:SI 1 "nonimmediate_operand" "") ++ (match_operand:SI 2 "general_operand" "")))] ++ "" ++ "IX86_EXPAND_BINARY_OPERATOR (MINUS, SImode, operands);") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r") ++ (minus:SI (match_operand:SI 1 "nonimmediate_operand" "0,0") ++ (match_operand:SI 2 "general_operand" "ri,r")))] ++ "ix86_binary_operator_ok (MINUS, SImode, operands)" ++ "* return AS2 (sub%L0,%2,%0);" ++ [(set_attr "type" "binary")]) ++ ++(define_expand "subhi3" ++ [(set (match_operand:HI 0 "general_operand" "") ++ (minus:HI (match_operand:HI 1 "nonimmediate_operand" "") ++ (match_operand:HI 2 "general_operand" "")))] ++ "" ++ "IX86_EXPAND_BINARY_OPERATOR (MINUS, HImode, operands);") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r") ++ (minus:HI (match_operand:HI 1 "nonimmediate_operand" "0,0") ++ (match_operand:HI 2 "general_operand" "ri,r")))] ++ "ix86_binary_operator_ok (MINUS, HImode, operands)" ++ "* ++{ ++ if (REG_P (operands[0]) ++ && i386_aligned_p (operands[2]) ++ && i386_cc_probably_useless_p (insn)) ++ { ++ CC_STATUS_INIT; ++ operands[2] = i386_sext16_if_const (operands[2]); ++ return AS2 (sub%L0,%k2,%k0); ++ } ++ return AS2 (sub%W0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++(define_expand "subqi3" ++ [(set (match_operand:QI 0 "general_operand" "") ++ (minus:QI (match_operand:QI 1 "general_operand" "") ++ (match_operand:QI 2 "general_operand" "")))] ++ "" ++ "IX86_EXPAND_BINARY_OPERATOR (MINUS, QImode, operands);") ++ ++(define_insn "" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q") ++ (minus:QI (match_operand:QI 1 "nonimmediate_operand" "0,0") ++ (match_operand:QI 2 "general_operand" "qn,qn")))] ++ "ix86_binary_operator_ok (MINUS, QImode, operands)" ++ "* return AS2 (sub%B0,%2,%0);" ++ [(set_attr "type" "binary")]) ++ ++;; The patterns that match these are at the end of this file. ++ ++(define_expand "subxf3" ++ [(set (match_operand:XF 0 "register_operand" "") ++ (minus:XF (match_operand:XF 1 "register_operand" "") ++ (match_operand:XF 2 "register_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++(define_expand "subdf3" ++ [(set (match_operand:DF 0 "register_operand" "") ++ (minus:DF (match_operand:DF 1 "nonimmediate_operand" "") ++ (match_operand:DF 2 "nonimmediate_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++(define_expand "subsf3" ++ [(set (match_operand:SF 0 "register_operand" "") ++ (minus:SF (match_operand:SF 1 "nonimmediate_operand" "") ++ (match_operand:SF 2 "nonimmediate_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++;;- multiply instructions ++ ++;(define_insn "mulqi3" ++; [(set (match_operand:QI 0 "register_operand" "=a") ++; (mult:QI (match_operand:QI 1 "register_operand" "%0") ++; (match_operand:QI 2 "nonimmediate_operand" "qm")))] ++; "" ++; "imul%B0 %2,%0") ++ ++(define_insn "mulhi3" ++ [(set (match_operand:HI 0 "register_operand" "=r,r") ++ (mult:HI (match_operand:HI 1 "nonimmediate_operand" "%0,r") ++ (match_operand:HI 2 "general_operand" "r,i")))] ++ "" ++ "* ++{ ++ if (GET_CODE (operands[1]) == REG ++ && REGNO (operands[1]) == REGNO (operands[0]) ++ && (GET_CODE (operands[2]) == MEM || GET_CODE (operands[2]) == REG)) ++ /* Assembler has weird restrictions. */ ++ return AS2 (imul%W0,%2,%0); ++ return AS3 (imul%W0,%2,%1,%0); ++}" ++ [(set_attr "type" "imul")]) ++ ++(define_insn "mulsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (mult:SI (match_operand:SI 1 "nonimmediate_operand" "%0,r") ++ (match_operand:SI 2 "general_operand" "r,i")))] ++ "" ++ "* ++{ ++ if (GET_CODE (operands[1]) == REG ++ && REGNO (operands[1]) == REGNO (operands[0]) ++ && (GET_CODE (operands[2]) == MEM || GET_CODE (operands[2]) == REG)) ++ /* Assembler has weird restrictions. */ ++ return AS2 (imul%L0,%2,%0); ++ return AS3 (imul%L0,%2,%1,%0); ++}" ++ [(set_attr "type" "imul")]) ++ ++(define_insn "umulqihi3" ++ [(set (match_operand:HI 0 "register_operand" "=a") ++ (mult:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "%0")) ++ (zero_extend:HI (match_operand:QI 2 "nonimmediate_operand" "qm"))))] ++ "" ++ "mul%B0 %2" ++ [(set_attr "type" "imul")]) ++ ++(define_insn "mulqihi3" ++ [(set (match_operand:HI 0 "register_operand" "=a") ++ (mult:HI (sign_extend:HI (match_operand:QI 1 "register_operand" "%0")) ++ (sign_extend:HI (match_operand:QI 2 "nonimmediate_operand" "qm"))))] ++ "" ++ "imul%B0 %2" ++ [(set_attr "type" "imul")]) ++ ++(define_insn "umulsidi3" ++ [(set (match_operand:DI 0 "register_operand" "=A") ++ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "%0")) ++ (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))] ++ "!WORDS_BIG_ENDIAN && TARGET_WIDE_MULTIPLY" ++ "mul%L0 %2" ++ [(set_attr "type" "imul")]) ++ ++(define_insn "mulsidi3" ++ [(set (match_operand:DI 0 "register_operand" "=A") ++ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "%0")) ++ (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))))] ++ "!WORDS_BIG_ENDIAN && TARGET_WIDE_MULTIPLY" ++ "imul%L0 %2" ++ [(set_attr "type" "imul")]) ++ ++(define_insn "umulsi3_highpart" ++ [(set (match_operand:SI 0 "register_operand" "=a") ++ (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "%a")) ++ (zero_extend:DI (match_operand:SI 2 "nonimmediate_operand" "rm"))) ++ (const_int 32)))) ++ (clobber (match_scratch:SI 3 "=a"))] ++ "!WORDS_BIG_ENDIAN && TARGET_WIDE_MULTIPLY" ++ "mul%L0 %2" ++ [(set_attr "type" "imul")]) ++ ++(define_insn "smulsi3_highpart" ++ [(set (match_operand:SI 0 "register_operand" "=a") ++ (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "%a")) ++ (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" "rm"))) ++ (const_int 32)))) ++ (clobber (match_scratch:SI 3 "=a"))] ++ "!WORDS_BIG_ENDIAN && TARGET_WIDE_MULTIPLY" ++ "imul%L0 %2" ++ [(set_attr "type" "imul")]) ++ ++;; The patterns that match these are at the end of this file. ++ ++(define_expand "mulxf3" ++ [(set (match_operand:XF 0 "register_operand" "") ++ (mult:XF (match_operand:XF 1 "register_operand" "") ++ (match_operand:XF 2 "register_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++(define_expand "muldf3" ++ [(set (match_operand:DF 0 "register_operand" "") ++ (mult:DF (match_operand:DF 1 "register_operand" "") ++ (match_operand:DF 2 "nonimmediate_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++(define_expand "mulsf3" ++ [(set (match_operand:SF 0 "register_operand" "") ++ (mult:SF (match_operand:SF 1 "register_operand" "") ++ (match_operand:SF 2 "nonimmediate_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++;;- divide instructions ++ ++(define_insn "divqi3" ++ [(set (match_operand:QI 0 "register_operand" "=a") ++ (div:QI (match_operand:HI 1 "register_operand" "0") ++ (match_operand:QI 2 "nonimmediate_operand" "q")))] ++ "" ++ "idiv%B0 %2") ++ ++(define_insn "udivqi3" ++ [(set (match_operand:QI 0 "register_operand" "=a") ++ (udiv:QI (match_operand:HI 1 "register_operand" "0") ++ (match_operand:QI 2 "nonimmediate_operand" "q")))] ++ "" ++ "div%B0 %2" ++ [(set_attr "type" "idiv")]) ++ ++;; The patterns that match these are at the end of this file. ++ ++(define_expand "divxf3" ++ [(set (match_operand:XF 0 "register_operand" "") ++ (div:XF (match_operand:XF 1 "register_operand" "") ++ (match_operand:XF 2 "register_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++(define_expand "divdf3" ++ [(set (match_operand:DF 0 "register_operand" "") ++ (div:DF (match_operand:DF 1 "register_operand" "") ++ (match_operand:DF 2 "nonimmediate_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++(define_expand "divsf3" ++ [(set (match_operand:SF 0 "register_operand" "") ++ (div:SF (match_operand:SF 1 "register_operand" "") ++ (match_operand:SF 2 "nonimmediate_operand" "")))] ++ "TARGET_80387" ++ "") ++ ++;; Remainder instructions. ++ ++(define_insn "divmodsi4" ++ [(set (match_operand:SI 0 "register_operand" "=a") ++ (div:SI (match_operand:SI 1 "register_operand" "0") ++ (match_operand:SI 2 "nonimmediate_operand" "r"))) ++ (set (match_operand:SI 3 "register_operand" "=&d") ++ (mod:SI (match_dup 1) (match_dup 2)))] ++ "" ++ "* ++{ ++#ifdef INTEL_SYNTAX ++ output_asm_insn (\"cdq\", operands); ++#else ++ output_asm_insn (\"cltd\", operands); ++#endif ++ return AS1 (idiv%L0,%2); ++}" ++ [(set_attr "type" "idiv")]) ++ ++(define_insn "divmodhi4" ++ [(set (match_operand:HI 0 "register_operand" "=a") ++ (div:HI (match_operand:HI 1 "register_operand" "0") ++ (match_operand:HI 2 "nonimmediate_operand" "r"))) ++ (set (match_operand:HI 3 "register_operand" "=&d") ++ (mod:HI (match_dup 1) (match_dup 2)))] ++ "" ++ "cwtd\;idiv%W0 %2" ++ [(set_attr "type" "idiv")]) ++ ++;; ??? Can we make gcc zero extend operand[0]? ++(define_insn "udivmodsi4" ++ [(set (match_operand:SI 0 "register_operand" "=a") ++ (udiv:SI (match_operand:SI 1 "register_operand" "0") ++ (match_operand:SI 2 "nonimmediate_operand" "r"))) ++ (set (match_operand:SI 3 "register_operand" "=&d") ++ (umod:SI (match_dup 1) (match_dup 2)))] ++ "" ++ "* ++{ ++ output_asm_insn (AS2 (xor%L3,%3,%3), operands); ++ return AS1 (div%L0,%2); ++}" ++ [(set_attr "type" "idiv")]) ++ ++;; ??? Can we make gcc zero extend operand[0]? ++(define_insn "udivmodhi4" ++ [(set (match_operand:HI 0 "register_operand" "=a") ++ (udiv:HI (match_operand:HI 1 "register_operand" "0") ++ (match_operand:HI 2 "nonimmediate_operand" "r"))) ++ (set (match_operand:HI 3 "register_operand" "=&d") ++ (umod:HI (match_dup 1) (match_dup 2)))] ++ "" ++ "* ++{ ++ output_asm_insn (AS2 (xor%W0,%3,%3), operands); ++ return AS1 (div%W0,%2); ++}" ++ [(set_attr "type" "idiv")]) ++ ++/* ++;;this should be a valid double division which we may want to add ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=a") ++ (udiv:DI (match_operand:DI 1 "register_operand" "a") ++ (match_operand:SI 2 "nonimmediate_operand" "rm"))) ++ (set (match_operand:SI 3 "register_operand" "=d") ++ (umod:SI (match_dup 1) (match_dup 2)))] ++ "" ++ "div%L0 %2,%0" ++ [(set_attr "type" "idiv")]) ++*/ ++ ++;;- and instructions ++ ++;; On i386, ++;; movzbl %bl,%ebx ++;; is faster than ++;; andl $255,%ebx ++;; ++;; but if the reg is %eax, then the "andl" is faster. ++;; ++;; On i486, the "andl" is always faster than the "movzbl". ++;; ++;; On both i386 and i486, a three operand AND is as fast with movzbl or ++;; movzwl as with andl, if operands[0] != operands[1]. ++ ++;; The `r' in `rm' for operand 3 looks redundant, but it causes ++;; optional reloads to be generated if op 3 is a pseudo in a stack slot. ++ ++(define_insn "andsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r") ++ (and:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") ++ (match_operand:SI 2 "general_operand" "ri,r")))] ++ "" ++ "* ++{ ++ HOST_WIDE_INT intval; ++ if (!rtx_equal_p (operands[0], operands[1]) ++ && rtx_equal_p (operands[0], operands[2])) ++ { ++ rtx tmp; ++ tmp = operands[1]; ++ operands[1] = operands[2]; ++ operands[2] = tmp; ++ } ++ switch (GET_CODE (operands[2])) ++ { ++ case CONST_INT: ++ if (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])) ++ break; ++ intval = INTVAL (operands[2]); ++ /* zero-extend 16->32? */ ++ if (intval == 0xffff && REG_P (operands[0]) ++ && (! REG_P (operands[1]) ++ || REGNO (operands[0]) != 0 || REGNO (operands[1]) != 0) ++ && (!TARGET_ZERO_EXTEND_WITH_AND || ! rtx_equal_p (operands[0], operands[1]))) ++ { ++ /* ??? tege: Should forget CC_STATUS only if we clobber a ++ remembered operand. Fix that later. */ ++ CC_STATUS_INIT; ++#ifdef INTEL_SYNTAX ++ return AS2 (movzx,%w1,%0); ++#else ++ return AS2 (movz%W0%L0,%w1,%0); ++#endif ++ } ++ ++ /* zero extend 8->32? */ ++ if (intval == 0xff && REG_P (operands[0]) ++ && !(REG_P (operands[1]) && NON_QI_REG_P (operands[1])) ++ && (! REG_P (operands[1]) ++ || REGNO (operands[0]) != 0 || REGNO (operands[1]) != 0) ++ && (!TARGET_ZERO_EXTEND_WITH_AND || ! rtx_equal_p (operands[0], operands[1]))) ++ { ++ /* ??? tege: Should forget CC_STATUS only if we clobber a ++ remembered operand. Fix that later. */ ++ CC_STATUS_INIT; ++#ifdef INTEL_SYNTAX ++ return AS2 (movzx,%b1,%0); ++#else ++ return AS2 (movz%B0%L0,%b1,%0); ++#endif ++ } ++ ++ /* Check partial bytes.. non-QI-regs are not available */ ++ if (REG_P (operands[0]) && ! QI_REG_P (operands[0])) ++ break; ++ ++ /* only low byte has zero bits? */ ++ if (~(intval | 0xff) == 0) ++ { ++ intval &= 0xff; ++ if (REG_P (operands[0])) ++ { ++ if (intval == 0) ++ { ++ CC_STATUS_INIT; ++ return AS2 (xor%B0,%b0,%b0); ++ } ++ ++ /* we're better off with the 32-bit version if reg != EAX */ ++ /* the value is sign-extended in 8 bits */ ++ if (REGNO (operands[0]) != 0 && (intval & 0x80)) ++ break; ++ } ++ ++ CC_STATUS_INIT; ++ ++ operands[2] = GEN_INT (intval); ++ ++ if (intval == 0) ++ return AS2 (mov%B0,%2,%b0); ++ ++ return AS2 (and%B0,%2,%b0); ++ } ++ ++ /* only second byte has zero? */ ++ if (~(intval | 0xff00) == 0) ++ { ++ CC_STATUS_INIT; ++ ++ intval = (intval >> 8) & 0xff; ++ operands[2] = GEN_INT (intval); ++ if (intval == 0) ++ { ++ if (REG_P (operands[0])) ++ return AS2 (xor%B0,%h0,%h0); ++ operands[0] = adj_offsettable_operand (operands[0], 1); ++ return AS2 (mov%B0,%2,%b0); ++ } ++ ++ if (REG_P (operands[0])) ++ return AS2 (and%B0,%2,%h0); ++ ++ operands[0] = adj_offsettable_operand (operands[0], 1); ++ return AS2 (and%B0,%2,%b0); ++ } ++ ++ if (REG_P (operands[0])) ++ break; ++ ++ /* third byte has zero bits? */ ++ if (~(intval | 0xff0000) == 0) ++ { ++ intval = (intval >> 16) & 0xff; ++ operands[0] = adj_offsettable_operand (operands[0], 2); ++byte_and_operation: ++ CC_STATUS_INIT; ++ operands[2] = GEN_INT (intval); ++ if (intval == 0) ++ return AS2 (mov%B0,%2,%b0); ++ return AS2 (and%B0,%2,%b0); ++ } ++ ++ /* fourth byte has zero bits? */ ++ if (~(intval | 0xff000000) == 0) ++ { ++ intval = (intval >> 24) & 0xff; ++ operands[0] = adj_offsettable_operand (operands[0], 3); ++ goto byte_and_operation; ++ } ++ ++ /* Low word is zero? */ ++ if (intval == 0xffff0000) ++ { ++word_zero_and_operation: ++ CC_STATUS_INIT; ++ operands[2] = const0_rtx; ++ return AS2 (mov%W0,%2,%w0); ++ } ++ ++ /* High word is zero? */ ++ if (intval == 0x0000ffff) ++ { ++ operands[0] = adj_offsettable_operand (operands[0], 2); ++ goto word_zero_and_operation; ++ } ++ ++ default: ++ break; ++ } ++ ++ return AS2 (and%L0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++(define_insn "andhi3" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r") ++ (and:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0") ++ (match_operand:HI 2 "general_operand" "ri,r")))] ++ "" ++ "* ++{ ++ if (GET_CODE (operands[2]) == CONST_INT ++ && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))) ++ { ++ /* Can we ignore the upper byte? */ ++ if ((! REG_P (operands[0]) || QI_REG_P (operands[0])) ++ && (INTVAL (operands[2]) & 0xff00) == 0xff00) ++ { ++ CC_STATUS_INIT; ++ ++ if ((INTVAL (operands[2]) & 0xff) == 0) ++ { ++ operands[2] = const0_rtx; ++ return AS2 (mov%B0,%2,%b0); ++ } ++ ++ operands[2] = GEN_INT (INTVAL (operands[2]) & 0xff); ++ return AS2 (and%B0,%2,%b0); ++ } ++ ++ /* Can we ignore the lower byte? */ ++ /* ??? what about offsettable memory references? */ ++ if (QI_REG_P (operands[0]) && (INTVAL (operands[2]) & 0xff) == 0xff) ++ { ++ CC_STATUS_INIT; ++ ++ if ((INTVAL (operands[2]) & 0xff00) == 0) ++ { ++ operands[2] = const0_rtx; ++ return AS2 (mov%B0,%2,%h0); ++ } ++ ++ operands[2] = GEN_INT ((INTVAL (operands[2]) >> 8) & 0xff); ++ return AS2 (and%B0,%2,%h0); ++ } ++ ++ /* use 32-bit ops on registers when there are no sign issues.. */ ++ if (REG_P (operands[0])) ++ { ++ if (!(INTVAL (operands[2]) & ~0x7fff)) ++ return AS2 (and%L0,%2,%k0); ++ } ++ } ++ ++ if (REG_P (operands[0]) ++ && i386_aligned_p (operands[2])) ++ { ++ CC_STATUS_INIT; ++ /* If op[2] is constant, we should zero-extend it and */ ++ /* make a note that op[0] has been zero-extended, so */ ++ /* that we could use 32-bit ops on it forthwith, but */ ++ /* there is no such reg-note available. Instead we do */ ++ /* a sign extension as that can result in shorter asm */ ++ operands[2] = i386_sext16_if_const (operands[2]); ++ return AS2 (and%L0,%k2,%k0); ++ } ++ ++ /* Use a 32-bit word with the upper bits set, invalidate CC */ ++ if (GET_CODE (operands[2]) == CONST_INT ++ && i386_aligned_p (operands[0])) ++ { ++ HOST_WIDE_INT val = INTVAL (operands[2]); ++ CC_STATUS_INIT; ++ val |= ~0xffff; ++ if (val != INTVAL (operands[2])) ++ operands[2] = GEN_INT (val); ++ return AS2 (and%L0,%k2,%k0); ++ } ++ ++ return AS2 (and%W0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++(define_insn "andqi3" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q") ++ (and:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0") ++ (match_operand:QI 2 "general_operand" "qn,qn")))] ++ "" ++ "* return AS2 (and%B0,%2,%0);" ++ [(set_attr "type" "binary")]) ++ ++/* I am nervous about these two.. add them later.. ++;I presume this means that we have something in say op0= eax which is small ++;and we want to and it with memory so we can do this by just an ++;andb m,%al and have success. ++(define_insn "" ++ [(set (match_operand:SI 0 "general_operand" "=r") ++ (and:SI (zero_extend:SI ++ (match_operand:HI 1 "nonimmediate_operand" "r")) ++ (match_operand:SI 2 "general_operand" "0")))] ++ "GET_CODE (operands[2]) == CONST_INT ++ && (unsigned int) INTVAL (operands[2]) < (1 << GET_MODE_BITSIZE (HImode))" ++ "and%W0 %1,%0") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=q") ++ (and:SI ++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "q")) ++ (match_operand:SI 2 "register_operand" "0")))] ++ "GET_CODE (operands[2]) == CONST_INT ++ && (unsigned int) INTVAL (operands[2]) < (1 << GET_MODE_BITSIZE (QImode))" ++ "and%L0 %1,%0") ++ ++*/ ++ ++;;- Bit set (inclusive or) instructions ++ ++;; This optimizes known byte-wide operations to memory, and in some cases ++;; to QI registers.. Note that we don't want to use the QI registers too ++;; aggressively, because often the 32-bit register instruction is the same ++;; size, and likely to be faster on PentiumPro. ++(define_insn "iorsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r") ++ (ior:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") ++ (match_operand:SI 2 "general_operand" "ri,r")))] ++ "" ++ "* ++{ ++ HOST_WIDE_INT intval; ++ switch (GET_CODE (operands[2])) ++ { ++ case CONST_INT: ++ ++ if (REG_P (operands[0]) && ! QI_REG_P (operands[0])) ++ break; ++ ++ /* don't try to optimize volatile accesses */ ++ if (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])) ++ break; ++ ++ intval = INTVAL (operands[2]); ++ if ((intval & ~0xff) == 0) ++ { ++ if (REG_P (operands[0])) ++ { ++ /* Do low byte access only for %eax or when high bit is set */ ++ if (REGNO (operands[0]) != 0 && !(intval & 0x80)) ++ break; ++ } ++ ++byte_or_operation: ++ CC_STATUS_INIT; ++ ++ if (intval != INTVAL (operands[2])) ++ operands[2] = GEN_INT (intval); ++ ++ if (intval == 0xff) ++ return AS2 (mov%B0,%2,%b0); ++ ++ return AS2 (or%B0,%2,%b0); ++ } ++ ++ /* second byte? */ ++ if ((intval & ~0xff00) == 0) ++ { ++ intval >>= 8; ++ ++ if (REG_P (operands[0])) ++ { ++ CC_STATUS_INIT; ++ operands[2] = GEN_INT (intval); ++ if (intval == 0xff) ++ return AS2 (mov%B0,%2,%h0); ++ ++ return AS2 (or%B0,%2,%h0); ++ } ++ ++ operands[0] = adj_offsettable_operand (operands[0], 1); ++ goto byte_or_operation; ++ } ++ ++ if (REG_P (operands[0])) ++ break; ++ ++ /* third byte? */ ++ if ((intval & ~0xff0000) == 0) ++ { ++ intval >>= 16; ++ operands[0] = adj_offsettable_operand (operands[0], 2); ++ goto byte_or_operation; ++ } ++ ++ /* fourth byte? */ ++ if ((intval & ~0xff000000) == 0) ++ { ++ intval = (intval >> 24) & 0xff; ++ operands[0] = adj_offsettable_operand (operands[0], 3); ++ goto byte_or_operation; ++ } ++ ++ default: ++ break; ++ } ++ ++ return AS2 (or%L0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++(define_insn "iorhi3" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r") ++ (ior:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0") ++ (match_operand:HI 2 "general_operand" "ri,r")))] ++ "" ++ "* ++{ ++ HOST_WIDE_INT intval; ++ switch (GET_CODE (operands[2])) ++ { ++ case CONST_INT: ++ ++ if (REG_P (operands[0]) && ! QI_REG_P (operands[0])) ++ break; ++ ++ /* don't try to optimize volatile accesses */ ++ if (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])) ++ break; ++ ++ intval = 0xffff & INTVAL (operands[2]); ++ ++ if ((intval & 0xff00) == 0) ++ { ++ if (REG_P (operands[0])) ++ { ++ /* Do low byte access only for %eax or when high bit is set */ ++ if (REGNO (operands[0]) != 0 && !(intval & 0x80)) ++ break; ++ } ++ ++byte_or_operation: ++ CC_STATUS_INIT; ++ ++ if (intval == 0xff) ++ return AS2 (mov%B0,%2,%b0); ++ ++ return AS2 (or%B0,%2,%b0); ++ } ++ ++ /* high byte? */ ++ if ((intval & 0xff) == 0) ++ { ++ intval >>= 8; ++ operands[2] = GEN_INT (intval); ++ ++ if (REG_P (operands[0])) ++ { ++ CC_STATUS_INIT; ++ if (intval == 0xff) ++ return AS2 (mov%B0,%2,%h0); ++ ++ return AS2 (or%B0,%2,%h0); ++ } ++ ++ operands[0] = adj_offsettable_operand (operands[0], 1); ++ ++ goto byte_or_operation; ++ } ++ ++ default: ++ break; ++ } ++ ++ if (REG_P (operands[0]) ++ && i386_aligned_p (operands[2])) ++ { ++ CC_STATUS_INIT; ++ operands[2] = i386_sext16_if_const (operands[2]); ++ return AS2 (or%L0,%k2,%k0); ++ } ++ ++ if (GET_CODE (operands[2]) == CONST_INT ++ && i386_aligned_p (operands[0])) ++ { ++ CC_STATUS_INIT; ++ intval = 0xffff & INTVAL (operands[2]); ++ if (intval != INTVAL (operands[2])) ++ operands[2] = GEN_INT (intval); ++ return AS2 (or%L0,%2,%k0); ++ } ++ ++ return AS2 (or%W0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++(define_insn "iorqi3" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q") ++ (ior:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0") ++ (match_operand:QI 2 "general_operand" "qn,qn")))] ++ "" ++ "* return AS2 (or%B0,%2,%0);" ++ [(set_attr "type" "binary")]) ++ ++;;- xor instructions ++ ++(define_insn "xorsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r") ++ (xor:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0") ++ (match_operand:SI 2 "general_operand" "ri,r")))] ++ "" ++ "* ++{ ++ HOST_WIDE_INT intval; ++ switch (GET_CODE (operands[2])) ++ { ++ case CONST_INT: ++ ++ if (REG_P (operands[0]) && ! QI_REG_P (operands[0])) ++ break; ++ ++ /* don't try to optimize volatile accesses */ ++ if (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])) ++ break; ++ ++ intval = INTVAL (operands[2]); ++ if ((intval & ~0xff) == 0) ++ { ++ if (REG_P (operands[0])) ++ { ++ /* Do low byte access only for %eax or when high bit is set */ ++ if (REGNO (operands[0]) != 0 && !(intval & 0x80)) ++ break; ++ } ++ ++byte_xor_operation: ++ CC_STATUS_INIT; ++ ++ if (intval == 0xff ++ && (!TARGET_PENTIUM || optimize_size ++ || (GET_CODE (operands[0]) == MEM ++ && memory_address_info (XEXP (operands[0], 0), 1)))) ++ return AS1 (not%B0,%b0); ++ ++ if (intval != INTVAL (operands[2])) ++ operands[2] = GEN_INT (intval); ++ return AS2 (xor%B0,%2,%b0); ++ } ++ ++ /* second byte? */ ++ if ((intval & ~0xff00) == 0) ++ { ++ intval >>= 8; ++ ++ if (REG_P (operands[0])) ++ { ++ CC_STATUS_INIT; ++ if (intval == 0xff ++ && (!TARGET_PENTIUM || optimize_size ++ || (GET_CODE (operands[0]) == MEM ++ && memory_address_info (XEXP (operands[0], 0), 1)))) ++ return AS1 (not%B0,%h0); ++ ++ operands[2] = GEN_INT (intval); ++ return AS2 (xor%B0,%2,%h0); ++ } ++ ++ operands[0] = adj_offsettable_operand (operands[0], 1); ++ ++ goto byte_xor_operation; ++ } ++ ++ if (REG_P (operands[0])) ++ break; ++ ++ /* third byte? */ ++ if ((intval & ~0xff0000) == 0) ++ { ++ intval >>= 16; ++ operands[0] = adj_offsettable_operand (operands[0], 2); ++ goto byte_xor_operation; ++ } ++ ++ /* fourth byte? */ ++ if ((intval & ~0xff000000) == 0) ++ { ++ intval = (intval >> 24) & 0xff; ++ operands[0] = adj_offsettable_operand (operands[0], 3); ++ goto byte_xor_operation; ++ } ++ ++ default: ++ break; ++ } ++ ++ return AS2 (xor%L0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++(define_insn "xorhi3" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r") ++ (xor:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0") ++ (match_operand:HI 2 "general_operand" "ri,r")))] ++ "" ++ "* ++{ ++ if (GET_CODE (operands[2]) == CONST_INT ++ && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))) ++ { ++ /* Can we ignore the upper byte? */ ++ if ((! REG_P (operands[0]) || QI_REG_P (operands[0])) ++ && (INTVAL (operands[2]) & 0xff00) == 0) ++ { ++ CC_STATUS_INIT; ++ if (INTVAL (operands[2]) & 0xffff0000) ++ operands[2] = GEN_INT (INTVAL (operands[2]) & 0xffff); ++ ++ if (INTVAL (operands[2]) == 0xff ++ && (!TARGET_PENTIUM || optimize_size ++ || (GET_CODE (operands[0]) == MEM ++ && memory_address_info (XEXP (operands[0], 0), 1)))) ++ return AS1 (not%B0,%b0); ++ ++ return AS2 (xor%B0,%2,%b0); ++ } ++ ++ /* Can we ignore the lower byte? */ ++ /* ??? what about offsettable memory references? */ ++ if (QI_REG_P (operands[0]) ++ && (INTVAL (operands[2]) & 0xff) == 0) ++ { ++ CC_STATUS_INIT; ++ operands[2] = GEN_INT ((INTVAL (operands[2]) >> 8) & 0xff); ++ ++ if (INTVAL (operands[2]) == 0xff ++ && (!TARGET_PENTIUM || optimize_size ++ || (GET_CODE (operands[0]) == MEM ++ && memory_address_info (XEXP (operands[0], 0), 1)))) ++ return AS1 (not%B0,%h0); ++ ++ return AS2 (xor%B0,%2,%h0); ++ } ++ } ++ ++ if (REG_P (operands[0]) ++ && i386_aligned_p (operands[2])) ++ { ++ CC_STATUS_INIT; ++ operands[2] = i386_sext16_if_const (operands[2]); ++ return AS2 (xor%L0,%k2,%k0); ++ } ++ ++ if (GET_CODE (operands[2]) == CONST_INT ++ && i386_aligned_p (operands[0])) ++ { ++ HOST_WIDE_INT intval; ++ CC_STATUS_INIT; ++ intval = 0xffff & INTVAL (operands[2]); ++ if (intval != INTVAL (operands[2])) ++ operands[2] = GEN_INT (intval); ++ return AS2 (xor%L0,%2,%k0); ++ } ++ ++ return AS2 (xor%W0,%2,%0); ++}" ++ [(set_attr "type" "binary")]) ++ ++(define_insn "xorqi3" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q") ++ (xor:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0") ++ (match_operand:QI 2 "general_operand" "qn,qm")))] ++ "" ++ "* return AS2 (xor%B0,%2,%0);" ++ [(set_attr "type" "binary")]) ++ ++;; logical operations for DImode ++ ++(define_insn "anddi3" ++ [(set (match_operand:DI 0 "general_operand" "=&r,&r") ++ (and:DI (match_operand:DI 1 "general_operand" "%0,0") ++ (match_operand:DI 2 "general_operand" "riF,riF")))] ++ "" ++ "#" ++ [(set_attr "type" "binary")]) ++ ++ ++(define_insn "iordi3" ++ [(set (match_operand:DI 0 "general_operand" "=&r,&r") ++ (ior:DI (match_operand:DI 1 "general_operand" "%0,0") ++ (match_operand:DI 2 "general_operand" "riF,riF")))] ++ "" ++ "#" ++ [(set_attr "type" "binary")]) ++ ++(define_insn "xordi3" ++ [(set (match_operand:DI 0 "general_operand" "=&r,&r") ++ (xor:DI (match_operand:DI 1 "general_operand" "%0,0") ++ (match_operand:DI 2 "general_operand" "riF,riF")))] ++ "" ++ "#" ++ [(set_attr "type" "binary")]) ++ ++(define_split ++ [(set (match_operand:DI 0 "general_operand" "") ++ (match_operator:DI 3 "ix86_logical_operator" ++ [(match_operand:DI 1 "general_operand" "") ++ (match_operand:DI 2 "general_operand" "")]))] ++ "" ++ [(set (match_dup 4) (match_op_dup:SI 3 [(match_dup 6) (match_dup 8)])) ++ (set (match_dup 5) (match_op_dup:SI 3 [(match_dup 7) (match_dup 9)]))] ++ "split_di (&operands[0], 1, &operands[4], &operands[5]); ++ split_di (&operands[1], 1, &operands[6], &operands[7]); ++ split_di (&operands[2], 1, &operands[8], &operands[9]);") ++ ++;;- negation instructions ++ ++(define_insn "negdi2" ++ [(set (match_operand:DI 0 "general_operand" "=&r") ++ (neg:DI (match_operand:DI 1 "general_operand" "0")))] ++ "" ++ "* ++{ ++ rtx xops[2], low[1], high[1]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 1, low, high); ++ xops[0] = const0_rtx; ++ xops[1] = high[0]; ++ ++ output_asm_insn (AS1 (neg%L0,%0), low); ++ output_asm_insn (AS2 (adc%L1,%0,%1), xops); ++ output_asm_insn (AS1 (neg%L0,%0), high); ++ RET; ++}") ++ ++(define_insn "negsi2" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (neg:SI (match_operand:SI 1 "nonimmediate_operand" "0")))] ++ "" ++ "neg%L0 %0") ++ ++(define_insn "neghi2" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r") ++ (neg:HI (match_operand:HI 1 "nonimmediate_operand" "0")))] ++ "" ++ "* ++ if (REG_P (operands[0]) && i386_cc_probably_useless_p (insn)) ++ { ++ CC_STATUS_INIT; ++ return AS1(neg%L0,%k0); ++ } ++ return AS1(neg%W0,%0);") ++ ++(define_insn "negqi2" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm") ++ (neg:QI (match_operand:QI 1 "nonimmediate_operand" "0")))] ++ "" ++ "neg%B0 %0") ++ ++(define_insn "negsf2" ++ [(set (match_operand:SF 0 "register_operand" "=f") ++ (neg:SF (match_operand:SF 1 "register_operand" "0")))] ++ "TARGET_80387" ++ "fchs" ++ [(set_attr "type" "fpop")]) ++ ++(define_insn "negdf2" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (neg:DF (match_operand:DF 1 "register_operand" "0")))] ++ "TARGET_80387" ++ "fchs" ++ [(set_attr "type" "fpop")]) ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (neg:DF (float_extend:DF (match_operand:SF 1 "register_operand" "0"))))] ++ "TARGET_80387" ++ "fchs" ++ [(set_attr "type" "fpop")]) ++ ++(define_insn "negxf2" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (neg:XF (match_operand:XF 1 "register_operand" "0")))] ++ "TARGET_80387" ++ "fchs" ++ [(set_attr "type" "fpop")]) ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (neg:XF (float_extend:XF (match_operand:DF 1 "register_operand" "0"))))] ++ "TARGET_80387" ++ "fchs" ++ [(set_attr "type" "fpop")]) ++ ++;; Absolute value instructions ++ ++(define_insn "abssf2" ++ [(set (match_operand:SF 0 "register_operand" "=f") ++ (abs:SF (match_operand:SF 1 "register_operand" "0")))] ++ "TARGET_80387" ++ "fabs" ++ [(set_attr "type" "fpop")]) ++ ++(define_insn "absdf2" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (abs:DF (match_operand:DF 1 "register_operand" "0")))] ++ "TARGET_80387" ++ "fabs" ++ [(set_attr "type" "fpop")]) ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (abs:DF (float_extend:DF (match_operand:SF 1 "register_operand" "0"))))] ++ "TARGET_80387" ++ "fabs" ++ [(set_attr "type" "fpop")]) ++ ++(define_insn "absxf2" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (abs:XF (match_operand:XF 1 "register_operand" "0")))] ++ "TARGET_80387" ++ "fabs" ++ [(set_attr "type" "fpop")]) ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (abs:XF (float_extend:XF (match_operand:DF 1 "register_operand" "0"))))] ++ "TARGET_80387" ++ "fabs" ++ [(set_attr "type" "fpop")]) ++ ++(define_insn "sqrtsf2" ++ [(set (match_operand:SF 0 "register_operand" "=f") ++ (sqrt:SF (match_operand:SF 1 "register_operand" "0")))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387" ++ "fsqrt") ++ ++(define_insn "sqrtdf2" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (sqrt:DF (match_operand:DF 1 "register_operand" "0")))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 ++ && (TARGET_IEEE_FP || flag_fast_math) " ++ "fsqrt") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (sqrt:DF (float_extend:DF ++ (match_operand:SF 1 "register_operand" "0"))))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387" ++ "fsqrt") ++ ++(define_insn "sqrtxf2" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (sqrt:XF (match_operand:XF 1 "register_operand" "0")))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 ++ && (TARGET_IEEE_FP || flag_fast_math) " ++ "fsqrt") ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (sqrt:XF (float_extend:XF ++ (match_operand:DF 1 "register_operand" "0"))))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387" ++ "fsqrt") ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (sqrt:XF (float_extend:XF ++ (match_operand:SF 1 "register_operand" "0"))))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387" ++ "fsqrt") ++ ++(define_insn "sindf2" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (unspec:DF [(match_operand:DF 1 "register_operand" "0")] 1))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math" ++ "fsin") ++ ++(define_insn "sinsf2" ++ [(set (match_operand:SF 0 "register_operand" "=f") ++ (unspec:SF [(match_operand:SF 1 "register_operand" "0")] 1))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math" ++ "fsin") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (unspec:DF [(float_extend:DF ++ (match_operand:SF 1 "register_operand" "0"))] 1))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math" ++ "fsin") ++ ++(define_insn "sinxf2" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (unspec:XF [(match_operand:XF 1 "register_operand" "0")] 1))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math" ++ "fsin") ++ ++(define_insn "cosdf2" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (unspec:DF [(match_operand:DF 1 "register_operand" "0")] 2))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math" ++ "fcos") ++ ++(define_insn "cossf2" ++ [(set (match_operand:SF 0 "register_operand" "=f") ++ (unspec:SF [(match_operand:SF 1 "register_operand" "0")] 2))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math" ++ "fcos") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f") ++ (unspec:DF [(float_extend:DF ++ (match_operand:SF 1 "register_operand" "0"))] 2))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math" ++ "fcos") ++ ++(define_insn "cosxf2" ++ [(set (match_operand:XF 0 "register_operand" "=f") ++ (unspec:XF [(match_operand:XF 1 "register_operand" "0")] 2))] ++ "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math" ++ "fcos") ++ ++;;- one complement instructions ++ ++(define_insn "one_cmplsi2" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (not:SI (match_operand:SI 1 "nonimmediate_operand" "0")))] ++ "" ++ "* ++{ ++ /* A Pentium NOT is not pariable. Output it only in case of complex ++ memory address, because XOR will be inpariable anyway because ++ of immediate/displacement rule. */ ++ ++ if (TARGET_PENTIUM && !optimize_size ++ && (GET_CODE (operands[0]) != MEM ++ || memory_address_info (XEXP (operands[0], 0), 1) == 0)) ++ { ++ rtx xops[2]; ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xffffffff); ++ output_asm_insn (AS2 (xor%L0,%1,%0), xops); ++ RET; ++ } ++ else ++ return AS1 (not%L0,%0); ++}") ++ ++(define_insn "one_cmplhi2" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r") ++ (not:HI (match_operand:HI 1 "nonimmediate_operand" "0")))] ++ "" ++ "* ++{ ++ /* A Pentium NOT is not pariable. Output it only in case of complex ++ memory address, because XOR will be inpariable anyway because ++ of immediate/displacement rule. */ ++ ++ if (TARGET_PENTIUM && !optimize_size ++ && (GET_CODE (operands[0]) != MEM ++ || memory_address_info (XEXP (operands[0], 0), 1) == 0)) ++ { ++ rtx xops[2]; ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xffff); ++ if (REG_P (operands[0]) ++ && i386_cc_probably_useless_p (insn)) ++ { ++ CC_STATUS_INIT; ++ output_asm_insn (AS2 (xor%L0,%1,%k0), xops); ++ } ++ else ++ output_asm_insn (AS2 (xor%W0,%1,%0), xops); ++ RET; ++ } ++ else ++ { ++ if (REG_P (operands[0]) ++ && i386_cc_probably_useless_p (insn)) ++ { ++ CC_STATUS_INIT; ++ return AS1 (not%L0,%k0); ++ } ++ return AS1 (not%W0,%0); ++ } ++}") ++ ++(define_insn "one_cmplqi2" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm") ++ (not:QI (match_operand:QI 1 "nonimmediate_operand" "0")))] ++ "" ++ "* ++{ ++ /* A Pentium NOT is not pariable. Output it only in case of complex ++ memory address, because XOR will be inpariable anyway because ++ of immediate/displacement rule. */ ++ ++ if (TARGET_PENTIUM && !optimize_size ++ && (GET_CODE (operands[0]) != MEM ++ || memory_address_info (XEXP (operands[0], 0), 1) == 0)) ++ { ++ rtx xops[2]; ++ xops[0] = operands[0]; ++ xops[1] = GEN_INT (0xff); ++ output_asm_insn (AS2 (xor%B0,%1,%0), xops); ++ RET; ++ } ++ else ++ return AS1 (not%B0,%0); ++}") ++ ++;;- arithmetic shift instructions ++ ++;; DImode shifts are implemented using the i386 "shift double" opcode, ++;; which is written as "sh[lr]d[lw] imm,reg,reg/mem". If the shift count ++;; is variable, then the count is in %cl and the "imm" operand is dropped ++;; from the assembler input. ++ ++;; This instruction shifts the target reg/mem as usual, but instead of ++;; shifting in zeros, bits are shifted in from reg operand. If the insn ++;; is a left shift double, bits are taken from the high order bits of ++;; reg, else if the insn is a shift right double, bits are taken from the ++;; low order bits of reg. So if %eax is "1234" and %edx is "5678", ++;; "shldl $8,%edx,%eax" leaves %edx unchanged and sets %eax to "2345". ++ ++;; Since sh[lr]d does not change the `reg' operand, that is done ++;; separately, making all shifts emit pairs of shift double and normal ++;; shift. Since sh[lr]d does not shift more than 31 bits, and we wish to ++;; support a 63 bit shift, each shift where the count is in a reg expands ++;; to a pair of shifts, a branch, a shift by 32 and a label. ++ ++;; If the shift count is a constant, we need never emit more than one ++;; shift pair, instead using moves and sign extension for counts greater ++;; than 31. ++ ++(define_expand "ashldi3" ++ [(set (match_operand:DI 0 "register_operand" "") ++ (ashift:DI (match_operand:DI 1 "register_operand" "") ++ (match_operand:QI 2 "nonmemory_operand" "")))] ++ "" ++ " ++{ ++ if (GET_CODE (operands[2]) != CONST_INT ++ || ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')) ++ { ++ operands[2] = copy_to_mode_reg (QImode, operands[2]); ++ emit_insn (gen_ashldi3_non_const_int (operands[0], operands[1], ++ operands[2])); ++ } ++ else ++ emit_insn (gen_ashldi3_const_int (operands[0], operands[1], operands[2])); ++ ++ DONE; ++}") ++ ++(define_insn "ashldi3_const_int" ++ [(set (match_operand:DI 0 "register_operand" "=&r") ++ (ashift:DI (match_operand:DI 1 "register_operand" "0") ++ (match_operand:QI 2 "const_int_operand" "J")))] ++ "CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')" ++ "* ++{ ++ rtx xops[4], low[1], high[1]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 1, low, high); ++ xops[0] = operands[2]; ++ xops[1] = const1_rtx; ++ xops[2] = low[0]; ++ xops[3] = high[0]; ++ ++ if (INTVAL (xops[0]) > 31) ++ { ++ output_asm_insn (AS2 (mov%L3,%2,%3), xops); /* Fast shift by 32 */ ++ output_asm_insn (AS2 (xor%L2,%2,%2), xops); ++ ++ if (INTVAL (xops[0]) > 32) ++ { ++ xops[0] = GEN_INT (INTVAL (xops[0]) - 32); ++ output_asm_insn (AS2 (sal%L3,%0,%3), xops); /* Remaining shift */ ++ } ++ } ++ else ++ { ++ output_asm_insn (AS3 (shld%L3,%0,%2,%3), xops); ++ output_asm_insn (AS2 (sal%L2,%0,%2), xops); ++ } ++ RET; ++}") ++ ++(define_insn "ashldi3_non_const_int" ++ [(set (match_operand:DI 0 "register_operand" "=&r") ++ (ashift:DI (match_operand:DI 1 "register_operand" "0") ++ (match_operand:QI 2 "register_operand" "c")))] ++ "" ++ "* ++{ ++ rtx xops[5], low[1], high[1]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 1, low, high); ++ xops[0] = operands[2]; ++ xops[1] = GEN_INT (32); ++ xops[2] = low[0]; ++ xops[3] = high[0]; ++ xops[4] = gen_label_rtx (); ++ ++ output_asm_insn (AS3_SHIFT_DOUBLE (shld%L3,%0,%2,%3), xops); ++ output_asm_insn (AS2 (sal%L2,%0,%2), xops); ++ output_asm_insn (AS2 (test%B0,%1,%b0), xops); ++ output_asm_insn (AS1 (je,%X4), xops); ++ output_asm_insn (AS2 (mov%L3,%2,%3), xops); /* Fast shift by 32 */ ++ output_asm_insn (AS2 (xor%L2,%2,%2), xops); ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ++ CODE_LABEL_NUMBER (xops[4])); ++ RET; ++}") ++ ++(define_expand "ashlsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "") ++ (ashift:SI (match_operand:SI 1 "nonimmediate_operand" "") ++ (match_operand:SI 2 "nonmemory_operand" "")))] ++ "" ++ "") ++ ++(define_expand "ashlhi3" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "") ++ (ashift:HI (match_operand:HI 1 "nonimmediate_operand" "") ++ (match_operand:HI 2 "nonmemory_operand" "")))] ++ "" ++ "") ++ ++(define_expand "ashlqi3" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "") ++ (ashift:QI (match_operand:QI 1 "nonimmediate_operand" "") ++ (match_operand:QI 2 "nonmemory_operand" "")))] ++ "" ++ "") ++ ++;; Pattern for shifts which can be encoded into an lea instruction. ++;; This is kept as a separate pattern so that regmove can optimize cases ++;; where we know the source and destination must match. ++;; ++;; Do not expose this pattern when optimizing for size since we never want ++;; to use lea when optimizing for size since mov+sal is smaller than lea. ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r") ++ (ashift:SI (match_operand:SI 1 "nonimmediate_operand" "0,r") ++ (match_operand:SI 2 "small_shift_operand" "M,M")))] ++ "! optimize_size" ++ "* return output_ashl (insn, operands);") ++ ++;; Generic left shift pattern to catch all cases not handled by the ++;; shift pattern above. ++(define_insn "" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (ashift:SI (match_operand:SI 1 "nonimmediate_operand" "0") ++ (match_operand:SI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* return output_ashl (insn, operands);") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r") ++ (ashift:HI (match_operand:HI 1 "nonimmediate_operand" "0,r") ++ (match_operand:HI 2 "small_shift_operand" "M,M")))] ++ "! optimize_size" ++ "* return output_ashl (insn, operands);") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r") ++ (ashift:HI (match_operand:HI 1 "nonimmediate_operand" "0") ++ (match_operand:HI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* return output_ashl (insn, operands);") ++ ++(define_insn "" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q") ++ (ashift:QI (match_operand:QI 1 "nonimmediate_operand" "0,q") ++ (match_operand:QI 2 "small_shift_operand" "M,M")))] ++ "! optimize_size" ++ "* return output_ashl (insn, operands);") ++ ++;; Generic left shift pattern to catch all cases not handled by the ++;; shift pattern above. ++(define_insn "" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=q") ++ (ashift:QI (match_operand:QI 1 "nonimmediate_operand" "0") ++ (match_operand:QI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* return output_ashl (insn, operands);") ++ ++;; See comment above `ashldi3' about how this works. ++ ++(define_expand "ashrdi3" ++ [(set (match_operand:DI 0 "register_operand" "") ++ (ashiftrt:DI (match_operand:DI 1 "register_operand" "") ++ (match_operand:QI 2 "nonmemory_operand" "")))] ++ "" ++ " ++{ ++ if (GET_CODE (operands[2]) != CONST_INT ++ || ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')) ++ { ++ operands[2] = copy_to_mode_reg (QImode, operands[2]); ++ emit_insn (gen_ashrdi3_non_const_int (operands[0], operands[1], ++ operands[2])); ++ } ++ else ++ emit_insn (gen_ashrdi3_const_int (operands[0], operands[1], operands[2])); ++ ++ DONE; ++}") ++ ++(define_insn "ashldi3_32" ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=r") ++ (ashift:DI (match_operand:DI 1 "nonimmediate_operand" "r") ++ (const_int 32)))] ++ "" ++ "* ++{ ++ rtx low[2], high[2], xops[4]; ++ ++ split_di (operands, 2, low, high); ++ xops[0] = high[0]; ++ xops[1] = low[1]; ++ xops[2] = low[0]; ++ xops[3] = const0_rtx; ++ if (!rtx_equal_p (xops[0], xops[1])) ++ output_asm_insn (AS2 (mov%L0,%1,%0), xops); ++ ++ if (GET_CODE (low[0]) == MEM) ++ output_asm_insn (AS2 (mov%L2,%3,%2), xops); ++ else ++ output_asm_insn (AS2 (xor%L2,%2,%2), xops); ++ ++ RET; ++}") ++ ++(define_insn "ashrdi3_const_int" ++ [(set (match_operand:DI 0 "register_operand" "=&r") ++ (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") ++ (match_operand:QI 2 "const_int_operand" "J")))] ++ "CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')" ++ "* ++{ ++ rtx xops[4], low[1], high[1]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 1, low, high); ++ xops[0] = operands[2]; ++ xops[1] = const1_rtx; ++ xops[2] = low[0]; ++ xops[3] = high[0]; ++ ++ if (INTVAL (xops[0]) > 31) ++ { ++ xops[1] = GEN_INT (31); ++ output_asm_insn (AS2 (mov%L2,%3,%2), xops); ++ output_asm_insn (AS2 (sar%L3,%1,%3), xops); /* shift by 32 */ ++ ++ if (INTVAL (xops[0]) > 32) ++ { ++ xops[0] = GEN_INT (INTVAL (xops[0]) - 32); ++ output_asm_insn (AS2 (sar%L2,%0,%2), xops); /* Remaining shift */ ++ } ++ } ++ else ++ { ++ output_asm_insn (AS3 (shrd%L2,%0,%3,%2), xops); ++ output_asm_insn (AS2 (sar%L3,%0,%3), xops); ++ } ++ ++ RET; ++}") ++ ++(define_insn "ashrdi3_non_const_int" ++ [(set (match_operand:DI 0 "register_operand" "=&r") ++ (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") ++ (match_operand:QI 2 "register_operand" "c")))] ++ "" ++ "* ++{ ++ rtx xops[5], low[1], high[1]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 1, low, high); ++ xops[0] = operands[2]; ++ xops[1] = GEN_INT (32); ++ xops[2] = low[0]; ++ xops[3] = high[0]; ++ xops[4] = gen_label_rtx (); ++ ++ output_asm_insn (AS3_SHIFT_DOUBLE (shrd%L2,%0,%3,%2), xops); ++ output_asm_insn (AS2 (sar%L3,%0,%3), xops); ++ output_asm_insn (AS2 (test%B0,%1,%b0), xops); ++ output_asm_insn (AS1 (je,%X4), xops); ++ xops[1] = GEN_INT (31); ++ output_asm_insn (AS2 (mov%L2,%3,%2), xops); ++ output_asm_insn (AS2 (sar%L3,%1,%3), xops); /* shift by 32 */ ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ++ CODE_LABEL_NUMBER (xops[4])); ++ RET; ++}") ++ ++(define_insn "ashrsi3_31" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,d") ++ (ashiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "0,a") ++ (const_int 31)))] ++ "!TARGET_PENTIUM || optimize_size" ++ "@ ++ sar%L0 $31,%0 ++ cltd") ++ ++(define_insn "ashrsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (ashiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "0") ++ (match_operand:SI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (sar%L0,%b2,%0); ++ else ++ return AS2 (sar%L0,%2,%0); ++}") ++ ++(define_insn "ashrhi3" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r") ++ (ashiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "0") ++ (match_operand:HI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (sar%W0,%b2,%0); ++ else ++ return AS2 (sar%W0,%2,%0); ++}") ++ ++(define_insn "ashrqi3" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm") ++ (ashiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0") ++ (match_operand:QI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (sar%B0,%b2,%0); ++ else ++ return AS2 (sar%B0,%2,%0); ++}") ++ ++;;- logical shift instructions ++ ++;; See comment above `ashldi3' about how this works. ++ ++(define_expand "lshrdi3" ++ [(set (match_operand:DI 0 "register_operand" "") ++ (lshiftrt:DI (match_operand:DI 1 "register_operand" "") ++ (match_operand:QI 2 "nonmemory_operand" "")))] ++ "" ++ " ++{ ++ if (GET_CODE (operands[2]) != CONST_INT ++ || ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')) ++ { ++ operands[2] = copy_to_mode_reg (QImode, operands[2]); ++ emit_insn (gen_lshrdi3_non_const_int (operands[0], operands[1], ++ operands[2])); ++ } ++ else ++ emit_insn (gen_lshrdi3_const_int (operands[0], operands[1], operands[2])); ++ ++ DONE; ++}") ++ ++(define_insn "lshrdi3_32" ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=r") ++ (lshiftrt:DI (match_operand:DI 1 "nonimmediate_operand" "r") ++ (const_int 32)))] ++ "" ++ "* ++{ ++ rtx low[2], high[2], xops[4]; ++ ++ split_di (operands, 2, low, high); ++ xops[0] = low[0]; ++ xops[1] = high[1]; ++ xops[2] = high[0]; ++ xops[3] = const0_rtx; ++ if (!rtx_equal_p (xops[0], xops[1])) ++ output_asm_insn (AS2 (mov%L0,%1,%0), xops); ++ ++ if (GET_CODE (low[0]) == MEM) ++ output_asm_insn (AS2 (mov%L2,%3,%2), xops); ++ else ++ output_asm_insn (AS2 (xor%L2,%2,%2), xops); ++ ++ RET; ++}") ++ ++(define_insn "lshrdi3_const_int" ++ [(set (match_operand:DI 0 "register_operand" "=&r") ++ (lshiftrt:DI (match_operand:DI 1 "register_operand" "0") ++ (match_operand:QI 2 "const_int_operand" "J")))] ++ "CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')" ++ "* ++{ ++ rtx xops[4], low[1], high[1]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 1, low, high); ++ xops[0] = operands[2]; ++ xops[1] = const1_rtx; ++ xops[2] = low[0]; ++ xops[3] = high[0]; ++ ++ if (INTVAL (xops[0]) > 31) ++ { ++ output_asm_insn (AS2 (mov%L2,%3,%2), xops); /* Fast shift by 32 */ ++ output_asm_insn (AS2 (xor%L3,%3,%3), xops); ++ ++ if (INTVAL (xops[0]) > 32) ++ { ++ xops[0] = GEN_INT (INTVAL (xops[0]) - 32); ++ output_asm_insn (AS2 (shr%L2,%0,%2), xops); /* Remaining shift */ ++ } ++ } ++ else ++ { ++ output_asm_insn (AS3 (shrd%L2,%0,%3,%2), xops); ++ output_asm_insn (AS2 (shr%L3,%0,%3), xops); ++ } ++ ++ RET; ++}") ++ ++(define_insn "lshrdi3_non_const_int" ++ [(set (match_operand:DI 0 "register_operand" "=&r") ++ (lshiftrt:DI (match_operand:DI 1 "register_operand" "0") ++ (match_operand:QI 2 "register_operand" "c")))] ++ "" ++ "* ++{ ++ rtx xops[5], low[1], high[1]; ++ ++ CC_STATUS_INIT; ++ ++ split_di (operands, 1, low, high); ++ xops[0] = operands[2]; ++ xops[1] = GEN_INT (32); ++ xops[2] = low[0]; ++ xops[3] = high[0]; ++ xops[4] = gen_label_rtx (); ++ ++ output_asm_insn (AS3_SHIFT_DOUBLE (shrd%L2,%0,%3,%2), xops); ++ output_asm_insn (AS2 (shr%L3,%0,%3), xops); ++ output_asm_insn (AS2 (test%B0,%1,%b0), xops); ++ output_asm_insn (AS1 (je,%X4), xops); ++ output_asm_insn (AS2 (mov%L2,%3,%2), xops); /* Fast shift by 32 */ ++ output_asm_insn (AS2 (xor%L3,%3,%3), xops); ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ++ CODE_LABEL_NUMBER (xops[4])); ++ RET; ++}") ++ ++(define_insn "lshrsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (lshiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "0") ++ (match_operand:SI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (shr%L0,%b2,%0); ++ else ++ return AS2 (shr%L0,%2,%1); ++}") ++ ++(define_insn "lshrhi3" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r") ++ (lshiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "0") ++ (match_operand:HI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (shr%W0,%b2,%0); ++ else ++ return AS2 (shr%W0,%2,%0); ++}") ++ ++(define_insn "lshrqi3" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm") ++ (lshiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0") ++ (match_operand:QI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (shr%B0,%b2,%0); ++ else ++ return AS2 (shr%B0,%2,%0); ++}") ++ ++;;- rotate instructions ++ ++(define_insn "rotlsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (rotate:SI (match_operand:SI 1 "nonimmediate_operand" "0") ++ (match_operand:SI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (rol%L0,%b2,%0); ++ else ++ return AS2 (rol%L0,%2,%0); ++}") ++ ++(define_insn "rotlhi3" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r") ++ (rotate:HI (match_operand:HI 1 "nonimmediate_operand" "0") ++ (match_operand:HI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (rol%W0,%b2,%0); ++ else ++ return AS2 (rol%W0,%2,%0); ++}") ++ ++(define_insn "rotlqi3" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm") ++ (rotate:QI (match_operand:QI 1 "nonimmediate_operand" "0") ++ (match_operand:QI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (rol%B0,%b2,%0); ++ else ++ return AS2 (rol%B0,%2,%0); ++}") ++ ++(define_insn "rotrsi3" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (rotatert:SI (match_operand:SI 1 "nonimmediate_operand" "0") ++ (match_operand:SI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (ror%L0,%b2,%0); ++ else ++ return AS2 (ror%L0,%2,%0); ++}") ++ ++(define_insn "rotrhi3" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=r") ++ (rotatert:HI (match_operand:HI 1 "nonimmediate_operand" "0") ++ (match_operand:HI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (ror%W0,%b2,%0); ++ else ++ return AS2 (ror%W0,%2,%0); ++}") ++ ++(define_insn "rotrqi3" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm") ++ (rotatert:QI (match_operand:QI 1 "nonimmediate_operand" "0") ++ (match_operand:QI 2 "nonmemory_operand" "cI")))] ++ "" ++ "* ++{ ++ if (REG_P (operands[2])) ++ return AS2 (ror%B0,%b2,%0); ++ else ++ return AS2 (ror%B0,%2,%0); ++}") ++ ++/* ++;; This usually looses. But try a define_expand to recognize a few case ++;; we can do efficiently, such as accessing the "high" QImode registers, ++;; %ah, %bh, %ch, %dh. ++;; ??? Note this has a botch on the mode of operand 0, which needs to be ++;; fixed if this is ever enabled. ++(define_insn "insv" ++ [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+&r") ++ (match_operand:SI 1 "immediate_operand" "i") ++ (match_operand:SI 2 "immediate_operand" "i")) ++ (match_operand:SI 3 "nonmemory_operand" "ri"))] ++ "" ++ "* ++{ ++ if (INTVAL (operands[1]) + INTVAL (operands[2]) > GET_MODE_BITSIZE (SImode)) ++ abort (); ++ if (GET_CODE (operands[3]) == CONST_INT) ++ { ++ unsigned int mask = (1 << INTVAL (operands[1])) - 1; ++ operands[1] = GEN_INT (~(mask << INTVAL (operands[2]))); ++ output_asm_insn (AS2 (and%L0,%1,%0), operands); ++ operands[3] = GEN_INT (INTVAL (operands[3]) << INTVAL (operands[2])); ++ output_asm_insn (AS2 (or%L0,%3,%0), operands); ++ } ++ else ++ { ++ operands[0] = gen_rtx_REG (SImode, REGNO (operands[0])); ++ if (INTVAL (operands[2])) ++ output_asm_insn (AS2 (ror%L0,%2,%0), operands); ++ output_asm_insn (AS3 (shrd%L0,%1,%3,%0), operands); ++ operands[2] = GEN_INT (BITS_PER_WORD ++ - INTVAL (operands[1]) - INTVAL (operands[2])); ++ if (INTVAL (operands[2])) ++ output_asm_insn (AS2 (ror%L0,%2,%0), operands); ++ } ++ RET; ++}") ++*/ ++/* ++;; ??? There are problems with the mode of operand[3]. The point of this ++;; is to represent an HImode move to a "high byte" register. ++ ++(define_expand "insv" ++ [(set (zero_extract:SI (match_operand:SI 0 "general_operand" "") ++ (match_operand:SI 1 "immediate_operand" "") ++ (match_operand:SI 2 "immediate_operand" "")) ++ (match_operand:QI 3 "nonmemory_operand" "ri"))] ++ "" ++ " ++{ ++ if (GET_CODE (operands[1]) != CONST_INT ++ || GET_CODE (operands[2]) != CONST_INT) ++ FAIL; ++ ++ if (! (INTVAL (operands[1]) == 8 ++ && (INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 0)) ++ && ! INTVAL (operands[1]) == 1) ++ FAIL; ++}") ++*/ ++ ++;; On i386, the register count for a bit operation is *not* truncated, ++;; so SHIFT_COUNT_TRUNCATED must not be defined. ++ ++;; On i486, the shift & or/and code is faster than bts or btr. If ++;; operands[0] is a MEM, the bt[sr] is half as fast as the normal code. ++ ++;; On i386, bts is a little faster if operands[0] is a reg, and a ++;; little slower if operands[0] is a MEM, than the shift & or/and code. ++;; Use bts & btr, since they reload better. ++ ++;; General bit set and clear. ++(define_insn "" ++ [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r") ++ (const_int 1) ++ (match_operand:SI 2 "register_operand" "r")) ++ (match_operand:SI 3 "const_int_operand" "n"))] ++ "TARGET_USE_BIT_TEST && GET_CODE (operands[2]) != CONST_INT" ++ "* ++{ ++ CC_STATUS_INIT; ++ ++ if (INTVAL (operands[3]) == 1) ++ return AS2 (bts%L0,%2,%0); ++ else ++ return AS2 (btr%L0,%2,%0); ++}") ++ ++;; Bit complement. See comments on previous pattern. ++;; ??? Is this really worthwhile? ++(define_insn "" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (xor:SI (ashift:SI (const_int 1) ++ (match_operand:SI 1 "register_operand" "r")) ++ (match_operand:SI 2 "nonimmediate_operand" "0")))] ++ "TARGET_USE_BIT_TEST && GET_CODE (operands[1]) != CONST_INT" ++ "* ++{ ++ CC_STATUS_INIT; ++ ++ return AS2 (btc%L0,%1,%0); ++}") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=r") ++ (xor:SI (match_operand:SI 1 "nonimmediate_operand" "0") ++ (ashift:SI (const_int 1) ++ (match_operand:SI 2 "register_operand" "r"))))] ++ "TARGET_USE_BIT_TEST && GET_CODE (operands[2]) != CONST_INT" ++ "* ++{ ++ CC_STATUS_INIT; ++ ++ return AS2 (btc%L0,%2,%0); ++}") ++ ++;; Recognizers for bit-test instructions. ++ ++;; The bt opcode allows a MEM in operands[0]. But on both i386 and ++;; i486, it is faster to copy a MEM to REG and then use bt, than to use ++;; bt on the MEM directly. ++ ++;; ??? The first argument of a zero_extract must not be reloaded, so ++;; don't allow a MEM in the operand predicate without allowing it in the ++;; constraint. ++ ++(define_insn "" ++ [(set (cc0) (zero_extract (match_operand:SI 0 "register_operand" "r") ++ (const_int 1) ++ (match_operand:SI 1 "register_operand" "r")))] ++ "GET_CODE (operands[1]) != CONST_INT" ++ "* ++{ ++ cc_status.flags |= CC_Z_IN_NOT_C; ++ return AS2 (bt%L0,%1,%0); ++}") ++ ++(define_insn "" ++ [(set (cc0) (zero_extract (match_operand:SI 0 "register_operand" "r") ++ (match_operand:SI 1 "const_int_operand" "n") ++ (match_operand:SI 2 "const_int_operand" "n")))] ++ "" ++ "* ++{ ++ unsigned int mask; ++ ++ mask = ((1 << INTVAL (operands[1])) - 1) << INTVAL (operands[2]); ++ operands[1] = GEN_INT (mask); ++ ++ if (QI_REG_P (operands[0]) ++ /* A Pentium test is pairable only with eax. Not with ah or al. */ ++ && (! REG_P (operands[0]) || REGNO (operands[0]) || !TARGET_PENTIUM ++ || optimize_size)) ++ { ++ if ((mask & ~0xff) == 0) ++ { ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ return AS2 (test%B0,%1,%b0); ++ } ++ ++ if ((mask & ~0xff00) == 0) ++ { ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ operands[1] = GEN_INT (mask >> 8); ++ return AS2 (test%B0,%1,%h0); ++ } ++ } ++ ++ return AS2 (test%L0,%1,%0); ++}") ++ ++;; ??? All bets are off if operand 0 is a volatile MEM reference. ++;; The CPU may access unspecified bytes around the actual target byte. ++;; lcs -- fix this! ++(define_insn "" ++ [(set (cc0) (zero_extract (match_operand:QI 0 "memory_operand" "m") ++ (match_operand:SI 1 "const_int_operand" "n") ++ (match_operand:SI 2 "const_int_operand" "n")))] ++ "GET_CODE (operands[0]) != MEM || ! MEM_VOLATILE_P (operands[0])" ++ "* ++{ ++ unsigned int mask; ++ ++ mask = ((1 << INTVAL (operands[1])) - 1) << INTVAL (operands[2]); ++ operands[1] = GEN_INT (mask); ++ ++ if ((! REG_P (operands[0]) || QI_REG_P (operands[0])) ++ /* A Pentium test is pairable only with eax. Not with ah or al. */ ++ && (! REG_P (operands[0]) || REGNO (operands[0]) || !TARGET_PENTIUM ++ || optimize_size)) ++ { ++ if ((mask & ~0xff) == 0) ++ { ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ return AS2 (test%B0,%1,%b0); ++ } ++ ++ if ((mask & ~0xff00) == 0) ++ { ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ operands[1] = GEN_INT (mask >> 8); ++ ++ if (QI_REG_P (operands[0])) ++ return AS2 (test%B0,%1,%h0); ++ else ++ { ++ operands[0] = adj_offsettable_operand (operands[0], 1); ++ return AS2 (test%B0,%1,%b0); ++ } ++ } ++ ++ if (GET_CODE (operands[0]) == MEM && (mask & ~0xff0000) == 0) ++ { ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ operands[1] = GEN_INT (mask >> 16); ++ operands[0] = adj_offsettable_operand (operands[0], 2); ++ return AS2 (test%B0,%1,%b0); ++ } ++ ++ if (GET_CODE (operands[0]) == MEM && (mask & ~0xff000000) == 0) ++ { ++ cc_status.flags |= CC_NOT_NEGATIVE; ++ operands[1] = GEN_INT (mask >> 24); ++ operands[0] = adj_offsettable_operand (operands[0], 3); ++ return AS2 (test%B0,%1,%b0); ++ } ++ } ++ ++ if (CONSTANT_P (operands[1]) || GET_CODE (operands[0]) == MEM) ++ return AS2 (test%L0,%1,%0); ++ ++ return AS2 (test%L1,%0,%1); ++}") ++ ++;; Store-flag instructions. ++ ++;; For all sCOND expanders, also expand the compare or test insn that ++;; generates cc0. Generate an equality comparison if `seq' or `sne'. ++ ++(define_expand "seq" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (eq:QI (cc0) (const_int 0)))] ++ "" ++ " ++{ ++ if (TARGET_IEEE_FP ++ && GET_MODE_CLASS (GET_MODE (i386_compare_op0)) == MODE_FLOAT) ++ operands[1] = (*i386_compare_gen_eq)(i386_compare_op0, i386_compare_op1); ++ else ++ operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1); ++}") ++ ++(define_expand "sne" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (ne:QI (cc0) (const_int 0)))] ++ "" ++ " ++{ ++ if (TARGET_IEEE_FP ++ && GET_MODE_CLASS (GET_MODE (i386_compare_op0)) == MODE_FLOAT) ++ operands[1] = (*i386_compare_gen_eq)(i386_compare_op0, i386_compare_op1); ++ else ++ operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1); ++}") ++ ++(define_expand "sgt" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (gt:QI (cc0) (const_int 0)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "sgtu" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (gtu:QI (cc0) (const_int 0)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "slt" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (lt:QI (cc0) (const_int 0)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "sltu" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (ltu:QI (cc0) (const_int 0)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "sge" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (ge:QI (cc0) (const_int 0)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "sgeu" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (geu:QI (cc0) (const_int 0)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "sle" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (le:QI (cc0) (const_int 0)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "sleu" ++ [(match_dup 1) ++ (set (match_operand:QI 0 "register_operand" "") ++ (leu:QI (cc0) (const_int 0)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++;; The 386 sCOND opcodes can write to memory. But a gcc sCOND insn may ++;; not have any input reloads. A MEM write might need an input reload ++;; for the address of the MEM. So don't allow MEM as the SET_DEST. ++ ++(define_insn "*setcc" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=qm") ++ (match_operator:QI 1 "comparison_operator" [(cc0) (const_int 0)]))] ++ "reload_completed || register_operand (operands[0], QImode)" ++ "* ++{ ++ enum rtx_code code = GET_CODE (operands[1]); ++ if (cc_prev_status.flags & CC_TEST_AX) ++ { ++ int eq; ++ HOST_WIDE_INT c; ++ operands[2] = gen_rtx_REG (SImode, 0); ++ switch (code) ++ { ++ case EQ: ++ c = 0x4000; ++ eq = 0; ++ break; ++ case NE: ++ c = 0x4000; ++ eq = 1; ++ break; ++ case GT: ++ c = 0x4100; ++ eq = 1; ++ break; ++ case LT: ++ c = 0x100; ++ eq = 0; ++ break; ++ case GE: ++ c = 0x100; ++ eq = 1; ++ break; ++ case LE: ++ c = 0x4100; ++ eq = 0; ++ break; ++ default: ++ abort (); ++ } ++ if (!TARGET_PENTIUM || optimize_size) ++ { ++ operands[3] = GEN_INT (c >> 8); ++ output_asm_insn (AS2 (test%B0,%3,%h2), operands); ++ } ++ else ++ { ++ operands[3] = GEN_INT (c); ++ output_asm_insn (AS2 (test%L0,%3,%2), operands); ++ } ++ return eq ? AS1 (sete,%0) : AS1 (setne, %0); ++ } ++ ++ if ((cc_status.flags & CC_NO_OVERFLOW) && (code == LE || code == GT)) ++ return (char *)0; ++ return AS1(set%D1,%0); ++}") ++ ++ ++;; Basic conditional jump instructions. ++;; We ignore the overflow flag for signed branch instructions. ++ ++;; For all bCOND expanders, also expand the compare or test insn that ++;; generates cc0. Generate an equality comparison if `beq' or `bne'. ++ ++(define_expand "beq" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (eq (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ if (TARGET_IEEE_FP ++ && GET_MODE_CLASS (GET_MODE (i386_compare_op0)) == MODE_FLOAT) ++ operands[1] = (*i386_compare_gen_eq)(i386_compare_op0, i386_compare_op1); ++ else ++ operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1); ++}") ++ ++(define_expand "bne" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (ne (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ " ++{ ++ if (TARGET_IEEE_FP ++ && GET_MODE_CLASS (GET_MODE (i386_compare_op0)) == MODE_FLOAT) ++ operands[1] = (*i386_compare_gen_eq)(i386_compare_op0, i386_compare_op1); ++ else ++ operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1); ++}") ++ ++ ++(define_expand "bgt" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (gt (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "bgtu" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (gtu (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "blt" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (lt (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++ ++(define_expand "bltu" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (ltu (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "bge" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (ge (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "bgeu" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (geu (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "ble" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (le (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_expand "bleu" ++ [(match_dup 1) ++ (set (pc) ++ (if_then_else (leu (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++ "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (match_operator 0 "comparison_operator" ++ [(cc0) (const_int 0)]) ++ (label_ref (match_operand 1 "" "")) ++ (pc)))] ++ "" ++ "* ++{ ++ enum rtx_code code = GET_CODE (operands[0]); ++ if (cc_prev_status.flags & CC_TEST_AX) ++ { ++ int eq; ++ HOST_WIDE_INT c; ++ operands[2] = gen_rtx_REG (SImode, 0); ++ switch (code) ++ { ++ case EQ: ++ c = 0x4000; ++ eq = 0; ++ break; ++ case NE: ++ c = 0x4000; ++ eq = 1; ++ break; ++ case GT: ++ c = 0x4100; ++ eq = 1; ++ break; ++ case LT: ++ c = 0x100; ++ eq = 0; ++ break; ++ case GE: ++ c = 0x100; ++ eq = 1; ++ break; ++ case LE: ++ c = 0x4100; ++ eq = 0; ++ break; ++ default: ++ abort (); ++ } ++ if (!TARGET_PENTIUM || optimize_size) ++ { ++ operands[3] = GEN_INT (c >> 8); ++ output_asm_insn (AS2 (test%B0,%3,%h2), operands); ++ } ++ else ++ { ++ operands[3] = GEN_INT (c); ++ output_asm_insn (AS2 (test%L0,%3,%2), operands); ++ } ++ return eq ? AS1 (je,%l1) : AS1 (jne, %l1); ++ } ++ if ((cc_status.flags & CC_NO_OVERFLOW) && (code == LE || code == GT)) ++ return (char *)0; ++ ++ return AS1(j%D0,%l1); ++}") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (match_operator 0 "comparison_operator" ++ [(cc0) (const_int 0)]) ++ (pc) ++ (label_ref (match_operand 1 "" ""))))] ++ "" ++ "* ++{ ++ enum rtx_code code = GET_CODE (operands[0]); ++ if (cc_prev_status.flags & CC_TEST_AX) ++ { ++ int eq; ++ HOST_WIDE_INT c; ++ operands[2] = gen_rtx_REG (SImode, 0); ++ switch (code) ++ { ++ case EQ: ++ c = 0x4000; ++ eq = 1; ++ break; ++ case NE: ++ c = 0x4000; ++ eq = 0; ++ break; ++ case GT: ++ c = 0x4100; ++ eq = 0; ++ break; ++ case LT: ++ c = 0x100; ++ eq = 1; ++ break; ++ case GE: ++ c = 0x100; ++ eq = 0; ++ break; ++ case LE: ++ c = 0x4100; ++ eq = 1; ++ break; ++ default: ++ abort (); ++ } ++ if (!TARGET_PENTIUM || optimize_size) ++ { ++ operands[3] = GEN_INT (c >> 8); ++ output_asm_insn (AS2 (test%B0,%3,%h2), operands); ++ } ++ else ++ { ++ operands[3] = GEN_INT (c); ++ output_asm_insn (AS2 (test%L0,%3,%2), operands); ++ } ++ return eq ? AS1 (je,%l1) : AS1 (jne, %l1); ++ } ++ if ((cc_status.flags & CC_NO_OVERFLOW) && (code == LE || code == GT)) ++ return (char *)0; ++ ++ return AS1(j%d0,%l1); ++}") ++ ++;; Unconditional and other jump instructions ++ ++(define_insn "jump" ++ [(set (pc) ++ (label_ref (match_operand 0 "" "")))] ++ "" ++ "jmp %l0" ++ [(set_attr "memory" "none")]) ++ ++(define_insn "indirect_jump" ++ [(set (pc) (match_operand:SI 0 "nonimmediate_operand" "r"))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ ++ return AS1 (jmp,%*%0); ++}" ++ [(set_attr "memory" "none")]) ++ ++;; ??? could transform while(--i > 0) S; to if (--i > 0) do S; while(--i); ++;; if S does not change i ++ ++(define_expand "decrement_and_branch_until_zero" ++ [(parallel [(set (pc) ++ (if_then_else (ge (plus:SI (match_operand:SI 0 "general_operand" "") ++ (const_int -1)) ++ (const_int 0)) ++ (label_ref (match_operand 1 "" "")) ++ (pc))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) ++ (const_int -1)))])] ++ "" ++ "") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (match_operator 0 "arithmetic_comparison_operator" ++ [(plus:SI (match_operand:SI 1 "nonimmediate_operand" "+c*r,!m") ++ (match_operand:SI 2 "general_operand" "ri,ri")) ++ (const_int 0)]) ++ (label_ref (match_operand 3 "" "")) ++ (pc))) ++ (set (match_dup 1) ++ (plus:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ ++ if (GET_CODE (operands[1]) == REG && REGNO (operands[2]) == 2 && ++ operands[2] == constm1_rtx && ix86_cpu == PROCESSOR_K6) ++ return \"loop %l3\"; ++ ++ if (GET_CODE (operands[1]) == MEM) ++ { ++ if (GET_CODE( XEXP( operands[1], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[1], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[1], 0), 0) ) == 0 ) ) ) ++ { ++ operands[4] = gen_rtx_REG (SImode, 1); // edx ++ } ++ else ++ { ++ operands[4] = gen_rtx_REG (SImode, 0); // eax ++ } ++ ++ output_asm_insn (AS2 (xchg%L1,%4,%1), operands); ++ output_asm_insn (AS1 (bswap,%4), operands); ++ ++ if (operands[2] == constm1_rtx) ++ output_asm_insn (AS1 (dec%L4,%4), operands); ++ ++ else if (operands[2] == const1_rtx) ++ output_asm_insn (AS1 (inc%L4,%4), operands); ++ ++ else ++ output_asm_insn (AS2 (add%L4,%2,%4), operands); ++ ++ output_asm_insn (AS1 (bswap,%4), operands); ++ output_asm_insn (AS2 (xchg%L1,%4,%1), operands); ++ } ++ else ++ { ++ if (operands[2] == constm1_rtx) ++ output_asm_insn (AS1 (dec%L1,%1), operands); ++ ++ else if (operands[2] == const1_rtx) ++ output_asm_insn (AS1 (inc%L1,%1), operands); ++ ++ else ++ output_asm_insn (AS2 (add%L1,%2,%1), operands); ++ } ++ ++ return AS1 (%J0,%l3); ++}") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (match_operator 0 "arithmetic_comparison_operator" ++ [(minus:SI (match_operand:SI 1 "nonimmediate_operand" "+r,!m") ++ (match_operand:SI 2 "general_operand" "ri,ri")) ++ (const_int 0)]) ++ (label_ref (match_operand 3 "" "")) ++ (pc))) ++ (set (match_dup 1) ++ (minus:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ ++ if (GET_CODE (operands[1]) == MEM) ++ { ++ if (GET_CODE( XEXP( operands[1], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[1], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[1], 0), 0) ) == 0 ) ) ) ++ { ++ operands[4] = gen_rtx_REG (SImode, 1); // edx ++ } ++ else ++ { ++ operands[4] = gen_rtx_REG (SImode, 0); // eax ++ } ++ ++ output_asm_insn (AS2 (xchg%L1,%4,%1), operands); ++ output_asm_insn (AS1 (bswap,%4), operands); ++ ++ if (operands[2] == const1_rtx) ++ output_asm_insn (AS1 (dec%L4,%4), operands); ++ ++ else if (operands[2] == constm1_rtx) ++ output_asm_insn (AS1 (inc%L4,%4), operands); ++ ++ else ++ output_asm_insn (AS2 (sub%L4,%2,%4), operands); ++ ++ output_asm_insn (AS1 (bswap,%4), operands); ++ output_asm_insn (AS2 (xchg%L1,%4,%1), operands); ++ } ++ else ++ { ++ if (operands[2] == const1_rtx) ++ output_asm_insn (AS1 (dec%L1,%1), operands); ++ ++ // lcs: the following was '(operands[1] == constm1_rtx)' ??! ++ else if (operands[2] == constm1_rtx) ++ output_asm_insn (AS1 (inc%L1,%1), operands); ++ ++ else ++ output_asm_insn (AS2 (sub%L1,%2,%1), operands); ++ } ++ ++ return AS1 (%J0,%l3); ++}") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (ne (match_operand:SI 0 "general_operand" "+r,!g") ++ (const_int 0)) ++ (label_ref (match_operand 1 "" "")) ++ (pc))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) ++ (const_int -1)))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ operands[2] = const1_rtx; ++ if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) ) ++ { ++ operands[3] = gen_rtx_REG (SImode, 1); // edx ++ } ++ else ++ { ++ operands[3] = gen_rtx_REG (SImode, 0); // eax ++ } ++ ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS2 (sub%L3,%2,%3), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS2 (sub%L0,%2,%0), operands); ++ } ++ return \"jnc %l1\"; ++}") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (eq (match_operand:SI 0 "general_operand" "+r,!g") ++ (const_int 0)) ++ (label_ref (match_operand 1 "" "")) ++ (pc))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) ++ (const_int -1)))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ operands[2] = const1_rtx; ++ if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) ) ++ { ++ operands[3] = gen_rtx_REG (SImode, 1); // edx ++ } ++ else ++ { ++ operands[3] = gen_rtx_REG (SImode, 0); // eax ++ } ++ ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS2 (sub%L3,%2,%3), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS2 (sub%L0,%2,%0), operands); ++ } ++ return \"jc %l1\"; ++}") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (ne (match_operand:SI 0 "general_operand" "+r,!g") ++ (const_int 1)) ++ (label_ref (match_operand 1 "" "")) ++ (pc))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) ++ (const_int -1)))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) ) ++ { ++ operands[3] = gen_rtx_REG (SImode, 1); // edx ++ } ++ else ++ { ++ operands[3] = gen_rtx_REG (SImode, 0); // eax ++ } ++ ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS1 (dec%L3,%3), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS1 (dec%L0,%0), operands); ++ } ++ return \"jnz %l1\"; ++}") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (eq (match_operand:SI 0 "general_operand" "+r,!g") ++ (const_int 1)) ++ (label_ref (match_operand 1 "" "")) ++ (pc))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) ++ (const_int -1)))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) ) ++ { ++ operands[3] = gen_rtx_REG (SImode, 1); // edx ++ } ++ else ++ { ++ operands[3] = gen_rtx_REG (SImode, 0); // eax ++ } ++ ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS1 (dec%L3,%3), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS1 (dec%L0,%0), operands); ++ } ++ return \"jz %l1\"; ++}") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (ne (match_operand:SI 0 "general_operand" "+r,!g") ++ (const_int -1)) ++ (label_ref (match_operand 1 "" "")) ++ (pc))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) ++ (const_int 1)))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) ) ++ { ++ operands[3] = gen_rtx_REG (SImode, 1); // edx ++ } ++ else ++ { ++ operands[3] = gen_rtx_REG (SImode, 0); // eax ++ } ++ ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS1 (inc%L3,%3), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS1 (inc%L0,%0), operands); ++ } ++ return \"jnz %l1\"; ++}") ++ ++(define_insn "" ++ [(set (pc) ++ (if_then_else (eq (match_operand:SI 0 "general_operand" "+r,!g") ++ (const_int -1)) ++ (label_ref (match_operand 1 "" "")) ++ (pc))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) ++ (const_int 1)))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ if (GET_CODE (operands[0]) == MEM) ++ { ++ if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS && ++ ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) && ++ REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) ) ++ { ++ operands[3] = gen_rtx_REG (SImode, 1); // edx ++ } ++ else ++ { ++ operands[3] = gen_rtx_REG (SImode, 0); // eax ++ } ++ ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS1 (inc%L3,%3), operands); ++ output_asm_insn (AS1 (bswap,%3), operands); ++ output_asm_insn (AS2 (xchg%L0,%3,%0), operands); ++ } ++ else ++ { ++ output_asm_insn (AS1 (inc%L0,%0), operands); ++ } ++ return \"jz %l1\"; ++}") ++ ++;; Implement switch statements when generating PIC code. Switches are ++;; implemented by `tablejump' when not using -fpic. ++ ++;; Emit code here to do the range checking and make the index zero based. ++ ++(define_expand "casesi" ++ [(set (match_dup 5) ++ (match_operand:SI 0 "general_operand" "")) ++ (set (match_dup 6) ++ (minus:SI (match_dup 5) ++ (match_operand:SI 1 "general_operand" ""))) ++ (set (cc0) ++ (compare:CC (match_dup 6) ++ (match_operand:SI 2 "general_operand" ""))) ++ (set (pc) ++ (if_then_else (gtu (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 4 "" "")) ++ (pc))) ++ (parallel ++ [(set (pc) ++ (minus:SI (reg:SI 3) ++ (mem:SI (plus:SI (mult:SI (match_dup 6) ++ (const_int 4)) ++ (label_ref (match_operand 3 "" "")))))) ++ (clobber (match_scratch:SI 7 ""))])] ++ "flag_pic" ++ " ++{ ++ operands[5] = gen_reg_rtx (SImode); ++ operands[6] = gen_reg_rtx (SImode); ++ current_function_uses_pic_offset_table = 1; ++}") ++ ++;; Implement a casesi insn. ++ ++;; Each entry in the "addr_diff_vec" looks like this as the result of the ++;; two rules below: ++;; ++;; .long _GLOBAL_OFFSET_TABLE_+[.-.L2] ++;; ++;; 1. An expression involving an external reference may only use the ++;; addition operator, and only with an assembly-time constant. ++;; The example above satisfies this because ".-.L2" is a constant. ++;; ++;; 2. The symbol _GLOBAL_OFFSET_TABLE_ is magic, and at link time is ++;; given the value of "GOT - .", where GOT is the actual address of ++;; the Global Offset Table. Therefore, the .long above actually ++;; stores the value "( GOT - . ) + [ . - .L2 ]", or "GOT - .L2". The ++;; expression "GOT - .L2" by itself would generate an error from as(1). ++;; ++;; The pattern below emits code that looks like this: ++;; ++;; movl %ebx,reg ++;; subl TABLE@GOTOFF(%ebx,index,4),reg ++;; jmp reg ++;; ++;; The addr_diff_vec contents may be directly referenced with @GOTOFF, since ++;; the addr_diff_vec is known to be part of this module. ++;; ++;; The subl above calculates "GOT - (( GOT - . ) + [ . - .L2 ])", which ++;; evaluates to just ".L2". ++ ++(define_insn "" ++ [(set (pc) ++ (minus:SI (reg:SI 3) ++ (mem:SI (plus:SI ++ (mult:SI (match_operand:SI 0 "register_operand" "r") ++ (const_int 4)) ++ (label_ref (match_operand 1 "" "")))))) ++ (clobber (match_scratch:SI 2 "=&r"))] ++ "" ++ "* ++{ ++ rtx xops[4]; ++ ++ xops[0] = operands[0]; ++ xops[1] = operands[1]; ++ xops[2] = operands[2]; ++ xops[3] = pic_offset_table_rtx; ++//lcs -- fix this ++ output_asm_insn (AS2 (mov%L2,%3,%2), xops); ++ output_asm_insn (\"sub%L2 %l1@GOTOFF(%3,%0,4),%2\", xops); ++ output_asm_insn (AS1 (jmp,%*%2), xops); ++ ASM_OUTPUT_ALIGN (asm_out_file, i386_align_jumps); ++ RET; ++}") ++ ++(define_insn "tablejump" ++ [(set (pc) (match_operand:SI 0 "nonimmediate_operand" "r")) ++ (use (label_ref (match_operand 1 "" "")))] ++ "" ++ "* ++{ ++ CC_STATUS_INIT; ++ ++ return AS1 (jmp,%*%0); ++}") ++ ++;; Call insns. ++ ++;; If generating PIC code, the predicate indirect_operand will fail ++;; for operands[0] containing symbolic references on all of the named ++;; call* patterns. Each named pattern is followed by an unnamed pattern ++;; that matches any call to a symbolic CONST (ie, a symbol_ref). The ++;; unnamed patterns are only used while generating PIC code, because ++;; otherwise the named patterns match. ++ ++;; Call subroutine returning no value. ++ ++(define_expand "call_pop" ++ [(parallel [(call (match_operand:QI 0 "indirect_operand" "") ++ (match_operand:SI 1 "general_operand" "")) ++ (set (reg:SI 7) ++ (plus:SI (reg:SI 7) ++ (match_operand:SI 3 "immediate_operand" "")))])] ++ "" ++ " ++{ ++ rtx addr; ++ ++ if (operands[3] == const0_rtx) ++ { ++ emit_insn (gen_call (operands[0], operands[1])); ++ DONE; ++ } ++ ++ if (flag_pic) ++ current_function_uses_pic_offset_table = 1; ++ ++ /* With half-pic, force the address into a register. */ ++ addr = XEXP (operands[0], 0); ++ if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr)) ++ XEXP (operands[0], 0) = force_reg (Pmode, addr); ++ ++ if (! expander_call_insn_operand (operands[0], QImode)) ++ operands[0] ++ = change_address (operands[0], VOIDmode, ++ copy_to_mode_reg (Pmode, XEXP (operands[0], 0))); ++}") ++;;lcs -- don't know ++(define_insn "" ++ [(call (match_operand:QI 0 "call_insn_operand" "m") ++ (match_operand:SI 1 "general_operand" "g")) ++ (set (reg:SI 7) (plus:SI (reg:SI 7) ++ (match_operand:SI 3 "immediate_operand" "i")))] ++ "" ++ "* ++{ ++ if (GET_CODE (operands[0]) == MEM ++ && ! CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) ++ { ++ operands[0] = XEXP (operands[0], 0); ++ return AS1 (call,%*%0); ++ } ++ else ++ return AS1 (call,%P0); ++}") ++;;lcs -- don't know ++(define_insn "" ++ [(call (mem:QI (match_operand:SI 0 "symbolic_operand" "")) ++ (match_operand:SI 1 "general_operand" "g")) ++ (set (reg:SI 7) (plus:SI (reg:SI 7) ++ (match_operand:SI 3 "immediate_operand" "i")))] ++ "!HALF_PIC_P ()" ++ "call %P0") ++ ++(define_expand "call" ++ [(call (match_operand:QI 0 "indirect_operand" "") ++ (match_operand:SI 1 "general_operand" ""))] ++ ;; Operand 1 not used on the i386. ++ "" ++ " ++{ ++ rtx addr; ++ ++ if (flag_pic) ++ current_function_uses_pic_offset_table = 1; ++ ++ /* With half-pic, force the address into a register. */ ++ addr = XEXP (operands[0], 0); ++ if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr)) ++ XEXP (operands[0], 0) = force_reg (Pmode, addr); ++ ++ if (! expander_call_insn_operand (operands[0], QImode)) ++ operands[0] ++ = change_address (operands[0], VOIDmode, ++ copy_to_mode_reg (Pmode, XEXP (operands[0], 0))); ++}") ++;;lcs -- don't know ++(define_insn "" ++ [(call (match_operand:QI 0 "call_insn_operand" "m") ++ (match_operand:SI 1 "general_operand" "g"))] ++ ;; Operand 1 not used on the i386. ++ "" ++ "* ++{ ++ if (GET_CODE (operands[0]) == MEM ++ && ! CONSTANT_ADDRESS_P (XEXP (operands[0], 0))) ++ { ++ operands[0] = XEXP (operands[0], 0); ++ return AS1 (call,%*%0); ++ } ++ else ++ return AS1 (call,%P0); ++}") ++;;lcs -- don't know ++(define_insn "" ++ [(call (mem:QI (match_operand:SI 0 "symbolic_operand" "")) ++ (match_operand:SI 1 "general_operand" "g"))] ++ ;; Operand 1 not used on the i386. ++ "!HALF_PIC_P ()" ++ "call %P0") ++ ++;; Call subroutine, returning value in operand 0 ++;; (which must be a hard register). ++ ++(define_expand "call_value_pop" ++ [(parallel [(set (match_operand 0 "" "") ++ (call (match_operand:QI 1 "indirect_operand" "") ++ (match_operand:SI 2 "general_operand" ""))) ++ (set (reg:SI 7) ++ (plus:SI (reg:SI 7) ++ (match_operand:SI 4 "immediate_operand" "")))])] ++ "" ++ " ++{ ++ rtx addr; ++ ++ if (operands[4] == const0_rtx) ++ { ++ emit_insn (gen_call_value (operands[0], operands[1], operands[2])); ++ DONE; ++ } ++ ++ if (flag_pic) ++ current_function_uses_pic_offset_table = 1; ++ ++ /* With half-pic, force the address into a register. */ ++ addr = XEXP (operands[1], 0); ++ if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr)) ++ XEXP (operands[1], 0) = force_reg (Pmode, addr); ++ ++ if (! expander_call_insn_operand (operands[1], QImode)) ++ operands[1] ++ = change_address (operands[1], VOIDmode, ++ copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); ++}") ++;;lcs -- don't know ++(define_insn "" ++ [(set (match_operand 0 "" "=rf") ++ (call (match_operand:QI 1 "call_insn_operand" "m") ++ (match_operand:SI 2 "general_operand" "g"))) ++ (set (reg:SI 7) (plus:SI (reg:SI 7) ++ (match_operand:SI 4 "immediate_operand" "i")))] ++ "" ++ "* ++{ ++ if (GET_CODE (operands[1]) == MEM ++ && ! CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) ++ { ++ operands[1] = XEXP (operands[1], 0); ++ output_asm_insn (AS1 (call,%*%1), operands); ++ } ++ else ++ output_asm_insn (AS1 (call,%P1), operands); ++ ++ RET; ++}") ++;;lcs -- don't know ++(define_insn "" ++ [(set (match_operand 0 "" "=rf") ++ (call (mem:QI (match_operand:SI 1 "symbolic_operand" "")) ++ (match_operand:SI 2 "general_operand" "g"))) ++ (set (reg:SI 7) (plus:SI (reg:SI 7) ++ (match_operand:SI 4 "immediate_operand" "i")))] ++ "!HALF_PIC_P ()" ++ "call %P1") ++ ++(define_expand "call_value" ++ [(set (match_operand 0 "" "") ++ (call (match_operand:QI 1 "indirect_operand" "") ++ (match_operand:SI 2 "general_operand" "")))] ++ ;; Operand 2 not used on the i386. ++ "" ++ " ++{ ++ rtx addr; ++ ++ if (flag_pic) ++ current_function_uses_pic_offset_table = 1; ++ ++ /* With half-pic, force the address into a register. */ ++ addr = XEXP (operands[1], 0); ++ if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr)) ++ XEXP (operands[1], 0) = force_reg (Pmode, addr); ++ ++ if (! expander_call_insn_operand (operands[1], QImode)) ++ operands[1] ++ = change_address (operands[1], VOIDmode, ++ copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); ++}") ++;;lcs -- don't know ++(define_insn "" ++ [(set (match_operand 0 "" "=rf") ++ (call (match_operand:QI 1 "call_insn_operand" "m") ++ (match_operand:SI 2 "general_operand" "g")))] ++ ;; Operand 2 not used on the i386. ++ "" ++ "* ++{ ++ if (GET_CODE (operands[1]) == MEM ++ && ! CONSTANT_ADDRESS_P (XEXP (operands[1], 0))) ++ { ++ operands[1] = XEXP (operands[1], 0); ++ output_asm_insn (AS1 (call,%*%1), operands); ++ } ++ else ++ output_asm_insn (AS1 (call,%P1), operands); ++ ++ RET; ++}") ++;;lcs -- don't know ++(define_insn "" ++ [(set (match_operand 0 "" "=rf") ++ (call (mem:QI (match_operand:SI 1 "symbolic_operand" "")) ++ (match_operand:SI 2 "general_operand" "g")))] ++ ;; Operand 2 not used on the i386. ++ "!HALF_PIC_P ()" ++ "call %P1") ++ ++;; Call subroutine returning any type. ++ ++(define_expand "untyped_call" ++ [(parallel [(call (match_operand 0 "" "") ++ (const_int 0)) ++ (match_operand 1 "" "") ++ (match_operand 2 "" "")])] ++ "" ++ " ++{ ++ int i; ++ ++ /* In order to give reg-stack an easier job in validating two ++ coprocessor registers as containing a possible return value, ++ simply pretend the untyped call returns a complex long double ++ value. */ ++ ++ emit_call_insn (TARGET_80387 ++ ? gen_call_value (gen_rtx_REG (XCmode, FIRST_FLOAT_REG), ++ operands[0], const0_rtx) ++ : gen_call (operands[0], const0_rtx)); ++ ++ for (i = 0; i < XVECLEN (operands[2], 0); i++) ++ { ++ rtx set = XVECEXP (operands[2], 0, i); ++ emit_move_insn (SET_DEST (set), SET_SRC (set)); ++ } ++ ++ /* The optimizer does not know that the call sets the function value ++ registers we stored in the result block. We avoid problems by ++ claiming that all hard registers are used and clobbered at this ++ point. */ ++ emit_insn (gen_blockage ()); ++ ++ DONE; ++}") ++ ++;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and ++;; all of memory. This blocks insns from being moved across this point. ++ ++(define_insn "blockage" ++ [(unspec_volatile [(const_int 0)] 0)] ++ "" ++ "" ++ [(set_attr "memory" "none")]) ++ ++;; Insn emitted into the body of a function to return from a function. ++;; This is only done if the function's epilogue is known to be simple. ++;; See comments for simple_386_epilogue in i386.c. ++ ++(define_expand "return" ++ [(return)] ++ "ix86_can_use_return_insn_p ()" ++ "") ++ ++(define_insn "return_internal" ++ [(return)] ++ "reload_completed" ++ "ret" ++ [(set_attr "memory" "none")]) ++ ++(define_insn "return_pop_internal" ++ [(return) ++ (use (match_operand:SI 0 "const_int_operand" ""))] ++ "reload_completed" ++ "ret %0" ++ [(set_attr "memory" "none")]) ++ ++(define_insn "nop" ++ [(const_int 0)] ++ "" ++ "nop" ++ [(set_attr "memory" "none")]) ++ ++(define_expand "prologue" ++ [(const_int 1)] ++ "" ++ " ++{ ++ ix86_expand_prologue (); ++ DONE; ++}") ++ ++;; The use of UNSPEC here is currently not necessary - a simple SET of ebp ++;; to itself would be enough. But this way we are safe even if some optimizer ++;; becomes too clever in the future. ++(define_insn "prologue_set_stack_ptr" ++ [(set (reg:SI 7) ++ (minus:SI (reg:SI 7) (match_operand:SI 0 "immediate_operand" "i"))) ++ (set (reg:SI 6) (unspec:SI [(reg:SI 6)] 4))] ++ "" ++ "* ++{ ++ rtx xops [2]; ++ ++ xops[0] = operands[0]; ++ xops[1] = stack_pointer_rtx; ++ output_asm_insn (AS2 (sub%L1,%0,%1), xops); ++ RET; ++}" ++ [(set_attr "memory" "none")]) ++ ++(define_insn "prologue_set_got" ++ [(set (match_operand:SI 0 "" "") ++ (unspec_volatile ++ [(plus:SI (match_dup 0) ++ (plus:SI (match_operand:SI 1 "symbolic_operand" "") ++ (minus:SI (pc) (match_operand 2 "" ""))))] 1))] ++ "" ++ "* ++{ ++ char buffer[64]; ++ ++ if (TARGET_DEEP_BRANCH_PREDICTION) ++ { ++ sprintf (buffer, \"addl %s,%%0\", XSTR (operands[1], 0)); ++ output_asm_insn (buffer, operands); ++ } ++ else ++ { ++ sprintf (buffer, \"addl %s+[.-%%X2],%%0\", XSTR (operands[1], 0)); ++ output_asm_insn (buffer, operands); ++ } ++ RET; ++}") ++ ++(define_insn "prologue_get_pc" ++ [(set (match_operand:SI 0 "" "") ++ (unspec_volatile [(plus:SI (pc) (match_operand 1 "" ""))] 2))] ++ "" ++ "* ++{ ++ output_asm_insn (AS1 (call,%X1), operands); ++ if (! TARGET_DEEP_BRANCH_PREDICTION) ++ { ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[1])); ++ } ++ RET; ++}" ++ [(set_attr "memory" "none")]) ++ ++(define_insn "prologue_get_pc_and_set_got" ++ [(unspec_volatile [(match_operand:SI 0 "" "")] 3)] ++ "" ++ "* ++{ ++ operands[1] = gen_label_rtx (); ++ output_asm_insn (AS1 (call,%X1), operands); ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", ++ CODE_LABEL_NUMBER (operands[1])); ++ output_asm_insn (AS1 (pop%L0,%0), operands); ++ output_asm_insn (\"addl $%__GLOBAL_OFFSET_TABLE_+[.-%X1],%0\", operands); ++ RET; ++}" ++ [(set_attr "memory" "none")]) ++ ++(define_expand "epilogue" ++ [(const_int 1)] ++ "" ++ " ++{ ++ ix86_expand_epilogue (); ++ DONE; ++}") ++ ++(define_insn "epilogue_set_stack_ptr" ++ [(set (reg:SI 7) (reg:SI 6)) ++ (clobber (reg:SI 6))] ++ "" ++ "* ++{ ++ rtx xops [2]; ++ ++ xops[0] = frame_pointer_rtx; ++ xops[1] = stack_pointer_rtx; ++ output_asm_insn (AS2 (mov%L0,%0,%1), xops); ++ RET; ++}" ++ [(set_attr "memory" "none")]) ++ ++(define_insn "leave" ++ [(const_int 2) ++ (clobber (reg:SI 6)) ++ (clobber (reg:SI 7))] ++ "" ++ "* ++{ ++ rtx xops[1]; ++ ++ xops[0] = frame_pointer_rtx; ++ ++ output_asm_insn (\"leave\", xops); ++ output_asm_insn (AS1 (bswap,%0), xops ); ++ RET; ++}" ++ [(set_attr "memory" "none")]) ++ ++(define_insn "pop" ++ [(set (match_operand:SI 0 "register_operand" "r") ++ (mem:SI (reg:SI 7))) ++ (set (reg:SI 7) (plus:SI (reg:SI 7) (const_int 4)))] ++ "" ++ "* ++{ ++ output_asm_insn (AS1 (pop%L0,%P0), operands); ++ output_asm_insn (AS1 (bswap,%P0), operands ); ++ RET; ++}" ++ [(set_attr "memory" "load")]) ++ ++(define_expand "movstrsi" ++ [(parallel [(set (match_operand:BLK 0 "memory_operand" "") ++ (match_operand:BLK 1 "memory_operand" "")) ++ (use (match_operand:SI 2 "const_int_operand" "")) ++ (use (match_operand:SI 3 "const_int_operand" "")) ++ (clobber (match_scratch:SI 4 "")) ++ (clobber (match_dup 5)) ++ (clobber (match_dup 6))])] ++ "" ++ " ++{ ++ rtx addr0, addr1; ++ ++ if (GET_CODE (operands[2]) != CONST_INT) ++ FAIL; ++ ++ addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); ++ addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); ++ ++ operands[5] = addr0; ++ operands[6] = addr1; ++ ++ operands[0] = change_address (operands[0], VOIDmode, addr0); ++ operands[1] = change_address (operands[1], VOIDmode, addr1); ++}") ++ ++;; It might seem that operands 0 & 1 could use predicate register_operand. ++;; But strength reduction might offset the MEM expression. So we let ++;; reload put the address into %edi & %esi. ++ ++(define_insn "" ++ [(set (mem:BLK (match_operand:SI 0 "address_operand" "D")) ++ (mem:BLK (match_operand:SI 1 "address_operand" "S"))) ++ (use (match_operand:SI 2 "const_int_operand" "n")) ++ (use (match_operand:SI 3 "immediate_operand" "i")) ++ (clobber (match_scratch:SI 4 "=&c")) ++ (clobber (match_dup 0)) ++ (clobber (match_dup 1))] ++ "" ++ "* ++{ ++ rtx xops[2]; ++ ++ output_asm_insn (\"cld\", operands); ++ if (GET_CODE (operands[2]) == CONST_INT) ++ { ++ if (INTVAL (operands[2]) & ~0x03) ++ { ++ xops[0] = GEN_INT ((INTVAL (operands[2]) >> 2) & 0x3fffffff); ++ xops[1] = operands[4]; ++ ++ output_asm_insn (AS2 (mov%L1,%0,%1), xops); ++#ifdef INTEL_SYNTAX ++ output_asm_insn (\"rep movsd\", xops); ++#else ++ output_asm_insn (\"rep\;movsl\", xops); ++#endif ++ } ++ if (INTVAL (operands[2]) & 0x02) ++ output_asm_insn (\"movsw\", operands); ++ if (INTVAL (operands[2]) & 0x01) ++ output_asm_insn (\"movsb\", operands); ++ } ++ else ++ abort (); ++ RET; ++}") ++ ++(define_expand "clrstrsi" ++ [(set (match_dup 3) (const_int 0)) ++ (parallel [(set (match_operand:BLK 0 "memory_operand" "") ++ (const_int 0)) ++ (use (match_operand:SI 1 "const_int_operand" "")) ++ (use (match_operand:SI 2 "const_int_operand" "")) ++ (use (match_dup 3)) ++ (clobber (match_scratch:SI 4 "")) ++ (clobber (match_dup 5))])] ++ "" ++ " ++{ ++ rtx addr0; ++ ++ if (GET_CODE (operands[1]) != CONST_INT) ++ FAIL; ++ ++ addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); ++ ++ operands[3] = gen_reg_rtx (SImode); ++ operands[5] = addr0; ++ ++ operands[0] = gen_rtx_MEM (BLKmode, addr0); ++}") ++ ++;; It might seem that operand 0 could use predicate register_operand. ++;; But strength reduction might offset the MEM expression. So we let ++;; reload put the address into %edi. ++ ++(define_insn "*bzero" ++ [(set (mem:BLK (match_operand:SI 0 "address_operand" "D")) ++ (const_int 0)) ++ (use (match_operand:SI 1 "const_int_operand" "n")) ++ (use (match_operand:SI 2 "immediate_operand" "i")) ++ (use (match_operand:SI 3 "register_operand" "a")) ++ (clobber (match_scratch:SI 4 "=&c")) ++ (clobber (match_dup 0))] ++ "" ++ "* ++{ ++ rtx xops[2]; ++ ++ output_asm_insn (\"cld\", operands); ++ if (GET_CODE (operands[1]) == CONST_INT) ++ { ++ unsigned int count = INTVAL (operands[1]) & 0xffffffff; ++ if (count & ~0x03) ++ { ++ xops[0] = GEN_INT (count / 4); ++ xops[1] = operands[4]; ++ ++ /* K6: stos takes 1 cycle, rep stos takes 8 + %ecx cycles. ++ 80386: 4/5+5n (+2 for set of ecx) ++ 80486: 5/7+5n (+1 for set of ecx) ++ */ ++ if (count / 4 < ((int) ix86_cpu < (int)PROCESSOR_PENTIUM ? 4 : 6)) ++ { ++ do ++#ifdef INTEL_SYNTAX ++ output_asm_insn (\"stosd\", xops); ++#else ++ output_asm_insn (\"stosl\", xops); ++#endif ++ while ((count -= 4) > 3); ++ } ++ else ++ { ++ output_asm_insn (AS2 (mov%L1,%0,%1), xops); ++#ifdef INTEL_SYNTAX ++ output_asm_insn (\"rep stosd\", xops); ++#else ++ output_asm_insn (\"rep\;stosl\", xops); ++#endif ++ } ++ } ++ if (INTVAL (operands[1]) & 0x02) ++ output_asm_insn (\"stosw\", operands); ++ if (INTVAL (operands[1]) & 0x01) ++ output_asm_insn (\"stosb\", operands); ++ } ++ else ++ abort (); ++ RET; ++}") ++ ++(define_expand "cmpstrsi" ++ [(parallel [(set (match_operand:SI 0 "general_operand" "") ++ (compare:SI (match_operand:BLK 1 "general_operand" "") ++ (match_operand:BLK 2 "general_operand" ""))) ++ (use (match_operand:SI 3 "general_operand" "")) ++ (use (match_operand:SI 4 "immediate_operand" "")) ++ (clobber (match_dup 5)) ++ (clobber (match_dup 6)) ++ (clobber (match_dup 3))])] ++ "" ++ " ++{ ++ rtx addr1, addr2; ++ ++ addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0)); ++ addr2 = copy_to_mode_reg (Pmode, XEXP (operands[2], 0)); ++ operands[3] = copy_to_mode_reg (SImode, operands[3]); ++ ++ operands[5] = addr1; ++ operands[6] = addr2; ++ ++ operands[1] = gen_rtx_MEM (BLKmode, addr1); ++ operands[2] = gen_rtx_MEM (BLKmode, addr2); ++ ++}") ++ ++;; memcmp recognizers. The `cmpsb' opcode does nothing if the count is ++;; zero. Emit extra code to make sure that a zero-length compare is EQ. ++ ++;; It might seem that operands 0 & 1 could use predicate register_operand. ++;; But strength reduction might offset the MEM expression. So we let ++;; reload put the address into %edi & %esi. ++ ++;; ??? Most comparisons have a constant length, and it's therefore ++;; possible to know that the length is non-zero, and to avoid the extra ++;; code to handle zero-length compares. ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=&r") ++ (compare:SI (mem:BLK (match_operand:SI 1 "address_operand" "S")) ++ (mem:BLK (match_operand:SI 2 "address_operand" "D")))) ++ (use (match_operand:SI 3 "register_operand" "c")) ++ (use (match_operand:SI 4 "immediate_operand" "i")) ++ (clobber (match_dup 1)) ++ (clobber (match_dup 2)) ++ (clobber (match_dup 3))] ++ "" ++ "* ++{ ++ rtx xops[2], label; ++ ++ label = gen_label_rtx (); ++ ++ output_asm_insn (\"cld\", operands); ++ output_asm_insn (AS2 (xor%L0,%0,%0), operands); ++ output_asm_insn (\"repz\;cmps%B2\", operands); ++ output_asm_insn (\"je %l0\", &label); ++ ++ xops[0] = operands[0]; ++ xops[1] = const1_rtx; ++ output_asm_insn (AS2 (sbb%L0,%0,%0), xops); ++ if (QI_REG_P (xops[0])) ++ output_asm_insn (AS2 (or%B0,%1,%b0), xops); ++ else ++ output_asm_insn (AS2 (or%L0,%1,%0), xops); ++ ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (label)); ++ RET; ++}") ++ ++(define_insn "" ++ [(set (cc0) ++ (compare:SI (mem:BLK (match_operand:SI 0 "address_operand" "S")) ++ (mem:BLK (match_operand:SI 1 "address_operand" "D")))) ++ (use (match_operand:SI 2 "register_operand" "c")) ++ (use (match_operand:SI 3 "immediate_operand" "i")) ++ (clobber (match_dup 0)) ++ (clobber (match_dup 1)) ++ (clobber (match_dup 2))] ++ "" ++ "* ++{ ++ rtx xops[2]; ++ ++ cc_status.flags |= CC_NOT_SIGNED; ++ ++ xops[0] = gen_rtx_REG (QImode, 0); ++ xops[1] = CONST0_RTX (QImode); ++ ++ output_asm_insn (\"cld\", operands); ++ output_asm_insn (AS2 (test%B0,%1,%0), xops); ++ return \"repz\;cmps%B2\"; ++}") ++ ++ ++;; Note, you cannot optimize away the branch following the bsfl by assuming ++;; that the destination is not modified if the input is 0, since not all ++;; x86 implementations do this. ++ ++(define_expand "ffssi2" ++ [(set (match_operand:SI 0 "general_operand" "") ++ (ffs:SI (match_operand:SI 1 "general_operand" "")))] ++ "" ++ " ++{ ++ rtx label = gen_label_rtx (), temp = gen_reg_rtx (SImode); ++ ++ emit_insn (gen_ffssi_1 (temp, operands[1])); ++ emit_cmp_insn (operands[1], const0_rtx, NE, NULL_RTX, SImode, 0, 0); ++ emit_jump_insn (gen_bne (label)); ++ emit_move_insn (temp, constm1_rtx); ++ emit_label (label); ++ temp = expand_binop (SImode, add_optab, temp, const1_rtx, ++ operands[0], 0, OPTAB_WIDEN); ++ ++ if (temp != operands[0]) ++ emit_move_insn (operands[0], temp); ++ DONE; ++}") ++ ++(define_insn "ffssi_1" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand:SI 1 "nonimmediate_operand" "r")] 5))] ++ "" ++ "* return AS2 (bsf%L0,%1,%0);") ++ ++(define_expand "ffshi2" ++ [(set (match_operand:SI 0 "general_operand" "") ++ (ffs:HI (match_operand:HI 1 "general_operand" "")))] ++ "" ++ " ++{ ++ rtx label = gen_label_rtx (), temp = gen_reg_rtx (HImode); ++ ++ emit_insn (gen_ffshi_1 (temp, operands[1])); ++ emit_cmp_insn (operands[1], const0_rtx, NE, NULL_RTX, HImode, 0, 0); ++ emit_jump_insn (gen_bne (label)); ++ emit_move_insn (temp, constm1_rtx); ++ emit_label (label); ++ temp = expand_binop (HImode, add_optab, temp, const1_rtx, ++ operands[0], 0, OPTAB_WIDEN); ++ ++ if (temp != operands[0]) ++ emit_move_insn (operands[0], temp); ++ DONE; ++}") ++ ++(define_insn "ffshi_1" ++ [(set (match_operand:HI 0 "register_operand" "=r") ++ (unspec:HI [(match_operand:SI 1 "nonimmediate_operand" "r")] 5))] ++ "" ++ "* return AS2 (bsf%W0,%1,%0);") ++ ++;; These patterns match the binary 387 instructions for addM3, subM3, ++;; mulM3 and divM3. There are three patterns for each of DFmode and ++;; SFmode. The first is the normal insn, the second the same insn but ++;; with one operand a conversion, and the third the same insn but with ++;; the other operand a conversion. ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f,f") ++ (match_operator:DF 3 "binary_387_op" ++ [(match_operand:DF 1 "nonimmediate_operand" "0,fm") ++ (match_operand:DF 2 "nonimmediate_operand" "fm,0")]))] ++ "TARGET_80387" ++ "* return output_387_binary_op (insn, operands);" ++ [(set (attr "type") ++ (cond [(match_operand:DF 3 "is_mul" "") ++ (const_string "fpmul") ++ (match_operand:DF 3 "is_div" "") ++ (const_string "fpdiv") ++ ] ++ (const_string "fpop") ++ ) ++ )]) ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f,f") ++ (match_operator:XF 3 "binary_387_op" ++ [(match_operand:XF 1 "register_operand" "0,f") ++ (match_operand:XF 2 "register_operand" "f,0")]))] ++ "TARGET_80387" ++ "* return output_387_binary_op (insn, operands);" ++ [(set (attr "type") ++ (cond [(match_operand:DF 3 "is_mul" "") ++ (const_string "fpmul") ++ (match_operand:DF 3 "is_div" "") ++ (const_string "fpdiv") ++ ] ++ (const_string "fpop") ++ ) ++ )]) ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f,f") ++ (match_operator:XF 3 "binary_387_op" ++ [(float_extend:XF (match_operand:SF 1 "nonimmediate_operand" "fm,0")) ++ (match_operand:XF 2 "register_operand" "0,f")]))] ++ "TARGET_80387" ++ "* return output_387_binary_op (insn, operands);" ++ [(set (attr "type") ++ (cond [(match_operand:DF 3 "is_mul" "") ++ (const_string "fpmul") ++ (match_operand:DF 3 "is_div" "") ++ (const_string "fpdiv") ++ ] ++ (const_string "fpop") ++ ) ++ )]) ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f,f") ++ (match_operator:XF 3 "binary_387_op" ++ [(match_operand:XF 1 "register_operand" "0,f") ++ (float_extend:XF ++ (match_operand:SF 2 "nonimmediate_operand" "fm,0"))]))] ++ "TARGET_80387" ++ "* return output_387_binary_op (insn, operands);" ++ [(set (attr "type") ++ (cond [(match_operand:DF 3 "is_mul" "") ++ (const_string "fpmul") ++ (match_operand:DF 3 "is_div" "") ++ (const_string "fpdiv") ++ ] ++ (const_string "fpop") ++ ) ++ )]) ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f,f") ++ (match_operator:DF 3 "binary_387_op" ++ [(float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,0")) ++ (match_operand:DF 2 "register_operand" "0,f")]))] ++ "TARGET_80387" ++ "* return output_387_binary_op (insn, operands);" ++ [(set (attr "type") ++ (cond [(match_operand:DF 3 "is_mul" "") ++ (const_string "fpmul") ++ (match_operand:DF 3 "is_div" "") ++ (const_string "fpdiv") ++ ] ++ (const_string "fpop") ++ ) ++ )]) ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f,f") ++ (match_operator:DF 3 "binary_387_op" ++ [(match_operand:DF 1 "register_operand" "0,f") ++ (float_extend:DF ++ (match_operand:SF 2 "nonimmediate_operand" "fm,0"))]))] ++ "TARGET_80387" ++ "* return output_387_binary_op (insn, operands);" ++ [(set (attr "type") ++ (cond [(match_operand:DF 3 "is_mul" "") ++ (const_string "fpmul") ++ (match_operand:DF 3 "is_div" "") ++ (const_string "fpdiv") ++ ] ++ (const_string "fpop") ++ ) ++ )]) ++ ++(define_insn "" ++ [(set (match_operand:SF 0 "register_operand" "=f,f") ++ (match_operator:SF 3 "binary_387_op" ++ [(match_operand:SF 1 "nonimmediate_operand" "0,fm") ++ (match_operand:SF 2 "nonimmediate_operand" "fm,0")]))] ++ "TARGET_80387" ++ "* return output_387_binary_op (insn, operands);" ++ [(set (attr "type") ++ (cond [(match_operand:DF 3 "is_mul" "") ++ (const_string "fpmul") ++ (match_operand:DF 3 "is_div" "") ++ (const_string "fpdiv") ++ ] ++ (const_string "fpop") ++ ) ++ )]) ++ ++(define_expand "strlensi" ++ [(parallel [(set (match_dup 4) ++ (unspec:SI [(mem:BLK (match_operand:BLK 1 "general_operand" "")) ++ (match_operand:QI 2 "immediate_operand" "") ++ (match_operand:SI 3 "immediate_operand" "")] 0)) ++ (clobber (match_dup 1))]) ++ (set (match_dup 5) ++ (not:SI (match_dup 4))) ++ (set (match_operand:SI 0 "register_operand" "") ++ (plus:SI (match_dup 5) ++ (const_int -1)))] ++ "" ++ " ++{ ++ if (TARGET_UNROLL_STRLEN && operands[2] == const0_rtx && optimize > 1) ++ { ++ rtx address; ++ rtx scratch; ++ ++ /* well it seems that some optimizer does not combine a call like ++ foo(strlen(bar), strlen(bar)); ++ when the move and the subtraction is done here. It does calculate ++ the length just once when these instructions are done inside of ++ output_strlen_unroll(). But I think since &bar[strlen(bar)] is ++ often used and I use one fewer register for the lifetime of ++ output_strlen_unroll() this is better. */ ++ scratch = gen_reg_rtx (SImode); ++ address = force_reg (SImode, XEXP (operands[1], 0)); ++ ++ /* move address to scratch-register ++ this is done here because the i586 can do the following and ++ in the same cycle with the following move. */ ++ if (GET_CODE (operands[3]) != CONST_INT || INTVAL (operands[3]) < 4) ++ emit_insn (gen_movsi (scratch, address)); ++ ++ emit_insn (gen_movsi (operands[0], address)); ++ ++ if(TARGET_USE_Q_REG) ++ emit_insn (gen_strlensi_unroll5 (operands[0], ++ operands[3], ++ scratch, ++ operands[0])); ++ else ++ emit_insn (gen_strlensi_unroll4 (operands[0], ++ operands[3], ++ scratch, ++ operands[0])); ++ ++ /* gen_strlensi_unroll[45] returns the address of the zero ++ at the end of the string, like memchr(), so compute the ++ length by subtracting the startaddress. */ ++ emit_insn (gen_subsi3 (operands[0], operands[0], address)); ++ DONE; ++ } ++ ++ operands[1] = copy_to_mode_reg (SImode, XEXP (operands[1], 0)); ++ operands[4] = gen_reg_rtx (SImode); ++ operands[5] = gen_reg_rtx (SImode); ++}") ++ ++;; It might seem that operands 0 & 1 could use predicate register_operand. ++;; But strength reduction might offset the MEM expression. So we let ++;; reload put the address into %edi. ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=&c") ++ (unspec:SI [(mem:BLK (match_operand:SI 1 "address_operand" "D")) ++ (match_operand:QI 2 "immediate_operand" "a") ++ (match_operand:SI 3 "immediate_operand" "i")] 0)) ++ (clobber (match_dup 1))] ++ "" ++ "* ++{ ++ rtx xops[2]; ++ ++ xops[0] = operands[0]; ++ xops[1] = constm1_rtx; ++ output_asm_insn (\"cld\", operands); ++ output_asm_insn (AS2 (mov%L0,%1,%0), xops); ++ return \"repnz\;scas%B2\"; ++}") ++ ++/* Conditional move define_insns. */ ++ ++(define_expand "movsicc" ++ [(set (match_operand:SI 0 "register_operand" "") ++ (if_then_else:SI (match_operand 1 "comparison_operator" "") ++ (match_operand:SI 2 "nonimmediate_operand" "") ++ (match_operand:SI 3 "nonimmediate_operand" "")))] ++ "TARGET_CMOVE" ++ " ++{ ++ if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT) ++ FAIL; ++ ++ operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]), ++ GET_MODE (i386_compare_op0), ++ i386_compare_op0, i386_compare_op1); ++}") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") ++ (if_then_else:SI (match_operator 1 "comparison_operator" ++ [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m") ++ (match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")]) ++ (match_operand:SI 4 "nonimmediate_operand" "rm,rm,0,0") ++ (match_operand:SI 5 "nonimmediate_operand" "0,0,rm,rm")))] ++ "TARGET_CMOVE" ++ "#") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") ++ (if_then_else:SI (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "r,m,r,m") ++ (match_operand 3 "general_operand" "rmi,ri,rmi,ri")]) ++ (match_operand:SI 4 "nonimmediate_operand" "rm,rm,0,0") ++ (match_operand:SI 5 "nonimmediate_operand" "0,0,rm,rm")))] ++ "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT" ++ "#") ++ ++(define_split ++ [(set (match_operand:SI 0 "register_operand" "") ++ (if_then_else:SI (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (const_int 0)]) ++ (match_operand:SI 3 "nonimmediate_operand" "") ++ (match_operand:SI 4 "nonimmediate_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) ++ (match_dup 2)) ++ (set (match_dup 0) ++ (if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 3) (match_dup 4)))] ++ "") ++ ++(define_split ++ [(set (match_operand:SI 0 "register_operand" "") ++ (if_then_else:SI (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (match_operand 3 "general_operand" "")]) ++ (match_operand:SI 4 "nonimmediate_operand" "") ++ (match_operand:SI 5 "nonimmediate_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) (compare (match_dup 2) (match_dup 3))) ++ (set (match_dup 0) ++ (if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 4) (match_dup 5)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (if_then_else:SI (match_operator 1 "comparison_operator" ++ [(cc0) (const_int 0)]) ++ (match_operand:SI 2 "nonimmediate_operand" "rm,0") ++ (match_operand:SI 3 "nonimmediate_operand" "0,rm")))] ++ "TARGET_CMOVE && reload_completed" ++ "* return output_int_conditional_move (which_alternative, operands);") ++ ++(define_expand "movhicc" ++ [(set (match_operand:HI 0 "register_operand" "") ++ (if_then_else:HI (match_operand 1 "comparison_operator" "") ++ (match_operand:HI 2 "nonimmediate_operand" "") ++ (match_operand:HI 3 "nonimmediate_operand" "")))] ++ "TARGET_CMOVE" ++ " ++{ ++ if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT) ++ FAIL; ++ ++ operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]), ++ GET_MODE (i386_compare_op0), ++ i386_compare_op0, i386_compare_op1); ++}") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "register_operand" "=r,r,r,r") ++ (if_then_else:HI (match_operator 1 "comparison_operator" ++ [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m") ++ (match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")]) ++ (match_operand:HI 4 "nonimmediate_operand" "rm,rm,0,0") ++ (match_operand:HI 5 "nonimmediate_operand" "0,0,rm,rm")))] ++ "TARGET_CMOVE" ++ "#") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "register_operand" "=r,r,r,r") ++ (if_then_else:HI (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "r,m,r,m") ++ (match_operand 3 "general_operand" "rmi,ri,rmi,ri")]) ++ (match_operand:HI 4 "nonimmediate_operand" "rm,rm,0,0") ++ (match_operand:HI 5 "nonimmediate_operand" "0,0,rm,rm")))] ++ "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT" ++ "#") ++ ++(define_split ++ [(set (match_operand:HI 0 "register_operand" "") ++ (if_then_else:HI (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (const_int 0)]) ++ (match_operand:HI 3 "nonimmediate_operand" "") ++ (match_operand:HI 4 "nonimmediate_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) ++ (match_dup 2)) ++ (set (match_dup 0) ++ (if_then_else:HI (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 3) (match_dup 4)))] ++ "") ++ ++(define_split ++ [(set (match_operand:HI 0 "register_operand" "") ++ (if_then_else:HI (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (match_operand 3 "general_operand" "")]) ++ (match_operand:HI 4 "nonimmediate_operand" "") ++ (match_operand:HI 5 "nonimmediate_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) ++ (compare (match_dup 2) (match_dup 3))) ++ (set (match_dup 0) ++ (if_then_else:HI (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 4) (match_dup 5)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:HI 0 "register_operand" "=r,r") ++ (if_then_else:HI (match_operator 1 "comparison_operator" ++ [(cc0) (const_int 0)]) ++ (match_operand:HI 2 "nonimmediate_operand" "rm,0") ++ (match_operand:HI 3 "nonimmediate_operand" "0,rm")))] ++ "TARGET_CMOVE && reload_completed" ++ "* return output_int_conditional_move (which_alternative, operands);") ++ ++(define_expand "movsfcc" ++ [(set (match_operand:SF 0 "register_operand" "") ++ (if_then_else:SF (match_operand 1 "comparison_operator" "") ++ (match_operand:SF 2 "register_operand" "") ++ (match_operand:SF 3 "register_operand" "")))] ++ "TARGET_CMOVE" ++ " ++{ ++ rtx temp; ++ ++ if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT) ++ FAIL; ++ ++ /* The floating point conditional move instructions don't directly ++ support conditions resulting from a signed integer comparison. */ ++ ++ switch (GET_CODE (operands[1])) ++ { ++ case LT: ++ case LE: ++ case GE: ++ case GT: ++ temp = emit_store_flag (gen_reg_rtx (QImode), ++ GET_CODE (operands[1]), i386_compare_op0, i386_compare_op1, ++ VOIDmode, 0, 0); ++ ++ if (!temp) ++ FAIL; ++ ++ operands[1] = gen_rtx_fmt_ee (NE, QImode, temp, const0_rtx); ++ break; ++ ++ default: ++ operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]), ++ GET_MODE (i386_compare_op0), ++ i386_compare_op0, i386_compare_op1); ++ break; ++ } ++}") ++ ++(define_insn "" ++ [(set (match_operand:SF 0 "register_operand" "=f,f,f,f") ++ (if_then_else:SF (match_operator 1 "comparison_operator" ++ [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m") ++ (match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")]) ++ (match_operand:SF 4 "register_operand" "f,f,0,0") ++ (match_operand:SF 5 "register_operand" "0,0,f,f")))] ++ "TARGET_CMOVE ++ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE ++ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT" ++ "#") ++ ++(define_insn "" ++ [(set (match_operand:SF 0 "register_operand" "=f,f,f,f") ++ (if_then_else:SF (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "r,m,r,m") ++ (match_operand 3 "general_operand" "rmi,ri,rmi,ri")]) ++ (match_operand:SF 4 "register_operand" "f,f,0,0") ++ (match_operand:SF 5 "register_operand" "0,0,f,f")))] ++ "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT ++ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE ++ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT" ++ "#") ++ ++(define_split ++ [(set (match_operand:SF 0 "register_operand" "") ++ (if_then_else:SF (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (const_int 0)]) ++ (match_operand:SF 3 "register_operand" "") ++ (match_operand:SF 4 "register_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) ++ (match_dup 2)) ++ (set (match_dup 0) ++ (if_then_else:SF (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 3) (match_dup 4)))] ++ "") ++ ++(define_split ++ [(set (match_operand:SF 0 "register_operand" "") ++ (if_then_else:SF (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (match_operand 3 "general_operand" "")]) ++ (match_operand:SF 4 "register_operand" "") ++ (match_operand:SF 5 "register_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) (compare (match_dup 2) (match_dup 3))) ++ (set (match_dup 0) ++ (if_then_else:SF (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 4) (match_dup 5)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:SF 0 "register_operand" "=f,f") ++ (if_then_else:SF (match_operator 1 "comparison_operator" ++ [(cc0) (const_int 0)]) ++ (match_operand:SF 2 "register_operand" "f,0") ++ (match_operand:SF 3 "register_operand" "0,f")))] ++ "TARGET_CMOVE && reload_completed" ++ "* return output_fp_conditional_move (which_alternative, operands);") ++ ++(define_expand "movdfcc" ++ [(set (match_operand:DF 0 "register_operand" "") ++ (if_then_else:DF (match_operand 1 "comparison_operator" "") ++ (match_operand:DF 2 "register_operand" "") ++ (match_operand:DF 3 "register_operand" "")))] ++ "TARGET_CMOVE" ++ " ++{ ++ rtx temp; ++ ++ if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT) ++ FAIL; ++ ++ /* The floating point conditional move instructions don't directly ++ support conditions resulting from a signed integer comparison. */ ++ ++ switch (GET_CODE (operands[1])) ++ { ++ case LT: ++ case LE: ++ case GE: ++ case GT: ++ temp = emit_store_flag (gen_reg_rtx (QImode), ++ GET_CODE (operands[1]), i386_compare_op0, i386_compare_op1, ++ VOIDmode, 0, 0); ++ ++ if (!temp) ++ FAIL; ++ ++ operands[1] = gen_rtx_fmt_ee (NE, QImode, temp, const0_rtx); ++ break; ++ ++ default: ++ operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]), ++ GET_MODE (i386_compare_op0), ++ i386_compare_op0, i386_compare_op1); ++ break; ++ } ++}") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f,f,f,f") ++ (if_then_else:DF (match_operator 1 "comparison_operator" ++ [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m") ++ (match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")]) ++ (match_operand:DF 4 "register_operand" "f,f,0,0") ++ (match_operand:DF 5 "register_operand" "0,0,f,f")))] ++ "TARGET_CMOVE ++ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE ++ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT" ++ "#") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f,f,f,f") ++ (if_then_else:DF (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "r,m,r,m") ++ (match_operand 3 "general_operand" "rmi,ri,rmi,ri")]) ++ (match_operand:DF 4 "register_operand" "f,f,0,0") ++ (match_operand:DF 5 "register_operand" "0,0,f,f")))] ++ "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT ++ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE ++ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT" ++ "#") ++ ++(define_split ++ [(set (match_operand:DF 0 "register_operand" "") ++ (if_then_else:DF (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (const_int 0)]) ++ (match_operand:DF 3 "register_operand" "") ++ (match_operand:DF 4 "register_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) ++ (match_dup 2)) ++ (set (match_dup 0) ++ (if_then_else:DF (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 3) (match_dup 4)))] ++ "") ++ ++(define_split ++ [(set (match_operand:DF 0 "register_operand" "") ++ (if_then_else:DF (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (match_operand 3 "general_operand" "")]) ++ (match_operand:DF 4 "register_operand" "") ++ (match_operand:DF 5 "register_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) (compare (match_dup 2) (match_dup 3))) ++ (set (match_dup 0) ++ (if_then_else:DF (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 4) (match_dup 5)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:DF 0 "register_operand" "=f,f") ++ (if_then_else:DF (match_operator 1 "comparison_operator" ++ [(cc0) (const_int 0)]) ++ (match_operand:DF 2 "register_operand" "f,0") ++ (match_operand:DF 3 "register_operand" "0,f")))] ++ "TARGET_CMOVE && reload_completed" ++ "* return output_fp_conditional_move (which_alternative, operands);") ++ ++(define_expand "movxfcc" ++ [(set (match_operand:XF 0 "register_operand" "") ++ (if_then_else:XF (match_operand 1 "comparison_operator" "") ++ (match_operand:XF 2 "register_operand" "") ++ (match_operand:XF 3 "register_operand" "")))] ++ "TARGET_CMOVE" ++ " ++{ ++ rtx temp; ++ ++ if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT) ++ FAIL; ++ ++ /* The floating point conditional move instructions don't directly ++ support conditions resulting from a signed integer comparison. */ ++ ++ switch (GET_CODE (operands[1])) ++ { ++ case LT: ++ case LE: ++ case GE: ++ case GT: ++ temp = emit_store_flag (gen_reg_rtx (QImode), ++ GET_CODE (operands[1]), i386_compare_op0, i386_compare_op1, ++ VOIDmode, 0, 0); ++ ++ if (!temp) ++ FAIL; ++ ++ operands[1] = gen_rtx_fmt_ee (NE, QImode, temp, const0_rtx); ++ break; ++ ++ default: ++ operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]), ++ GET_MODE (i386_compare_op0), ++ i386_compare_op0, i386_compare_op1); ++ break; ++ } ++}") ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f,f,f,f") ++ (if_then_else:XF (match_operator 1 "comparison_operator" ++ [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m") ++ (match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")]) ++ (match_operand:XF 4 "register_operand" "f,f,0,0") ++ (match_operand:XF 5 "register_operand" "0,0,f,f")))] ++ "TARGET_CMOVE ++ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE ++ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT" ++ "#") ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f,f,f,f") ++ (if_then_else:XF (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "r,m,r,m") ++ (match_operand 3 "general_operand" "rmi,ri,rmi,ri")]) ++ (match_operand:XF 4 "register_operand" "f,f,0,0") ++ (match_operand:XF 5 "register_operand" "0,0,f,f")))] ++ "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT ++ && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE ++ && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT" ++ "#") ++ ++(define_split ++ [(set (match_operand:XF 0 "register_operand" "") ++ (if_then_else:XF (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (const_int 0)]) ++ (match_operand:XF 3 "register_operand" "") ++ (match_operand:XF 4 "register_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) ++ (match_dup 2)) ++ (set (match_dup 0) ++ (if_then_else:XF (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 3) (match_dup 4)))] ++ "") ++ ++(define_split ++ [(set (match_operand:XF 0 "register_operand" "") ++ (if_then_else:XF (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (match_operand 3 "general_operand" "")]) ++ (match_operand:XF 4 "register_operand" "") ++ (match_operand:XF 5 "register_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) (compare (match_dup 2) (match_dup 3))) ++ (set (match_dup 0) ++ (if_then_else:XF (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 4) (match_dup 5)))] ++ "") ++ ++(define_insn "" ++ [(set (match_operand:XF 0 "register_operand" "=f,f") ++ (if_then_else:XF (match_operator 1 "comparison_operator" ++ [(cc0) (const_int 0)]) ++ (match_operand:XF 2 "register_operand" "f,0") ++ (match_operand:XF 3 "register_operand" "0,f")))] ++ "TARGET_CMOVE && reload_completed" ++ "* return output_fp_conditional_move (which_alternative, operands);") ++ ++(define_expand "movdicc" ++ [(set (match_operand:DI 0 "register_operand" "") ++ (if_then_else:DI (match_operand 1 "comparison_operator" "") ++ (match_operand:DI 2 "nonimmediate_operand" "") ++ (match_operand:DI 3 "nonimmediate_operand" "")))] ++ "TARGET_CMOVE" ++ " ++{ ++ if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT) ++ FAIL; ++ ++ operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]), ++ GET_MODE (i386_compare_op0), ++ i386_compare_op0, i386_compare_op1); ++}") ++ ++(define_insn "" ++ [(set (match_operand:DI 0 "register_operand" "=&r,&r,&r,&r") ++ (if_then_else:DI (match_operator 1 "comparison_operator" ++ [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m") ++ (match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")]) ++ (match_operand:DI 4 "nonimmediate_operand" "ro,ro,0,0") ++ (match_operand:DI 5 "nonimmediate_operand" "0,0,ro,ro")))] ++ "TARGET_CMOVE" ++ "#") ++ ++(define_insn "" ++ [(set (match_operand:DI 0 "register_operand" "=&r,&r,&r,&r") ++ (if_then_else:DI (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "r,m,r,m") ++ (match_operand 3 "general_operand" "rmi,ri,rmi,ri")]) ++ (match_operand:DI 4 "nonimmediate_operand" "ro,ro,0,0") ++ (match_operand:DI 5 "nonimmediate_operand" "0,0,ro,ro")))] ++ "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT" ++ "#") ++ ++(define_split ++ [(set (match_operand:DI 0 "register_operand" "") ++ (if_then_else:DI (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (const_int 0)]) ++ (match_operand:DI 3 "nonimmediate_operand" "") ++ (match_operand:DI 4 "nonimmediate_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) ++ (match_dup 2)) ++ (set (match_dup 5) ++ (if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 7) (match_dup 9))) ++ (set (match_dup 6) ++ (if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 8) (match_dup 10)))] ++ "split_di (&operands[0], 1, &operands[5], &operands[6]); ++ split_di (&operands[3], 1, &operands[7], &operands[8]); ++ split_di (&operands[4], 1, &operands[9], &operands[10]);") ++ ++(define_split ++ [(set (match_operand:DI 0 "register_operand" "") ++ (if_then_else:DI (match_operator 1 "comparison_operator" ++ [(match_operand 2 "nonimmediate_operand" "") ++ (match_operand 3 "general_operand" "")]) ++ (match_operand:DI 4 "nonimmediate_operand" "") ++ (match_operand:DI 5 "nonimmediate_operand" "")))] ++ "TARGET_CMOVE && reload_completed" ++ [(set (cc0) (compare (match_dup 2) (match_dup 3))) ++ (set (match_dup 6) ++ (if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 8) (match_dup 10))) ++ (set (match_dup 7) ++ (if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)]) ++ (match_dup 9) (match_dup 11)))] ++ "split_di (&operands[0], 1, &operands[6], &operands[7]); ++ split_di (&operands[4], 1, &operands[8], &operands[9]); ++ split_di (&operands[5], 1, &operands[10], &operands[11]);") ++ ++(define_insn "strlensi_unroll" ++ [(set (match_operand:SI 0 "register_operand" "=&r,&r") ++ (unspec:SI [(mem:BLK (match_operand:SI 1 "address_operand" "r,r")) ++ (match_operand:SI 2 "immediate_operand" "i,i")] 0)) ++ (clobber (match_scratch:SI 3 "=&q,&r"))] ++ "optimize > 1" ++ "* return output_strlen_unroll (operands);") ++ ++;; the only difference between the following patterns is the register preference ++;; on a pentium using a q-register saves one clock cycle per 4 characters ++ ++(define_insn "strlensi_unroll4" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (unspec:SI [(mem:BLK (match_operand:SI 3 "register_operand" "0,0")) ++ (match_operand:SI 1 "immediate_operand" "i,i") ++ (match_operand:SI 2 "register_operand" "+q,!r")] 0)) ++ (clobber (match_dup 2))] ++ "(TARGET_USE_ANY_REG && optimize > 1)" ++ "* return output_strlen_unroll (operands);") ++ ++(define_insn "strlensi_unroll5" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(mem:BLK (match_operand:SI 3 "register_operand" "0")) ++ (match_operand:SI 1 "immediate_operand" "i") ++ (match_operand:SI 2 "register_operand" "+q")] 0)) ++ (clobber (match_dup 2))] ++ "(TARGET_USE_Q_REG && optimize > 1)" ++ "* return output_strlen_unroll (operands);" ++) ++ ++(define_insn "allocate_stack_worker" ++ [(unspec:SI [(match_operand:SI 0 "register_operand" "a")] 3) ++ (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0))) ++ (clobber (match_dup 0))] ++ "TARGET_STACK_PROBE" ++ "* return AS1(call,__alloca);" ++ [(set_attr "memory" "none")]) ++ ++(define_expand "allocate_stack" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (minus:SI (reg:SI 7) (match_operand:SI 1 "general_operand" ""))) ++ (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 1)))] ++ "TARGET_STACK_PROBE" ++ " ++{ ++#ifdef CHECK_STACK_LIMIT ++ if (GET_CODE (operands[1]) == CONST_INT ++ && INTVAL (operands[1]) < CHECK_STACK_LIMIT) ++ emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx, ++ operands[1])); ++ else ++#endif ++ emit_insn (gen_allocate_stack_worker (copy_to_mode_reg (SImode, ++ operands[1]))); ++ ++ emit_move_insn (operands[0], virtual_stack_dynamic_rtx); ++ DONE; ++}") ++ ++(define_expand "exception_receiver" ++ [(const_int 0)] ++ "flag_pic" ++ " ++{ ++ load_pic_register (1); ++ DONE; ++}") ++ ++(define_expand "builtin_setjmp_receiver" ++ [(label_ref (match_operand 0 "" ""))] ++ "flag_pic" ++ " ++{ ++ load_pic_register (1); ++ DONE; ++}") +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/i386/t-amithlon gcc/gcc/config/i386/t-amithlon +--- gcc-2.95.3/gcc/config/i386/t-amithlon Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/i386/t-amithlon Sat Dec 1 14:23:42 2001 +@@ -0,0 +1,28 @@ ++# Makefile fragment for AmigaOS target. ++ ++# Each compilation environment (Manx, Dice, GCC, SAS/C, etc) provides its ++# own equivalent of the UNIX /usr/include tree. For gcc, the standard headers ++# are in /gg/include and system specific headers are in /gg/os-include. ++# Use these paths for fixincludes. ++ ++SYSTEM_HEADER_DIR = /gg/include ++ ++# We don't need a libgcc1, it's all in ixemul.library and LibNIX ++ ++LIBGCC1 = ++CROSS_LIBGCC1 = ++LIBGCC1_TEST = ++ ++#LIBGCC1 = libgcc1.null ++#CROSS_LIBGCC1 = libgcc1.null ++ ++### begin-GG-local: dynamic libraries ++# Extra objects that get compiled and linked to collect2 ++ ++EXTRA_COLLECT2_OBJS = amigacollect2.o ++ ++# Build supplimentary AmigaOS target support file for collect2 ++amigacollect2.o: amigacollect2.c ++ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ++ -DA2IXDIR_PREFIX=\"$(prefix)/share/a2ixlibrary\" $(srcdir)/amigacollect2.c ++### end-GG-local +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/i386/xm-amithlon.h gcc/gcc/config/i386/xm-amithlon.h +--- gcc-2.95.3/gcc/config/i386/xm-amithlon.h Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/i386/xm-amithlon.h Thu Sep 20 20:12:23 2001 +@@ -0,0 +1,102 @@ ++/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS. ++ Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc. ++ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch). ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++/* First include the generic header, then modify some parts. */ ++ ++#include "i386/xm-i386.h" ++ ++#ifndef _FCNTL_H_ ++#include ++#endif ++ ++/* Define various things that the AmigaOS host has. */ ++ ++#define HAVE_ATEXIT ++#define HAVE_RENAME ++ ++/* AmigaOS specific headers, such as from the Native Developer Update kits, ++ go in SYSTEM_INCLUDE_DIR. STANDARD_INCLUDE_DIR is the equivalent of ++ Unix "/usr/include". All other include paths are set in Makefile. */ ++ ++#define SYSTEM_INCLUDE_DIR "/gg/os-include" ++#define STANDARD_INCLUDE_DIR "/gg/include" ++ ++#define STANDARD_EXEC_PREFIX_1 "/gg/lib/gcc/" ++#define STANDARD_STARTFILE_PREFIX_1 "/gg/lib/" ++#define STANDARD_STARTFILE_PREFIX_2 "/gg/lib/" ++ ++/* The AmigaOS stores file names with regard to upper/lower case, but actions ++ on existing files are case independent on the standard filesystems. ++ ++ A good example of where this causes problems is the conflict between the C ++ include file and the C++ include file , where the C++ ++ include file dir is searched first and thus causes includes of ++ to include instead. ++ ++ In order to solve this problem we define the macro OPEN_CASE_SENSITIVE as ++ the name of the function that takes the same args as open() and does case ++ dependent opens. */ ++ ++#define OPEN_CASE_SENSITIVE(NAME, FLAGS, MODE) open ((NAME), (FLAGS) | O_CASE, (MODE)) ++ ++/* On the AmigaOS, there are two pathname separators, '/' (DIR_SEPARATOR) ++ and ':' (VOL_SEPARATOR). DIR_SEPARATOR defaults to the correct ++ character, so we don't have to explicitly set it. */ ++ ++#define DIR_SEPARATOR '/' ++#define VOL_SEPARATOR ':' ++ ++/* Do *not* use this define, otherwise Amiga-devicesnames ('DEV:') won't ++ work: */ ++// #define DIR_SEPARATOR_2 VOL_SEPARATOR ++ ++ ++/* Determine whether a '\0'-terminated file name is absolute or not. ++ ++ This checks for both, '/' as the first character, since we're running under ++ ixemul.library which provides for this unix'ism, and for the usual ++ logical-terminator, ':', somewhere in the filename. */ ++ ++#define FILE_NAME_ABSOLUTE_P(NAME) ((NAME)[0] == '/' || index ((NAME), ':')) ++ ++/* Like the above, but the file name is not '\0'-terminated. */ ++ ++#define FILE_NAME_ABSOLUTE_N_P(NAME, LEN) amigaos_file_name_absolute_n ((NAME), (LEN)) ++ ++/* Return the file name part of the path name. */ ++ ++#define FILE_NAME_NONDIRECTORY(NAME) \ ++ (rindex ((NAME), '/') ? rindex ((NAME), '/') + 1 \ ++ : (rindex ((NAME), ':') ? rindex ((NAME), ':') + 1 \ ++ : (NAME))) ++ ++/* Generate the name of the cross reference file. */ ++ ++#define XREF_FILE_NAME(BUFF, NAME) \ ++do \ ++ { \ ++ char *filesrc, *filedst; \ ++ strcpy ((BUFF), (NAME)); \ ++ filesrc = FILE_NAME_NONDIRECTORY (NAME); \ ++ filedst = (BUFF) + (filesrc - (NAME)); \ ++ sprintf (filedst, ".%s.gxref", filesrc); \ ++ } \ ++while (0) +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/m68k/amigaos.c gcc/gcc/config/m68k/amigaos.c +--- gcc-2.95.3/gcc/config/m68k/amigaos.c Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/m68k/amigaos.c Thu Sep 27 19:35:54 2001 +@@ -0,0 +1,419 @@ ++/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS. ++ Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc. ++ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch). ++ Heavily modified by Kamil Iskra (iskra@student.uci.agh.edu.pl). ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#include "config.h" ++#include "system.h" ++#include "rtl.h" ++#include "output.h" ++#include "tree.h" ++#include "flags.h" ++#include "expr.h" ++ ++/* Baserel support. */ ++ ++/* Does operand (which is a symbolic_operand) live in text space? If ++ so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true. ++ ++ This function is used in base relative code generation. */ ++ ++int ++read_only_operand (operand) ++ rtx operand; ++{ ++ if (GET_CODE (operand) == CONST) ++ operand = XEXP (XEXP (operand, 0), 0); ++ if (GET_CODE (operand) == SYMBOL_REF) ++ return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand); ++ return 1; ++} ++ ++/* This function is used while generating a base relative code. ++ It returns 1 if a decl is not relocatable, i. e., if it can be put ++ in the text section. ++ Currently, it's very primitive: it just checks if the object size ++ is less than 4 bytes (i. e., if it can hold a pointer). It also ++ supports arrays and floating point types. */ ++ ++int ++amigaos_put_in_text (decl) ++ tree decl; ++{ ++ tree type = TREE_TYPE (decl); ++ if (TREE_CODE (type) == ARRAY_TYPE) ++ type = TREE_TYPE (type); ++ return (TREE_INT_CST_HIGH (TYPE_SIZE (type)) == 0 ++ && TREE_INT_CST_LOW (TYPE_SIZE (type)) < 32) ++ || FLOAT_TYPE_P (type); ++} ++ ++/* Common routine used to check if a4 should be preserved/restored. */ ++ ++int ++amigaos_restore_a4 () ++{ ++ return (flag_pic >= 3 && ++ (TARGET_RESTORE_A4 || TARGET_ALWAYS_RESTORE_A4 ++ || lookup_attribute ("saveds", ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))); ++} ++ ++void ++amigaos_alternate_pic_setup (stream) ++ FILE *stream; ++{ ++ if (TARGET_RESTORE_A4 || TARGET_ALWAYS_RESTORE_A4) ++ asm_fprintf (stream, "\tjbsr %U__restore_a4\n"); ++ else if (lookup_attribute ("saveds", ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) ++ asm_fprintf (stream, "\tlea %U__a4_init,%Ra4\n"); ++} ++ ++/* Attributes support. */ ++ ++#define AMIGA_CHIP_SECTION_NAME ".datachip" ++ ++/* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine ++ specific attribute for DECL. The attributes in ATTRIBUTES have previously ++ been assigned to DECL. */ ++ ++int ++valid_amigaos_decl_attribute (decl, identifier) ++ tree decl, identifier; ++{ ++ if (TREE_CODE (decl) == VAR_DECL) ++ if (is_attribute_p ("chip", identifier)) ++#ifdef ASM_OUTPUT_SECTION_NAME ++ { ++ if (! TREE_STATIC (decl) && ! DECL_EXTERNAL (decl)) ++ error ("`chip' attribute cannot be specified for local variables"); ++ else ++ { ++ /* The decl may have already been given a section attribute from ++ a previous declaration. Ensure they match. */ ++ if (DECL_SECTION_NAME (decl) == NULL_TREE) ++ DECL_SECTION_NAME (decl) = ++ build_string (strlen (AMIGA_CHIP_SECTION_NAME) + 1, ++ AMIGA_CHIP_SECTION_NAME); ++ else if (strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), ++ AMIGA_CHIP_SECTION_NAME) != 0) ++ { ++ error_with_decl (decl, ++ "`chip' for `%s' conflicts with previous declaration"); ++ return 0; ++ } ++ return 1; ++ } ++ } ++#else ++ error ("`chip' attribute is not supported for this target"); ++#endif ++ ++ return 0; ++} ++ ++/* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine ++ specific attribute for TYPE. The attributes in ATTRIBUTES have previously ++ been assigned to TYPE. */ ++ ++int ++valid_amigaos_type_attribute (type, attributes, identifier, args) ++ tree type, attributes, identifier, args; ++{ ++ if (valid_m68k_type_attribute (type, attributes, identifier, args)) ++ return 1; ++ else if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE) ++ { ++ if (is_attribute_p ("stackext", identifier)) ++ { ++ if (lookup_attribute ("interrupt", attributes)) ++ { ++ error ("`stackext' and `interrupt' are mutually exclusive"); ++ return 0; ++ } ++ return 1; ++ } ++ if (is_attribute_p ("interrupt", identifier)) ++ { ++ if (lookup_attribute ("stackext", attributes)) ++ { ++ error ("`stackext' and `interrupt' are mutually exclusive"); ++ return 0; ++ } ++ return 1; ++ } ++ if (is_attribute_p ("saveds", identifier)) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++/* Stack checking and automatic extension support. */ ++ ++void ++amigaos_prologue_begin_hook (stream, fsize) ++ FILE *stream; ++ int fsize; ++{ ++ if (TARGET_STACKCHECK) ++ { ++ if (fsize < 256) ++ asm_fprintf (stream, "\tcmpl %s,%Rsp\n" ++ "\tjcc 0f\n" ++ "\tjra %U__stkovf\n" ++ "\t0:\n", ++ (flag_pic == 3 ? "a4@(___stk_limit:W)" : ++ (flag_pic == 4 ? "a4@(___stk_limit:L)" : ++ "___stk_limit"))); ++ else if (fsize < 0x8000) ++ asm_fprintf (stream, "\tmovel #%d:W,%Rd0\n\tjbsr %U__stkchk_d0\n", ++ fsize); ++ else ++ asm_fprintf (stream, "\tmovel #%d,%Rd0\n\tjbsr %U__stkchk_d0\n", ++ fsize); ++ } ++} ++ ++void ++amigaos_alternate_frame_setup_f (stream, fsize) ++ FILE *stream; ++ int fsize; ++{ ++ if (fsize < 128) ++ asm_fprintf (stream, "\tcmpl %s,%Rsp\n" ++ "\tjcc 0f\n" ++ "\tmoveq #%d,%Rd0\n" ++ "\tmoveq #0,%Rd1\n" ++ "\tjbsr %U__stkext_f\n" ++ "0:\tlink %Ra5,#%d:W\n", ++ (flag_pic == 3 ? "a4@(___stk_limit:W)" : ++ (flag_pic == 4 ? "a4@(___stk_limit:L)" : ++ "___stk_limit")), ++ fsize, -fsize); ++ else if (fsize < 0x8000) ++ asm_fprintf (stream, "\tmovel #%d:W,%Rd0\n\tjbsr %U__link_a5_d0_f\n", ++ fsize); ++ else ++ asm_fprintf (stream, "\tmovel #%d,%Rd0\n\tjbsr %U__link_a5_d0_f\n", ++ fsize); ++} ++ ++void ++amigaos_alternate_frame_setup (stream, fsize) ++ FILE *stream; ++ int fsize; ++{ ++ if (! fsize) ++ asm_fprintf (stream, "\tcmpl %s,%Rsp\n" ++ "\tjcc 0f\n" ++ "\tmoveq #0,%Rd0\n" ++ "\tmoveq #0,%Rd1\n" ++ "\tjbsr %U__stkext_f\n" ++ "0:\n", ++ (flag_pic == 3 ? "a4@(___stk_limit:W)" : ++ (flag_pic == 4 ? "a4@(___stk_limit:L)" : ++ "___stk_limit"))); ++ else if (fsize + 4 < 128) ++ asm_fprintf (stream, "\tcmpl %s,%Rsp\n" ++ "\tjcc 0f\n" ++ "\tmoveq #%d,%Rd0\n" ++ "\tmoveq #0,%Rd1\n" ++ "\tjbsr %U__stkext_f\n" ++ "0:\taddw #%d,%Rsp\n", ++ (flag_pic == 3 ? "a4@(___stk_limit:W)" : ++ (flag_pic == 4 ? "a4@(___stk_limit:L)" : ++ "___stk_limit")), ++ fsize + 4, -(fsize + 4)); ++ else if (fsize + 4 < 0x8000) ++ asm_fprintf (stream, "\tmovel #%d:W,%Rd0\n\tjbsr %U__sub_d0_sp_f\n", ++ fsize + 4); ++ else ++ asm_fprintf (stream, "\tmovel %0I%d,%Rd0\n\tjbsr %U__sub_d0_sp_f\n", ++ fsize + 4); ++} ++ ++static rtx ++gen_stack_management_call (stack_pointer, arg, func) ++ rtx stack_pointer; ++ rtx arg; ++ char *func; ++{ ++ rtx call_insn, call, seq, name; ++ start_sequence (); ++ ++ /* Move arg to d0. */ ++ emit_move_insn (gen_rtx (REG, SImode, 0), arg); ++ ++ /* Generate the function reference. */ ++ name = gen_rtx (SYMBOL_REF, Pmode, func); ++ SYMBOL_REF_FLAG (name) = 1; ++ /* If optimizing, put it in a psedo so that several loads can be merged ++ into one. */ ++ if (optimize && ! flag_no_function_cse) ++ name = copy_to_reg (name); ++ ++ /* Generate the function call. */ ++ call = gen_rtx (CALL, VOIDmode, gen_rtx (MEM, FUNCTION_MODE, name), ++ const0_rtx); ++ /* If we are doing stack extension, notify about the sp change. */ ++ if (stack_pointer) ++ call = gen_rtx (SET, VOIDmode, stack_pointer, call); ++ ++ /* Generate the call instruction. */ ++ call_insn = emit_call_insn (call); ++ /* Stack extension does not change memory in an unpredictable way. */ ++ CONST_CALL_P (call_insn) = 1; ++ /* We pass an argument in d0. */ ++ CALL_INSN_FUNCTION_USAGE (call_insn) = gen_rtx (EXPR_LIST, VOIDmode, ++ gen_rtx (USE, VOIDmode, gen_rtx (REG, SImode, 0)), 0); ++ ++ seq = gen_sequence (); ++ end_sequence (); ++ return seq; ++} ++ ++rtx ++gen_stack_cleanup_call (stack_pointer, sa) ++ rtx stack_pointer; ++ rtx sa; ++{ ++ return gen_stack_management_call (stack_pointer, sa, "__move_d0_sp"); ++} ++ ++void ++amigaos_alternate_allocate_stack (operands) ++ rtx *operands; ++{ ++ if (TARGET_STACKEXTEND) ++ emit_insn ((rtx)gen_stack_management_call (stack_pointer_rtx, operands[1], ++ "__sub_d0_sp")); ++ else ++ { ++ if (TARGET_STACKCHECK) ++ emit_insn ((rtx)gen_stack_management_call (0, operands[1], ++ "__stkchk_d0")); ++ anti_adjust_stack (operands[1]); ++ } ++ emit_move_insn (operands[0], virtual_stack_dynamic_rtx); ++} ++ ++/* begin-GG-local: explicit register specification for parameters */ ++ ++/* Initialize a variable CUM of type CUMULATIVE_ARGS ++ for a call to a function whose data type is FNTYPE. ++ For a library call, FNTYPE is 0. */ ++ ++void ++amigaos_init_cumulative_args(CUMULATIVE_ARGS *cum, tree fntype) ++{ ++ m68k_init_cumulative_args(cum, fntype); ++ ++ if (fntype) ++ cum->formal_type=TYPE_ARG_TYPES(fntype); ++ else /* Call to compiler-support function. */ ++ cum->formal_type=0; ++} ++ ++/* Update the data in CUM to advance over an argument. */ ++ ++void ++amigaos_function_arg_advance(CUMULATIVE_ARGS *cum) ++{ ++ m68k_function_arg_advance(cum); ++ ++ if (cum->formal_type) ++ cum->formal_type=TREE_CHAIN((tree)cum->formal_type); ++} ++ ++/* A C expression that controls whether a function argument is passed ++ in a register, and which register. */ ++ ++struct rtx_def * ++amigaos_function_arg(CUMULATIVE_ARGS *cum, enum machine_mode mode, ++ tree type) ++{ ++ tree asmtree; ++ if (cum->formal_type && TREE_VALUE((tree)cum->formal_type) ++ && (asmtree=lookup_attribute("asm", ++ TYPE_ATTRIBUTES(TREE_VALUE((tree)cum->formal_type))))) ++ { ++ int i; ++#if 0 ++ /* See c-decl.c/push_parm_decl for an explanation why this doesn't work. ++ */ ++ cum->last_arg_reg=TREE_INT_CST_LOW(TREE_VALUE(TREE_VALUE(asmtree))); ++#else ++ cum->last_arg_reg=TREE_INT_CST_LOW(TREE_VALUE(asmtree)); ++#endif ++ cum->last_arg_len=HARD_REGNO_NREGS(cum->last_arg_reg, mode); ++ ++ for (i=0; ilast_arg_len; i++) ++ if (cum->regs_already_used & (1 << cum->last_arg_reg+i)) ++ { ++ error("two parameters allocated for one register"); ++ break; ++ } ++ return gen_rtx(REG, mode, cum->last_arg_reg); ++ } ++ else ++ return (struct rtx_def *)m68k_function_arg(cum, mode, type); ++} ++ ++/* Return zero if the attributes on TYPE1 and TYPE2 are incompatible, ++ one if they are compatible, and two if they are nearly compatible ++ (which causes a warning to be generated). */ ++ ++int ++comp_amigaos_type_attributes(tree type1, tree type2) ++{ ++ int ret; ++ if ((ret=comp_m68k_type_attributes(type1, type2))!=1) ++ return ret; ++ ++ /* Functions or methods are incompatible if they specify mutually exclusive ++ ways of passing arguments. */ ++ if (TREE_CODE(type1)==FUNCTION_TYPE || TREE_CODE(type1)==METHOD_TYPE) ++ { ++ tree arg1, arg2; ++ arg1=TYPE_ARG_TYPES(type1); ++ arg2=TYPE_ARG_TYPES(type2); ++ for (; arg1 && arg2; arg1=TREE_CHAIN(arg1), arg2=TREE_CHAIN(arg2)) ++ if (TREE_VALUE(arg1) && TREE_VALUE(arg2)) ++ { ++ tree asm1, asm2; ++ asm1=lookup_attribute("asm", TYPE_ATTRIBUTES(TREE_VALUE(arg1))); ++ asm2=lookup_attribute("asm", TYPE_ATTRIBUTES(TREE_VALUE(arg2))); ++ if (asm1 && asm2) ++ { ++ if (TREE_INT_CST_LOW(TREE_VALUE(asm1))!= ++ TREE_INT_CST_LOW(TREE_VALUE(asm2))) ++ return 0; /* Two different registers specified. */ ++ } ++ else ++ if (asm1 || asm2) ++ return 0; /* "asm" used in only one type. */ ++ } ++ } ++ return 1; ++} ++ ++/* end-GG-local */ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/m68k/amigaos.h gcc/gcc/config/m68k/amigaos.h +--- gcc-2.95.3/gcc/config/m68k/amigaos.h Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/m68k/amigaos.h Wed Dec 19 19:24:12 2001 +@@ -0,0 +1,633 @@ ++/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS. ++ Copyright (C) 1992, 93-97, 1998 Free Software Foundation, Inc. ++ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch). ++ Heavily modified by Kamil Iskra (iskra@student.uci.agh.edu.pl). ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#include "m68k/m68k.h" ++ ++/* begin-GG-local: explicit register specification for parameters */ ++#define TARGET_AMIGAOS ++/* end-GG-local */ ++ ++/* Specs, switches. */ ++ ++/* See m68k.h for bits in TARGET_DEFAULT. ++ 0 means 68000, no hardware fpu (68881/68882/68040/68060). */ ++ ++#define TARGET_DEFAULT 0 ++ ++/* Define __HAVE_68881__ in preprocessor according to the -m flags. ++ This will control the use of inline 68881 insns in certain macros. ++ Also inform the program which CPU we compile for. ++ When creating shared libraries, use different 'errno'. */ ++ ++/* -msoft-float is the default, assume -mc68000 as well */ ++#define CPP_SPEC \ ++ "%{m68881:-D__HAVE_68881__} " \ ++ "%{!ansi:" \ ++ "%{m68020:-Dmc68020} " \ ++ "%{mc68020:-Dmc68020} " \ ++ "%{m68020-40:-Dmc68020} " \ ++ "%{m68020-60:-Dmc68020} " \ ++ "%{m68030:-Dmc68030} " \ ++ "%{m68040:-Dmc68040} " \ ++ "%{m68060:-Dmc68060} " \ ++ "%{!noixemul:-Dixemul} " \ ++ "%{noixemul:-Dlibnix}} " \ ++ "%{m68020:-D__mc68020__ -D__mc68020} " \ ++ "%{mc68020:-D__mc68020__ -D__mc68020} " \ ++ "%{m68020-40:-D__mc68020__ -D__mc68020} " \ ++ "%{m68020-60:-D__mc68020__ -D__mc68020} " \ ++ "%{m68030:-D__mc68030__ -D__mc68030} " \ ++ "%{m68040:-D__mc68040__ -D__mc68040} " \ ++ "%{m68060:-D__mc68060__ -D__mc68060} " \ ++ "%{!noixemul:-D__ixemul__ -D__ixemul} " \ ++ "%{noixemul:-D__libnix__ -D__libnix} " \ ++ "%{malways-restore-a4:-Derrno=(*ixemul_errno)} " \ ++ "%{mrestore-a4:-Derrno=(*ixemul_errno)} " ++ ++/* Various -m flags require special flags to the assembler. */ ++ ++#define ASM_SPEC "\ ++ %{m68000:-mc68010}\ ++ %{mc68000:-mc68010}\ ++ %{m68020:-mc68020}\ ++ %{mc68020:-mc68020}\ ++ %{m68030:-mc68030}\ ++ %{m68040:-mc68040}\ ++ %{m68060:-mc68060}\ ++ %{m68020-40:-mc68020}\ ++ %{m68020-60:-mc68020}\ ++ %{!mc68000:%{!m68000:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68060:%{!m68020-40:%{!m68020-60:-mc68010}}}}}}}}}\ ++ %{msmall-code:-sc}\ ++" ++ ++/* amiga/amigaos are the new "standard" defines for the Amiga. ++ * MCH_AMIGA, AMIGA, __chip etc. are used in other compilers and are ++ * provided for compatibility reasons. */ ++ ++#define CPP_PREDEFINES "\ ++ -Dmc68000\ ++ -Damiga\ ++ -Damigaos\ ++ -DMCH_AMIGA\ ++ -DAMIGA\ ++ -D__chip=__attribute__((__chip__))\ ++ -D__saveds=__attribute__((__saveds__))\ ++ -D__interrupt=__attribute__((__interrupt__))\ ++ -D__stackext=__attribute__((__stackext__))\ ++ -D__regargs=__attribute__((__regparm__))\ ++ -D__stdargs=__attribute__((__stkparm__))\ ++ -D__aligned=__attribute__((__aligned__(4)))\ ++ -Asystem(amigaos)\ ++ -Acpu(m68k)\ ++ -Amachine(m68k)\ ++" ++ ++/* Choose the right startup file, depending on whether we use base relative ++ code, base relative code with automatic relocation (-resident), their ++ 32-bit versions, libnix, profiling or plain crt0.o. */ ++ ++#define STARTFILE_SPEC \ ++ "%{!noixemul:" \ ++ "%{fbaserel:%{!resident:bcrt0.o%s}}" \ ++ "%{resident:rcrt0.o%s}" \ ++ "%{fbaserel32:%{!resident32:lcrt0.o%s}}" \ ++ "%{resident32:scrt0.o%s}" \ ++ "%{!resident:%{!fbaserel:%{!resident32:%{!fbaserel32:" \ ++ "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}}}}" \ ++ "%{noixemul:" \ ++ "%{resident:libnix/nrcrt0.o%s} " \ ++ "%{!resident:%{fbaserel:libnix/nbcrt0.o%s}%{!fbaserel:libnix/ncrt0.o%s}}} " ++ ++#define ENDFILE_SPEC "%{noixemul:-lstubs}" ++ ++/* Automatically search libamiga.a for AmigaOS specific functions. Note ++ that we first search the standard C library to resolve as much as ++ possible from there, since it has names that are duplicated in libamiga.a ++ which we *don't* want from there. Then search libamiga.a for any calls ++ that were not generated inline, and finally search the standard C library ++ again to resolve any references that libamiga.a might have generated. ++ This may only be a temporary solution since it might be better to simply ++ remove the things from libamiga.a that should be pulled in from libc.a ++ instead, which would eliminate the first reference to libc.a. Note that ++ if we don't search it automatically, it is very easy for the user to try ++ to put in a -lamiga himself and get it in the wrong place, so that (for ++ example) calls like sprintf come from -lamiga rather than -lc. */ ++ ++#define LIB_SPEC \ ++ "%{!noixemul:" \ ++ "%{!p:%{!pg:-lc -lamiga -lc}}" \ ++ "%{p:-lc_p}%{pg:-lc_p}}" \ ++ "%{noixemul:-lnixmain -lnix -lamiga " \ ++ "%{mstackcheck:-lstack} " \ ++ "%{mstackextend:-lstack}} -lamigastubs" ++ ++/* If debugging, tell the linker to output amiga-hunk symbols *and* a BSD ++ compatible debug hunk. ++ Also, pass appropriate linker flavours depending on user-supplied ++ commandline options. */ ++ ++#define LINK_SPEC \ ++ "%{noixemul:-fl libnix} " \ ++ "%{fbaserel:%{!resident:-m amiga_bss -fl libb}} " \ ++ "%{resident:-m amiga_bss -amiga-datadata-reloc -fl libb} " \ ++ "%{fbaserel32:%{!resident32:-m amiga_bss -fl libb32}} " \ ++ "%{resident32:-m amiga_bss -amiga-datadata-reloc -fl libb32} " \ ++ "%{g:-amiga-debug-hunk} " \ ++ "%{m68020:-fl libm020} " \ ++ "%{mc68020:-fl libm020} " \ ++ "%{m68030:-fl libm020} " \ ++ "%{m68040:-fl libm020} " \ ++ "%{m68060:-fl libm020} " \ ++ "%{m68020-40:-fl libm020} " \ ++ "%{m68020-60:-fl libm020} " \ ++ "%{m68881:-fl libm881} " ++ ++/* Translate '-resident' to '-fbaserel' (they differ in linking stage only). ++ Don't put function addresses in registers for PC-relative code. */ ++ ++#define CC1_SPEC \ ++ "%{resident:-fbaserel} " \ ++ "%{resident32:-fbaserel32} " \ ++ "%{msmall-code:-fno-function-cse} " ++ ++/* Compile with stack extension. */ ++ ++#define MASK_STACKEXTEND 0x40000000 ++#define TARGET_STACKEXTEND (((target_flags & MASK_STACKEXTEND) \ ++ && !lookup_attribute ("interrupt", \ ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) \ ++ || lookup_attribute ("stackext", \ ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) ++ ++/* Compile with stack checking. */ ++ ++#define MASK_STACKCHECK 0x20000000 ++#define TARGET_STACKCHECK ((target_flags & MASK_STACKCHECK) \ ++ && !(target_flags & MASK_STACKEXTEND) \ ++ && !lookup_attribute ("interrupt", \ ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))) \ ++ && !lookup_attribute ("stackext", \ ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) ++ ++/* Compile with a4 restoring in public functions. */ ++ ++#define MASK_RESTORE_A4 0x10000000 ++#define TARGET_RESTORE_A4 \ ++ ((target_flags & MASK_RESTORE_A4) && TREE_PUBLIC (current_function_decl)) ++ ++/* Compile with a4 restoring in all functions. */ ++ ++#define MASK_ALWAYS_RESTORE_A4 0x8000000 ++#define TARGET_ALWAYS_RESTORE_A4 (target_flags & MASK_ALWAYS_RESTORE_A4) ++ ++/* Provide a dummy entry for the '-msmall-code' switch. This is used by ++ the assembler and '*_SPEC'. */ ++ ++#undef SUBTARGET_SWITCHES ++#define SUBTARGET_SWITCHES \ ++ { "small-code", 0}, \ ++ { "stackcheck", MASK_STACKCHECK}, \ ++ { "no-stackcheck", - MASK_STACKCHECK}, \ ++ { "stackextend", MASK_STACKEXTEND}, \ ++ { "no-stackextend", - MASK_STACKEXTEND}, \ ++ { "fixedstack", - (MASK_STACKCHECK|MASK_STACKEXTEND)}, \ ++ { "restore-a4", MASK_RESTORE_A4}, \ ++ { "no-restore-a4", - MASK_RESTORE_A4}, \ ++ { "always-restore-a4", MASK_ALWAYS_RESTORE_A4}, \ ++ { "no-always-restore-a4", - MASK_ALWAYS_RESTORE_A4}, ++ ++#undef SUBTARGET_OVERRIDE_OPTIONS ++#define SUBTARGET_OVERRIDE_OPTIONS \ ++do \ ++ { \ ++ if (!TARGET_68020 && flag_pic==4) \ ++ error ("-fbaserel32 is not supported on the 68000 or 68010\n"); \ ++ } \ ++while (0) ++ ++/* Various ABI issues. */ ++ ++/* This is (almost;-) BSD, so it wants DBX format. */ ++ ++#define DBX_DEBUGGING_INFO ++ ++/* GDB goes mad if it sees the function end marker. */ ++ ++#define NO_DBX_FUNCTION_END 1 ++ ++/* Allow folding division by zero. */ ++ ++#define REAL_INFINITY ++ ++/* Don't try using XFmode since we don't have appropriate runtime software ++ support. */ ++#undef LONG_DOUBLE_TYPE_SIZE ++#define LONG_DOUBLE_TYPE_SIZE 64 ++ ++/* Use A5 as framepointer instead of A6, since the AmigaOS ABI requires A6 ++ to be used as a shared library base pointer in direct library calls. */ ++ ++#undef FRAME_POINTER_REGNUM ++#define FRAME_POINTER_REGNUM 13 ++#undef ARG_POINTER_REGNUM ++#define ARG_POINTER_REGNUM 13 ++ ++/* We use A4 for the PIC pointer, not A5, which is the framepointer. */ ++ ++#undef PIC_OFFSET_TABLE_REGNUM ++#define PIC_OFFSET_TABLE_REGNUM 12 ++ ++/* The AmigaOS ABI does not define how structures should be returned, so, ++ contrary to 'm68k.h', we prefer a multithread-safe solution. */ ++ ++#undef PCC_STATIC_STRUCT_RETURN ++ ++/* Setup a default shell return value for those (gazillion..) programs that ++ (inspite of ANSI-C) declare main() to be void (or even VOID...) and thus ++ cause the shell to randomly caugh upon executing such programs (contrary ++ to Unix, AmigaOS scripts are terminated with an error if a program returns ++ with an error code above the `error' or even `failure' level ++ (which is configurable with the FAILAT command)). */ ++ ++#define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node) ++ ++#undef WCHAR_TYPE ++#define WCHAR_TYPE "unsigned int" ++ ++/* Support sections in chip memory, currently '.datachip' only. */ ++#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \ ++ fprintf ((FILE), "\t%s\n", (NAME)) ++ ++/* We define ASM_OUTPUT_SECTON_NAME, but we don't support arbitrary sections, ++ including '.gcc_except_table', so we emulate the standard behaviour. */ ++#define EXCEPTION_SECTION() \ ++do \ ++ { \ ++ if (flag_pic) \ ++ data_section (); \ ++ else \ ++ readonly_data_section (); \ ++ } \ ++while(0) ++ ++#define EH_FRAME_SECTION() readonly_data_section () ++ ++/* Use sjlj exceptions until problems with DWARF2 unwind info on a.out ++ targets using GNU ld are fixed. */ ++#define DWARF2_UNWIND_INFO 0 ++ ++/* GAS supports alignment up to 32768 bytes. */ ++#undef ASM_OUTPUT_ALIGN ++#define ASM_OUTPUT_ALIGN(FILE, LOG) \ ++do \ ++ { \ ++ if ((LOG) == 1) \ ++ fprintf ((FILE), "\t.even\n"); \ ++ else \ ++ fprintf ((FILE), "\t.align %d\n", (LOG)); \ ++ } \ ++while (0) ++ ++#define MAX_OFILE_ALIGNMENT ((1 << 15)*BITS_PER_UNIT) ++ ++/* It is not uncommon to use a custom startup code on AmigaOS. The OS ++ starts an application by jumping to the first byte of the text section, ++ so we prefer the constants to be put after the functions. */ ++/* FIXME: Disabled for now, it's buggy. */ ++ ++/* #define CONSTANT_AFTER_FUNCTION_P(EXP) 1 */ /**/ ++ ++/* Call __flush_cache() after building the trampoline: it will call ++ an appropriate OS cache-clearing routine. */ ++ ++#undef FINALIZE_TRAMPOLINE ++#define FINALIZE_TRAMPOLINE(TRAMP) \ ++ emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__flush_cache"), \ ++ 0, VOIDmode, 2, (TRAMP), Pmode, \ ++ GEN_INT (TRAMPOLINE_SIZE), SImode) ++ ++/* Baserel support. */ ++ ++/* Given that symbolic_operand(X), return TRUE if no special ++ base relative relocation is necessary */ ++ ++#define LEGITIMATE_BASEREL_OPERAND_P(X) \ ++ (flag_pic >= 3 && read_only_operand (X)) ++ ++#undef LEGITIMATE_PIC_OPERAND_P ++#define LEGITIMATE_PIC_OPERAND_P(X) \ ++ (! symbolic_operand (X, VOIDmode) || LEGITIMATE_BASEREL_OPERAND_P (X)) ++ ++/* Define this macro if references to a symbol must be treated ++ differently depending on something about the variable or ++ function named by the symbol (such as what section it is in). ++ ++ The macro definition, if any, is executed immediately after the ++ rtl for DECL or other node is created. ++ The value of the rtl will be a `mem' whose address is a ++ `symbol_ref'. ++ ++ The usual thing for this macro to do is to a flag in the ++ `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified ++ name string in the `symbol_ref' (if one bit is not enough ++ information). ++ ++ On the Amiga we use this to indicate if references to a symbol should be ++ absolute or base relative. */ ++ ++#define ENCODE_SECTION_INFO(DECL) \ ++do \ ++ { \ ++ if (TREE_CODE (DECL) == FUNCTION_DECL) \ ++ SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \ ++ else \ ++ { \ ++ rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ++ ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ ++ if ((RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl) \ ++ && (flag_pic<3 || (TREE_CODE (DECL) == STRING_CST \ ++ && !flag_writable_strings) \ ++ || amigaos_put_in_text (DECL))) \ ++ || (TREE_CODE (DECL) == VAR_DECL \ ++ && DECL_SECTION_NAME (DECL) != NULL_TREE)) \ ++ SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1; \ ++ } \ ++ } \ ++while (0) ++ ++#define LIBCALL_ENCODE_SECTION_INFO(FUN) \ ++do \ ++ { \ ++ if (flag_pic >= 3) \ ++ SYMBOL_REF_FLAG (FUN) = 1; \ ++ } \ ++while (0) ++ ++/* according to varasm.c, RELOC referrs *only* to whether constants (!) ++ are addressed by address. */ ++ ++#undef SELECT_SECTION ++#define SELECT_SECTION(DECL, RELOC) \ ++{ \ ++ if (TREE_CODE (DECL) == STRING_CST) \ ++ { \ ++ if (! flag_writable_strings) \ ++ readonly_data_section (); \ ++ else \ ++ data_section (); \ ++ } \ ++ else if (TREE_CODE (DECL) == VAR_DECL) \ ++ { \ ++ if (TREE_READONLY (DECL) \ ++ && ! TREE_THIS_VOLATILE (DECL) \ ++ && DECL_INITIAL (DECL) \ ++ && (DECL_INITIAL (DECL) == error_mark_node \ ++ || TREE_CONSTANT (DECL_INITIAL (DECL))) \ ++ && (!flag_pic || (flag_pic<3 && !RELOC) \ ++ || SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)))) \ ++ readonly_data_section (); \ ++ else \ ++ data_section (); \ ++ } \ ++ else if ((!flag_pic || (flag_pic<3 && !RELOC)) \ ++ && SYMBOL_REF_FLAG (XEXP ((TREE_CODE_CLASS (TREE_CODE (DECL))\ ++ != 'd' ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)), 0))) \ ++ readonly_data_section (); \ ++ else \ ++ data_section (); \ ++} ++ ++/* Preserve the initial value of a4. */ ++ ++#define PROLOGUE_EXTRA_SAVE(MASK, NUM_SAVED_REGS) \ ++do \ ++ { \ ++ if (amigaos_restore_a4 ()) \ ++ { \ ++ (MASK) |= 1 << (15 - PIC_OFFSET_TABLE_REGNUM); \ ++ (NUM_SAVED_REGS)++; \ ++ } \ ++ } \ ++while (0) ++ ++/* Restore the initial value of a4. */ ++ ++#define EPILOGUE_EXTRA_RESTORE(MASK, NREGS) \ ++do \ ++ { \ ++ if (amigaos_restore_a4 ()) \ ++ { \ ++ (MASK) |= 1 << PIC_OFFSET_TABLE_REGNUM; \ ++ (NREGS)++; \ ++ } \ ++ } \ ++while (0) ++ ++#define HAVE_ALTERNATE_PIC_SETUP (flag_pic >= 3) ++ ++/* Make a4 point at data hunk. */ ++ ++void amigaos_alternate_pic_setup (); ++#define ALTERNATE_PIC_SETUP(STREAM) \ ++ (amigaos_alternate_pic_setup (STREAM)) ++ ++/* If preserving a4, let the code generator know about it. */ ++ ++#undef SUBTARGET_INITIAL_FP_OFFSET ++#define SUBTARGET_INITIAL_FP_OFFSET(OFFSET) \ ++do \ ++ { \ ++ if (amigaos_restore_a4 ()) \ ++ (OFFSET) += 4; \ ++ } \ ++while (0) ++ ++/* Determine if the epilogue should be output as RTL. ++ Don't do it if preserving a4. */ ++ ++#undef USE_RETURN_INSN ++#define USE_RETURN_INSN (use_return_insn () && ! amigaos_restore_a4 ()) ++ ++/* Attribute support. */ ++ ++/* A C expression whose value is nonzero if IDENTIFIER with arguments ++ ARGS is a valid machine specific attribute for DECL. The attributes ++ in ATTRIBUTES have previously been assigned to DECL. */ ++ ++#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \ ++ (valid_amigaos_decl_attribute ((DECL), (IDENTIFIER))) ++ ++/* A C expression whose value is nonzero if IDENTIFIER with arguments ++ ARGS is a valid machine specific attribute for TYPE. The attributes ++ in ATTRIBUTES have previously been assigned to TYPE. */ ++ ++#undef VALID_MACHINE_TYPE_ATTRIBUTE ++#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \ ++ (valid_amigaos_type_attribute ((TYPE), (ATTRIBUTES), (IDENTIFIER), (ARGS))) ++ ++/* Generate the test of d0 before return to set cc register in 'interrupt' ++ function. */ ++ ++#define EPILOGUE_END_HOOK(STREAM) \ ++do \ ++ { \ ++ if (lookup_attribute ("interrupt", \ ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) \ ++ asm_fprintf ((STREAM), "\ttstl %Rd0\n"); \ ++ } \ ++while (0) ++ ++/* begin-GG-local: explicit register specification for parameters */ ++ ++/* Note: this is an extension of m68k_args */ ++struct amigaos_args ++{ ++ int num_of_regs; ++ long regs_already_used; ++ int last_arg_reg; ++ int last_arg_len; ++ void *formal_type; /* New field: formal type of the current argument. */ ++}; ++ ++/* A C type for declaring a variable that is used as the first ++ argument of `FUNCTION_ARG' and other related values. */ ++ ++#undef CUMULATIVE_ARGS ++#define CUMULATIVE_ARGS struct amigaos_args ++ ++/* Initialize a variable CUM of type CUMULATIVE_ARGS ++ for a call to a function whose data type is FNTYPE. ++ For a library call, FNTYPE is 0. */ ++ ++#undef INIT_CUMULATIVE_ARGS ++#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ ++ (amigaos_init_cumulative_args(&(CUM), (FNTYPE))) ++ ++/* Update the data in CUM to advance over an argument ++ of mode MODE and data type TYPE. ++ (TYPE is null for libcalls where that information may not be available.) */ ++ ++#undef FUNCTION_ARG_ADVANCE ++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ++ (amigaos_function_arg_advance (&(CUM))) ++ ++/* A C expression that controls whether a function argument is passed ++ in a register, and which register. */ ++ ++#undef FUNCTION_ARG ++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ++ ((struct rtx_def *)amigaos_function_arg (&(CUM), (MODE), (TYPE))) ++ ++/* A C expression whose value is zero if the attributes on TYPE1 and ++ TYPE2 are incompatible, one if they are compatible, and two if they ++ are nearly compatible (which causes a warning to be generated). */ ++ ++#undef COMP_TYPE_ATTRIBUTES ++#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \ ++ (comp_amigaos_type_attributes ((TYPE1), (TYPE2))) ++ ++/* end-GG-local */ ++ ++/* Stack checking and automatic extension support. */ ++ ++void amigaos_prologue_begin_hook (); ++#define PROLOGUE_BEGIN_HOOK(STREAM, FSIZE) \ ++ (amigaos_prologue_begin_hook ((STREAM), (FSIZE))) ++ ++#define HAVE_ALTERNATE_FRAME_SETUP_F(FSIZE) TARGET_STACKEXTEND ++ ++void amigaos_alternate_frame_setup_f (); ++#define ALTERNATE_FRAME_SETUP_F(STREAM, FSIZE) \ ++ (amigaos_alternate_frame_setup_f ((STREAM), (FSIZE))) ++ ++#define HAVE_ALTERNATE_FRAME_SETUP(FSIZE) TARGET_STACKEXTEND ++ ++void amigaos_alternate_frame_setup (); ++#define ALTERNATE_FRAME_SETUP(STREAM, FSIZE) \ ++ (amigaos_alternate_frame_setup ((STREAM), (FSIZE))) ++ ++#define HAVE_ALTERNATE_FRAME_DESTR_F(FSIZE) \ ++ (TARGET_STACKEXTEND && current_function_calls_alloca) ++ ++#define ALTERNATE_FRAME_DESTR_F(STREAM, FSIZE) \ ++ (asm_fprintf ((STREAM), "\tjra %U__unlk_a5_rts\n")) ++ ++#define HAVE_ALTERNATE_RETURN \ ++ (TARGET_STACKEXTEND && frame_pointer_needed && \ ++ current_function_calls_alloca) ++ ++#define ALTERNATE_RETURN(STREAM) ++ ++struct rtx_def* gen_stack_cleanup_call (); ++#define HAVE_restore_stack_nonlocal TARGET_STACKEXTEND ++#define gen_restore_stack_nonlocal gen_stack_cleanup_call ++ ++#define HAVE_restore_stack_function TARGET_STACKEXTEND ++#define gen_restore_stack_function gen_stack_cleanup_call ++ ++#define HAVE_restore_stack_block TARGET_STACKEXTEND ++#define gen_restore_stack_block gen_stack_cleanup_call ++ ++#undef TARGET_ALTERNATE_ALLOCATE_STACK ++#define TARGET_ALTERNATE_ALLOCATE_STACK 1 ++ ++#define ALTERNATE_ALLOCATE_STACK(OPERANDS) \ ++do \ ++ { \ ++ amigaos_alternate_allocate_stack (OPERANDS); \ ++ DONE; \ ++ } \ ++while (0) ++ ++/* begin-GG-local: dynamic libraries */ ++ ++/* This macro is used to check if all collect2 facilities should be used. ++ We need a few special ones, like stripping after linking. */ ++ ++#define DO_COLLECTING (do_collecting || amigaos_do_collecting()) ++ ++/* This macro is called in collect2 for every GCC argument name. ++ ARG is a part of commandline (without '\0' at the end). */ ++ ++#define COLLECT2_GCC_OPTIONS_HOOK(ARG) amigaos_gccopts_hook(ARG) ++ ++/* This macro is called in collect2 for every ld's "-l" or "*.o" or "*.a" ++ argument. ARG is a complete argument, with '\0' at the end. */ ++ ++#define COLLECT2_LIBNAME_HOOK(ARG) amigaos_libname_hook(ARG) ++ ++/* This macro is called at collect2 exit, to clean everything up. */ ++ ++#define COLLECT2_EXTRA_CLEANUP amigaos_collect2_cleanup ++ ++/* This macro is called just before the first linker invocation. ++ LD1_ARGV is "char** argv", which will be passed to "ld". STRIP is an ++ *address* of "strip_flag" variable. */ ++ ++#define COLLECT2_PRELINK_HOOK(LD1_ARGV, STRIP) \ ++amigaos_prelink_hook((LD1_ARGV), (STRIP)) ++ ++/* This macro is called just after the first linker invocation, in place of ++ "nm" and "ldd". OUTPUT_FILE is the executable's filename. */ ++ ++#define COLLECT2_POSTLINK_HOOK(OUTPUT_FILE) amigaos_postlink_hook(OUTPUT_FILE) ++/* end-GG-local */ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/m68k/m68k.c gcc/gcc/config/m68k/m68k.c +--- gcc-2.95.3/gcc/config/m68k/m68k.c Mon Aug 2 06:51:08 1999 ++++ gcc/gcc/config/m68k/m68k.c Thu Sep 27 19:35:54 2001 +@@ -63,6 +63,8 @@ + const char *m68k_align_jumps_string; + /* Specify power of two alignment used for functions. */ + const char *m68k_align_funcs_string; ++/* Specify number of registers for integer, pointer and float arguments. */ ++const char *m68k_regparm_string; + + /* Specify power of two alignment used for loops. */ + int m68k_align_loops; +@@ -70,6 +72,8 @@ + int m68k_align_jumps; + /* Specify power of two alignment used for functions. */ + int m68k_align_funcs; ++/* Specify number of registers for integer, pointer and float arguments. */ ++int m68k_regparm; + + /* Nonzero if the last compare/test insn had FP operands. The + sCC expanders peek at this to determine what to do for the +@@ -124,6 +128,19 @@ + } + else + m68k_align_funcs = def_align; ++ ++ /* Validate -mregparm and -mregparm= value. */ ++ if (m68k_regparm_string) ++ { ++ m68k_regparm = atoi (m68k_regparm_string); ++ if (m68k_regparm < 1 || m68k_regparm > M68K_MAX_REGPARM) ++ fatal ("-mregparm=%d is not between 1 and %d", ++ m68k_regparm, M68K_MAX_REGPARM); ++ target_flags |= MASK_REGPARM; ++ } ++ else ++ if (TARGET_REGPARM) ++ m68k_regparm = M68K_DEFAULT_REGPARM; + } + + /* This function generates the assembly code for function entry. +@@ -151,9 +168,17 @@ + int fsize = (size + 3) & -4; + int cfa_offset = INCOMING_FRAME_SP_OFFSET, cfa_store_offset = cfa_offset; + ++#ifdef PROLOGUE_BEGIN_HOOK ++ PROLOGUE_BEGIN_HOOK (stream, fsize); ++#endif + + if (frame_pointer_needed) + { ++#ifdef HAVE_ALTERNATE_FRAME_SETUP_F ++ if (HAVE_ALTERNATE_FRAME_SETUP_F (fsize)) ++ ALTERNATE_FRAME_SETUP_F (stream, fsize); ++ else ++#endif + if (fsize == 0 && TARGET_68040) + { + /* on the 68040, pea + move is faster than link.w 0 */ +@@ -209,6 +234,10 @@ + cfa_store_offset += fsize; + } + } ++#ifdef HAVE_ALTERNATE_FRAME_SETUP ++ else if (HAVE_ALTERNATE_FRAME_SETUP (fsize)) ++ ALTERNATE_FRAME_SETUP (stream, fsize); ++#endif + else if (fsize) + { + if (fsize + 4 < 0x8000) +@@ -356,11 +385,14 @@ + mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM)); + num_saved_regs--; + } +- if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM]) ++ if (flag_pic && flag_pic < 3 && regs_ever_live[PIC_OFFSET_TABLE_REGNUM]) + { + mask |= 1 << (15 - PIC_OFFSET_TABLE_REGNUM); + num_saved_regs++; + } ++#ifdef PROLOGUE_EXTRA_SAVE ++ PROLOGUE_EXTRA_SAVE (mask, num_saved_regs); ++#endif + + #if NEED_PROBE + #ifdef MOTOROLA +@@ -462,6 +494,11 @@ + -cfa_store_offset + n_regs++ * 4); + } + } ++#ifdef HAVE_ALTERNATE_PIC_SETUP ++ if (HAVE_ALTERNATE_PIC_SETUP) ++ ALTERNATE_PIC_SETUP (stream); ++ else ++#endif + if (flag_pic && current_function_uses_pic_offset_table) + { + #ifdef MOTOROLA +@@ -568,11 +605,14 @@ + nregs++; + mask |= 1 << regno; + } +- if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM]) ++ if (flag_pic && flag_pic < 3 && regs_ever_live[PIC_OFFSET_TABLE_REGNUM]) + { + nregs++; + mask |= 1 << PIC_OFFSET_TABLE_REGNUM; + } ++#ifdef EPILOGUE_EXTRA_RESTORE ++ EPILOGUE_EXTRA_RESTORE (mask, nregs); ++#endif + offset = foffset + nregs * 4; + /* FIXME : leaf_function_p below is too strong. + What we really need to know there is if there could be pending +@@ -759,6 +799,11 @@ + fpoffset -= 8; + } + if (frame_pointer_needed) ++#ifdef HAVE_ALTERNATE_FRAME_DESTR_F ++ if (HAVE_ALTERNATE_FRAME_DESTR_F (fsize)) ++ ALTERNATE_FRAME_DESTR_F (stream, fsize); ++ else ++#endif + fprintf (stream, "\tunlk %s\n", + reg_names[FRAME_POINTER_REGNUM]); + else if (fsize) +@@ -828,9 +873,19 @@ + #endif + } + } ++ ++#ifdef EPILOGUE_END_HOOK ++ EPILOGUE_END_HOOK (stream); ++#endif ++ + if (current_function_pops_args) + asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args); + else ++#ifdef HAVE_ALTERNATE_RETURN ++ if (HAVE_ALTERNATE_RETURN) ++ ALTERNATE_RETURN (stream); ++ else ++#endif + fprintf (stream, "\trts\n"); + } + +@@ -1327,12 +1382,20 @@ + /* First handle a simple SYMBOL_REF or LABEL_REF */ + if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF) + { ++#ifdef LEGITIMATE_BASEREL_OPERAND_P ++ if (LEGITIMATE_BASEREL_OPERAND_P (orig)) ++ return orig; ++#endif ++ + if (reg == 0) + abort (); + +- pic_ref = gen_rtx_MEM (Pmode, +- gen_rtx_PLUS (Pmode, +- pic_offset_table_rtx, orig)); ++ if (flag_pic < 3) ++ pic_ref = gen_rtx_MEM (Pmode, ++ gen_rtx_PLUS (Pmode, ++ pic_offset_table_rtx, orig)); ++ else ++ pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, orig); + current_function_uses_pic_offset_table = 1; + if (reload_in_progress) + regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1; +@@ -3104,6 +3167,10 @@ + fprintf (file, ":w"); + if ((flag_pic == 2) && (breg == pic_offset_table_rtx)) + fprintf (file, ":l"); ++ if ((flag_pic == 3) && (breg == pic_offset_table_rtx)) ++ fprintf (file, ":W"); ++ if ((flag_pic == 4) && (breg == pic_offset_table_rtx)) ++ fprintf (file, ":L"); + } + if (addr != 0 && ireg != 0) + { +@@ -3279,6 +3346,252 @@ + return (GET_CODE (op) == CONST_INT + && (INTVAL (op) >= (-0x7fffffff - 1) && INTVAL (op) <= 0x7fffffff)); + } ++ ++/* Argument-passing support functions. */ ++ ++/* Initialize a variable CUM of type CUMULATIVE_ARGS ++ for a call to a function whose data type is FNTYPE. ++ For a library call, FNTYPE is 0. */ ++ ++void ++m68k_init_cumulative_args (cum, fntype) ++ CUMULATIVE_ARGS *cum; ++ tree fntype; ++{ ++ cum->last_arg_reg = -1; ++ cum->regs_already_used = 0; ++ if (fntype) ++ { ++ if (lookup_attribute ("stkparm", TYPE_ATTRIBUTES (fntype))) ++ cum->num_of_regs = 0; ++ else ++ { ++ tree ratree = lookup_attribute ("regparm", TYPE_ATTRIBUTES (fntype)); ++ if (ratree) ++ { ++ cum->num_of_regs = m68k_regparm ? m68k_regparm ++ : M68K_DEFAULT_REGPARM; ++ if (TREE_VALUE (ratree) ++ && TREE_CODE (TREE_VALUE (ratree)) == TREE_LIST) ++ { ++ tree num_of_regs = TREE_VALUE (TREE_VALUE (ratree)); ++ cum->num_of_regs = ++ num_of_regs ? TREE_INT_CST_LOW (num_of_regs) : ++ (m68k_regparm ? m68k_regparm : M68K_DEFAULT_REGPARM); ++ } ++ } ++ else ++ cum->num_of_regs = m68k_regparm; ++ } ++ } ++ else /* Libcall. */ ++ cum->num_of_regs = 0; ++ ++ if (cum->num_of_regs) ++ { ++ /* If this is a vararg call, put all arguments on stack. */ ++ tree param, next_param; ++ for (param = TYPE_ARG_TYPES (fntype); param; param = next_param) ++ { ++ next_param = TREE_CHAIN (param); ++ if (!next_param && TREE_VALUE (param) != void_type_node) ++ cum->num_of_regs = 0; ++ } ++ } ++ ++#if ! defined (PCC_STATIC_STRUCT_RETURN) && defined (STRUCT_VALUE_REGNUM) ++ /* If return value is a structure, and we pass the buffer address in a ++ register, we can't use this register for our own purposes. ++ FIXME: Something similar would be useful for static chain. */ ++ if (fntype && aggregate_value_p (TREE_TYPE (fntype))) ++ cum->regs_already_used |= (1 << STRUCT_VALUE_REGNUM); ++#endif ++} ++ ++/* Update the data in CUM to advance over an argument. */ ++ ++void ++m68k_function_arg_advance (cum) ++ CUMULATIVE_ARGS *cum; ++{ ++ if (cum->last_arg_reg != -1) ++ { ++ int count; ++ for (count = 0; count < cum->last_arg_len; count++) ++ cum->regs_already_used |= (1 << (cum->last_arg_reg + count)); ++ cum->last_arg_reg = -1; ++ } ++} ++ ++/* Define where to put the arguments to a function. ++ Value is zero to push the argument on the stack, ++ or a hard register in which to store the argument. ++ ++ MODE is the argument's machine mode. ++ TYPE is the data type of the argument (as a tree). ++ This is null for libcalls where that information may ++ not be available. ++ CUM is a variable of type CUMULATIVE_ARGS which gives info about ++ the preceding args and about the function being called. */ ++ ++struct rtx_def * ++m68k_function_arg (cum, mode, type) ++ CUMULATIVE_ARGS *cum; ++ enum machine_mode mode; ++ tree type; ++{ ++ if (cum->num_of_regs) ++ { ++ int regbegin = -1, altregbegin = -1, len; ++ ++ /* FIXME: The last condition below is a workaround for a bug. */ ++ if (TARGET_68881 && FLOAT_MODE_P (mode) && ++ GET_MODE_UNIT_SIZE (mode) <= 12 && ++ (GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT || mode == SCmode)) ++ { ++ regbegin = 16; /* FPx */ ++ len = GET_MODE_NUNITS (mode); ++ } ++ /* FIXME: Two last conditions below are workarounds for bugs. */ ++ else if (INTEGRAL_MODE_P (mode) && mode !=CQImode && mode != CHImode) ++ { ++ if (POINTER_TYPE_P (type)) ++ regbegin = 8; /* Ax */ ++ else ++ regbegin = 0; /* Dx */ ++ altregbegin = 8 - regbegin; ++ len = (GET_MODE_SIZE (mode) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD; ++ } ++ ++ if (regbegin != -1) ++ { ++ int reg; ++ long mask; ++ ++look_for_reg: ++ mask = 1 << regbegin; ++ for (reg = 0; reg < cum->num_of_regs; reg++, mask <<= 1) ++ if (!(cum->regs_already_used & mask)) ++ { ++ int end; ++ for (end = reg; end < cum->num_of_regs && end < reg + len; ++ end++, mask <<= 1) ++ if (cum->regs_already_used & mask) ++ break; ++ if (end == reg + len) ++ { ++ cum->last_arg_reg = reg + regbegin; ++ cum->last_arg_len = len; ++ break; ++ } ++ } ++ ++ if (reg == cum->num_of_regs && altregbegin != -1) ++ { ++ regbegin = altregbegin; ++ altregbegin = -1; ++ goto look_for_reg; ++ } ++ } ++ ++ if (cum->last_arg_reg != -1) ++ return gen_rtx (REG, mode, cum->last_arg_reg); ++ } ++ return 0; ++} ++ ++/* Attributes support. */ ++ ++/* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine ++ specific attribute for TYPE. The attributes in ATTRIBUTES have previously ++ been assigned to TYPE. */ ++ ++int ++valid_m68k_type_attribute (type, attributes, identifier, args) ++ tree type, attributes, identifier, args; ++{ ++ if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE) ++ { ++ /* 'regparm' accepts one optional argument - number of registers in ++ single class that should be used to pass arguments. */ ++ if (is_attribute_p ("regparm", identifier)) ++ { ++ if (lookup_attribute ("stkparm", attributes)) ++ { ++ error ("`regparm' and `stkparm' are mutually exclusive"); ++ return 0; ++ } ++ if (args && TREE_CODE (args) == TREE_LIST) ++ { ++ tree numofregs = TREE_VALUE (args); ++ if (numofregs) ++ if (TREE_CODE (numofregs) != INTEGER_CST ++ || TREE_INT_CST_HIGH (numofregs) ++ || TREE_INT_CST_LOW (numofregs) < 1 ++ || TREE_INT_CST_LOW (numofregs) > M68K_MAX_REGPARM) ++ { ++ error ("invalid argument to `regparm' attribute"); ++ return 0; ++ } ++ } ++ return 1; ++ } ++ if (is_attribute_p ("stkparm", identifier)) ++ { ++ if (lookup_attribute ("regparm", attributes)) ++ { ++ error ("`regparm' and `stkparm' are mutually exclusive"); ++ return 0; ++ } ++ return 1; ++ } ++ } ++ ++ return 0; ++} ++ ++/* Return zero if the attributes on TYPE1 and TYPE2 are incompatible, ++ one if they are compatible, and two if they are nearly compatible ++ (which causes a warning to be generated). */ ++ ++int ++comp_m68k_type_attributes (type1, type2) ++ tree type1, type2; ++{ ++ /* Functions or methods are incompatible if they specify mutually ++ exclusive ways of passing arguments. */ ++ if (TREE_CODE (type1) == FUNCTION_TYPE || TREE_CODE (type1) == METHOD_TYPE) ++ { ++ tree arg1, arg2; ++ if (!! lookup_attribute ("stkparm", TYPE_ATTRIBUTES (type1)) != ++ !! lookup_attribute ("stkparm", TYPE_ATTRIBUTES (type2)) ++ || !! lookup_attribute ("regparm", TYPE_ATTRIBUTES (type1)) != ++ !! lookup_attribute ("regparm", TYPE_ATTRIBUTES (type2))) ++ return 0; /* 'regparm' and 'stkparm' are mutually exclusive. */ ++ ++ arg1 = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type1)); ++ arg2 = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type2)); ++ if (arg1 && arg2) ++ { ++ int num1 = 0, num2 = 0; ++ if (TREE_VALUE (arg1) && TREE_CODE (TREE_VALUE (arg1)) == TREE_LIST) ++ { ++ tree numofregs = TREE_VALUE (TREE_VALUE (arg1)); ++ if (numofregs) ++ num1 = TREE_INT_CST_LOW (numofregs); ++ } ++ if (TREE_VALUE (arg2) && TREE_CODE (TREE_VALUE (arg2)) == TREE_LIST) ++ { ++ tree numofregs = TREE_VALUE (TREE_VALUE (arg2)); ++ if (numofregs) ++ num2 = TREE_INT_CST_LOW (numofregs); ++ } ++ if (num1 != num2) ++ return 0; /* Different numbers, or no number in one type. */ ++ } ++ } ++ return 1; ++} + + char * + output_andsi3 (operands) +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/m68k/m68k.h gcc/gcc/config/m68k/m68k.h +--- gcc-2.95.3/gcc/config/m68k/m68k.h Thu Jan 25 15:03:34 2001 ++++ gcc/gcc/config/m68k/m68k.h Thu Sep 27 19:35:54 2001 +@@ -68,10 +68,8 @@ + #define MASK_RTD 8 + #define TARGET_RTD (target_flags & MASK_RTD) + +-/* Compile passing first two args in regs 0 and 1. +- This exists only to test compiler features that will +- be needed for RISC chips. It is not usable +- and is not intended to be usable on this cpu. */ ++/* Compile using the first 'm68k_regparm' data, address and float ++ registers for arguments passing. */ + #define MASK_REGPARM 16 + #define TARGET_REGPARM (target_flags & MASK_REGPARM) + +@@ -182,6 +180,8 @@ + { "cpu32", MASK_68020}, \ + { "align-int", MASK_ALIGN_INT }, \ + { "no-align-int", -MASK_ALIGN_INT }, \ ++ { "regparm", MASK_REGPARM}, \ ++ { "no-regparm", - MASK_REGPARM}, \ + SUBTARGET_SWITCHES \ + { "", TARGET_DEFAULT}} + /* TARGET_DEFAULT is defined in sun*.h and isi.h, etc. */ +@@ -199,6 +199,7 @@ + { { "align-loops=", &m68k_align_loops_string }, \ + { "align-jumps=", &m68k_align_jumps_string }, \ + { "align-functions=", &m68k_align_funcs_string }, \ ++ { "regparm=", &m68k_regparm_string }, \ + SUBTARGET_OPTIONS \ + } + +@@ -809,7 +810,7 @@ + #ifndef SUPPORT_SUN_FPA + + #define CLASS_MAX_NREGS(CLASS, MODE) \ +- ((CLASS) == FP_REGS ? 1 \ ++ ((CLASS) == FP_REGS ? GET_MODE_NUNITS (MODE) \ + : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) + + /* Moves between fp regs and other regs are two insns. */ +@@ -821,7 +822,7 @@ + #else /* defined SUPPORT_SUN_FPA */ + + #define CLASS_MAX_NREGS(CLASS, MODE) \ +- ((CLASS) == FP_REGS || (CLASS) == FPA_REGS || (CLASS) == LO_FPA_REGS ? 1 \ ++ ((CLASS) == FP_REGS || (CLASS) == FPA_REGS || (CLASS) == LO_FPA_REGS ? GET_MODE_NUNITS (MODE) \ + : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) + + /* Moves between fp regs and other regs are two insns. */ +@@ -925,10 +926,19 @@ + + #define PCC_STATIC_STRUCT_RETURN + +-/* 1 if N is a possible register number for function argument passing. +- On the 68000, no registers are used in this way. */ ++/* 1 if N is a possible register number for function argument passing. */ + +-#define FUNCTION_ARG_REGNO_P(N) 0 ++#define FUNCTION_ARG_REGNO_P(N) \ ++ (((N) >= 0 && (N) < M68K_MAX_REGPARM) \ ++ || ((N) >= 8 && (N) < 8 + M68K_MAX_REGPARM) \ ++ || (TARGET_68881 && (N) >= 16 && (N) < 16 + M68K_MAX_REGPARM)) ++ ++/* Nonzero if we need to generate special stack-allocating insns. ++ On most systems they are not needed. ++ When they are needed, also define ALTERNATE_ALLOCATE_STACK (see m68k.md) ++ to perform the necessary actions. */ ++ ++#define TARGET_ALTERNATE_ALLOCATE_STACK 0 + + /* Define a data type for recording info about an argument list + during the scan of that argument list. This data type should +@@ -936,28 +946,52 @@ + and about the args processed so far, enough to enable macros + such as FUNCTION_ARG to determine where the next arg should go. + +- On the m68k, this is a single integer, which is a number of bytes +- of arguments scanned so far. */ ++ On the m68k, this is a structure: ++ num_of_regs: number of data, address and float registers to use for ++ arguments passing (if it's 2, than pass arguments in d0, d1, a0, a1, ++ fp0 and fp1). 0 - pass everything on stack. vararg calls are ++ always passed entirely on stack. ++ regs_already_used: bitmask of the already used registers. ++ last_arg_reg - register number of the most recently passed argument. ++ -1 if passed on stack. ++ last_arg_len - number of registers used by the most recently passed ++ argument. ++*/ ++ ++struct m68k_args ++{ ++ int num_of_regs; ++ long regs_already_used; ++ int last_arg_reg; ++ int last_arg_len; ++}; ++ ++#define CUMULATIVE_ARGS struct m68k_args ++ ++/* Max. number of data, address and float registers to be used for passing ++ integer, pointer and float arguments when TARGET_REGPARM. ++ It's 4, so d0-d3, a0-a3 and fp0-fp3 can be used. */ + +-#define CUMULATIVE_ARGS int ++#define M68K_MAX_REGPARM 4 ++ ++/* The default number of data, address and float registers to use when ++ user specified '-mregparm' switch, not '-mregparm=' option. */ ++ ++#define M68K_DEFAULT_REGPARM 2 + + /* Initialize a variable CUM of type CUMULATIVE_ARGS + for a call to a function whose data type is FNTYPE. +- For a library call, FNTYPE is 0. +- +- On the m68k, the offset starts at 0. */ ++ For a library call, FNTYPE is 0. */ + + #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ +- ((CUM) = 0) ++ (m68k_init_cumulative_args (&(CUM), (FNTYPE))) + + /* Update the data in CUM to advance over an argument + of mode MODE and data type TYPE. + (TYPE is null for libcalls where that information may not be available.) */ + + #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ +- ((CUM) += ((MODE) != BLKmode \ +- ? (GET_MODE_SIZE (MODE) + 3) & ~3 \ +- : (int_size_in_bytes (TYPE) + 3) & ~3)) ++ (m68k_function_arg_advance (&(CUM))) + + /* Define where to put the arguments to a function. + Value is zero to push the argument on the stack, +@@ -972,24 +1006,21 @@ + NAMED is nonzero if this argument is a named parameter + (otherwise it is an extra parameter matching an ellipsis). */ + +-/* On the 68000 all args are pushed, except if -mregparm is specified +- then the first two words of arguments are passed in d0, d1. +- *NOTE* -mregparm does not work. +- It exists only to test register calling conventions. */ ++/* On the 68000 all args are pushed, except if -mregparm is specified, ++ then a number of arguments is passed in the first 'm68k_regparm' data, ++ address and float registers. ++ Note: by default, the static-chain is passed in a0. Targets that want ++ to make full use of '-mregparm' are advised to pass the static-chain ++ somewhere else. */ + + #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ +-((TARGET_REGPARM && (CUM) < 8) ? gen_rtx_REG ((MODE), (CUM) / 4) : 0) ++ ((struct rtx_def *)m68k_function_arg (&(CUM), (MODE), (TYPE))) + + /* For an arg passed partly in registers and partly in memory, + this is the number of registers used. + For args passed entirely in registers or entirely in memory, zero. */ + +-#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ +-((TARGET_REGPARM && (CUM) < 8 \ +- && 8 < ((CUM) + ((MODE) == BLKmode \ +- ? int_size_in_bytes (TYPE) \ +- : GET_MODE_SIZE (MODE)))) \ +- ? 2 - (CUM) / 4 : 0) ++#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) (0) + + /* Generate the assembly code for function entry. */ + #define FUNCTION_PROLOGUE(FILE, SIZE) output_function_prologue(FILE, SIZE) +@@ -1190,6 +1221,8 @@ + of a local variable as a function of frame_pointer_needed, which + is hard. */ + ++#define SUBTARGET_INITIAL_FP_OFFSET(OFFSET) ++ + #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) \ + { int regno; \ + int offset = -4; \ +@@ -1199,8 +1232,9 @@ + for (regno = 0; regno < 16; regno++) \ + if (regs_ever_live[regno] && ! call_used_regs[regno]) \ + offset += 4; \ +- if (flag_pic && current_function_uses_pic_offset_table) \ ++ if (flag_pic && (flag_pic<=2) && current_function_uses_pic_offset_table) \ + offset += 4; \ ++ SUBTARGET_INITIAL_FP_OFFSET (offset); \ + (DEPTH) = (offset + ((get_frame_size () + 3) & -4) \ + + (get_frame_size () == 0 ? 0 : 4)); \ + } +@@ -2083,6 +2117,23 @@ + + #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) + ++ ++/* Attributes support. */ ++ ++/* A C expression whose value is nonzero if IDENTIFIER with arguments ++ ARGS is a valid machine specific attribute for TYPE. The attributes ++ in ATTRIBUTES have previously been assigned to TYPE. */ ++ ++#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \ ++ (valid_m68k_type_attribute ((TYPE), (ATTRIBUTES), (IDENTIFIER), (ARGS))) ++ ++/* A C expression whose value is zero if the attributes on TYPE1 and ++ TYPE2 are incompatible, one if they are compatible, and two if they ++ are nearly compatible (which causes a warning to be generated). */ ++ ++#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \ ++ (comp_m68k_type_attributes ((TYPE1), (TYPE2))) ++ + /* Define functions defined in aux-output.c and used in templates. */ + + extern char *output_move_const_into_data_reg (); +@@ -2115,9 +2166,11 @@ + extern const char *m68k_align_loops_string; + extern const char *m68k_align_jumps_string; + extern const char *m68k_align_funcs_string; ++extern const char *m68k_regparm_string; + extern int m68k_align_loops; + extern int m68k_align_jumps; + extern int m68k_align_funcs; ++extern int m68k_regparm; + extern int m68k_last_compare_had_fp_operands; + + /* Functions from m68k.c used in macros. */ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/m68k/m68k.md gcc/gcc/config/m68k/m68k.md +--- gcc-2.95.3/gcc/config/m68k/m68k.md Thu Aug 5 08:22:05 1999 ++++ gcc/gcc/config/m68k/m68k.md Thu Sep 27 19:35:54 2001 +@@ -6799,7 +6799,7 @@ + (match_operand:SI 1 "general_operand" "g"))] + ;; Operand 1 not really used on the m68000. + +- "! flag_pic" ++ "(! flag_pic || flag_pic >= 3)" + "* + #if defined (MOTOROLA) && !defined (USE_GAS) + #ifdef MOTOROLA_BSR +@@ -6819,7 +6819,7 @@ + (match_operand:SI 1 "general_operand" "g"))] + ;; Operand 1 not really used on the m68000. + +- "flag_pic" ++ "(flag_pic && flag_pic < 3)" + "* + if (GET_CODE (operands[0]) == MEM + && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF) +@@ -6862,7 +6862,7 @@ + (call (match_operand:QI 1 "memory_operand" "o") + (match_operand:SI 2 "general_operand" "g")))] + ;; Operand 2 not really used on the m68000. +- "! flag_pic" ++ "(! flag_pic || flag_pic >= 3)" + "* + #if defined (MOTOROLA) && !defined (USE_GAS) + #ifdef MOTOROLA_BSR +@@ -6882,7 +6882,7 @@ + (call (match_operand:QI 1 "memory_operand" "o") + (match_operand:SI 2 "general_operand" "g")))] + ;; Operand 2 not really used on the m68000. +- "flag_pic" ++ "(flag_pic && flag_pic < 3)" + "* + if (GET_CODE (operands[1]) == MEM + && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF) +@@ -7823,7 +7823,7 @@ + (define_insn "sinsf2" + [(set (match_operand:SF 0 "general_operand" "=f") + (unspec:SF [(match_operand:SF 1 "general_operand" "fm")] 1))] +- "TARGET_68881 && flag_fast_math" ++ "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math" + "* + { + if (FP_REG_P (operands[1])) +@@ -7835,7 +7835,7 @@ + (define_insn "sindf2" + [(set (match_operand:DF 0 "general_operand" "=f") + (unspec:DF [(match_operand:DF 1 "general_operand" "fm")] 1))] +- "TARGET_68881 && flag_fast_math" ++ "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math" + "* + { + if (FP_REG_P (operands[1])) +@@ -7847,13 +7847,13 @@ + (define_insn "sinxf2" + [(set (match_operand:XF 0 "general_operand" "=f") + (unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 1))] +- "TARGET_68881 && flag_fast_math" ++ "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math" + "fsin%.x %1,%0") + + (define_insn "cossf2" + [(set (match_operand:SF 0 "general_operand" "=f") + (unspec:SF [(match_operand:SF 1 "general_operand" "fm")] 2))] +- "TARGET_68881 && flag_fast_math" ++ "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math" + "* + { + if (FP_REG_P (operands[1])) +@@ -7865,7 +7865,7 @@ + (define_insn "cosdf2" + [(set (match_operand:DF 0 "general_operand" "=f") + (unspec:DF [(match_operand:DF 1 "general_operand" "fm")] 2))] +- "TARGET_68881 && flag_fast_math" ++ "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math" + "* + { + if (FP_REG_P (operands[1])) +@@ -7877,5 +7877,18 @@ + (define_insn "cosxf2" + [(set (match_operand:XF 0 "general_operand" "=f") + (unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 2))] +- "TARGET_68881 && flag_fast_math" ++ "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math" + "fcos%.x %1,%0") ++ ++; This is only needed for some subtargets. ++(define_expand "allocate_stack" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (minus:SI (reg:SI 15) (match_operand:SI 1 "general_operand" ""))) ++ (set (reg:SI 15) (minus:SI (reg:SI 15) (match_dup 1)))] ++ "TARGET_ALTERNATE_ALLOCATE_STACK" ++ " ++{ ++#ifdef ALTERNATE_ALLOCATE_STACK ++ ALTERNATE_ALLOCATE_STACK(operands); ++#endif ++}") +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/m68k/t-amigaos gcc/gcc/config/m68k/t-amigaos +--- gcc-2.95.3/gcc/config/m68k/t-amigaos Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/m68k/t-amigaos Thu Sep 27 19:35:54 2001 +@@ -0,0 +1,90 @@ ++# Makefile fragment for AmigaOS target. ++ ++# Each compilation environment (Manx, Dice, GCC, SAS/C, etc) provides its ++# own equivalent of the UNIX /usr/include tree. For gcc, the standard headers ++# are in /gg/include and system specific headers are in /gg/os-include. ++# Use these paths for fixincludes. ++ ++SYSTEM_HEADER_DIR = /gg/include ++ ++# Extra object file linked to the cc1* executables. ++amigaos.o: $(srcdir)/config/m68k/amigaos.c $(CONFIG_H) ++ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< ++ ++# We don't need a libgcc1, it's all in ixemul.library and LibNIX ++ ++LIBGCC1 = libgcc1.null ++CROSS_LIBGCC1 = libgcc1.null ++ ++# Additional target dependent options for compiling libgcc.a. This just ++# ensures that we don't compile libgcc* with anything other than a ++# fixed stack. ++ ++TARGET_LIBGCC2_CFLAGS = -mfixedstack ++ ++# Support for building multiple version of libgcc. ++# Note: this is taken from the toplevel Makefile.in multilib support. ++LIBGCC = stmp-libgcc-multi ++INSTALL_LIBGCC = install-libgcc-multi ++ ++LIBGCC_MULTI = ".;" \ ++ "libb;@resident" \ ++ "libm020;@m68020" \ ++ "libb/libm020;@resident@m68020" \ ++ "libb32/libm020;@resident32@m68020" ++ ++# Build multiple copies of libgcc.a, one for each target switch. ++stmp-libgcc-multi: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \ ++ frame.h \ ++ $(LIB2ADD) machmode.h longlong.h gbl-ctors.h config.status ++ # We need the following explicit mkdir, since the toplevel ++ # Makefile.in attempts to create only the last directory ++ # of a path. ++ if [ -d libb32 ]; then true; else mkdir libb32; fi ++ for i in $(LIBGCC_MULTI); do \ ++ dir=`echo $$i | sed -e 's/;.*$$//'`; \ ++ flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ ++ $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ ++ AR_FOR_TARGET="$(AR_FOR_TARGET)" \ ++ AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ ++ CC="$(CC)" CFLAGS="$(CFLAGS)" \ ++ RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \ ++ RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \ ++ LANGUAGES="$(LANGUAGES)" \ ++ HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ ++ LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \ ++ MULTILIB_CFLAGS="$${flags}" \ ++ LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \ ++ dir="$${dir}" stmp-multilib-sub; \ ++ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ++ done ++ touch stmp-libgcc-multi ++ ++# Install multiple versions of libgcc.a. ++install-libgcc-multi: stmp-libgcc-multi installdirs ++ # We need the following explicit mkdir, since below we attempt to ++ # create only the last directory of a path. ++ if [ -d $(libsubdir)/libb32 ]; then true; else mkdir $(libsubdir)/libb32; fi ++ for i in $(LIBGCC_MULTI); do \ ++ dir=`echo $$i | sed -e 's/;.*$$//'`; \ ++ if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \ ++ for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \ ++ rm -f $(libsubdir)/$${dir}/$${f}; \ ++ $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \ ++ done; \ ++ if $(RANLIB_TEST_FOR_TARGET); then \ ++ (cd $(libsubdir)/$${dir}; $(RANLIB_FOR_TARGET) libgcc.a); \ ++ else true; fi; \ ++ chmod a-x $(libsubdir)/$${dir}/libgcc.a; \ ++ done ++ ++### begin-GG-local: dynamic libraries ++# Extra objects that get compiled and linked to collect2 ++ ++EXTRA_COLLECT2_OBJS = amigacollect2.o ++ ++# Build supplimentary AmigaOS target support file for collect2 ++amigacollect2.o: amigacollect2.c ++ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ++ -DA2IXDIR_PREFIX=\"$(prefix)/share/a2ixlibrary\" $(srcdir)/amigacollect2.c ++### end-GG-local +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/m68k/x-amigaos gcc/gcc/config/m68k/x-amigaos +--- gcc-2.95.3/gcc/config/m68k/x-amigaos Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/m68k/x-amigaos Thu Sep 27 19:35:54 2001 +@@ -0,0 +1,77 @@ ++# Makefile fragment for AmigaOS host ++ ++# Uncomment the following macro to get a resident GCC. We don't do it ++# by default, since we want to support users with mc68000. ++# WARNING! If you uncomment this, you MUST add the same flags to the ++# libiberty's Makefile (libiberty is now linked into GCC executables). ++ ++#RESIDENT = -m68020 -resident32 ++ ++# Additional host flags that are not used when compiling with GCC_FOR_TARGET, ++# such as when compiling the libgcc* runtime archives. GCC uses stack ++# a lot, and since AmigaOS provides processes with a small, fixed size ++# stack, we have to generate code that will extend it whenever necessary. ++ ++XCFLAGS = -mstackextend $(RESIDENT) ++ ++# AmigaOS supports "AmigaGuide(R)" hypertext files. For GCC, these are ++# build with a custom "makeinfo". ++ ++### begin-GG-local: gcc-amigaos ++EXTRA_DOC_TARGETS = guide gcc-amigaos-doc ++### end-GG-local ++ ++# Arrange for guides to be build with GCC, in the build directory. ++ ++ALL = all.internal doc ++ ++# Actually build guides ++ ++guide: cpp.guide gcc.guide ++ ++cpp.guide: cpp.texi ++ $(MAKEINFO) -I$(srcdir) $(srcdir)/cpp.texi --output=$@ --amiga ++ ++gcc.guide: gcc.texi extend.texi install.texi invoke.texi \ ++ md.texi rtl.texi tm.texi ++ $(MAKEINFO) -I$(srcdir) $(srcdir)/gcc.texi --output=$@ --amiga ++ ++# Arrange for guides to be installed with GCC. ++ ++### begin-GG-local: gcc-amigaos ++INSTALL_TARGET=install-normal install-guide install-gcc-amigaos-doc ++### end-GG-local ++ ++# Where the guide files go ++ ++guidedir = $(prefix)/guide ++ ++# Actually install guides. ++ ++install-guide: doc installdirs ++ -if [ -d $(guidedir) ] ; then true ; else mkdir $(guidedir) ; chmod a+rx $(guidedir) ; fi ++ -rm -f $(guidedir)/cpp.guide $(guidedir)/gcc.guide ++ for f in cpp.guide gcc.guide; \ ++ do $(INSTALL_DATA) $$f $(guidedir)/$$f; done ++ -chmod a-x $(guidedir)/cpp.guide $(guidedir)/gcc.guide ++ ++### begin-GG-local: gcc-amigaos ++# Build and install gcc-amigaos.guide - documentation specific to the ++# AmigaOS port of GCC. ++ ++gcc-amigaos-doc: gcc-amigaos.info gcc-amigaos.guide ++ ++gcc-amigaos.info: gcc-amigaos.texi ++ $(MAKEINFO) -I$(srcdir) $(srcdir)/gcc-amigaos.texi --output=$@ ++ ++gcc-amigaos.guide: gcc-amigaos.texi ++ $(MAKEINFO) -I$(srcdir) $(srcdir)/gcc-amigaos.texi --output=$@ --amiga ++ ++install-gcc-amigaos-doc: doc installdirs ++ -if [ -d $(guidedir) ] ; then true ; else mkdir $(guidedir) ; chmod a+rx $(guidedir) ; fi ++ -rm -f $(infodir)/gcc-amigaos.info* $(guidedir)/gcc-amigaos.guide ++ for f in gcc-amigaos.info*; \ ++ do $(INSTALL_DATA) $$f $(infodir)/$$f; done ++ $(INSTALL_DATA) gcc-amigaos.guide $(guidedir) ++ -chmod a-x $(infodir)/gcc-amigaos.info* $(guidedir)/gcc-amigaos.guide ++### end-GG-local +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/m68k/xm-amigaos.h gcc/gcc/config/m68k/xm-amigaos.h +--- gcc-2.95.3/gcc/config/m68k/xm-amigaos.h Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/m68k/xm-amigaos.h Thu Sep 27 19:35:54 2001 +@@ -0,0 +1,98 @@ ++/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS. ++ Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc. ++ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch). ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++/* First include the generic header, then modify some parts. */ ++ ++#include "m68k/xm-m68k.h" ++ ++#ifndef _FCNTL_H_ ++#include ++#endif ++ ++/* Define various things that the AmigaOS host has. */ ++ ++#define HAVE_ATEXIT ++#define HAVE_RENAME ++ ++/* AmigaOS specific headers, such as from the Native Developer Update kits, ++ go in SYSTEM_INCLUDE_DIR. STANDARD_INCLUDE_DIR is the equivalent of ++ Unix "/usr/include". All other include paths are set in Makefile. */ ++ ++#define SYSTEM_INCLUDE_DIR "/gg/os-include" ++#define STANDARD_INCLUDE_DIR "/gg/include" ++ ++#define STANDARD_EXEC_PREFIX_1 "/gg/lib/gcc/" ++#define STANDARD_STARTFILE_PREFIX_1 "/gg/lib/" ++#define STANDARD_STARTFILE_PREFIX_2 "/gg/lib/" ++ ++/* The AmigaOS stores file names with regard to upper/lower case, but actions ++ on existing files are case independent on the standard filesystems. ++ ++ A good example of where this causes problems is the conflict between the C ++ include file and the C++ include file , where the C++ ++ include file dir is searched first and thus causes includes of ++ to include instead. ++ ++ In order to solve this problem we define the macro OPEN_CASE_SENSITIVE as ++ the name of the function that takes the same args as open() and does case ++ dependent opens. */ ++ ++#define OPEN_CASE_SENSITIVE(NAME, FLAGS, MODE) open ((NAME), (FLAGS) | O_CASE, (MODE)) ++ ++/* On the AmigaOS, there are two pathname separators, '/' (DIR_SEPARATOR) ++ and ':' (VOL_SEPARATOR). DIR_SEPARATOR defaults to the correct ++ character, so we don't have to explicitly set it. */ ++ ++#define DIR_SEPARATOR '/' ++#define VOL_SEPARATOR ':' ++#define DIR_SEPARATOR_2 VOL_SEPARATOR ++ ++/* Determine whether a '\0'-terminated file name is absolute or not. ++ ++ This checks for both, '/' as the first character, since we're running under ++ ixemul.library which provides for this unix'ism, and for the usual ++ logical-terminator, ':', somewhere in the filename. */ ++ ++#define FILE_NAME_ABSOLUTE_P(NAME) ((NAME)[0] == '/' || index ((NAME), ':')) ++ ++/* Like the above, but the file name is not '\0'-terminated. */ ++ ++#define FILE_NAME_ABSOLUTE_N_P(NAME, LEN) amigaos_file_name_absolute_n ((NAME), (LEN)) ++ ++/* Return the file name part of the path name. */ ++ ++#define FILE_NAME_NONDIRECTORY(NAME) \ ++ (rindex ((NAME), '/') ? rindex ((NAME), '/') + 1 \ ++ : (rindex ((NAME), ':') ? rindex ((NAME), ':') + 1 \ ++ : (NAME))) ++ ++/* Generate the name of the cross reference file. */ ++ ++#define XREF_FILE_NAME(BUFF, NAME) \ ++do \ ++ { \ ++ char *filesrc, *filedst; \ ++ strcpy ((BUFF), (NAME)); \ ++ filesrc = FILE_NAME_NONDIRECTORY (NAME); \ ++ filedst = (BUFF) + (filesrc - (NAME)); \ ++ sprintf (filedst, ".%s.gxref", filesrc); \ ++ } \ ++while (0) +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/rs6000/morphos.c gcc/gcc/config/rs6000/morphos.c +--- gcc-2.95.3/gcc/config/rs6000/morphos.c Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/rs6000/morphos.c Thu Sep 27 19:35:54 2001 +@@ -0,0 +1,307 @@ ++/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS. ++ Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc. ++ Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch). ++ Heavily modified by Kamil Iskra (iskra@student.uci.agh.edu.pl). ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#include "config.h" ++#include "system.h" ++#include "rtl.h" ++#include "output.h" ++#include "tree.h" ++#include "flags.h" ++#include "expr.h" ++ ++extern enum rs6000_sdata_type rs6000_sdata; ++ ++/* Common routine used to check if r13 should be preserved/restored. */ ++ ++int ++morphos_restore_r13 () ++{ ++ return ((rs6000_sdata == SDATA_BREL || rs6000_sdata == SDATA_DATA) && ++ (TARGET_RESTORE_R13 || TARGET_ALWAYS_RESTORE_R13 ++ || lookup_attribute ("saveds", ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))); ++} ++ ++/* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine ++ specific attribute for TYPE. The attributes in ATTRIBUTES have previously ++ been assigned to TYPE. */ ++ ++int ++morphos_valid_type_attribute_p (type, attributes, identifier, args) ++ tree type, attributes, identifier, args; ++{ ++ if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE) ++ { ++ if (is_attribute_p ("stackext", identifier) || ++ is_attribute_p ("saveds", identifier) || ++ is_attribute_p ("varargs68k", identifier)) ++ return 1; ++ } ++ return rs6000_valid_type_attribute_p (type, attributes, identifier, args); ++} ++ ++ ++ ++/* stack check/extension code */ ++ ++void morphos_output_prolog(file, size) ++ FILE *file; ++ int size; ++{ ++ if (TARGET_STACKCHECK || TARGET_STACKEXTEND) ++ asm_fprintf(file, "\tmflr 0\n\tbl __stk%s1\n", ++ TARGET_STACKEXTEND ? "ext" : "chk"); ++ output_prolog(file, size); ++} ++ ++ ++/* Initialize a variable CUM of type CUMULATIVE_ARGS ++ for a call to a function whose data type is FNTYPE. ++ For a library call, FNTYPE is 0. ++ ++ For incoming args we set the number of arguments in the prototype large ++ so we never return a PARALLEL. */ ++ ++void ++morphos_init_cumulative_args (cum, fntype, libname, incoming) ++ CUMULATIVE_ARGS *cum; ++ tree fntype; ++ rtx libname ATTRIBUTE_UNUSED; ++ int incoming; ++{ ++ init_cumulative_args (cum, fntype, libname, incoming); ++ if (fntype && lookup_attribute ("varargs68k", TYPE_ATTRIBUTES (fntype))) ++ cum->call_cookie |= CALL_VARARGS68K; ++} ++ ++ ++/* Determine where to put an argument to a function. ++ Value is zero to push the argument on the stack, ++ or a hard register in which to store the argument. ++ ++ MODE is the argument's machine mode. ++ TYPE is the data type of the argument (as a tree). ++ This is null for libcalls where that information may ++ not be available. ++ CUM is a variable of type CUMULATIVE_ARGS which gives info about ++ the preceding args and about the function being called. ++ NAMED is nonzero if this argument is a named parameter ++ (otherwise it is an extra parameter matching an ellipsis). ++ ++ On RS/6000 the first eight words of non-FP are normally in registers ++ and the rest are pushed. Under AIX, the first 13 FP args are in registers. ++ Under V.4, the first 8 FP args are in registers. ++ ++ If this is floating-point and no prototype is specified, we use ++ both an FP and integer register (or possibly FP reg and stack). Library ++ functions (when TYPE is zero) always have the proper types for args, ++ so we can pass the FP value just in one register. emit_library_function ++ doesn't support PARALLEL anyway. */ ++ ++struct rtx_def * ++morphos_function_arg (cum, mode, type, named) ++ CUMULATIVE_ARGS *cum; ++ enum machine_mode mode; ++ tree type; ++ int named; ++{ ++ /* Return a marker to indicate whether CR1 needs to set or clear the bit ++ that V.4 uses to say fp args were passed in registers. Assume that we ++ don't need the marker for software floating point, or compiler generated ++ library calls. */ ++ if (mode == VOIDmode && cum->call_cookie & CALL_VARARGS68K) ++ return GEN_INT (cum->call_cookie); ++ ++ return function_arg (cum, mode, type, named); ++} ++ ++ ++/* Update the data in CUM to advance over an argument ++ of mode MODE and data type TYPE. ++ (TYPE is null for libcalls where that information may not be available.) */ ++ ++void ++morphos_function_arg_advance (cum, mode, type, named) ++ CUMULATIVE_ARGS *cum; ++ enum machine_mode mode; ++ tree type; ++ int named; ++{ ++ function_arg_advance(cum, mode, type, named); ++ if (cum->call_cookie & CALL_VARARGS68K && ++ cum->sysv_gregno + cum->fregno - GP_ARG_MIN_REG - FP_ARG_MIN_REG > cum->orig_nargs) ++ { ++ cum->sysv_gregno = GP_ARG_MAX_REG + 1; ++ cum->fregno = FP_ARG_V4_MAX_REG + 1; ++ } ++} ++ ++ ++/* Perform any needed actions needed for a function that is receiving a ++ variable number of arguments. ++ ++ CUM is as above. ++ ++ MODE and TYPE are the mode and type of the current parameter. ++ ++ PRETEND_SIZE is a variable that should be set to the amount of stack ++ that must be pushed by the prolog to pretend that our caller pushed ++ it. ++ ++ Normally, this macro will push all remaining incoming registers on the ++ stack and set PRETEND_SIZE to the length of the registers pushed. */ ++ ++void ++morphos_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl) ++ CUMULATIVE_ARGS *cum; ++ enum machine_mode mode; ++ tree type; ++ int *pretend_size; ++ int no_rtl; ++ ++{ ++ CUMULATIVE_ARGS next_cum; ++ int reg_size = TARGET_32BIT ? 4 : 8; ++ rtx save_area; ++ int first_reg_offset; ++ tree fntype; ++ int stdarg_p; ++ ++ if (!(cum->call_cookie & CALL_VARARGS68K)) { ++ setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl); ++ return; ++ } ++ ++ fntype = TREE_TYPE (current_function_decl); ++ stdarg_p = (TYPE_ARG_TYPES (fntype) != 0 ++ && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) ++ != void_type_node)); ++ ++ /* For varargs, we do not want to skip the dummy va_dcl argument. ++ For stdargs, we do want to skip the last named argument. */ ++ next_cum = *cum; ++ if (stdarg_p) ++ function_arg_advance (&next_cum, mode, type, 1); ++ ++ /* Indicate to allocate space on the stack for varargs save area. */ ++ /* ??? Does this really have to be located at a magic spot on the ++ stack, or can we allocate this with assign_stack_local instead. */ ++ rs6000_sysv_varargs_p = 1; ++ if (! no_rtl) ++ save_area = plus_constant (virtual_stack_vars_rtx, ++ - RS6000_VARARGS_SIZE); ++ ++ first_reg_offset = next_cum.sysv_gregno - GP_ARG_MIN_REG; ++} ++ ++ ++/* If defined, is a C expression that produces the machine-specific ++ code for a call to `__builtin_saveregs'. This code will be moved ++ to the very beginning of the function, before any parameter access ++ are made. The return value of this function should be an RTX that ++ contains the value to use as the return of `__builtin_saveregs'. ++ ++ The argument ARGS is a `tree_list' containing the arguments that ++ were passed to `__builtin_saveregs'. ++ ++ If this macro is not defined, the compiler will output an ordinary ++ call to the library function `__builtin_saveregs'. ++ ++ On the Power/PowerPC return the address of the area on the stack ++ used to hold arguments. Under AIX, this includes the 8 word register ++ save area. ++ ++ Under V.4, things are more complicated. We do not have access to ++ all of the virtual registers required for va_start to do its job, ++ so we construct the va_list in its entirity here, and reduce va_start ++ to a block copy. This is similar to the way we do things on Alpha. */ ++ ++struct rtx_def * ++morphos_expand_builtin_saveregs (args) ++ tree args ATTRIBUTE_UNUSED; ++{ ++ rtx block, mem_gpr_fpr, /*mem_reg_save_area, */mem_overflow, tmp; ++ tree fntype; ++ int stdarg_p; ++ HOST_WIDE_INT words, gpr, bits; ++ ++ if (!(current_function_args_info.call_cookie & CALL_VARARGS68K)) ++ return expand_builtin_saveregs (args); ++ ++ fntype = TREE_TYPE (current_function_decl); ++ stdarg_p = (TYPE_ARG_TYPES (fntype) != 0 ++ && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) ++ != void_type_node)); ++ ++ /* Allocate the va_list constructor. */ ++ block = assign_stack_local (BLKmode, 3 * UNITS_PER_WORD, BITS_PER_WORD); ++ RTX_UNCHANGING_P (block) = 1; ++ RTX_UNCHANGING_P (XEXP (block, 0)) = 1; ++ ++ mem_gpr_fpr = change_address (block, word_mode, XEXP (block, 0)); ++ mem_overflow = change_address (block, ptr_mode, ++ plus_constant (XEXP (block, 0), ++ UNITS_PER_WORD)); ++ /*mem_reg_save_area = change_address (block, ptr_mode, ++ plus_constant (XEXP (block, 0), ++ 2 * UNITS_PER_WORD));*/ ++ ++ /* Construct the two characters of `gpr' and `fpr' as a unit. */ ++ words = current_function_args_info.words; ++ gpr = current_function_args_info.sysv_gregno - GP_ARG_MIN_REG; ++ ++ /* Varargs has the va_dcl argument, but we don't count it. */ ++ if (!stdarg_p) ++ { ++ if (gpr > GP_ARG_NUM_REG) ++ words -= 1; ++ } ++ ++ bits = (GP_ARG_MAX_REG - GP_ARG_MIN_REG + 1) << 8 ++ | (FP_ARG_MAX_REG - FP_ARG_MIN_REG + 1); ++ if (HOST_BITS_PER_WIDE_INT >= BITS_PER_WORD) ++ tmp = GEN_INT (bits << (BITS_PER_WORD - 16)); ++ else ++ { ++ bits <<= BITS_PER_WORD - HOST_BITS_PER_WIDE_INT - 16; ++ tmp = immed_double_const (0, bits, word_mode); ++ } ++ ++ emit_move_insn (mem_gpr_fpr, tmp); ++ ++ /* Find the overflow area. */ ++ tmp = expand_binop (Pmode, add_optab, virtual_incoming_args_rtx, ++ GEN_INT (words * UNITS_PER_WORD), ++ mem_overflow, 0, OPTAB_WIDEN); ++ if (tmp != mem_overflow) ++ emit_move_insn (mem_overflow, tmp); ++ ++ /*tmp = expand_binop (Pmode, add_optab, virtual_stack_vars_rtx, ++ GEN_INT (-RS6000_VARARGS_SIZE), ++ mem_reg_save_area, 0, OPTAB_WIDEN); ++ if (tmp != mem_reg_save_area) ++ emit_move_insn (mem_reg_save_area, tmp);*/ ++ ++ /* Return the address of the va_list constructor. */ ++ return XEXP (block, 0); ++} ++ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/rs6000/morphos.h gcc/gcc/config/rs6000/morphos.h +--- gcc-2.95.3/gcc/config/rs6000/morphos.h Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/rs6000/morphos.h Thu Dec 20 00:41:54 2001 +@@ -0,0 +1,398 @@ ++/* Definitions of target machine for GNU compiler. Amiga powerpc version. ++ Copyright (C) 1996 Free Software Foundation, Inc. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#include "rs6000/sysv4.h" ++ ++/* Enable some special Amiga only features. FIXME: This define should ++ be eliminated in favor of more general ways to enable the features. */ ++ ++#define TARGET_MORPHOS 1 ++ ++#undef PROCESSOR_DEFAULT ++#define PROCESSOR_DEFAULT PROCESSOR_PPC604e ++ ++#undef DEFAULT_ABI ++#define DEFAULT_ABI ABI_V4 ++ ++/* Put jump tables in text section to suppress some relocations */ ++#undef JUMP_TABLES_IN_TEXT_SECTION ++#define JUMP_TABLES_IN_TEXT_SECTION 1 ++ ++ ++extern enum rs6000_sdata_type rs6000_sdata; ++ ++#undef CPP_SPEC ++#define CPP_SPEC \ ++ "%{!ansi:" \ ++ "%{!noixemul:-Dixemul} " \ ++ "%{noixemul:-Dlibnix}} " \ ++ "%{mcpu=603e:-D__603e__} " \ ++ "%{mcpu=604e:-D__604e__} " \ ++ "%{!noixemul:-D__ixemul__ -D__ixemul} " \ ++ "%{noixemul:-D__libnix__ -D__libnix} " \ ++ "%{malways-restore-r13:-Derrno=(*ixemul_errno)} " \ ++ "%{malways-restore-a4:-Derrno=(*ixemul_errno)} " \ ++ "%{mrestore-r13:-Derrno=(*ixemul_errno)} " \ ++ "%{mrestore-a4:-Derrno=(*ixemul_errno)} " \ ++ "%{msoft-float: -D_SOFT_FLOAT} " ++ ++#undef CPP_PREDEFINES ++#define CPP_PREDEFINES \ ++ "-D__PPC__ -D_CALL_SYSV -Damiga -Damigaos -DMCH_AMIGA -DAMIGA " \ ++ "-Asystem(morphos) --Acpu(powerpc) -Amachine(powerpc) " \ ++ "-D__MORPHOS__ -Dmorphos -D__powerpc__ " \ ++ "-D__saveds=__attribute__((__saveds__)) "\ ++ "-D__stackext=__attribute__((__stackext__)) " \ ++ ++ ++/* Choose the right startup file, depending on whether we use base relative ++ code, base relative code with automatic relocation (-resident), or plain ++ crt0.o. ++ ++ Profiling is currently only available for plain startup. ++ mcrt0.o does not (yet) exist. */ ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC \ ++ "%{!noixemul:" \ ++ "%{mbaserel:%{!mresident:bcrt0.o%s}}" \ ++ "%{mresident:rcrt0.o%s}" \ ++ "%{mbaserel32:%{!mresident32:lcrt0.o%s}}" \ ++ "%{mresident32:scrt0.o%s}" \ ++ "%{!mresident:%{!mbaserel:%{!mresident32:%{!mbaserel32:" \ ++ "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}}}}" \ ++ "%{noixemul:libnix/startup.o%s} " ++ ++#undef ENDFILE_SPEC ++/*#define ENDFILE_SPEC \ ++ "%{noixemul:libnix/end.o%s} "*/ ++ ++/* Automatically search libamiga.a for AmigaOS specific functions. Note ++ that we first search the standard C library to resolve as much as ++ possible from there, since it has names that are duplicated in libamiga.a ++ which we *don't* want from there. Then search the standard C library ++ again to resolve any references that libamiga.a might have generated. ++ This may only be a temporary solution since it might be better to simply ++ remove the things from libamiga.a that should be pulled in from libc.a ++ instead, which would eliminate the first reference to libc.a. */ ++ ++#undef LIB_SPEC ++#define LIB_SPEC \ ++ "%{!noixemul:" \ ++ "%{!p:%{!pg:-lc -lamiga -lamigastubs -lc}}" \ ++ "%{p:-lc_p}%{pg:-lc_p}}" \ ++ "%{noixemul:-lc -lamiga -lamigastubs" \ ++ "%{mstackcheck:-lstack} " \ ++ "%{mstackextend:-lstack}} -lsyscall " ++ ++#undef LINK_SPEC ++#define LINK_SPEC \ ++ "%{h*} %{v:-V} %{G*} %{Wl,*:%*} %{YP,*} %{R*} %{Qy:} %{!Qn:-Qy} " \ ++ "%{noixemul:-fl libnix} " \ ++ "%{mbaserel:%{!mresident:-m morphos_baserel -G 1000000 -fl libb}} " \ ++ "%{mresident:-m morphos_baserel -datadata-reloc -G 100000 -fl libb} " \ ++ "%{mbaserel32:%{!mresident32:-m morphos_baserel -fl libb32}} " \ ++ "%{mresident32:-m morphos_baserel -datadata-reloc -fl libb32} " ++ ++/* The place to find libc.a, libamiga.c and crt0.o depends on the runtime ++** environment being used. As usual, default to the ixemul environment. ++*/ ++ ++/*#undef LINK_PATH_SPEC ++#define LINK_PATH_SPEC \ ++ "%{!runtime=*:ixemul%s} %{runtime=ixemul:ixemul%s} \ ++ %{runtime=libnix:libnix%s} %{runtime=librilc:librilc%s}"*/ ++ ++/*#undef LINK_SYSCALL: ++ #define LINK_SYSCALL "-lsyscall "*/ ++ ++/* Translate '-resident' to '-fbaserel' (they differ in linking stage only). ++ Don't put function addresses in registers for PC-relative code. */ ++ ++#undef CC1_SPEC ++#define CC1_SPEC \ ++ "%{G*} " \ ++ "%{mbaserel:-msdata=sysv -G 100000} " \ ++ "%{mbaserel32:-msdata=baserel} " \ ++ "%{mresident:-msdata=sysv -G 100000} " \ ++ "%{mresident32:-msdata=baserel} " ++ ++/* Define the name of the runtime environment (libc, etc.) used so it can be ++ tested for during compilation. ++ Abuse (?) CPP_OS_DEFAULT_SPEC for this purpose. -rask */ ++ ++/*#undef CPP_OS_DEFAULT_SPEC ++#define CPP_OS_DEFAULT_SPEC \ ++ "%{!runtime=*:-D__ixemul__} %{runtime=ixemul:-D__ixemul__} \ ++ %{runtime=libnix:-D__libnix__} %{runtime=librilc:-D__librilc__}"*/ ++ ++#undef EXTRA_SPECS ++#undef MULTILIB_DEFAULTS ++ ++/* Compile with stack extension. */ ++ ++#define MASK_STACKEXTEND 0x00800000 ++#define TARGET_STACKEXTEND ((target_flags & MASK_STACKEXTEND) \ ++ || lookup_attribute ("stackext", \ ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) ++ ++/* Compile with stack checking. */ ++ ++#define MASK_STACKCHECK 0x00400000 ++#define TARGET_STACKCHECK ((target_flags & MASK_STACKCHECK) \ ++ && !(target_flags & MASK_STACKEXTEND) \ ++ && !lookup_attribute ("stackext", \ ++ TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) ++ ++/* Compile with r13 restoring in public functions. */ ++ ++#define MASK_RESTORE_R13 0x00200000 ++#define TARGET_RESTORE_R13 \ ++ ((target_flags & MASK_RESTORE_R13) && TREE_PUBLIC (current_function_decl)) ++ ++/* Compile with r13 restoring in all functions. */ ++ ++#define MASK_ALWAYS_RESTORE_R13 0x00100000 ++#define TARGET_ALWAYS_RESTORE_R13 (target_flags & MASK_ALWAYS_RESTORE_R13) ++ ++#undef EXTRA_SUBTARGET_SWITCHES ++#define EXTRA_SUBTARGET_SWITCHES \ ++ { "baserel", 0, "16-bits relative data access"}, \ ++ { "baserel32", 0, "32-bits relative data access"}, \ ++ { "resident", 0, "make a reentrant executable with <= 64k data"}, \ ++ { "resident32", 0, "make reentrant executable"}, \ ++ { "stackcheck", MASK_STACKCHECK, "check for stack overflow"}, \ ++ { "no-stackcheck", - MASK_STACKCHECK, "don't check for stack overflow"}, \ ++ { "stackextend", MASK_STACKEXTEND, "automatically extend stack"}, \ ++ { "no-stackextend", - MASK_STACKEXTEND, "don't extend stack"}, \ ++ { "fixedstack", - (MASK_STACKCHECK|MASK_STACKEXTEND), "don't extend the stack" },\ ++ { "restore-r13", MASK_RESTORE_R13}, \ ++ { "no-restore-r13", - MASK_RESTORE_R13}, \ ++ { "always-restore-r13", MASK_ALWAYS_RESTORE_R13}, \ ++ { "no-always-restore-r13", - MASK_ALWAYS_RESTORE_R13}, \ ++ { "restore-a4", MASK_RESTORE_R13}, \ ++ { "no-restore-a4", - MASK_RESTORE_R13}, \ ++ { "always-restore-a4", MASK_ALWAYS_RESTORE_R13}, \ ++ { "no-always-restore-a4", - MASK_ALWAYS_RESTORE_R13}, ++ ++ ++/* This macro generates the assembly code for function entry. ++ FILE is a stdio stream to output the code to. ++ SIZE is an int: how many units of temporary storage to allocate. ++ Refer to the array `regs_ever_live' to determine which registers ++ to save; `regs_ever_live[I]' is nonzero if register number I ++ is ever used in the function. This macro is responsible for ++ knowing which registers should not be saved even if used. */ ++ ++#undef FUNCTION_PROLOGUE ++#define FUNCTION_PROLOGUE(FILE, SIZE) morphos_output_prolog (FILE, SIZE) ++ ++ ++/* This is (almost;-)) BSD, so it wants DBX format. */ ++ ++#undef PREFERRED_DEBUGGING_TYPE ++#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG ++#define DBX_DEBUGGING_INFO ++#define DWARF_DEBUGGING_INFO ++ ++#if 0 ++/* To maintain the binary compatibility with the m68k structures, we need ++ to align 32-bit integers and pointers only to 16 bits in structures. */ ++ ++#undef ADJUST_FIELD_ALIGN ++#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ ++ (DECL_MODE (FIELD) != SImode ? (COMPUTED) : MIN ((COMPUTED), 16)) ++#endif ++ ++/* Accesses to floats must be at least 4 bytes-aligned */ ++#define GET_MIN_MODE_ALIGNMENT(mode) (mode == DImode || FLOAT_MODE_P(mode) ? 32 : 8) ++#define GET_MIN_TYPE_ALIGNMENT(type) (FLOAT_TYPE_P(type) ? 32 : 8) ++ ++/* Use sjlj exceptions until DWARF2 unwind info works */ ++//#define DWARF2_UNWIND_INFO 0 ++#undef DWARF2_UNWIND_INFO ++ ++/* If defined, a C expression whose value is nonzero if IDENTIFIER ++ with arguments ARGS is a valid machine specific attribute for TYPE. ++ The attributes in ATTRIBUTES have previously been assigned to TYPE. */ ++ ++#undef VALID_MACHINE_TYPE_ATTRIBUTE ++#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, NAME, ARGS) \ ++ (morphos_valid_type_attribute_p (TYPE, ATTRIBUTES, NAME, ARGS)) ++ ++#define EXTRA_STACK_INFO \ ++ if (morphos_restore_r13()) { \ ++ info_ptr->calls_p = 1; \ ++ info_ptr->lr_save_p = 1; \ ++ regs_ever_live[65] = 1; \ ++ if (info_ptr->first_gp_reg_save > 13) { \ ++ info_ptr->gp_size += reg_size; \ ++ if (info_ptr->first_gp_reg_save == 14) \ ++ --info_ptr->first_gp_reg_save; \ ++ } \ ++ } ++ ++#define EXTRA_PROLOG \ ++ if (morphos_restore_r13() && info->first_gp_reg_save > 14) \ ++ asm_fprintf (file, store_reg, \ ++ reg_names[13], \ ++ info->gp_save_offset + sp_offset + (32 - info->first_gp_reg_save) * reg_size, \ ++ reg_names[sp_reg]); ++ ++#define EXTRA_PROLOG_END \ ++ if (morphos_restore_r13()) \ ++ asm_fprintf (file, "\tbl __restore_r13\n"); ++ ++#define EXTRA_EPILOG \ ++ if (morphos_restore_r13() && info->first_gp_reg_save > 14) \ ++ asm_fprintf (file, load_reg, \ ++ reg_names[13], \ ++ info->gp_save_offset + sp_offset + (32 - info->first_gp_reg_save) * info->reg_size, \ ++ reg_names[sp_reg]); ++ ++ ++#define CALL_VARARGS68K 0x80000000 /* Use 68k-style varargs */ ++ ++ ++/* Initialize a variable CUM of type CUMULATIVE_ARGS ++ for a call to a function whose data type is FNTYPE. ++ For a library call, FNTYPE is 0. */ ++ ++#undef INIT_CUMULATIVE_ARGS ++#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ ++ morphos_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE) ++ ++/* Similar, but when scanning the definition of a procedure. We always ++ set NARGS_PROTOTYPE large so we never return an EXPR_LIST. */ ++ ++#undef INIT_CUMULATIVE_INCOMING_ARGS ++#define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,LIBNAME) \ ++ morphos_init_cumulative_args (&CUM, FNTYPE, LIBNAME, TRUE) ++ ++/* Update the data in CUM to advance over an argument ++ of mode MODE and data type TYPE. ++ (TYPE is null for libcalls where that information may not be available.) */ ++ ++#undef FUNCTION_ARG_ADVANCE ++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ++ morphos_function_arg_advance (&CUM, MODE, TYPE, NAMED) ++ ++/* Determine where to put an argument to a function. ++ Value is zero to push the argument on the stack, ++ or a hard register in which to store the argument. ++ ++ MODE is the argument's machine mode. ++ TYPE is the data type of the argument (as a tree). ++ This is null for libcalls where that information may ++ not be available. ++ CUM is a variable of type CUMULATIVE_ARGS which gives info about ++ the preceding args and about the function being called. ++ NAMED is nonzero if this argument is a named parameter ++ (otherwise it is an extra parameter matching an ellipsis). ++ ++ On RS/6000 the first eight words of non-FP are normally in registers ++ and the rest are pushed. The first 13 FP args are in registers. ++ ++ If this is floating-point and no prototype is specified, we use ++ both an FP and integer register (or possibly FP reg and stack). Library ++ functions (when TYPE is zero) always have the proper types for args, ++ so we can pass the FP value just in one register. emit_library_function ++ doesn't support EXPR_LIST anyway. */ ++ ++#undef FUNCTION_ARG ++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ++ morphos_function_arg (&CUM, MODE, TYPE, NAMED) ++ ++/* Perform any needed actions needed for a function that is receiving a ++ variable number of arguments. ++ ++ CUM is as above. ++ ++ MODE and TYPE are the mode and type of the current parameter. ++ ++ PRETEND_SIZE is a variable that should be set to the amount of stack ++ that must be pushed by the prolog to pretend that our caller pushed ++ it. ++ ++ Normally, this macro will push all remaining incoming registers on the ++ stack and set PRETEND_SIZE to the length of the registers pushed. */ ++ ++#undef SETUP_INCOMING_VARARGS ++#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \ ++ morphos_setup_incoming_varargs (&CUM, MODE, TYPE, &PRETEND_SIZE, NO_RTL) ++ ++/* If defined, is a C expression that produces the machine-specific ++ code for a call to `__builtin_saveregs'. This code will be moved ++ to the very beginning of the function, before any parameter access ++ are made. The return value of this function should be an RTX that ++ contains the value to use as the return of `__builtin_saveregs'. ++ ++ The argument ARGS is a `tree_list' containing the arguments that ++ were passed to `__builtin_saveregs'. ++ ++ If this macro is not defined, the compiler will output an ordinary ++ call to the library function `__builtin_saveregs'. */ ++ ++#undef EXPAND_BUILTIN_SAVEREGS ++#define EXPAND_BUILTIN_SAVEREGS(ARGS) \ ++ morphos_expand_builtin_saveregs (ARGS) ++ ++ ++/* begin-GG-local: dynamic libraries */ ++ ++/* This macro is used to check if all collect2 facilities should be used. ++ We need a few special ones, like stripping after linking. */ ++ ++#define DO_COLLECTING (do_collecting || morphos_do_collecting()) ++ ++/* This macro is called in collect2 for every GCC argument name. ++ ARG is a part of commandline (without '\0' at the end). */ ++ ++#define COLLECT2_GCC_OPTIONS_HOOK(ARG) morphos_gccopts_hook(ARG) ++ ++/* This macro is called in collect2 for every ld's "-l" or "*.o" or "*.a" ++ argument. ARG is a complete argument, with '\0' at the end. */ ++ ++#define COLLECT2_LIBNAME_HOOK(ARG) morphos_libname_hook(ARG) ++ ++/* This macro is called at collect2 exit, to clean everything up. */ ++ ++#define COLLECT2_EXTRA_CLEANUP morphos_collect2_cleanup ++ ++/* This macro is called just before the first linker invocation. ++ LD1_ARGV is "char** argv", which will be passed to "ld". STRIP is an ++ *address* of "strip_flag" variable. */ ++ ++#define COLLECT2_PRELINK_HOOK(LD1_ARGV, STRIP) \ ++ morphos_prelink_hook((LD1_ARGV), (STRIP)) ++ ++/* This macro is called just after the first linker invocation, in place of ++ "nm" and "ldd". OUTPUT_FILE is the executable's filename. */ ++ ++#define COLLECT2_POSTLINK_HOOK(OUTPUT_FILE) morphos_postlink_hook(OUTPUT_FILE) ++/* end-GG-local */ ++ ++ ++extern void morphos_init_cumulative_args (); ++extern void morphos_function_arg_advance (); ++extern struct rtx_def *morphos_function_arg (); ++extern void morphos_setup_incoming_varargs (); ++extern struct rtx_def *morphos_expand_builtin_saveregs (); ++ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/rs6000/rs6000.c gcc/gcc/config/rs6000/rs6000.c +--- gcc-2.95.3/gcc/config/rs6000/rs6000.c Thu Jan 25 15:03:34 2001 ++++ gcc/gcc/config/rs6000/rs6000.c Thu Sep 27 19:35:54 2001 +@@ -405,6 +405,7 @@ + case SDATA_DATA: fprintf (file, "%s -msdata=data", start); start = ""; break; + case SDATA_SYSV: fprintf (file, "%s -msdata=sysv", start); start = ""; break; + case SDATA_EABI: fprintf (file, "%s -msdata=eabi", start); start = ""; break; ++ case SDATA_BREL: fprintf (file, "%s -msdata=baserel", start); start = ""; break; + } + + if (rs6000_sdata && g_switch_value) +@@ -1278,7 +1279,7 @@ + #if TARGET_ELF + rtx sym_ref, const_part; + +- if (rs6000_sdata == SDATA_NONE || rs6000_sdata == SDATA_DATA) ++ if (rs6000_sdata == SDATA_NONE || rs6000_sdata == SDATA_DATA || rs6000_sdata == SDATA_BREL) + return 0; + + if (DEFAULT_ABI != ABI_V4 && DEFAULT_ABI != ABI_SOLARIS) +@@ -1317,6 +1318,44 @@ + #endif + } + ++/* Return 1 for an operand in data memory on V.4/eabi */ ++ ++int ++baserel_data_operand (op, mode) ++ rtx op ATTRIBUTE_UNUSED; ++ enum machine_mode mode ATTRIBUTE_UNUSED; ++{ ++#if TARGET_ELF ++ rtx sym_ref, const_part; ++ ++ if (rs6000_sdata != SDATA_BREL) ++ return 0; ++ ++ if (DEFAULT_ABI != ABI_V4 && DEFAULT_ABI != ABI_SOLARIS) ++ return 0; ++ ++ if (GET_CODE (op) == SYMBOL_REF) ++ sym_ref = op; ++ ++ else if (GET_CODE (op) != CONST ++ || GET_CODE (XEXP (op, 0)) != PLUS ++ || GET_CODE (XEXP (XEXP (op, 0), 0)) != SYMBOL_REF ++ || GET_CODE (XEXP (XEXP (op, 0), 1)) != CONST_INT) ++ return 0; ++ ++ else ++ sym_ref = XEXP (XEXP (op, 0), 0); ++ ++ if (*XSTR (sym_ref, 0) != '@') ++ return 0; ++ ++ return 1; ++ ++#else ++ return 0; ++#endif ++} ++ + + /* Initialize a variable CUM of type CUMULATIVE_ARGS + for a call to a function whose data type is FNTYPE. +@@ -3388,6 +3427,9 @@ + && GET_CODE (XEXP (x, 0)) == REG && CONSTANT_P (XEXP (x, 1))) + { + output_addr_const (file, XEXP (x, 1)); ++ if (baserel_data_operand(XEXP (x, 1))) ++ fprintf (file, "@drell(%s)", reg_names[ REGNO (XEXP (x, 0)) ]); ++ else + fprintf (file, "@l(%s)", reg_names[ REGNO (XEXP (x, 0)) ]); + } + else +@@ -3739,6 +3781,10 @@ + + info_ptr->toc_size + + info_ptr->main_size, 8); + ++#ifdef EXTRA_STACK_INFO ++ EXTRA_STACK_INFO ++#endif ++ + /* Calculate the offsets */ + switch (abi) + { +@@ -4265,6 +4311,10 @@ + asm_fprintf (file, "\tmtlr %s\n", reg_names[0]); + } + ++#ifdef EXTRA_PROLOG ++ EXTRA_PROLOG ++#endif ++ + /* NT needs us to probe the stack frame every 4k pages for large frames, so + do it here. */ + if (DEFAULT_ABI == ABI_NT && info->total_size > 4096) +@@ -4377,6 +4427,10 @@ + rs6000_output_load_toc_table (file, 30); + } + ++#ifdef EXTRA_PROLOG_END ++ EXTRA_PROLOG_END ++#endif ++ + if (DEFAULT_ABI == ABI_NT) + { + assemble_name (file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); +@@ -4437,6 +4491,10 @@ + if (info->lr_save_p) + asm_fprintf (file, "\tmtlr %s\n", reg_names[0]); + ++#ifdef EXTRA_EPILOG ++ EXTRA_EPILOG ++#endif ++ + /* Restore gpr's. */ + if (! TARGET_MULTIPLE || info->first_gp_reg_save == 31 || TARGET_64BIT) + { +@@ -5858,7 +5916,7 @@ + } + else + { +- if (rs6000_sdata != SDATA_NONE && (size > 0) && (size <= g_switch_value)) ++ if (rs6000_sdata != SDATA_NONE && rs6000_sdata != SDATA_BREL && (size > 0) && (size <= g_switch_value)) + { + if (rs6000_sdata == SDATA_EABI) + sdata2_section (); +@@ -5924,9 +5982,16 @@ + abort (); + } + +- if ((size > 0 && size <= g_switch_value) ++ if ((!name ++ && (!TREE_READONLY (decl) || TREE_THIS_VOLATILE(decl)) ++ && (g_switch_value > 0xffff || (size > 0 && size <= g_switch_value) ++ || rs6000_sdata == SDATA_BREL)) + || (name +- && ((len == sizeof (".sdata")-1 && strcmp (name, ".sdata") == 0) ++ && ((rs6000_sdata == SDATA_BREL ++ && ((len == sizeof (".data") && strcmp (name, ".data") == 0) ++ || (len == sizeof (".data1") && strcmp (name, ".data1") == 0) ++ || (len == sizeof (".bss") && strcmp (name, ".bss") == 0))) ++ || (len == sizeof (".sdata")-1 && strcmp (name, ".sdata") == 0) + || (len == sizeof (".sdata2")-1 && strcmp (name, ".sdata2") == 0) + || (len == sizeof (".sbss")-1 && strcmp (name, ".sbss") == 0) + || (len == sizeof (".sbss2")-1 && strcmp (name, ".sbss2") == 0) +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/rs6000/rs6000.h gcc/gcc/config/rs6000/rs6000.h +--- gcc-2.95.3/gcc/config/rs6000/rs6000.h Wed Mar 22 19:54:05 2000 ++++ gcc/gcc/config/rs6000/rs6000.h Thu Sep 27 19:35:54 2001 +@@ -3276,6 +3276,7 @@ + extern int current_file_function_operand (); + extern int input_operand (); + extern int small_data_operand (); ++extern int baserel_data_operand (); + extern void init_cumulative_args (); + extern void function_arg_advance (); + extern int function_arg_boundary (); +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/rs6000/rs6000.md gcc/gcc/config/rs6000/rs6000.md +--- gcc-2.95.3/gcc/config/rs6000/rs6000.md Thu Jan 25 15:03:35 2001 ++++ gcc/gcc/config/rs6000/rs6000.md Thu Sep 27 19:35:54 2001 +@@ -5828,14 +5828,18 @@ + [(set (match_operand:SI 0 "gpc_reg_operand" "=b") + (high:SI (match_operand 1 "" "")))] + "TARGET_ELF && ! TARGET_64BIT" +- "{liu|lis} %0,%1@ha") ++ "* ++ return (baserel_data_operand(operands[1]) ? ++ \"{addiu|addis} %0,13,%1@drelha\" : \"{liu|lis} %0,%1@ha\");") + + (define_insn "elf_low" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b") + (match_operand 2 "" "")))] + "TARGET_ELF && ! TARGET_64BIT" +- "{cal|la} %0,%2@l(%1)") ++ "* ++ return (baserel_data_operand(operands[2]) ? ++ \"{cal|la} %0,%2@drell(%1)\" : \"{cal|la} %0,%2@l(%1)\");") + + ;; Set up a register with a value from the GOT table + +@@ -7742,10 +7746,24 @@ + + emit_move_insn (chain, stack_bot); + ++ /* Under MorphOS, we may have to check/extend the stack. Do it via a ++ call to an external function. */ ++ if (TARGET_MORPHOS && target_flags & (MASK_STACKCHECK | MASK_STACKEXTEND)) ++ { ++ rtx tmp = gen_reg_rtx (Pmode); ++ emit_library_call_value (gen_rtx_SYMBOL_REF (Pmode, ++ target_flags & MASK_STACKEXTEND ? ++ \"__alloc_stk_ext\" : \"__alloc_stk_chk\"), ++ tmp, 0, Pmode, 1, operands[1], Pmode); ++ emit_insn (gen_set_sp (tmp)); ++ /*emit_move_insn (operands[0], tmp);*/ ++ emit_move_insn (operands[0], virtual_stack_dynamic_rtx); ++ DONE; ++ } + /* Under Windows NT, we need to add stack probes for large/variable + allocations, so do it via a call to the external function alloca + instead of doing it inline. */ +- if (DEFAULT_ABI == ABI_NT ++ else if (DEFAULT_ABI == ABI_NT + && (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) > 4096)) + { + rtx tmp = gen_reg_rtx (Pmode); +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/rs6000/sysv4.h gcc/gcc/config/rs6000/sysv4.h +--- gcc-2.95.3/gcc/config/rs6000/sysv4.h Thu Jan 25 15:03:37 2001 ++++ gcc/gcc/config/rs6000/sysv4.h Thu Sep 27 19:35:54 2001 +@@ -24,7 +24,8 @@ + SDATA_NONE, /* no small data support */ + SDATA_DATA, /* just put data in .sbss/.sdata, don't use relocs */ + SDATA_SYSV, /* Use r13 to point to .sdata/.sbss */ +- SDATA_EABI /* Use r13 like above, r2 points to .sdata2/.sbss2 */ ++ SDATA_EABI, /* Use r13 like above, r2 points to .sdata2/.sbss2 */ ++ SDATA_BREL /* Use r13 to point to .data/.sdata/.sbss/.bss */ + }; + + extern enum rs6000_sdata_type rs6000_sdata; +@@ -181,6 +182,8 @@ + rs6000_sdata = SDATA_SYSV; \ + else if (!strcmp (rs6000_sdata_name, "eabi")) \ + rs6000_sdata = SDATA_EABI; \ ++ else if (!strcmp (rs6000_sdata_name, "baserel")) \ ++ rs6000_sdata = SDATA_BREL; \ + else \ + error ("Bad value for -msdata=%s", rs6000_sdata_name); \ + } \ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/rs6000/t-morphos gcc/gcc/config/rs6000/t-morphos +--- gcc-2.95.3/gcc/config/rs6000/t-morphos Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/rs6000/t-morphos Thu Sep 27 19:35:54 2001 +@@ -0,0 +1,63 @@ ++# Makefile fragment for MorphOS target. ++ ++# Do not build libgcc1. ++LIBGCC1 = ++CROSS_LIBGCC1 = ++#LIBGCC1_TEST = ++ ++# These are really part of libgcc1, but this will cause them to be ++# built correctly, so... [taken from t-sparclite] ++LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c ++ ++# Extra object for cc1 ++morphos.o: $(srcdir)/config/rs6000/morphos.c $(CONFIG_H) ++ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< ++ ++dp-bit.c: $(srcdir)/config/fp-bit.c ++ cat $(srcdir)/config/fp-bit.c > dp-bit.c ++ ++fp-bit.c: $(srcdir)/config/fp-bit.c ++ echo '#define FLOAT' > fp-bit.c ++ cat $(srcdir)/config/fp-bit.c >> fp-bit.c ++ ++# Build libgcc.a with different options. ++ ++MULTILIB_OPTIONS = mbaserel32 ++ ++MULTILIB_DIRNAMES = libb32 ++ ++MULTILIB_MATCHES = mbaserel32=mresident32 \ ++ mbaserel32=msdata=baserel ++ ++#LIBGCC = stmp-multilib ++#LIBGCC = ++#INSTALL_LIBGCC = install-multilib ++#INSTALL_LIBGCC = ++ ++# Each compilation environment (Dice, GCC, SAS/C, vbcc, etc) provides its ++# own equivalent of the UNIX /usr/include tree. For gcc, the standard headers ++# are in GG:include and system specific headers are in GG:os-include. ++# Use these paths for fixincludes. ++ ++SYSTEM_HEADER_DIR = GG:include ++OTHER_FIXINCLUDES_DIRS = GG:os-include ++ ++# Try to make it possible to build libgcc.a without an existing libc and ++# related include files (the default runtime of ixemul needs machine/ansi.h ++# to compile). This is useful since libc for this target isn't quite ready ++# yet. -rask ++ ++TARGET_LIBGCC2_CFLAGS = -mfixedstack #-Dinhibit_libc ++STMP_FIXPROTO = ++ ++### begin-GG-local: dynamic libraries ++# Extra objects that get compiled and linked to collect2 ++ ++EXTRA_COLLECT2_OBJS = morphoscollect2.o ++ ++# Build supplimentary MorphOS target support file for collect2 ++morphoscollect2.o: morphoscollect2.c ++ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ++ -DA2IXDIR_PREFIX=\"$(prefix)/share/a2ixlibrary\" $(srcdir)/morphoscollect2.c ++### end-GG-local ++ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/rs6000/x-morphos gcc/gcc/config/rs6000/x-morphos +--- gcc-2.95.3/gcc/config/rs6000/x-morphos Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/rs6000/x-morphos Thu Sep 27 19:35:54 2001 +@@ -0,0 +1,38 @@ ++# Note: It doesn't do any good to try to define prefix or local_prefix ++# in the host overrides because configure will just change them back. ++# You either have to give an appropriate option to configure or live with ++# an Amiga specific patch to configure. See the note in configure. -fnf ++ ++# Building under AmigaOS almost certainly requires an already working gcc. ++# To bootstrap without "-pipe" do "make PIPE=". ++ ++CC = gcc $(PIPE) ++ ++# Disable -pipe for now since I had problems bootstrapping gcc 2.5.5 with ++# it. (fnf) ++#PIPE = -pipe ++ ++# Allow the user to override the default host optimization with gcc, or if the ++# host compiler is not gcc and doesn't understand -O. ++ ++X_OPTIMIZE = -O2 ++ ++# The standard additional host flags for the compiler. ++ ++X_CFLAGS = $(X_OPTIMIZE) -mstackextend ++ ++# Man pages get a wierd suffix... ++ ++manext = .0 ++ ++# We really shouldn't specify CFLAGS from here, but there's no other way ++# to get rid of the `-g' indoctrinated by Makefile.in. Note this becomes ++# part of both the host compilation CFLAGS and the target compilation ++# CFLAGS. ++ ++CFLAGS = ++ ++# Ranlib does exist, but may not be in a path where the default RANLIB_TEST ++# expects it, so just force it to true. ++ ++RANLIB_TEST = true +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config/rs6000/xm-morphos.h gcc/gcc/config/rs6000/xm-morphos.h +--- gcc-2.95.3/gcc/config/rs6000/xm-morphos.h Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/config/rs6000/xm-morphos.h Thu Sep 27 19:35:54 2001 +@@ -0,0 +1,255 @@ ++/* Configuration for GNU C-compiler for Commodore Amiga, running AmigaOS. ++ Copyright (C) 1996 Free Software Foundation, Inc. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#include "rs6000/xm-sysv4.h" ++ ++/* Define various things that the Amiga host has. */ ++ ++#undef HAVE_VPRINTF ++#define HAVE_VPRINTF ++#undef HAVE_PUTENV ++#define HAVE_PUTENV ++#undef HAVE_STRERROR ++#define HAVE_STRERROR ++#undef HAVE_ATEXIT ++#define HAVE_ATEXIT ++#undef HAVE_RENAME ++#define HAVE_RENAME ++ ++/* Amiga specific headers, such as from the Native Developer Update kits, ++ go in SYSTEM_INCLUDE_DIR. STANDARD_INCLUDE_DIR is the equivalent of ++ Unix "/usr/include". All other include paths are set in Makefile. */ ++ ++#define SYSTEM_INCLUDE_DIR "GG:os-include" ++#define STANDARD_INCLUDE_DIR "GG:include" ++ ++#define STANDARD_EXEC_PREFIX "/gg/lib/gcc-lib/" ++#define STANDARD_EXEC_PREFIX_1 "/gg/lib/gcc/" ++#define STANDARD_STARTFILE_PREFIX "/gg/lib/" ++#define STANDARD_STARTFILE_PREFIX_1 "/gg/lib/" ++#define STANDARD_STARTFILE_PREFIX_2 "/gg/lib/" ++#define TOOLDIR_BASE_PREFIX "/gg/" ++ ++/* The AmigaOS stores file names with regard to upper/lower case, but actions ++ on existing files are case independent on the standard filesystems. ++ ++ A good example of where this causes problems is the conflict between the C ++ include file and the C++ include file , where the C++ ++ include file dir is searched first and thus causes includes of ++ to include instead. ++ ++ In order to solve this problem we define the macro OPEN_CASE_SENSITIVE as ++ the name of the function that takes the same args as open() and does case ++ dependent opens. */ ++ ++#define OPEN_CASE_SENSITIVE(NAME, FLAGS, MODE) open ((NAME), (FLAGS) | O_CASE, (MODE)) ++ ++/* On the Amiga, there are two pathname separators, '/' (DIR_SEPARATOR) ++ and ':' (VOL_SEPARATOR). DIR_SEPARATOR defaults to the correct ++ character, so we don't have to explicitly set it. */ ++ ++#define DIR_SEPARATOR '/' ++#define VOL_SEPARATOR ':' ++#define DIR_SEPARATOR_2 VOL_SEPARATOR ++ ++/* Determine whether a '\0'-terminated file name is absolute or not. ++ ++ This checks for both, '/' as the first character, since we're running under ++ ixemul.library which provides for this unix'ism, and for the usual ++ logical-terminator, ':', somewhere in the filename. */ ++ ++#define FILE_NAME_ABSOLUTE_P(NAME) ((NAME)[0] == '/' || index ((NAME), ':')) ++ ++ ++#if 0 ++ ++/* Fork one piped subcommand. SEARCH_FLAG is the system call to use ++ (either execv or execvp). ARGV is the arg vector to use. ++ NOT_LAST is nonzero if this is not the last subcommand ++ (i.e. its output should be piped to the next one.) */ ++ ++#define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \ ++({int (*_func)() = (SEARCH_FLAG ? execv : execvp); \ ++ int _pid; \ ++ int _pdes[2]; \ ++ int _input_desc = last_pipe_input; \ ++ int _output_desc = STDOUT_FILE_NO; \ ++ int _retries, _sleep_interval, _result; \ ++ \ ++ /* If this isn't the last process, make a pipe for its output, \ ++ and record it as waiting to be the input to the next process. */ \ ++ \ ++ if (NOT_LAST) \ ++ { \ ++ if (pipe (_pdes) < 0) \ ++ pfatal_with_name ("pipe"); \ ++ _output_desc = _pdes[WRITE_PORT]; \ ++ last_pipe_input = _pdes[READ_PORT]; \ ++ } \ ++ else \ ++ last_pipe_input = STDIN_FILE_NO; \ ++ \ ++ /* Fork a subprocess; wait and retry if it fails. */ \ ++ _sleep_interval = 1; \ ++ for (_retries = 0; _retries < 4; _retries++) \ ++ { \ ++ _pid = vfork (); \ ++ if (_pid >= 0) \ ++ break; \ ++ sleep (_sleep_interval); \ ++ _sleep_interval *= 2; \ ++ } \ ++ \ ++ switch (_pid) \ ++ { \ ++ case -1: \ ++ pfatal_with_name ("vfork"); \ ++ /* NOTREACHED */ \ ++ _result = 0; \ ++ break; \ ++ \ ++ case 0: /* child */ \ ++ /* Move the input and output pipes into place, if nec. */ \ ++ if (_input_desc != STDIN_FILE_NO) \ ++ { \ ++ close (STDIN_FILE_NO); \ ++ dup (_input_desc); \ ++ close (_input_desc); \ ++ } \ ++ if (_output_desc != STDOUT_FILE_NO) \ ++ { \ ++ close (STDOUT_FILE_NO); \ ++ dup (_output_desc); \ ++ close (_output_desc); \ ++ } \ ++ \ ++ /* Close the parent's descs that aren't wanted here. */ \ ++ if (last_pipe_input != STDIN_FILE_NO) \ ++ close (last_pipe_input); \ ++ \ ++ /* Exec the program. */ \ ++ (*_func) (PROGRAM, ARGV); \ ++ perror_exec (PROGRAM); \ ++ exit (-1); \ ++ /* NOTREACHED */ \ ++ _result = 0; \ ++ break; \ ++ \ ++ default: \ ++ /* In the parent, after forking. \ ++ Close the descriptors that we made for this child. */ \ ++ if (_input_desc != STDIN_FILE_NO) \ ++ close (_input_desc); \ ++ if (_output_desc != STDOUT_FILE_NO) \ ++ close (_output_desc); \ ++ \ ++ /* Return child's process number. */ \ ++ _result = _pid; \ ++ break; \ ++ } \ ++_result; }) \ ++ ++#define PEXECUTE_RESULT(STATUS, COMMAND) \ ++ ({ wait (& STATUS); }) ++ ++/* the following macros are stolen more or less from xm-vms.h ... */ ++ ++/* This macro is used to help compare filenames in cp-lex.c. ++ ++ We also need to make sure that the names are all lower case, because ++ we must be able to compare filenames to determine if a file implements ++ a class. */ ++ ++#define FILE_NAME_NONDIRECTORY(C) \ ++({ \ ++ extern char *rindex(); \ ++ char * pnt_ = (C), * pnt1_; \ ++ pnt1_ = pnt_ - 1; \ ++ while (*++pnt1_) \ ++ if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20; \ ++ pnt1_ = rindex (pnt_, '/'); \ ++ pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_); \ ++ (pnt1_ == 0 ? pnt_ : pnt1_ + 1); \ ++ }) ++ ++/* Macro to generate the name of the cross reference file. The standard ++ one does not work, since it was written assuming that the conventions ++ of a unix style filesystem will work on the host system. ++ ++ Contrary to VMS, I'm using the original unix filename, there's no reason ++ not to use this under AmigaOS. */ ++ ++#define XREF_FILE_NAME(BUFF, NAME) \ ++ s = FILE_NAME_NONDIRECTORY (NAME); \ ++ if (s == NAME) sprintf(BUFF, ".%s.gxref", NAME); \ ++ else { \ ++ unsigned char ch = *s; /* could be Latin1 char.. */ \ ++ /* temporary: cut the filename from the directory */\ ++ *s = 0; \ ++ sprintf (BUFF, "%s.%c%s.gxref", NAME, ch, s+1); \ ++ /* and restore the filename */ \ ++ *s = ch; \ ++ } \ ++ ++/* Macro that is used in cp-xref.c to determine whether a file name is ++ absolute or not. ++ ++ This checks for both, '/' as first character, since we're running under ++ ixemul.library which provides for this unix'ism, and for the usual ++ logical-terminator, ':', somewhere in the filename. */ ++ ++#define FILE_NAME_ABSOLUTE_P(NAME) (NAME[0] == '/' || index(NAME, ':')) ++ ++/* the colon conflicts with the name space of logicals */ ++ ++#define PATH_SEPARATOR ',' ++ ++/* Phil.B 17-Apr-95 Added stack checking code submitted by Kriton Kyrimis ++ (kyrimis@theseas.ntua.gr) on 10-Feb-95, modified for inclusion into gcc ++ ++ What stackcheck does is to add the following code at the beginning of ++ each function: ++ cmpl __StackBottom,sp ++ bccs .+8 ++ jmp __StackOverflow ++ ++ _StackBottom and _StackOverflow() are defined in stackchecksetup.c. ++ _StackBottom is set to the bottom of the stack plus some leeway for ++ subroutine arguments (128 bytes). _StackOverflow() sets the stack ++ pointer to a sane value, prints an error message and exits. ++ ++ Even with stack checking, you cannot be completely safe, as overflows ++ are detected on function entry, rather than during function execution. ++ E.g., ++ crash(){ ++ char scribble[100000]; ++ int i; ++ for (i=0; i<100000; i++) scribble[i]=0; ++ check(scribble); ++ } ++ check(char *x){} ++ In the above example, stack overflow and its side-effects will occur in ++ crash(), but it will be detected in check(), when it is too late. (The ++ same thing happens with SAS/C's stack checking, BTW.) ++*/ ++ ++/* #defined AMIGA_STACK_CHECKING */ ++ ++#endif +diff -ruN --exclude=CVS gcc-2.95.3/gcc/config.in gcc/gcc/config.in +--- gcc-2.95.3/gcc/config.in Fri Mar 16 15:13:48 2001 ++++ gcc/gcc/config.in Fri Nov 2 10:39:24 2001 +@@ -130,237 +130,267 @@ + /* Define to the version of the distribution. */ + #undef VERSION + +-/* Define if using alloca.c. */ +-#undef C_ALLOCA +- +-/* Define to empty if the keyword does not work. */ +-#undef const + +-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. +- This function is required for alloca.c support on those systems. */ ++/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP ++ systems. This function is required for `alloca.c' support on those systems. ++ */ + #undef CRAY_STACKSEG_END + +-/* Define if you have alloca, as a function or macro. */ ++/* Define if using `alloca.c'. */ ++#undef C_ALLOCA ++ ++/* Define if you have `alloca', as a function or macro. */ + #undef HAVE_ALLOCA + +-/* Define if you have and it should be used (not on Ultrix). */ ++/* Define if you have and it should be used (not on Ultrix). */ + #undef HAVE_ALLOCA_H + +-/* Define if you don't have vprintf but do have _doprnt. */ +-#undef HAVE_DOPRNT +- +-/* Define if you have a working `mmap' system call. */ +-#undef HAVE_MMAP +- +-/* Define if you have that is POSIX.1 compatible. */ +-#undef HAVE_SYS_WAIT_H +- +-/* Define if you have . */ +-#undef HAVE_VFORK_H +- +-/* Define if you have the vprintf function. */ +-#undef HAVE_VPRINTF +- +-/* Define as __inline if that's what the C compiler calls it. */ +-#undef inline +- +-/* Define to `long' if doesn't define. */ +-#undef off_t +- +-/* Define to `int' if doesn't define. */ +-#undef pid_t +- +-/* Define to `unsigned' if doesn't define. */ +-#undef size_t +- +-/* If using the C implementation of alloca, define if you know the +- direction of stack growth for your system; otherwise it will be +- automatically deduced at run-time. +- STACK_DIRECTION > 0 => grows toward higher addresses +- STACK_DIRECTION < 0 => grows toward lower addresses +- STACK_DIRECTION = 0 => direction of growth unknown +- */ +-#undef STACK_DIRECTION +- +-/* Define if you have the ANSI C header files. */ +-#undef STDC_HEADERS +- +-/* Define if `sys_siglist' is declared by . */ +-#undef SYS_SIGLIST_DECLARED +- +-/* Define if you can safely include both and . */ +-#undef TIME_WITH_SYS_TIME +- +-/* Define vfork as fork if vfork does not work. */ +-#undef vfork +- +-/* Define if you have the __argz_count function. */ +-#undef HAVE___ARGZ_COUNT +- +-/* Define if you have the __argz_next function. */ +-#undef HAVE___ARGZ_NEXT +- +-/* Define if you have the __argz_stringify function. */ +-#undef HAVE___ARGZ_STRINGIFY ++/* Define if you have the header file. */ ++#undef HAVE_ARGZ_H + +-/* Define if you have the atoll function. */ ++/* Define if you have the `atoll' function. */ + #undef HAVE_ATOLL + +-/* Define if you have the atoq function. */ ++/* Define if you have the `atoq' function. */ + #undef HAVE_ATOQ + +-/* Define if you have the bcmp function. */ ++/* Define if you have the `bcmp' function. */ + #undef HAVE_BCMP + +-/* Define if you have the bcopy function. */ ++/* Define if you have the `bcopy' function. */ + #undef HAVE_BCOPY + +-/* Define if you have the bsearch function. */ ++/* Define if you have the `bsearch' function. */ + #undef HAVE_BSEARCH + +-/* Define if you have the bzero function. */ ++/* Define if you have the `bzero' function. */ + #undef HAVE_BZERO + +-/* Define if you have the dcgettext function. */ ++/* Define if you have the `dcgettext' function. */ + #undef HAVE_DCGETTEXT + +-/* Define if you have the fputc_unlocked function. */ ++/* Define if you have the header file. */ ++#undef HAVE_DIRECT_H ++ ++/* Define if you don't have `vprintf' but do have `_doprnt.' */ ++#undef HAVE_DOPRNT ++ ++/* Define if you have the header file. */ ++#undef HAVE_FCNTL_H ++ ++/* Define if you have the `fork' function. */ ++#undef HAVE_FORK ++ ++/* Define if you have the `fputc_unlocked' function. */ + #undef HAVE_FPUTC_UNLOCKED + +-/* Define if you have the fputs_unlocked function. */ ++/* Define if you have the `fputs_unlocked' function. */ + #undef HAVE_FPUTS_UNLOCKED + +-/* Define if you have the getcwd function. */ ++/* Define if you have the `getcwd' function. */ + #undef HAVE_GETCWD + +-/* Define if you have the getpagesize function. */ ++/* Define if you have the `getpagesize' function. */ + #undef HAVE_GETPAGESIZE + +-/* Define if you have the getrlimit function. */ ++/* Define if you have the `getrlimit' function. */ + #undef HAVE_GETRLIMIT + +-/* Define if you have the gettimeofday function. */ ++/* Define if you have the `gettimeofday' function. */ + #undef HAVE_GETTIMEOFDAY + +-/* Define if you have the index function. */ ++/* Define if you have the `index' function. */ + #undef HAVE_INDEX + +-/* Define if you have the isascii function. */ ++/* Define if you have the header file. */ ++#undef HAVE_INTTYPES_H ++ ++/* Define if you have the `isascii' function. */ + #undef HAVE_ISASCII + +-/* Define if you have the kill function. */ ++/* Define if you have the `kill' function. */ + #undef HAVE_KILL + +-/* Define if you have the munmap function. */ ++/* Define if you have the `i' library (-li). */ ++#undef HAVE_LIBI ++ ++/* Define if you have the header file. */ ++#undef HAVE_LIMITS_H ++ ++/* Define if you have the header file. */ ++#undef HAVE_LOCALE_H ++ ++/* Define if you have the header file. */ ++#undef HAVE_MALLOC_H ++ ++/* Define if you have the header file. */ ++#undef HAVE_MEMORY_H ++ ++/* Define if you have a working `mmap' system call. */ ++#undef HAVE_MMAP ++ ++/* Define if you have the `munmap' function. */ + #undef HAVE_MUNMAP + +-/* Define if you have the popen function. */ ++/* Define if you have the header file. */ ++#undef HAVE_NL_TYPES_H ++ ++/* Define if you have the `popen' function. */ + #undef HAVE_POPEN + +-/* Define if you have the putc_unlocked function. */ ++/* Define if you have the `putc_unlocked' function. */ + #undef HAVE_PUTC_UNLOCKED + +-/* Define if you have the putenv function. */ ++/* Define if you have the `putenv' function. */ + #undef HAVE_PUTENV + +-/* Define if you have the rindex function. */ ++/* Define if you have the `rindex' function. */ + #undef HAVE_RINDEX + +-/* Define if you have the setenv function. */ ++/* Define if you have the `setenv' function. */ + #undef HAVE_SETENV + +-/* Define if you have the setlocale function. */ ++/* Define if you have the `setlocale' function. */ + #undef HAVE_SETLOCALE + +-/* Define if you have the setrlimit function. */ ++/* Define if you have the `setrlimit' function. */ + #undef HAVE_SETRLIMIT + +-/* Define if you have the stpcpy function. */ ++/* Define if you have the header file. */ ++#undef HAVE_STAB_H ++ ++/* Define if you have the header file. */ ++#undef HAVE_STDDEF_H ++ ++/* Define if you have the header file. */ ++#undef HAVE_STDINT_H ++ ++/* Define if you have the header file. */ ++#undef HAVE_STDLIB_H ++ ++/* Define if you have the `stpcpy' function. */ + #undef HAVE_STPCPY + +-/* Define if you have the strcasecmp function. */ ++/* Define if you have the `strcasecmp' function. */ + #undef HAVE_STRCASECMP + +-/* Define if you have the strchr function. */ ++/* Define if you have the `strchr' function. */ + #undef HAVE_STRCHR + +-/* Define if you have the strdup function. */ ++/* Define if you have the `strdup' function. */ + #undef HAVE_STRDUP + +-/* Define if you have the strerror function. */ ++/* Define if you have the `strerror' function. */ + #undef HAVE_STRERROR + +-/* Define if you have the strrchr function. */ ++/* Define if you have the header file. */ ++#undef HAVE_STRINGS_H ++ ++/* Define if you have the header file. */ ++#undef HAVE_STRING_H ++ ++/* Define if you have the `strrchr' function. */ + #undef HAVE_STRRCHR + +-/* Define if you have the strsignal function. */ ++/* Define if you have the `strsignal' function. */ + #undef HAVE_STRSIGNAL + +-/* Define if you have the strtoul function. */ ++/* Define if you have the `strtoul' function. */ + #undef HAVE_STRTOUL + +-/* Define if you have the sysconf function. */ ++/* Define if you have the `sysconf' function. */ + #undef HAVE_SYSCONF + +-/* Define if you have the header file. */ +-#undef HAVE_ARGZ_H ++/* Define if you have the header file. */ ++#undef HAVE_SYS_FILE_H + +-/* Define if you have the header file. */ +-#undef HAVE_DIRECT_H ++/* Define if you have the header file. */ ++#undef HAVE_SYS_PARAM_H + +-/* Define if you have the header file. */ +-#undef HAVE_FCNTL_H ++/* Define if you have the header file. */ ++#undef HAVE_SYS_RESOURCE_H + +-/* Define if you have the header file. */ +-#undef HAVE_LIMITS_H ++/* Define if you have the header file. */ ++#undef HAVE_SYS_STAT_H + +-/* Define if you have the header file. */ +-#undef HAVE_LOCALE_H ++/* Define if you have the header file. */ ++#undef HAVE_SYS_TIMES_H + +-/* Define if you have the header file. */ +-#undef HAVE_MALLOC_H ++/* Define if you have the header file. */ ++#undef HAVE_SYS_TIME_H + +-/* Define if you have the header file. */ +-#undef HAVE_NL_TYPES_H ++/* Define if you have the header file. */ ++#undef HAVE_SYS_TYPES_H + +-/* Define if you have the header file. */ +-#undef HAVE_STAB_H ++/* Define if you have that is POSIX.1 compatible. */ ++#undef HAVE_SYS_WAIT_H + +-/* Define if you have the header file. */ +-#undef HAVE_STDDEF_H ++/* Define if you have the header file. */ ++#undef HAVE_TIME_H + +-/* Define if you have the header file. */ +-#undef HAVE_STDLIB_H ++/* Define if you have the header file. */ ++#undef HAVE_UNISTD_H + +-/* Define if you have the header file. */ +-#undef HAVE_STRING_H ++/* Define if you have the `vfork' function. */ ++#undef HAVE_VFORK + +-/* Define if you have the header file. */ +-#undef HAVE_STRINGS_H ++/* Define if you have the header file. */ ++#undef HAVE_VFORK_H + +-/* Define if you have the header file. */ +-#undef HAVE_SYS_FILE_H ++/* Define if you have the `vprintf' function. */ ++#undef HAVE_VPRINTF + +-/* Define if you have the header file. */ +-#undef HAVE_SYS_PARAM_H ++/* Define if `fork' works. */ ++#undef HAVE_WORKING_FORK + +-/* Define if you have the header file. */ +-#undef HAVE_SYS_RESOURCE_H ++/* Define if `vfork' works. */ ++#undef HAVE_WORKING_VFORK + +-/* Define if you have the header file. */ +-#undef HAVE_SYS_STAT_H ++/* Define if you have the `__argz_count' function. */ ++#undef HAVE___ARGZ_COUNT + +-/* Define if you have the header file. */ +-#undef HAVE_SYS_TIME_H ++/* Define if you have the `__argz_next' function. */ ++#undef HAVE___ARGZ_NEXT + +-/* Define if you have the header file. */ +-#undef HAVE_SYS_TIMES_H ++/* Define if you have the `__argz_stringify' function. */ ++#undef HAVE___ARGZ_STRINGIFY + +-/* Define if you have the header file. */ +-#undef HAVE_TIME_H ++/* If using the C implementation of alloca, define if you know the ++ direction of stack growth for your system; otherwise it will be ++ automatically deduced at run-time. ++ STACK_DIRECTION > 0 => grows toward higher addresses ++ STACK_DIRECTION < 0 => grows toward lower addresses ++ STACK_DIRECTION = 0 => direction of growth unknown */ ++#undef STACK_DIRECTION + +-/* Define if you have the header file. */ +-#undef HAVE_UNISTD_H ++/* Define if you have the ANSI C header files. */ ++#undef STDC_HEADERS + +-/* Define if you have the i library (-li). */ +-#undef HAVE_LIBI ++/* Define if `sys_siglist' is declared by or . */ ++#undef SYS_SIGLIST_DECLARED ++ ++/* Define if you can safely include both and . */ ++#undef TIME_WITH_SYS_TIME ++ ++/* Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'. ++ */ ++#undef YYTEXT_POINTER ++ ++/* Define to empty if `const' does not conform to ANSI C. */ ++#undef const ++ ++/* Define as `__inline' if that's what the C compiler calls it, or to nothing ++ if it is not supported. */ ++#undef inline ++ ++/* Define to `long' if does not define. */ ++#undef off_t ++ ++/* Define to `int' if does not define. */ ++#undef pid_t ++ ++/* Define to `unsigned' if does not define. */ ++#undef size_t ++ ++/* Define as `fork' if `vfork' does not work. */ ++#undef vfork +diff -ruN --exclude=CVS gcc-2.95.3/gcc/configure gcc/gcc/configure +--- gcc-2.95.3/gcc/configure Fri Mar 16 15:13:48 2001 ++++ gcc/gcc/configure Wed Dec 5 23:55:03 2001 +@@ -1,85 +1,155 @@ + #! /bin/sh +- + # Guess values for system-dependent variables and create Makefiles. +-# Generated automatically using autoconf version 2.13 +-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. ++# Generated by Autoconf 2.52. + # ++# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 ++# Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + +-# Defaults: +-ac_help= ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits ++ ++# Sed expression to map a string onto a valid variable name. ++as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" ++ ++# Sed expression to map a string onto a valid CPP name. ++as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" ++ ++# Be Bourne compatible ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ++ set -o posix ++fi ++ ++# Name of the executable. ++as_me=`echo "$0" |sed 's,.*[\\/],,'` ++ ++if expr a : '\(a\)' >/dev/null 2>&1; then ++ as_expr=expr ++else ++ as_expr=false ++fi ++ ++rm -f conf$$ conf$$.exe conf$$.file ++echo >conf$$.file ++if ln -s conf$$.file conf$$ 2>/dev/null; then ++ # We could just check for DJGPP; but this test a) works b) is more generic ++ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ++ if test -f conf$$.exe; then ++ # Don't use ln at all; we don't have any links ++ as_ln_s='cp -p' ++ else ++ as_ln_s='ln -s' ++ fi ++elif ln conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s=ln ++else ++ as_ln_s='cp -p' ++fi ++rm -f conf$$ conf$$.exe conf$$.file ++ ++as_executable_p="test -f" ++ ++# Support unset when possible. ++if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ++ as_unset=unset ++else ++ as_unset=false ++fi ++ ++# NLS nuisances. ++$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } ++$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } ++$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } ++$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } ++$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } ++$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } ++$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } ++$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } ++ ++# IFS ++# We need space, tab and new line, in precisely that order. ++as_nl=' ++' ++IFS=" $as_nl" ++ ++# CDPATH. ++$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } ++ ++# Name of the host. ++# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, ++# so uname gets run too. ++ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` ++ ++exec 6>&1 ++ ++# ++# Initializations. ++# + ac_default_prefix=/usr/local +-# Any additions from configure.in: +-ac_help="$ac_help +- --with-gnu-ld arrange to work with GNU ld." +-ac_help="$ac_help +- --with-ld arrange to use the specified ld (full pathname)." +-ac_help="$ac_help +- --with-gnu-as arrange to work with GNU as." +-ac_help="$ac_help +- --with-as arrange to use the specified as (full pathname)." +-ac_help="$ac_help +- --with-stabs arrange to use stabs instead of host debug format." +-ac_help="$ac_help +- --with-elf arrange to use ELF instead of host debug format." +-ac_help="$ac_help +- --with-local-prefix=DIR specifies directory to put local include." +-ac_help="$ac_help +- --with-gxx-include-dir=DIR +- specifies directory to put g++ header files." +-ac_help="$ac_help +- --enable-checking enable expensive run-time checks." +-ac_help="$ac_help +- --disable-cpp don't provide a user-visible C preprocessor." +-ac_help="$ac_help +- --with-cpp-install-dir=DIR +- install the user visible C preprocessor in DIR +- (relative to PREFIX) as well as PREFIX/bin." +-ac_help="$ac_help +- --enable-cpplib use cpplib for the C preprocessor." +-ac_help="$ac_help +- --enable-c-cpplib link cpplib directly into C and C++ compilers +- (EXPERIMENTAL) (implies --enable-cpplib)." +-ac_help="$ac_help +- --enable-c-mbchar enable multibyte characters for C and C++." +-ac_help="$ac_help +- --disable-fast-fixincludes +- Disable the new fast fixincludes. +- Run the old fixincludes script unconditionally" +-ac_help="$ac_help +- --enable-haifa use the experimental scheduler. +- --disable-haifa don't use the experimental scheduler for the +- targets which normally enable it." +-ac_help="$ac_help +- --enable-threads enable thread usage for target GCC. +- --enable-threads=LIB use LIB thread package for target GCC." +-ac_help="$ac_help +- --enable-objc-gc enable the use of Boehm's garbage collector with +- the GNU Objective-C runtime." +-ac_help="$ac_help +- --enable-java-gc=TYPE choose garbage collector [boehm]" +-ac_help="$ac_help +- --enable-dwarf2 enable DWARF2 debugging as default." +-ac_help="$ac_help +- --enable-nls use Native Language Support (disabled by default). +- EXPERIMENTAL, see ABOUT-GCC-NLS." +-ac_help="$ac_help +- --disable-nls do not use Native Language Support" +-ac_help="$ac_help +- --with-included-gettext use the GNU gettext library included here" +-ac_help="$ac_help +- --with-catgets use catgets functions if available" ++cross_compiling=no ++subdirs= ++MFLAGS= MAKEFLAGS= ++SHELL=${CONFIG_SHELL-/bin/sh} ++ ++# Maximum number of lines to put in a shell here document. ++# This variable seems obsolete. It should probably be removed, and ++# only ac_max_sed_lines should be used. ++: ${ac_max_here_lines=38} ++ ++ac_unique_file="tree.c" ++# Factoring default headers for most tests. ++ac_includes_default="\ ++#include ++#if HAVE_SYS_TYPES_H ++# include ++#endif ++#if HAVE_SYS_STAT_H ++# include ++#endif ++#if STDC_HEADERS ++# include ++# include ++#else ++# if HAVE_STDLIB_H ++# include ++# endif ++#endif ++#if HAVE_STRING_H ++# if !STDC_HEADERS && HAVE_MEMORY_H ++# include ++# endif ++# include ++#endif ++#if HAVE_STRINGS_H ++# include ++#endif ++#if HAVE_INTTYPES_H ++# include ++#else ++# if HAVE_STDINT_H ++# include ++# endif ++#endif ++#if HAVE_UNISTD_H ++# include ++#endif" + + # Initialize some variables set by options. ++ac_init_help= ++ac_init_version=false + # The variables have the same names as the options, with + # dashes changed to underlines. +-build=NONE +-cache_file=./config.cache ++cache_file=/dev/null + exec_prefix=NONE +-host=NONE + no_create= +-nonopt=NONE + no_recursion= + prefix=NONE + program_prefix=NONE +@@ -88,10 +158,15 @@ + silent= + site= + srcdir= +-target=NONE + verbose= + x_includes=NONE + x_libraries=NONE ++ ++# Installation directory options. ++# These are left unexpanded so users can "make install exec_prefix=/foo" ++# and all the variables that are supposed to be based on exec_prefix ++# by default will actually change. ++# Use braces instead of parens because sh, perl, etc. also accept them. + bindir='${exec_prefix}/bin' + sbindir='${exec_prefix}/sbin' + libexecdir='${exec_prefix}/libexec' +@@ -103,19 +178,22 @@ + includedir='${prefix}/include' + oldincludedir='/usr/include' + infodir='${prefix}/info' ++guidedir='${prefix}/guidedir' ++htmldir='${prefix}/htmldir' ++psdir='${prefix}/psdir' ++dvidir='${prefix}/dvidir' + mandir='${prefix}/man' + +-# Initialize some other variables. +-subdirs= +-MFLAGS= MAKEFLAGS= +-SHELL=${CONFIG_SHELL-/bin/sh} +-# Maximum number of lines to put in a shell here document. +-ac_max_here_lines=12 ++# Identity of this package. ++PACKAGE_NAME= ++PACKAGE_TARNAME= ++PACKAGE_VERSION= ++PACKAGE_STRING= ++PACKAGE_BUGREPORT= + + ac_prev= + for ac_option + do +- + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" +@@ -123,59 +201,59 @@ + continue + fi + +- case "$ac_option" in +- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; +- *) ac_optarg= ;; +- esac ++ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + +- case "$ac_option" in ++ case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) +- bindir="$ac_optarg" ;; ++ bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) +- ac_prev=build ;; ++ ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) +- build="$ac_optarg" ;; ++ build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) +- cache_file="$ac_optarg" ;; ++ cache_file=$ac_optarg ;; ++ ++ --config-cache | -C) ++ cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) +- datadir="$ac_optarg" ;; ++ datadir=$ac_optarg ;; + + -disable-* | --disable-*) +- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` ++ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. +- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then +- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } +- fi +- ac_feature=`echo $ac_feature| sed 's/-/_/g'` +- eval "enable_${ac_feature}=no" ;; ++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ++ { (exit 1); exit 1; }; } ++ ac_feature=`echo $ac_feature | sed 's/-/_/g'` ++ eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) +- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` ++ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then +- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } +- fi +- ac_feature=`echo $ac_feature| sed 's/-/_/g'` +- case "$ac_option" in +- *=*) ;; ++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ++ { (exit 1); exit 1; }; } ++ ac_feature=`echo $ac_feature | sed 's/-/_/g'` ++ case $ac_option in ++ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac +- eval "enable_${ac_feature}='$ac_optarg'" ;; ++ eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ +@@ -184,95 +262,63 @@ + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) +- exec_prefix="$ac_optarg" ;; ++ exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + +- -help | --help | --hel | --he) +- # Omit some internal or obsolete options to make the list less imposing. +- # This message is too long to be a string in the A/UX 3.1 sh. +- cat << EOF +-Usage: configure [options] [host] +-Options: [defaults in brackets after descriptions] +-Configuration: +- --cache-file=FILE cache test results in FILE +- --help print this message +- --no-create do not create output files +- --quiet, --silent do not print \`checking...' messages +- --version print the version of autoconf that created configure +-Directory and file names: +- --prefix=PREFIX install architecture-independent files in PREFIX +- [$ac_default_prefix] +- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX +- [same as prefix] +- --bindir=DIR user executables in DIR [EPREFIX/bin] +- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] +- --libexecdir=DIR program executables in DIR [EPREFIX/libexec] +- --datadir=DIR read-only architecture-independent data in DIR +- [PREFIX/share] +- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] +- --sharedstatedir=DIR modifiable architecture-independent data in DIR +- [PREFIX/com] +- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] +- --libdir=DIR object code libraries in DIR [EPREFIX/lib] +- --includedir=DIR C header files in DIR [PREFIX/include] +- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] +- --infodir=DIR info documentation in DIR [PREFIX/info] +- --mandir=DIR man documentation in DIR [PREFIX/man] +- --srcdir=DIR find the sources in DIR [configure dir or ..] +- --program-prefix=PREFIX prepend PREFIX to installed program names +- --program-suffix=SUFFIX append SUFFIX to installed program names +- --program-transform-name=PROGRAM +- run sed PROGRAM on installed program names +-EOF +- cat << EOF +-Host type: +- --build=BUILD configure for building on BUILD [BUILD=HOST] +- --host=HOST configure for HOST [guessed] +- --target=TARGET configure for TARGET [TARGET=HOST] +-Features and packages: +- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) +- --enable-FEATURE[=ARG] include FEATURE [ARG=yes] +- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) +- --x-includes=DIR X include files are in DIR +- --x-libraries=DIR X library files are in DIR +-EOF +- if test -n "$ac_help"; then +- echo "--enable and --with options recognized:$ac_help" +- fi +- exit 0 ;; ++ -help | --help | --hel | --he | -h) ++ ac_init_help=long ;; ++ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ++ ac_init_help=recursive ;; ++ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ++ ac_init_help=short ;; + + -host | --host | --hos | --ho) +- ac_prev=host ;; ++ ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) +- host="$ac_optarg" ;; ++ host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) +- includedir="$ac_optarg" ;; ++ includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) +- infodir="$ac_optarg" ;; ++ infodir=$ac_optarg ;; ++ ++ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui) ++ ac_prev=guidedir ;; ++ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+ guidedir="$ac_optarg" ;; ++ ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+ htmldir="$ac_optarg" ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+ psdir="$ac_optarg" ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+ dvidir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) +- libdir="$ac_optarg" ;; ++ libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) +- libexecdir="$ac_optarg" ;; ++ libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ +@@ -281,12 +327,12 @@ + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) +- localstatedir="$ac_optarg" ;; ++ localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) +- mandir="$ac_optarg" ;; ++ mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. +@@ -307,26 +353,26 @@ + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) +- oldincludedir="$ac_optarg" ;; ++ oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) +- prefix="$ac_optarg" ;; ++ prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) +- program_prefix="$ac_optarg" ;; ++ program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) +- program_suffix="$ac_optarg" ;; ++ program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ +@@ -343,7 +389,7 @@ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) +- program_transform_name="$ac_optarg" ;; ++ program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) +@@ -353,7 +399,7 @@ + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) +- sbindir="$ac_optarg" ;; ++ sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ +@@ -364,58 +410,57 @@ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) +- sharedstatedir="$ac_optarg" ;; ++ sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) +- site="$ac_optarg" ;; ++ site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) +- srcdir="$ac_optarg" ;; ++ srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) +- sysconfdir="$ac_optarg" ;; ++ sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) +- ac_prev=target ;; ++ ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) +- target="$ac_optarg" ;; ++ target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + +- -version | --version | --versio | --versi | --vers) +- echo "configure generated by autoconf version 2.13" +- exit 0 ;; ++ -version | --version | --versio | --versi | --vers | -V) ++ ac_init_version=: ;; + + -with-* | --with-*) +- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` ++ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then +- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } +- fi ++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid package name: $ac_package" >&2 ++ { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` +- case "$ac_option" in +- *=*) ;; ++ case $ac_option in ++ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac +- eval "with_${ac_package}='$ac_optarg'" ;; ++ eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) +- ac_package=`echo $ac_option|sed -e 's/-*without-//'` ++ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. +- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then +- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } +- fi +- ac_package=`echo $ac_package| sed 's/-/_/g'` +- eval "with_${ac_package}=no" ;; ++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid package name: $ac_package" >&2 ++ { (exit 1); exit 1; }; } ++ ac_package=`echo $ac_package | sed 's/-/_/g'` ++ eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. +@@ -426,98 +471,99 @@ + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) +- x_includes="$ac_optarg" ;; ++ x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) +- x_libraries="$ac_optarg" ;; ++ x_libraries=$ac_optarg ;; + +- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ++ -*) { echo "$as_me: error: unrecognized option: $ac_option ++Try \`$0 --help' for more information." >&2 ++ { (exit 1); exit 1; }; } + ;; + ++ *=*) ++ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` ++ # Reject names that are not valid shell variable names. ++ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 ++ { (exit 1); exit 1; }; } ++ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ++ eval "$ac_envvar='$ac_optarg'" ++ export $ac_envvar ;; ++ + *) +- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then +- echo "configure: warning: $ac_option: invalid host type" 1>&2 +- fi +- if test "x$nonopt" != xNONE; then +- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } +- fi +- nonopt="$ac_option" ++ # FIXME: should be removed in autoconf 3.0. ++ echo "$as_me: WARNING: you should use --build, --host, --target" >&2 ++ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && ++ echo "$as_me: WARNING: invalid host type: $ac_option" >&2 ++ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac + done + + if test -n "$ac_prev"; then +- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +-fi +- +-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 +- +-# File descriptor usage: +-# 0 standard input +-# 1 file creation +-# 2 errors and warnings +-# 3 some systems may open it to /dev/tty +-# 4 used on the Kubota Titan +-# 6 checking for... messages and results +-# 5 compiler messages saved in config.log +-if test "$silent" = yes; then +- exec 6>/dev/null +-else +- exec 6>&1 ++ ac_option=--`echo $ac_prev | sed 's/_/-/g'` ++ { echo "$as_me: error: missing argument to $ac_option" >&2 ++ { (exit 1); exit 1; }; } + fi +-exec 5>./config.log + +-echo "\ +-This file contains any messages produced by compilers while +-running configure, to aid debugging if configure makes a mistake. +-" 1>&5 ++# Be sure to have absolute paths. ++for ac_var in exec_prefix prefix ++do ++ eval ac_val=$`echo $ac_var` ++ case $ac_val in ++ [\\/$]* | ?:[\\/]* | NONE | '' ) ;; ++ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 ++ { (exit 1); exit 1; }; };; ++ esac ++done + +-# Strip out --no-create and --no-recursion so they do not pile up. +-# Also quote any args containing shell metacharacters. +-ac_configure_args= +-for ac_arg ++# Be sure to have absolute paths. ++for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ ++ localstatedir libdir includedir oldincludedir infodir guidedir\ ++ htmldir psdir dvidir mandir + do +- case "$ac_arg" in +- -no-create | --no-create | --no-creat | --no-crea | --no-cre \ +- | --no-cr | --no-c) ;; +- -no-recursion | --no-recursion | --no-recursio | --no-recursi \ +- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; +- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) +- ac_configure_args="$ac_configure_args '$ac_arg'" ;; +- *) ac_configure_args="$ac_configure_args $ac_arg" ;; ++ eval ac_val=$`echo $ac_var` ++ case $ac_val in ++ [\\/$]* | ?:[\\/]* ) ;; ++ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 ++ { (exit 1); exit 1; }; };; + esac + done + +-# NLS nuisances. +-# Only set these to C if already set. These must not be set unconditionally +-# because not all systems understand e.g. LANG=C (notably SCO). +-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +-# Non-C LC_CTYPE values break the ctype check. +-if test "${LANG+set}" = set; then LANG=C; export LANG; fi +-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi ++# There might be people who depend on the old broken behavior: `$host' ++# used to hold the argument of --host etc. ++build=$build_alias ++host=$host_alias ++target=$target_alias ++ ++# FIXME: should be removed in autoconf 3.0. ++if test "x$host_alias" != x; then ++ if test "x$build_alias" = x; then ++ cross_compiling=maybe ++ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. ++ If a cross compiler is detected then cross compile mode will be used." >&2 ++ elif test "x$build_alias" != "x$host_alias"; then ++ cross_compiling=yes ++ fi ++fi + +-# confdefs.h avoids OS command line length limits that DEFS can exceed. +-rm -rf conftest* confdefs.h +-# AIX cpp loses on an empty file, so make sure it contains at least a newline. +-echo > confdefs.h ++ac_tool_prefix= ++test -n "$host_alias" && ac_tool_prefix=$host_alias- + +-# A filename unique to this package, relative to the directory that +-# configure is in, which we can look for to find out if srcdir is correct. +-ac_unique_file=tree.c ++test "$silent" = yes && exec 6>/dev/null + + # Find the source files, if location was not specified. + if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 +- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` ++ ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then +@@ -528,13 +574,347 @@ + fi + if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then +- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } ++ { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 ++ { (exit 1); exit 1; }; } + else +- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } ++ { echo "$as_me: error: cannot find sources in $srcdir" >&2 ++ { (exit 1); exit 1; }; } + fi + fi +-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` ++srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ++ac_env_build_alias_set=${build_alias+set} ++ac_env_build_alias_value=$build_alias ++ac_cv_env_build_alias_set=${build_alias+set} ++ac_cv_env_build_alias_value=$build_alias ++ac_env_host_alias_set=${host_alias+set} ++ac_env_host_alias_value=$host_alias ++ac_cv_env_host_alias_set=${host_alias+set} ++ac_cv_env_host_alias_value=$host_alias ++ac_env_target_alias_set=${target_alias+set} ++ac_env_target_alias_value=$target_alias ++ac_cv_env_target_alias_set=${target_alias+set} ++ac_cv_env_target_alias_value=$target_alias ++ac_env_CC_set=${CC+set} ++ac_env_CC_value=$CC ++ac_cv_env_CC_set=${CC+set} ++ac_cv_env_CC_value=$CC ++ac_env_CFLAGS_set=${CFLAGS+set} ++ac_env_CFLAGS_value=$CFLAGS ++ac_cv_env_CFLAGS_set=${CFLAGS+set} ++ac_cv_env_CFLAGS_value=$CFLAGS ++ac_env_LDFLAGS_set=${LDFLAGS+set} ++ac_env_LDFLAGS_value=$LDFLAGS ++ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ++ac_cv_env_LDFLAGS_value=$LDFLAGS ++ac_env_CPPFLAGS_set=${CPPFLAGS+set} ++ac_env_CPPFLAGS_value=$CPPFLAGS ++ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ++ac_cv_env_CPPFLAGS_value=$CPPFLAGS ++ac_env_CPP_set=${CPP+set} ++ac_env_CPP_value=$CPP ++ac_cv_env_CPP_set=${CPP+set} ++ac_cv_env_CPP_value=$CPP ++ ++# ++# Report the --help message. ++# ++if test "$ac_init_help" = "long"; then ++ # Omit some internal or obsolete options to make the list less imposing. ++ # This message is too long to be a string in the A/UX 3.1 sh. ++ cat < if you have libraries in a ++ nonstandard directory ++ CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have ++ headers in a nonstandard directory ++ CPP C preprocessor ++ ++Use these variables to override the choices made by `configure' or to help ++it to find libraries and programs with nonstandard names/locations. ++ ++EOF ++fi ++ ++if test "$ac_init_help" = "recursive"; then ++ # If there are subdirs, report their specific --help. ++ ac_popdir=`pwd` ++ for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue ++ cd $ac_subdir ++ # A "../" for each directory in /$ac_subdir. ++ ac_dots=`echo $ac_subdir | ++ sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` ++ ++ case $srcdir in ++ .) # No --srcdir option. We are building in place. ++ ac_sub_srcdir=$srcdir ;; ++ [\\/]* | ?:[\\/]* ) # Absolute path. ++ ac_sub_srcdir=$srcdir/$ac_subdir ;; ++ *) # Relative path. ++ ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; ++ esac ++ ++ # Check for guested configure; otherwise get Cygnus style configure. ++ if test -f $ac_sub_srcdir/configure.gnu; then ++ echo ++ $SHELL $ac_sub_srcdir/configure.gnu --help=recursive ++ elif test -f $ac_sub_srcdir/configure; then ++ echo ++ $SHELL $ac_sub_srcdir/configure --help=recursive ++ elif test -f $ac_sub_srcdir/configure.ac || ++ test -f $ac_sub_srcdir/configure.in; then ++ echo ++ $ac_configure --help ++ else ++ echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 ++ fi ++ cd $ac_popdir ++ done ++fi ++ ++test -n "$ac_init_help" && exit 0 ++if $ac_init_version; then ++ cat <<\EOF ++ ++Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 ++Free Software Foundation, Inc. ++This configure script is free software; the Free Software Foundation ++gives unlimited permission to copy, distribute and modify it. ++EOF ++ exit 0 ++fi ++exec 5>config.log ++cat >&5 </dev/null | sed 1q` ++uname -m = `(uname -m) 2>/dev/null || echo unknown` ++uname -r = `(uname -r) 2>/dev/null || echo unknown` ++uname -s = `(uname -s) 2>/dev/null || echo unknown` ++uname -v = `(uname -v) 2>/dev/null || echo unknown` + ++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` ++/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` ++ ++/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` ++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` ++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` ++hostinfo = `(hostinfo) 2>/dev/null || echo unknown` ++/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` ++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` ++/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` ++ ++PATH = $PATH ++ ++_ASUNAME ++} >&5 ++ ++cat >&5 <\?\"\']*) ++ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ++ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ++ ac_sep=" " ;; ++ *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" ++ ac_sep=" " ;; ++ esac ++ # Get rid of the leading space. ++done ++ ++# When interrupted or exit'd, cleanup temporary files, and complete ++# config.log. We remove comments because anyway the quotes in there ++# would cause problems or look ugly. ++trap 'exit_status=$? ++ # Save into config.log some information that might help in debugging. ++ echo >&5 ++ echo "## ----------------- ##" >&5 ++ echo "## Cache variables. ##" >&5 ++ echo "## ----------------- ##" >&5 ++ echo >&5 ++ # The following way of writing the cache mishandles newlines in values, ++{ ++ (set) 2>&1 | ++ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in ++ *ac_space=\ *) ++ sed -n \ ++ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; ++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ++ ;; ++ *) ++ sed -n \ ++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ ;; ++ esac; ++} >&5 ++ sed "/^$/d" confdefs.h >conftest.log ++ if test -s conftest.log; then ++ echo >&5 ++ echo "## ------------ ##" >&5 ++ echo "## confdefs.h. ##" >&5 ++ echo "## ------------ ##" >&5 ++ echo >&5 ++ cat conftest.log >&5 ++ fi ++ (echo; echo) >&5 ++ test "$ac_signal" != 0 && ++ echo "$as_me: caught signal $ac_signal" >&5 ++ echo "$as_me: exit $exit_status" >&5 ++ rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && ++ exit $exit_status ++ ' 0 ++for ac_signal in 1 2 13 15; do ++ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal ++done ++ac_signal=0 ++ ++# confdefs.h avoids OS command line length limits that DEFS can exceed. ++rm -rf conftest* confdefs.h ++# AIX cpp loses on an empty file, so make sure it contains at least a newline. ++echo >confdefs.h ++ ++# Let the site file select an alternate cache file if it wants to. + # Prefer explicitly selected file to automatically selected ones. + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then +@@ -545,42 +925,109 @@ + fi + for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then +- echo "loading site script $ac_site_file" ++ { echo "$as_me:928: loading site script $ac_site_file" >&5 ++echo "$as_me: loading site script $ac_site_file" >&6;} ++ cat "$ac_site_file" >&5 + . "$ac_site_file" + fi + done + + if test -r "$cache_file"; then +- echo "loading cache $cache_file" +- . $cache_file ++ # Some versions of bash will fail to source /dev/null (special ++ # files actually), so we avoid doing that. ++ if test -f "$cache_file"; then ++ { echo "$as_me:939: loading cache $cache_file" >&5 ++echo "$as_me: loading cache $cache_file" >&6;} ++ case $cache_file in ++ [\\/]* | ?:[\\/]* ) . $cache_file;; ++ *) . ./$cache_file;; ++ esac ++ fi + else +- echo "creating cache $cache_file" +- > $cache_file ++ { echo "$as_me:947: creating cache $cache_file" >&5 ++echo "$as_me: creating cache $cache_file" >&6;} ++ >$cache_file ++fi ++ ++# Check that the precious variables saved in the cache have kept the same ++# value. ++ac_cache_corrupted=false ++for ac_var in `(set) 2>&1 | ++ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do ++ eval ac_old_set=\$ac_cv_env_${ac_var}_set ++ eval ac_new_set=\$ac_env_${ac_var}_set ++ eval ac_old_val="\$ac_cv_env_${ac_var}_value" ++ eval ac_new_val="\$ac_env_${ac_var}_value" ++ case $ac_old_set,$ac_new_set in ++ set,) ++ { echo "$as_me:963: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ++echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ++ ac_cache_corrupted=: ;; ++ ,set) ++ { echo "$as_me:967: error: \`$ac_var' was not set in the previous run" >&5 ++echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ++ ac_cache_corrupted=: ;; ++ ,);; ++ *) ++ if test "x$ac_old_val" != "x$ac_new_val"; then ++ { echo "$as_me:973: error: \`$ac_var' has changed since the previous run:" >&5 ++echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ++ { echo "$as_me:975: former value: $ac_old_val" >&5 ++echo "$as_me: former value: $ac_old_val" >&2;} ++ { echo "$as_me:977: current value: $ac_new_val" >&5 ++echo "$as_me: current value: $ac_new_val" >&2;} ++ ac_cache_corrupted=: ++ fi;; ++ esac ++ # Pass precious variables to config.status. It doesn't matter if ++ # we pass some twice (in addition to the command line arguments). ++ if test "$ac_new_set" = set; then ++ case $ac_new_val in ++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ++ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ++ ac_configure_args="$ac_configure_args '$ac_arg'" ++ ;; ++ *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" ++ ;; ++ esac ++ fi ++done ++if $ac_cache_corrupted; then ++ { echo "$as_me:996: error: changes in the environment can compromise the build" >&5 ++echo "$as_me: error: changes in the environment can compromise the build" >&2;} ++ { { echo "$as_me:998: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 ++echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} ++ { (exit 1); exit 1; }; } + fi + + ac_ext=c +-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' +-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +-cross_compiling=$ac_cv_prog_cc_cross +- +-ac_exeext= +-ac_objext=o +-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then +- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. +- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then +- ac_n= ac_c=' +-' ac_t=' ' +- else +- ac_n=-n ac_c= ac_t= +- fi ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ++ *c*,-n*) ECHO_N= ECHO_C=' ++' ECHO_T=' ' ;; ++ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ++ *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ++esac ++echo "#! $SHELL" >conftest.sh ++echo "exit 0" >>conftest.sh ++chmod +x conftest.sh ++if { (echo "$as_me:1018: PATH=\".;.\"; conftest.sh") >&5 ++ (PATH=".;."; conftest.sh) 2>&5 ++ ac_status=$? ++ echo "$as_me:1021: \$? = $ac_status" >&5 ++ (exit $ac_status); }; then ++ ac_path_separator=';' + else +- ac_n= ac_c='\c' ac_t= ++ ac_path_separator=: + fi ++PATH_SEPARATOR="$ac_path_separator" ++rm -f conftest.sh + +- +- ++ac_config_headers="$ac_config_headers auto-host.h:config.in" + + remove=rm + hard_link=ln +@@ -595,8 +1042,8 @@ + # - one of the terminals (":" and ";") is the first or last sign + # - two terminals occur directly after each other + # - the path contains an element with a dot in it +-echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 +-echo "configure:600: checking LIBRARY_PATH variable" >&5 ++echo "$as_me:1045: checking LIBRARY_PATH variable" >&5 ++echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 + case ${LIBRARY_PATH} in + [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) + library_path_setting="contains current directory" +@@ -605,12 +1052,18 @@ + library_path_setting="ok" + ;; + esac +-echo "$ac_t""$library_path_setting" 1>&6 ++echo "$as_me:1055: result: $library_path_setting" >&5 ++echo "${ECHO_T}$library_path_setting" >&6 + if test "$library_path_setting" != "ok"; then +-{ echo "configure: error: ++{ { echo "$as_me:1058: error: ++*** LIBRARY_PATH shouldn't contain the current directory when ++*** building gcc. Please change the environment variable ++*** and run configure again." >&5 ++echo "$as_me: error: + *** LIBRARY_PATH shouldn't contain the current directory when + *** building gcc. Please change the environment variable +-*** and run configure again." 1>&2; exit 1; } ++*** and run configure again." >&2;} ++ { (exit 1); exit 1; }; } + fi + + # Test if GCC_EXEC_PREFIX contains the notation for the current directory +@@ -620,8 +1073,8 @@ + # - one of the terminals (":" and ";") is the first or last sign + # - two terminals occur directly after each other + # - the path contains an element with a dot in it +-echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 +-echo "configure:625: checking GCC_EXEC_PREFIX variable" >&5 ++echo "$as_me:1076: checking GCC_EXEC_PREFIX variable" >&5 ++echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 + case ${GCC_EXEC_PREFIX} in + [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) + gcc_exec_prefix_setting="contains current directory" +@@ -630,105 +1083,114 @@ + gcc_exec_prefix_setting="ok" + ;; + esac +-echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 ++echo "$as_me:1086: result: $gcc_exec_prefix_setting" >&5 ++echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 + if test "$gcc_exec_prefix_setting" != "ok"; then +-{ echo "configure: error: ++{ { echo "$as_me:1089: error: + *** GCC_EXEC_PREFIX shouldn't contain the current directory when + *** building gcc. Please change the environment variable +-*** and run configure again." 1>&2; exit 1; } ++*** and run configure again." >&5 ++echo "$as_me: error: ++*** GCC_EXEC_PREFIX shouldn't contain the current directory when ++*** building gcc. Please change the environment variable ++*** and run configure again." >&2;} ++ { (exit 1); exit 1; }; } + fi + + # Check for additional parameters + + # With GNU ld ++ + # Check whether --with-gnu-ld or --without-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + gnu_ld_flag="$with_gnu_ld" + else + gnu_ld_flag=no +-fi +- ++fi; + + # With pre-defined ld ++ + # Check whether --with-ld or --without-ld was given. + if test "${with_ld+set}" = set; then + withval="$with_ld" + DEFAULT_LINKER="$with_ld" +-fi +- ++fi; + if test x"${DEFAULT_LINKER+set}" = x"set"; then + if test ! -x "$DEFAULT_LINKER"; then +- echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 ++ { echo "$as_me:1121: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 ++echo "$as_me: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} + elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then + gnu_ld_flag=yes + fi +- cat >> confdefs.h <>confdefs.h <&2 ++ { echo "$as_me:1149: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 ++echo "$as_me: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} + elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then + gas_flag=yes + fi +- cat >> confdefs.h <>confdefs.h <&2; exit 1; } ;; ++yes) { { echo "$as_me:1187: error: bad value ${withval} given for local include directory prefix" >&5 ++echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} ++ { (exit 1); exit 1; }; } ;; + no) ;; + *) local_prefix=$with_local_prefix ;; + esac +-fi +- ++fi; + + # Default local prefix if it is empty + if test x$local_prefix = x; then +@@ -740,16 +1202,18 @@ + # depending on where we built the sources. + gcc_gxx_include_dir= + # Specify the g++ header file directory ++ + # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. + if test "${with_gxx_include_dir+set}" = set; then + withval="$with_gxx_include_dir" + case "${withval}" in +-yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; ++yes) { { echo "$as_me:1210: error: bad value ${withval} given for g++ include directory" >&5 ++echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} ++ { (exit 1); exit 1; }; } ;; + no) ;; + *) gcc_gxx_include_dir=$with_gxx_include_dir ;; + esac +-fi +- ++fi; + + if test x${gcc_gxx_include_dir} = x; then + if test x${enable_version_specific_runtime_libs} = xyes; then +@@ -765,35 +1229,36 @@ + if test "${enable_checking+set}" = set; then + enableval="$enable_checking" + case "${enableval}" in +-yes) cat >> confdefs.h <<\EOF ++yes) cat >>confdefs.h <<\EOF + #define ENABLE_CHECKING 1 + EOF + ;; + no) ;; +-*) { echo "configure: error: bad value ${enableval} given for checking option" 1>&2; exit 1; } ;; ++*) { { echo "$as_me:1237: error: bad value ${enableval} given for checking option" >&5 ++echo "$as_me: error: bad value ${enableval} given for checking option" >&2;} ++ { (exit 1); exit 1; }; } ;; + esac +-fi +- ++fi; + + # Check whether --enable-cpp or --disable-cpp was given. + if test "${enable_cpp+set}" = set; then + enableval="$enable_cpp" +- : ++ + else + enable_cpp=yes +-fi +- ++fi; + + # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. + if test "${with_cpp_install_dir+set}" = set; then + withval="$with_cpp_install_dir" + if test x$withval = xyes; then +- { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } ++ { { echo "$as_me:1255: error: option --with-cpp-install-dir requires an argument" >&5 ++echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} ++ { (exit 1); exit 1; }; } + elif test x$withval != xno; then + cpp_install_dir=$withval + fi +-fi +- ++fi; + + # Use cpplib+cppmain for the preprocessor, but don't link it with the compiler. + cpp_main=cccp +@@ -803,8 +1268,7 @@ + if test x$enable_cpplib != xno; then + cpp_main=cppmain + fi +-fi +- ++fi; + + # Link cpplib into the compiler proper, for C/C++/ObjC. + # Check whether --enable-c-cpplib or --disable-c-cpplib was given. +@@ -816,8 +1280,7 @@ + extra_c_flags="${extra_c_flags} -DUSE_CPPLIB=1" + cpp_main=cppmain + fi +-fi +- ++fi; + + # Enable Multibyte Characters for C/C++ + # Check whether --enable-c-mbchar or --disable-c-mbchar was given. +@@ -826,8 +1289,7 @@ + if test x$enable_c_mbchar != xno; then + extra_c_flags=-DMULTIBYTE_CHARS=1 + fi +-fi +- ++fi; + + # Disable fast fixincludes + # Check whether --enable-fast-fixincludes or --disable-fast-fixincludes was given. +@@ -836,16 +1298,14 @@ + if test x$enable_fast_fixincludes = xno ; then + cp $srcdir/fixincludes ./fixinc.sh + fi +-fi +- ++fi; + + # Enable Haifa scheduler. + # Check whether --enable-haifa or --disable-haifa was given. + if test "${enable_haifa+set}" = set; then + enableval="$enable_haifa" +- : +-fi + ++fi; + + # Enable threads + # Pass with no value to take the default +@@ -858,8 +1318,7 @@ + fi + else + enable_threads='' +-fi +- ++fi; + + enable_threads_flag=$enable_threads + # Check if a valid thread package +@@ -892,18 +1351,16 @@ + fi + else + objc_boehm_gc='' +-fi +- ++fi; + + # Check whether --enable-java-gc or --disable-java-gc was given. + if test "${enable_java_gc+set}" = set; then + enableval="$enable_java_gc" +- ++ + JAVAGC=$enableval + else + JAVAGC=boehm +-fi +- ++fi; + + # Check whether --with-dwarf2 or --without-dwarf2 was given. + if test "${with_dwarf2+set}" = set; then +@@ -911,8 +1368,7 @@ + dwarf2="$with_dwarf2" + else + dwarf2=no +-fi +- ++fi; + + # Determine the host, build, and target systems + ac_aux_dir= +@@ -925,314 +1381,778 @@ + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break ++ elif test -f $ac_dir/shtool; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/shtool install -c" ++ break + fi + done + if test -z "$ac_aux_dir"; then +- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +-fi +-ac_config_guess=$ac_aux_dir/config.guess +-ac_config_sub=$ac_aux_dir/config.sub +-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ++ { { echo "$as_me:1391: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 ++echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ac_config_guess="$SHELL $ac_aux_dir/config.guess" ++ac_config_sub="$SHELL $ac_aux_dir/config.sub" ++ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +- +-# Do some error checking and defaulting for the host and target type. +-# The inputs are: +-# configure --host=HOST --target=TARGET --build=BUILD NONOPT +-# +-# The rules are: +-# 1. You are not allowed to specify --host, --target, and nonopt at the +-# same time. +-# 2. Host defaults to nonopt. +-# 3. If nonopt is not specified, then host defaults to the current host, +-# as determined by config.guess. +-# 4. Target and build default to nonopt. +-# 5. If nonopt is not specified, then target and build default to host. ++# Make sure we can run config.sub. ++$ac_config_sub sun4 >/dev/null 2>&1 || ++ { { echo "$as_me:1401: error: cannot run $ac_config_sub" >&5 ++echo "$as_me: error: cannot run $ac_config_sub" >&2;} ++ { (exit 1); exit 1; }; } ++ ++echo "$as_me:1405: checking build system type" >&5 ++echo $ECHO_N "checking build system type... $ECHO_C" >&6 ++if test "${ac_cv_build+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_cv_build_alias=$build_alias ++test -z "$ac_cv_build_alias" && ++ ac_cv_build_alias=`$ac_config_guess` ++test -z "$ac_cv_build_alias" && ++ { { echo "$as_me:1414: error: cannot guess build type; you must specify one" >&5 ++echo "$as_me: error: cannot guess build type; you must specify one" >&2;} ++ { (exit 1); exit 1; }; } ++ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || ++ { { echo "$as_me:1418: error: $ac_config_sub $ac_cv_build_alias failed." >&5 ++echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} ++ { (exit 1); exit 1; }; } ++ ++fi ++echo "$as_me:1423: result: $ac_cv_build" >&5 ++echo "${ECHO_T}$ac_cv_build" >&6 ++build=$ac_cv_build ++build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++ ++echo "$as_me:1430: checking host system type" >&5 ++echo $ECHO_N "checking host system type... $ECHO_C" >&6 ++if test "${ac_cv_host+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_cv_host_alias=$host_alias ++test -z "$ac_cv_host_alias" && ++ ac_cv_host_alias=$ac_cv_build_alias ++ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || ++ { { echo "$as_me:1439: error: $ac_config_sub $ac_cv_host_alias failed" >&5 ++echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} ++ { (exit 1); exit 1; }; } ++ ++fi ++echo "$as_me:1444: result: $ac_cv_host" >&5 ++echo "${ECHO_T}$ac_cv_host" >&6 ++host=$ac_cv_host ++host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++ ++echo "$as_me:1451: checking target system type" >&5 ++echo $ECHO_N "checking target system type... $ECHO_C" >&6 ++if test "${ac_cv_target+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_cv_target_alias=$target_alias ++test "x$ac_cv_target_alias" = "x" && ++ ac_cv_target_alias=$ac_cv_host_alias ++ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || ++ { { echo "$as_me:1460: error: $ac_config_sub $ac_cv_target_alias failed" >&5 ++echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} ++ { (exit 1); exit 1; }; } ++ ++fi ++echo "$as_me:1465: result: $ac_cv_target" >&5 ++echo "${ECHO_T}$ac_cv_target" >&6 ++target=$ac_cv_target ++target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + # The aliases save the names the user supplied, while $host etc. + # will get canonicalized. +-case $host---$target---$nonopt in +-NONE---*---* | *---NONE---* | *---*---NONE) ;; +-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; +-esac ++test -n "$target_alias" && ++ test "$program_prefix$program_suffix$program_transform_name" = \ ++ NONENONEs,x,x, && ++ program_prefix=${target_alias}- + ++# Find the native compiler ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. ++set dummy ${ac_tool_prefix}gcc; ac_word=$2 ++echo "$as_me:1488: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_CC="${ac_tool_prefix}gcc" ++echo "$as_me:1503: found $ac_dir/$ac_word" >&5 ++break ++done + +-# Make sure we can run config.sub. +-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ echo "$as_me:1511: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 ++else ++ echo "$as_me:1514: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +-echo $ac_n "checking host system type""... $ac_c" 1>&6 +-echo "configure:966: checking host system type" >&5 ++fi ++if test -z "$ac_cv_prog_CC"; then ++ ac_ct_CC=$CC ++ # Extract the first word of "gcc", so it can be a program name with args. ++set dummy gcc; ac_word=$2 ++echo "$as_me:1523: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_CC"; then ++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ++else ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_ac_ct_CC="gcc" ++echo "$as_me:1538: found $ac_dir/$ac_word" >&5 ++break ++done + +-host_alias=$host +-case "$host_alias" in +-NONE) +- case $nonopt in +- NONE) +- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : +- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } +- fi ;; +- *) host_alias=$nonopt ;; +- esac ;; +-esac ++fi ++fi ++ac_ct_CC=$ac_cv_prog_ac_ct_CC ++if test -n "$ac_ct_CC"; then ++ echo "$as_me:1546: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6 ++else ++ echo "$as_me:1549: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi + +-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +-echo "$ac_t""$host" 1>&6 +- +-echo $ac_n "checking target system type""... $ac_c" 1>&6 +-echo "configure:987: checking target system type" >&5 +- +-target_alias=$target +-case "$target_alias" in +-NONE) +- case $nonopt in +- NONE) target_alias=$host_alias ;; +- *) target_alias=$nonopt ;; +- esac ;; +-esac ++ CC=$ac_ct_CC ++else ++ CC="$ac_cv_prog_CC" ++fi + +-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` +-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +-echo "$ac_t""$target" 1>&6 +- +-echo $ac_n "checking build system type""... $ac_c" 1>&6 +-echo "configure:1005: checking build system type" >&5 +- +-build_alias=$build +-case "$build_alias" in +-NONE) +- case $nonopt in +- NONE) build_alias=$host_alias ;; +- *) build_alias=$nonopt ;; +- esac ;; +-esac ++if test -z "$CC"; then ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ++set dummy ${ac_tool_prefix}cc; ac_word=$2 ++echo "$as_me:1562: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_CC="${ac_tool_prefix}cc" ++echo "$as_me:1577: found $ac_dir/$ac_word" >&5 ++break ++done + +-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` +-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +-echo "$ac_t""$build" 1>&6 ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ echo "$as_me:1585: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 ++else ++ echo "$as_me:1588: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi + +-test "$host_alias" != "$target_alias" && +- test "$program_prefix$program_suffix$program_transform_name" = \ +- NONENONEs,x,x, && +- program_prefix=${target_alias}- ++fi ++if test -z "$ac_cv_prog_CC"; then ++ ac_ct_CC=$CC ++ # Extract the first word of "cc", so it can be a program name with args. ++set dummy cc; ac_word=$2 ++echo "$as_me:1597: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_CC"; then ++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ++else ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_ac_ct_CC="cc" ++echo "$as_me:1612: found $ac_dir/$ac_word" >&5 ++break ++done ++ ++fi ++fi ++ac_ct_CC=$ac_cv_prog_ac_ct_CC ++if test -n "$ac_ct_CC"; then ++ echo "$as_me:1620: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6 ++else ++ echo "$as_me:1623: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi + ++ CC=$ac_ct_CC ++else ++ CC="$ac_cv_prog_CC" ++fi + +-# Find the native compiler +-# 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:1032: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++fi ++if test -z "$CC"; then ++ # Extract the first word of "bcc", so it can be a program name with args. ++set dummy bcc; ac_word=$2 ++echo "$as_me:1636: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_prog_CC="gcc" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_CC="bcc" ++echo "$as_me:1651: found $ac_dir/$ac_word" >&5 ++break ++done ++ + fi + fi +-CC="$ac_cv_prog_CC" ++CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$ac_t""$CC" 1>&6 ++ echo "$as_me:1659: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:1662: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + ++fi ++if test -z "$CC"; then ++ machine=`(uname -m 2>/dev/null)` || machine=unknown ++ case "$machine" in ++ BePC) # Extract the first word of "mwccx86", so it can be a program name with args. ++set dummy mwccx86; ac_word=$2 ++echo "$as_me:1672: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_CC="mwccx86" ++echo "$as_me:1687: found $ac_dir/$ac_word" >&5 ++break ++done ++ ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ echo "$as_me:1695: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 ++else ++ echo "$as_me:1698: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ;; ++ BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args. ++set dummy mwcc; ac_word=$2 ++echo "$as_me:1704: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_CC="mwcc" ++echo "$as_me:1719: found $ac_dir/$ac_word" >&5 ++break ++done ++ ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ echo "$as_me:1727: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 ++else ++ echo "$as_me:1730: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ;; ++ *) ;; ++ esac ++fi + 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:1062: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:1740: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then +- ac_prog_rejected=yes +- continue +- fi +- ac_cv_prog_CC="cc" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ++ ac_prog_rejected=yes ++ continue ++fi ++ac_cv_prog_CC="cc" ++echo "$as_me:1760: found $ac_dir/$ac_word" >&5 ++break ++done ++ + if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift +- if test $# -gt 0; then ++ if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift +- set dummy "$ac_dir/$ac_word" "$@" ++ set dummy "$ac_dir/$ac_word" ${1+"$@"} + shift + ac_cv_prog_CC="$@" + fi + fi + fi + fi +-CC="$ac_cv_prog_CC" ++CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$ac_t""$CC" 1>&6 ++ echo "$as_me:1782: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:1785: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +- if test -z "$CC"; then +- case "`uname -s`" in +- *win32* | *WIN32*) +- # 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:1113: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++fi ++if test -z "$CC"; then ++ if test -n "$ac_tool_prefix"; then ++ for ac_prog in cl ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 ++echo "$as_me:1796: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_prog_CC="cl" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_CC="$ac_tool_prefix$ac_prog" ++echo "$as_me:1811: found $ac_dir/$ac_word" >&5 ++break ++done ++ + fi + fi +-CC="$ac_cv_prog_CC" ++CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$ac_t""$CC" 1>&6 ++ echo "$as_me:1819: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:1822: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ test -n "$CC" && break ++ done ++fi ++if test -z "$CC"; then ++ ac_ct_CC=$CC ++ for ac_prog in cl ++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 "$as_me:1835: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_CC"; then ++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ++else ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_ac_ct_CC="$ac_prog" ++echo "$as_me:1850: found $ac_dir/$ac_word" >&5 ++break ++done ++ + fi +- ;; +- esac +- fi +- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } ++fi ++ac_ct_CC=$ac_cv_prog_ac_ct_CC ++if test -n "$ac_ct_CC"; then ++ echo "$as_me:1858: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6 ++else ++ echo "$as_me:1861: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:1145: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++ test -n "$ac_ct_CC" && break ++done + +-ac_ext=c +-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +-ac_cpp='$CPP $CPPFLAGS' +-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +-cross_compiling=$ac_cv_prog_cc_cross ++ CC=$ac_ct_CC ++fi ++ ++fi + +-cat > conftest.$ac_ext << EOF ++test -z "$CC" && { { echo "$as_me:1873: error: no acceptable cc found in \$PATH" >&5 ++echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} ++ { (exit 1); exit 1; }; } ++ ++# Provide some information about the compiler. ++echo "$as_me:1878:" \ ++ "checking for C compiler version" >&5 ++ac_compiler=`set X $ac_compile; echo $2` ++{ (eval echo "$as_me:1881: \"$ac_compiler --version &5\"") >&5 ++ (eval $ac_compiler --version &5) 2>&5 ++ ac_status=$? ++ echo "$as_me:1884: \$? = $ac_status" >&5 ++ (exit $ac_status); } ++{ (eval echo "$as_me:1886: \"$ac_compiler -v &5\"") >&5 ++ (eval $ac_compiler -v &5) 2>&5 ++ ac_status=$? ++ echo "$as_me:1889: \$? = $ac_status" >&5 ++ (exit $ac_status); } ++{ (eval echo "$as_me:1891: \"$ac_compiler -V &5\"") >&5 ++ (eval $ac_compiler -V &5) 2>&5 ++ ac_status=$? ++ echo "$as_me:1894: \$? = $ac_status" >&5 ++ (exit $ac_status); } + +-#line 1156 "configure" ++cat >conftest.$ac_ext <<_ACEOF ++#line 1898 "configure" + #include "confdefs.h" + +-main(){return(0);} +-EOF +-if { (eval echo configure:1161: \"$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 +- ac_cv_prog_cc_cross=no ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++ac_clean_files_save=$ac_clean_files ++ac_clean_files="$ac_clean_files a.out a.exe" ++# Try to create an executable without -o first, disregard a.out. ++# It will help us diagnose broken compilers, and finding out an intuition ++# of exeext. ++echo "$as_me:1914: checking for C compiler default output" >&5 ++echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ++ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` ++if { (eval echo "$as_me:1917: \"$ac_link_default\"") >&5 ++ (eval $ac_link_default) 2>&5 ++ ac_status=$? ++ echo "$as_me:1920: \$? = $ac_status" >&5 ++ (exit $ac_status); }; then ++ # Find the output, starting from the most likely. This scheme is ++# not robust to junk in `.', hence go to wildcards (a.*) only as a last ++# resort. ++for ac_file in `ls a.exe conftest.exe 2>/dev/null; ++ ls a.out conftest 2>/dev/null; ++ ls a.* conftest.* 2>/dev/null`; do ++ case $ac_file in ++ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; ++ a.out ) # We found the default executable, but exeext='' is most ++ # certainly right. ++ break;; ++ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ++ # FIXME: I believe we export ac_cv_exeext for Libtool --akim. ++ export ac_cv_exeext ++ break;; ++ * ) break;; ++ esac ++done ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++{ { echo "$as_me:1943: error: C compiler cannot create executables" >&5 ++echo "$as_me: error: C compiler cannot create executables" >&2;} ++ { (exit 77); exit 77; }; } ++fi ++ ++ac_exeext=$ac_cv_exeext ++echo "$as_me:1949: result: $ac_file" >&5 ++echo "${ECHO_T}$ac_file" >&6 ++ ++# Check the compiler produces executables we can run. If not, either ++# the compiler is broken, or we cross compile. ++echo "$as_me:1954: checking whether the C compiler works" >&5 ++echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 ++# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 ++# If not cross compiling, check that we can run a simple program. ++if test "$cross_compiling" != yes; then ++ if { ac_try='./$ac_file' ++ { (eval echo "$as_me:1960: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:1963: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ cross_compiling=no + else +- ac_cv_prog_cc_cross=yes ++ if test "$cross_compiling" = maybe; then ++ cross_compiling=yes ++ else ++ { { echo "$as_me:1970: error: cannot run C compiled programs. ++If you meant to cross compile, use \`--host'." >&5 ++echo "$as_me: error: cannot run C compiled programs. ++If you meant to cross compile, use \`--host'." >&2;} ++ { (exit 1); exit 1; }; } ++ fi + fi +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- ac_cv_prog_cc_works=no + fi +-rm -fr conftest* +-ac_ext=c +-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +-ac_cpp='$CPP $CPPFLAGS' +-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +-cross_compiling=$ac_cv_prog_cc_cross +- +-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +-if test $ac_cv_prog_cc_works = no; then +- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +-fi +-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:1187: 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 "$as_me:1978: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 + +-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +-echo "configure:1192: 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 ++rm -f a.out a.exe conftest$ac_cv_exeext ++ac_clean_files=$ac_clean_files_save ++# Check the compiler produces executables we can run. If not, either ++# the compiler is broken, or we cross compile. ++echo "$as_me:1985: checking whether we are cross compiling" >&5 ++echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 ++echo "$as_me:1987: result: $cross_compiling" >&5 ++echo "${ECHO_T}$cross_compiling" >&6 ++ ++echo "$as_me:1990: checking for executable suffix" >&5 ++echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 ++if { (eval echo "$as_me:1992: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:1995: \$? = $ac_status" >&5 ++ (exit $ac_status); }; then ++ # If both `conftest.exe' and `conftest' are `present' (well, observable) ++# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will ++# work properly (i.e., refer to `conftest.exe'), while it won't with ++# `rm'. ++for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do ++ case $ac_file in ++ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; ++ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ++ export ac_cv_exeext ++ break;; ++ * ) break;; ++ esac ++done + else +- cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +- ac_cv_prog_gcc=yes ++ { { echo "$as_me:2011: error: cannot compute EXEEXT: cannot compile and link" >&5 ++echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++rm -f conftest$ac_cv_exeext ++echo "$as_me:2017: result: $ac_cv_exeext" >&5 ++echo "${ECHO_T}$ac_cv_exeext" >&6 ++ ++rm -f conftest.$ac_ext ++EXEEXT=$ac_cv_exeext ++ac_exeext=$EXEEXT ++echo "$as_me:2023: checking for object suffix" >&5 ++echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 ++if test "${ac_cv_objext+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_cv_prog_gcc=no +-fi +-fi ++ cat >conftest.$ac_ext <<_ACEOF ++#line 2029 "configure" ++#include "confdefs.h" + +-echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ++int ++main () ++{ + +-if test $ac_cv_prog_gcc = yes; then +- GCC=yes ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.o conftest.obj ++if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:2044: \$? = $ac_status" >&5 ++ (exit $ac_status); }; then ++ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do ++ case $ac_file in ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; ++ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` ++ break;; ++ esac ++done + else +- GCC= +-fi ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++{ { echo "$as_me:2056: error: cannot compute OBJEXT: cannot compile" >&5 ++echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++rm -f conftest.$ac_cv_objext conftest.$ac_ext ++fi ++echo "$as_me:2063: result: $ac_cv_objext" >&5 ++echo "${ECHO_T}$ac_cv_objext" >&6 ++OBJEXT=$ac_cv_objext ++ac_objext=$OBJEXT ++echo "$as_me:2067: checking whether we are using the GNU C compiler" >&5 ++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 ++if test "${ac_cv_c_compiler_gnu+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++#line 2073 "configure" ++#include "confdefs.h" + +-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:1220: 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 ++int ++main () ++{ ++#ifndef __GNUC__ ++ choke me ++#endif ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:2088: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:2091: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:2094: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:2097: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_compiler_gnu=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_compiler_gnu=no ++fi ++rm -f conftest.$ac_objext conftest.$ac_ext ++ac_cv_c_compiler_gnu=$ac_compiler_gnu ++ ++fi ++echo "$as_me:2109: result: $ac_cv_c_compiler_gnu" >&5 ++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 ++GCC=`test $ac_compiler_gnu = yes && echo yes` ++ac_test_CFLAGS=${CFLAGS+set} ++ac_save_CFLAGS=$CFLAGS ++CFLAGS="-g" ++echo "$as_me:2115: checking whether $CC accepts -g" >&5 ++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 ++if test "${ac_cv_prog_cc_g+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- echo 'void f(){}' > conftest.c +-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ++ cat >conftest.$ac_ext <<_ACEOF ++#line 2121 "configure" ++#include "confdefs.h" ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:2133: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:2136: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:2139: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:2142: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes + else +- ac_cv_prog_cc_g=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_prog_cc_g=no + fi +-rm -f conftest* +- ++rm -f conftest.$ac_objext conftest.$ac_ext + fi +- +-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 ++echo "$as_me:2152: result: $ac_cv_prog_cc_g" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 + if test "$ac_test_CFLAGS" = set; then +- CFLAGS="$ac_save_CFLAGS" ++ CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" +@@ -1247,186 +2167,471 @@ + fi + fi + ++case "$CC" in ++ bcc ) ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwcc ) ++ CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup" ++ AR=${AR-mwld} ++ LD=${LD-mwld} ++ RANLIB=${RANLIB-true};; ++ mwccx86 ) ++ CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib" ++ AR=${AR-mwldx86} ++ LD=${LD-mwldx86} ++ RANLIB=${RANLIB-true};; ++ ${host_alias}-gcc) ++ ;; ++ *) ++ AR=${AR-ar} ++ LD=${LD-ld} ++ RANLIB=${RANLIB-ranlib};; ++esac + +-# If the native compiler is GCC, we can enable warnings even in stage1. ++# Some people use a C++ compiler to compile C. Since we use `exit', ++# in C++ we need to declare it. In case someone uses the same compiler ++# for both compiling C and C++ we need to have the C++ compiler decide ++# the declaration of exit, since it's the most demanding environment. ++cat >conftest.$ac_ext <<_ACEOF ++#ifndef __cplusplus ++ choke me ++#endif ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:2203: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:2206: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:2209: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:2212: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ for ac_declaration in \ ++ ''\ ++ '#include ' \ ++ 'extern "C" void std::exit (int) throw (); using std::exit;' \ ++ 'extern "C" void std::exit (int); using std::exit;' \ ++ 'extern "C" void exit (int) throw ();' \ ++ 'extern "C" void exit (int);' \ ++ 'void exit (int);' ++do ++ cat >conftest.$ac_ext <<_ACEOF ++#line 2224 "configure" ++#include "confdefs.h" ++#include ++$ac_declaration ++int ++main () ++{ ++exit (42); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:2237: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:2240: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:2243: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:2246: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ : ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++continue ++fi ++rm -f conftest.$ac_objext conftest.$ac_ext ++ cat >conftest.$ac_ext <<_ACEOF ++#line 2256 "configure" ++#include "confdefs.h" ++$ac_declaration ++int ++main () ++{ ++exit (42); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:2268: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:2271: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:2274: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:2277: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ break ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++fi ++rm -f conftest.$ac_objext conftest.$ac_ext ++done ++rm -f conftest* ++if test -n "$ac_declaration"; then ++ echo '#ifdef __cplusplus' >>confdefs.h ++ echo $ac_declaration >>confdefs.h ++ echo '#endif' >>confdefs.h ++fi ++ ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++fi ++rm -f conftest.$ac_objext conftest.$ac_ext ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++# If the native compiler is GCC, we can enable warnings even in stage1. + # That's useful for people building cross-compilers, or just running a + # quick `make'. +-if test "x$GCC" = "xyes"; then ++if test "x$GCC" = "xyes"; then + stage1_warn_cflags='$(WARN_CFLAGS)' + else + stage1_warn_cflags="" + fi + +- +-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-echo "configure:1263: checking whether ${MAKE-make} sets \${MAKE}" >&5 +-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:2313: checking whether ${MAKE-make} sets \${MAKE}" >&5 ++echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 ++set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` ++if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftestmake <<\EOF ++ cat >conftest.make <<\EOF + all: + @echo 'ac_maketemp="${MAKE}"' + EOF + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. +-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` ++eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` + if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes + else + eval ac_cv_prog_make_${ac_make}_set=no + fi +-rm -f conftestmake ++rm -f conftest.make + fi + if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then +- echo "$ac_t""yes" 1>&6 ++ echo "$as_me:2333: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 + SET_MAKE= + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:2337: result: no" >&5 ++echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" + fi + +- +-echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 +-echo "configure:1291: checking whether a default assembler was specified" >&5 ++echo "$as_me:2342: checking whether a default assembler was specified" >&5 ++echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 + if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then + if test x"$gas_flag" = x"no"; then +- echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 ++ echo "$as_me:2346: result: yes ($DEFAULT_ASSEMBLER)" >&5 ++echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 + else +- echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 ++ echo "$as_me:2349: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 ++echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 + fi + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:2353: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +-echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 +-echo "configure:1303: checking whether a default linker was specified" >&5 ++echo "$as_me:2357: checking whether a default linker was specified" >&5 ++echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 + if test x"${DEFAULT_LINKER+set}" = x"set"; then + if test x"$gnu_ld_flag" = x"no"; then +- echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 ++ echo "$as_me:2361: result: yes ($DEFAULT_LINKER)" >&5 ++echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 + else +- echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 ++ echo "$as_me:2364: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 ++echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 + fi + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:2368: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + + # Find some useful tools +-for ac_prog in gawk mawk nawk awk ++for ac_prog in mawk gawk nawk awk + do +-# Extract the first word of "$ac_prog", so it can be a program name with args. ++ # 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:1320: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:2377: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_AWK+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_prog_AWK="$ac_prog" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_AWK="$ac_prog" ++echo "$as_me:2392: found $ac_dir/$ac_word" >&5 ++break ++done ++ + fi + fi +-AWK="$ac_cv_prog_AWK" ++AWK=$ac_cv_prog_AWK + if test -n "$AWK"; then +- echo "$ac_t""$AWK" 1>&6 ++ echo "$as_me:2400: result: $AWK" >&5 ++echo "${ECHO_T}$AWK" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:2403: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +-test -n "$AWK" && break ++ test -n "$AWK" && break + done + +-# 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:1352: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++for ac_prog in flex lex ++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 "$as_me:2414: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_LEX+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_prog_LEX="flex" +- break +- fi +- done +- IFS="$ac_save_ifs" +- test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_LEX="$ac_prog" ++echo "$as_me:2429: found $ac_dir/$ac_word" >&5 ++break ++done ++ + fi + fi +-LEX="$ac_cv_prog_LEX" ++LEX=$ac_cv_prog_LEX + if test -n "$LEX"; then +- echo "$ac_t""$LEX" 1>&6 ++ echo "$as_me:2437: result: $LEX" >&5 ++echo "${ECHO_T}$LEX" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:2440: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + ++ test -n "$LEX" && break ++done ++test -n "$LEX" || LEX=":" ++ + if test -z "$LEXLIB" + then +- case "$LEX" in +- flex*) ac_lib=fl ;; +- *) ac_lib=l ;; +- esac +- echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 +-echo "configure:1386: 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 +-else +- ac_save_LIBS="$LIBS" +-LIBS="-l$ac_lib $LIBS" +-cat > conftest.$ac_ext <&5 ++echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 ++if test "${ac_cv_lib_fl_yywrap+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lfl $LIBS" ++cat >conftest.$ac_ext <<_ACEOF ++#line 2458 "configure" + #include "confdefs.h" ++ + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char yywrap(); ++ builtin and then its argument prototype would still apply. */ ++char yywrap (); ++int ++main () ++{ ++yywrap (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:2477: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:2480: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:2483: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:2486: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_lib_fl_yywrap=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_lib_fl_yywrap=no ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++echo "$as_me:2497: result: $ac_cv_lib_fl_yywrap" >&5 ++echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 ++if test $ac_cv_lib_fl_yywrap = yes; then ++ LEXLIB="-lfl" ++else ++ echo "$as_me:2502: checking for yywrap in -ll" >&5 ++echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 ++if test "${ac_cv_lib_l_yywrap+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-ll $LIBS" ++cat >conftest.$ac_ext <<_ACEOF ++#line 2510 "configure" ++#include "confdefs.h" + +-int main() { +-yywrap() +-; return 0; } +-EOF +-if { (eval echo configure:1405: \"$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 +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_lib_$ac_lib_var=no" ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char yywrap (); ++int ++main () ++{ ++yywrap (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:2529: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:2532: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:2535: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:2538: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_lib_l_yywrap=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_lib_l_yywrap=no ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++echo "$as_me:2549: result: $ac_cv_lib_l_yywrap" >&5 ++echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 ++if test $ac_cv_lib_l_yywrap = yes; then ++ LEXLIB="-ll" + fi +-rm -f conftest* +-LIBS="$ac_save_LIBS" + + fi +-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- LEXLIB="-l$ac_lib" +-else +- echo "$ac_t""no" 1>&6 ++ + fi + ++if test "x$LEX" != "x:"; then ++ echo "$as_me:2560: checking lex output file root" >&5 ++echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 ++if test "${ac_cv_prog_lex_root+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ # The minimal lex program is just a single line: %%. But some broken lexes ++# (Solaris, I think it was) want two %% lines, so accommodate them. ++echo '%% ++%%' | $LEX ++if test -f lex.yy.c; then ++ ac_cv_prog_lex_root=lex.yy ++elif test -f lexyy.c; then ++ ac_cv_prog_lex_root=lexyy ++else ++ { { echo "$as_me:2574: error: cannot find output from $LEX; giving up" >&5 ++echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++fi ++echo "$as_me:2579: result: $ac_cv_prog_lex_root" >&5 ++echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 ++LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root ++ ++echo "$as_me:2583: checking whether yytext is a pointer" >&5 ++echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 ++if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ # POSIX says lex can declare yytext either as a pointer or an array; the ++# default is implementation-dependent. Figure out which it is, since ++# not all implementations provide the %pointer and %array declarations. ++ac_cv_prog_lex_yytext_pointer=no ++echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ++ac_save_LIBS=$LIBS ++LIBS="$LIBS $LEXLIB" ++cat >conftest.$ac_ext <<_ACEOF ++`cat $LEX_OUTPUT_ROOT.c` ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:2599: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:2602: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:2605: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:2608: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_prog_lex_yytext_pointer=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_save_LIBS ++rm -f "${LEX_OUTPUT_ROOT}.c" ++ ++fi ++echo "$as_me:2620: result: $ac_cv_prog_lex_yytext_pointer" >&5 ++echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 ++if test $ac_cv_prog_lex_yytext_pointer = yes; then ++ ++cat >>confdefs.h <<\EOF ++#define YYTEXT_POINTER 1 ++EOF ++ + fi + +-echo $ac_n "checking whether ln works""... $ac_c" 1>&6 +-echo "configure:1428: checking whether ln works" >&5 +-if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++fi ++echo "$as_me:2631: checking whether ln works" >&5 ++echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 ++if test "${gcc_cv_prog_LN+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + rm -f conftestdata_t + echo >conftestdata_f +@@ -1446,19 +2651,22 @@ + fi + LN="$gcc_cv_prog_LN" + if test "$gcc_cv_prog_LN" = "ln"; then +- echo "$ac_t""yes" 1>&6 ++ echo "$as_me:2654: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 + else + if test "$gcc_cv_prog_LN" = "ln -s"; then +- echo "$ac_t""no, using ln -s" 1>&6 ++ echo "$as_me:2658: result: no, using ln -s" >&5 ++echo "${ECHO_T}no, using ln -s" >&6 + else +- echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 ++ echo "$as_me:2661: result: no, and neither does ln -s, so using cp" >&5 ++echo "${ECHO_T}no, and neither does ln -s, so using cp" >&6 + fi + fi + +-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:1460: checking whether ln -s works" >&5 +-if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:2666: checking whether ln -s works" >&5 ++echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 ++if test "${gcc_cv_prog_LN_S+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + rm -f conftestdata_t + echo >conftestdata_f +@@ -1478,110 +2686,173 @@ + fi + LN_S="$gcc_cv_prog_LN_S" + if test "$gcc_cv_prog_LN_S" = "ln -s"; then +- echo "$ac_t""yes" 1>&6 ++ echo "$as_me:2689: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 + else + if test "$gcc_cv_prog_LN_S" = "ln"; then +- echo "$ac_t""no, using ln" 1>&6 ++ echo "$as_me:2693: result: no, using ln" >&5 ++echo "${ECHO_T}no, using ln" >&6 + else +- echo "$ac_t""no, and neither does ln, so using cp" 1>&6 ++ echo "$as_me:2696: result: no, and neither does ln, so using cp" >&5 ++echo "${ECHO_T}no, and neither does ln, so using cp" >&6 + fi + fi + +-echo $ac_n "checking for volatile""... $ac_c" 1>&6 +-echo "configure:1492: checking for volatile" >&5 +-if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:2701: checking for volatile" >&5 ++echo $ECHO_N "checking for volatile... $ECHO_C" >&6 ++if test "${gcc_cv_c_volatile+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 2707 "configure" + #include "confdefs.h" + +-int main() { ++int ++main () ++{ + volatile int foo; +-; return 0; } +-EOF +-if { (eval echo configure:1504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:2719: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:2722: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:2725: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:2728: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_c_volatile=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- gcc_cv_c_volatile=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++gcc_cv_c_volatile=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi +- +-echo "$ac_t""$gcc_cv_c_volatile" 1>&6 ++echo "$as_me:2738: result: $gcc_cv_c_volatile" >&5 ++echo "${ECHO_T}$gcc_cv_c_volatile" >&6 + if test $gcc_cv_c_volatile = yes ; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_VOLATILE 1 + EOF + + fi + +-# Extract the first word of "ranlib", so it can be a program name with args. +-set dummy ranlib; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1527: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. ++set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ++echo "$as_me:2750: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_RANLIB+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_prog_RANLIB="ranlib" +- break +- fi +- done +- IFS="$ac_save_ifs" +- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ++echo "$as_me:2765: found $ac_dir/$ac_word" >&5 ++break ++done ++ + fi + fi +-RANLIB="$ac_cv_prog_RANLIB" ++RANLIB=$ac_cv_prog_RANLIB + if test -n "$RANLIB"; then +- echo "$ac_t""$RANLIB" 1>&6 ++ echo "$as_me:2773: result: $RANLIB" >&5 ++echo "${ECHO_T}$RANLIB" >&6 ++else ++ echo "$as_me:2776: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++fi ++if test -z "$ac_cv_prog_RANLIB"; then ++ ac_ct_RANLIB=$RANLIB ++ # Extract the first word of "ranlib", so it can be a program name with args. ++set dummy ranlib; ac_word=$2 ++echo "$as_me:2785: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_RANLIB"; then ++ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. ++else ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_ac_ct_RANLIB="ranlib" ++echo "$as_me:2800: found $ac_dir/$ac_word" >&5 ++break ++done ++ ++ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" ++fi ++fi ++ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB ++if test -n "$ac_ct_RANLIB"; then ++ echo "$as_me:2809: result: $ac_ct_RANLIB" >&5 ++echo "${ECHO_T}$ac_ct_RANLIB" >&6 ++else ++ echo "$as_me:2812: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ RANLIB=$ac_ct_RANLIB + else +- echo "$ac_t""no" 1>&6 ++ RANLIB="$ac_cv_prog_RANLIB" + fi + + for ac_prog in 'bison -y' byacc + do +-# Extract the first word of "$ac_prog", so it can be a program name with args. ++ # 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:1559: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:2825: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_YACC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_prog_YACC="$ac_prog" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_YACC="$ac_prog" ++echo "$as_me:2840: found $ac_dir/$ac_word" >&5 ++break ++done ++ + fi + fi +-YACC="$ac_cv_prog_YACC" ++YACC=$ac_cv_prog_YACC + if test -n "$YACC"; then +- echo "$ac_t""$YACC" 1>&6 ++ echo "$as_me:2848: result: $YACC" >&5 ++echo "${ECHO_T}$YACC" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:2851: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +-test -n "$YACC" && break ++ test -n "$YACC" && break + done + test -n "$YACC" || YACC="yacc" + +@@ -1595,11 +2866,11 @@ + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. +-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:1600: checking for a BSD compatible install" >&5 ++echo "$as_me:2869: checking for a BSD compatible install" >&5 ++echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 + if test -z "$INSTALL"; then +-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++if test "${ac_cv_path_install+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do +@@ -1637,7 +2908,8 @@ + INSTALL="$ac_install_sh" + fi + fi +-echo "$ac_t""$INSTALL" 1>&6 ++echo "$as_me:2911: result: $INSTALL" >&5 ++echo "${ECHO_T}$INSTALL" >&6 + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. + # It thinks the first close brace ends the variable substitution. +@@ -1645,127 +2917,257 @@ + + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +- +-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1651: checking how to run the C preprocessor" >&5 ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++echo "$as_me:2925: checking how to run the C preprocessor" >&5 ++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= + fi + if test -z "$CPP"; then +-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++ if test "${ac_cv_prog_CPP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- # This must be in double quotes, not single quotes, because CPP may get +- # substituted into the Makefile and "${CC-cc}" will confuse make. +- CPP="${CC-cc} -E" ++ # Double quotes because CPP needs to be expanded ++ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" ++ do ++ ac_preproc_ok=false ++for ac_c_preproc_warn_flag in '' yes ++do ++ # Use a header file that comes with gcc, so configuring glibc ++ # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, +- # not just through cpp. +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 2946 "configure" + #include "confdefs.h" + #include +-Syntax Error +-EOF +-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1672: \"$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 ++ Syntax error ++_ACEOF ++if { (eval echo "$as_me:2951: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:2957: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then + : + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- 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:1689: \"$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 +- : ++ # Broken: fails on valid input. ++continue ++fi ++rm -f conftest.err conftest.$ac_ext ++ ++ # OK, works on sane cases. Now check whether non-existent headers ++ # can be detected and how. ++ cat >conftest.$ac_ext <<_ACEOF ++#line 2980 "configure" ++#include "confdefs.h" ++#include ++_ACEOF ++if { (eval echo "$as_me:2984: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:2990: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ # Broken: success on invalid input. ++continue + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- CPP="${CC-cc} -nologo -E" +- cat > conftest.$ac_ext <&5 ++echo "${ECHO_T}$CPP" >&6 ++ac_preproc_ok=false ++for ac_c_preproc_warn_flag in '' yes ++do ++ # Use a header file that comes with gcc, so configuring glibc ++ # with a fresh cross-compiler works. ++ # On the NeXT, cc -E runs the code through the compiler's parser, ++ # not just through cpp. "Syntax error" is here to catch this case. ++ cat >conftest.$ac_ext <<_ACEOF ++#line 3037 "configure" + #include "confdefs.h" + #include +-Syntax Error +-EOF +-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1706: \"$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 ++ Syntax error ++_ACEOF ++if { (eval echo "$as_me:3042: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:3048: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then + : + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- CPP=/lib/cpp ++ # Broken: fails on valid input. ++continue + fi +-rm -f conftest* +-fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext ++ ++ # OK, works on sane cases. Now check whether non-existent headers ++ # can be detected and how. ++ cat >conftest.$ac_ext <<_ACEOF ++#line 3071 "configure" ++#include "confdefs.h" ++#include ++_ACEOF ++if { (eval echo "$as_me:3075: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:3081: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes + fi +-rm -f conftest* +- ac_cv_prog_CPP="$CPP" ++if test -z "$ac_cpp_err"; then ++ # Broken: success on invalid input. ++continue ++else ++ echo "$as_me: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ # Passes both tests. ++ac_preproc_ok=: ++break + fi +- CPP="$ac_cv_prog_CPP" ++rm -f conftest.err conftest.$ac_ext ++ ++done ++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. ++rm -f conftest.err conftest.$ac_ext ++if $ac_preproc_ok; then ++ : + else +- ac_cv_prog_CPP="$CPP" ++ { { echo "$as_me:3109: error: C preprocessor \"$CPP\" fails sanity check" >&5 ++echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} ++ { (exit 1); exit 1; }; } + fi +-echo "$ac_t""$CPP" 1>&6 + +-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:1731: 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 ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++echo "$as_me:3120: checking for ANSI C header files" >&5 ++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 ++if test "${ac_cv_header_stdc+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3126 "configure" + #include "confdefs.h" + #include + #include + #include + #include +-EOF +-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1744: \"$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* ++ ++_ACEOF ++if { (eval echo "$as_me:3134: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:3140: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* + ac_cv_header_stdc=no + fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +-cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3162 "configure" + #include "confdefs.h" + #include +-EOF ++ ++_ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : + else +- rm -rf conftest* + ac_cv_header_stdc=no + fi + rm -f conftest* +@@ -1774,16 +3176,16 @@ + + 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 <conftest.$ac_ext <<_ACEOF ++#line 3180 "configure" + #include "confdefs.h" + #include +-EOF ++ ++_ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : + else +- rm -rf conftest* + ac_cv_header_stdc=no + fi + rm -f conftest* +@@ -1792,329 +3194,436 @@ + + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +-if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then + : + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3201 "configure" + #include "confdefs.h" + #include +-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +-int main () { int i; for (i = 0; i < 256; i++) +-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +-exit (0); } ++#if ((' ' & 0x0FF) == 0x020) ++# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ++# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ++#else ++# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ ++ || ('j' <= (c) && (c) <= 'r') \ ++ || ('s' <= (c) && (c) <= 'z')) ++# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) ++#endif + +-EOF +-if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +-then ++#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ++int ++main () ++{ ++ int i; ++ for (i = 0; i < 256; i++) ++ if (XOR (islower (i), ISLOWER (i)) ++ || toupper (i) != TOUPPER (i)) ++ exit(2); ++ exit (0); ++} ++_ACEOF ++rm -f conftest$ac_exeext ++if { (eval echo "$as_me:3227: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:3230: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ { (eval echo "$as_me:3232: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3235: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + : + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -fr conftest* +- ac_cv_header_stdc=no ++ echo "$as_me: program exited with status $ac_status" >&5 ++echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_header_stdc=no + fi +-rm -fr conftest* ++rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi +- + fi + fi +- +-echo "$ac_t""$ac_cv_header_stdc" 1>&6 ++echo "$as_me:3248: result: $ac_cv_header_stdc" >&5 ++echo "${ECHO_T}$ac_cv_header_stdc" >&6 + if test $ac_cv_header_stdc = yes; then +- cat >> confdefs.h <<\EOF ++ ++cat >>confdefs.h <<\EOF + #define STDC_HEADERS 1 + EOF + + fi + +-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +-echo "configure:1835: checking whether time.h and sys/time.h may both be included" >&5 +-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:3258: checking whether time.h and sys/time.h may both be included" >&5 ++echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 ++if test "${ac_cv_header_time+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3264 "configure" + #include "confdefs.h" + #include + #include + #include +-int main() { +-struct tm *tp; +-; return 0; } +-EOF +-if { (eval echo configure:1849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ++int ++main () ++{ ++if ((struct tm *) 0) ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:3280: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:3283: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:3286: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3289: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_header_time=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- ac_cv_header_time=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_header_time=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi +- +-echo "$ac_t""$ac_cv_header_time" 1>&6 ++echo "$as_me:3299: result: $ac_cv_header_time" >&5 ++echo "${ECHO_T}$ac_cv_header_time" >&6 + if test $ac_cv_header_time = yes; then +- cat >> confdefs.h <<\EOF ++ ++cat >>confdefs.h <<\EOF + #define TIME_WITH_SYS_TIME 1 + EOF + + fi + +-echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 +-echo "configure:1870: checking whether string.h and strings.h may both be included" >&5 +-if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:3309: checking whether string.h and strings.h may both be included" >&5 ++echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 ++if test "${gcc_cv_header_string+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3315 "configure" + #include "confdefs.h" + #include + #include +-int main() { ++int ++main () ++{ + +-; return 0; } +-EOF +-if { (eval echo configure:1883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:3328: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:3331: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:3334: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3337: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_header_string=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- gcc_cv_header_string=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++gcc_cv_header_string=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi +- +-echo "$ac_t""$gcc_cv_header_string" 1>&6 ++echo "$as_me:3347: result: $gcc_cv_header_string" >&5 ++echo "${ECHO_T}$gcc_cv_header_string" >&6 + if test $gcc_cv_header_string = yes; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define STRING_WITH_STRINGS 1 + EOF + + fi + +-echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +-echo "configure:1904: checking for sys/wait.h that is POSIX.1 compatible" >&5 +-if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:3356: checking for sys/wait.h that is POSIX.1 compatible" >&5 ++echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 ++if test "${ac_cv_header_sys_wait_h+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3362 "configure" + #include "confdefs.h" + #include + #include + #ifndef WEXITSTATUS +-#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) ++# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) + #endif + #ifndef WIFEXITED +-#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) ++# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) + #endif +-int main() { +-int s; +-wait (&s); +-s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +-; return 0; } +-EOF +-if { (eval echo configure:1925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ++int ++main () ++{ ++ int s; ++ wait (&s); ++ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:3384: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:3387: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:3390: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3393: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_header_sys_wait_h=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- ac_cv_header_sys_wait_h=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_header_sys_wait_h=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi +- +-echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 ++echo "$as_me:3403: result: $ac_cv_header_sys_wait_h" >&5 ++echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 + if test $ac_cv_header_sys_wait_h = yes; then +- cat >> confdefs.h <<\EOF ++ ++cat >>confdefs.h <<\EOF + #define HAVE_SYS_WAIT_H 1 + EOF + + fi + +-for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h sys/stat.h direct.h ++for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h sys/stat.h direct.h + do +-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1949: 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:1959: \"$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* +- eval "ac_cv_header_$ac_safe=yes" ++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ++echo "$as_me:3416: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++#line 3422 "configure" ++#include "confdefs.h" ++#include <$ac_header> ++_ACEOF ++if { (eval echo "$as_me:3426: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:3432: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ eval "$as_ac_Header=yes" + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" ++ eval "$as_ac_Header=no" + fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext + fi +-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +- cat >> confdefs.h <&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ cat >>confdefs.h <&6 ++ + fi + done + +- + # Check for thread headers. +-ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` +-echo $ac_n "checking for thread.h""... $ac_c" 1>&6 +-echo "configure:1989: checking for thread.h" >&5 +-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:3462: checking for thread.h" >&5 ++echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 ++if test "${ac_cv_header_thread_h+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3468 "configure" + #include "confdefs.h" + #include +-EOF +-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1999: \"$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* +- eval "ac_cv_header_$ac_safe=yes" ++_ACEOF ++if { (eval echo "$as_me:3472: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:3478: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ ac_cv_header_thread_h=yes + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" ++ ac_cv_header_thread_h=no + fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext + fi +-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +- echo "$ac_t""yes" 1>&6 ++echo "$as_me:3497: result: $ac_cv_header_thread_h" >&5 ++echo "${ECHO_T}$ac_cv_header_thread_h" >&6 ++if test $ac_cv_header_thread_h = yes; then + have_thread_h=yes + else +- echo "$ac_t""no" 1>&6 +-have_thread_h= ++ have_thread_h= + fi + +-ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` +-echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 +-echo "configure:2023: checking for pthread.h" >&5 +-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:3505: checking for pthread.h" >&5 ++echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 ++if test "${ac_cv_header_pthread_h+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3511 "configure" + #include "confdefs.h" + #include +-EOF +-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2033: \"$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* +- eval "ac_cv_header_$ac_safe=yes" ++_ACEOF ++if { (eval echo "$as_me:3515: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:3521: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ ac_cv_header_pthread_h=yes + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" ++ ac_cv_header_pthread_h=no + fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext + fi +-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +- echo "$ac_t""yes" 1>&6 ++echo "$as_me:3540: result: $ac_cv_header_pthread_h" >&5 ++echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 ++if test $ac_cv_header_pthread_h = yes; then + have_pthread_h=yes + else +- echo "$ac_t""no" 1>&6 +-have_pthread_h= ++ have_pthread_h= + fi + +- + # See if GNAT has been installed + # Extract the first word of "gnatbind", so it can be a program name with args. + set dummy gnatbind; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2060: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:3551: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_gnat+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$gnat"; then + ac_cv_prog_gnat="$gnat" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_prog_gnat="yes" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ $as_executable_p "$ac_dir/$ac_word" || continue ++ac_cv_prog_gnat="yes" ++echo "$as_me:3566: found $ac_dir/$ac_word" >&5 ++break ++done ++ + test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no" + fi + fi +-gnat="$ac_cv_prog_gnat" ++gnat=$ac_cv_prog_gnat + if test -n "$gnat"; then +- echo "$ac_t""$gnat" 1>&6 ++ echo "$as_me:3575: result: $gnat" >&5 ++echo "${ECHO_T}$gnat" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:3578: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +- + # See if the system preprocessor understands the ANSI C preprocessor + # stringification operator. +-echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6 +-echo "configure:2091: checking whether cpp understands the stringify operator" >&5 +-if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:3584: checking whether cpp understands the stringify operator" >&5 ++echo $ECHO_N "checking whether cpp understands the stringify operator... $ECHO_C" >&6 ++if test "${gcc_cv_c_have_stringify+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3590 "configure" + #include "confdefs.h" + +-int main() { ++int ++main () ++{ + #define S(x) #x + char *test = S(foo); +-; return 0; } +-EOF +-if { (eval echo configure:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:3603: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:3606: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:3609: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3612: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_c_have_stringify=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- gcc_cv_c_have_stringify=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++gcc_cv_c_have_stringify=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi + +-echo "$ac_t""$gcc_cv_c_have_stringify" 1>&6 ++echo "$as_me:3623: result: $gcc_cv_c_have_stringify" >&5 ++echo "${ECHO_T}$gcc_cv_c_have_stringify" >&6 + if test $gcc_cv_c_have_stringify = yes; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_CPP_STRINGIFY 1 + EOF + +@@ -2122,35 +3631,49 @@ + + # Use only if it exists, + # doesn't clash with , and declares intmax_t. +-echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 +-echo "configure:2127: checking for inttypes.h" >&5 +-if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:3634: checking for inttypes.h" >&5 ++echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 ++if test "${gcc_cv_header_inttypes_h+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3640 "configure" + #include "confdefs.h" + #include + #include +-int main() { ++int ++main () ++{ + intmax_t i = -1; +-; return 0; } +-EOF +-if { (eval echo configure:2140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:3653: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:3656: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:3659: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3662: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_header_inttypes_h=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- gcc_cv_header_inttypes_h=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++gcc_cv_header_inttypes_h=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi + +-echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 ++echo "$as_me:3673: result: $gcc_cv_header_inttypes_h" >&5 ++echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 + if test $gcc_cv_header_inttypes_h = yes; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_INTTYPES_H 1 + EOF + +@@ -2161,167 +3684,210 @@ + sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \ + fputs_unlocked + do +-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2166: 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 ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++echo "$as_me:3688: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3694 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func(); below. */ ++ which can conflict with char $ac_func (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char $ac_func(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else +-$ac_func(); ++f = $ac_func; + #endif + +-; return 0; } ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:3725: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:3728: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:3731: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3734: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "$as_ac_var=no" ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:3744: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=no" +-fi +-rm -f conftest* +-fi + +-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +- cat >> confdefs.h <&6 + fi + done + +- + # Make sure wchar_t is available + #AC_CHECK_TYPE(wchar_t, unsigned int) + +-echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +-echo "configure:2223: checking for vprintf" >&5 +-if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++for ac_func in vprintf ++do ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++echo "$as_me:3760: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3766 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char vprintf(); below. */ ++ which can conflict with char $ac_func (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char vprintf(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_vprintf) || defined (__stub___vprintf) ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else +-vprintf(); ++f = $ac_func; + #endif + +-; return 0; } +-EOF +-if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_func_vprintf=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func_vprintf=no" +-fi +-rm -f conftest* +-fi +- +-if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- cat >> confdefs.h <<\EOF +-#define HAVE_VPRINTF 1 +-EOF +- +-else +- echo "$ac_t""no" 1>&6 +-fi +- +-if test "$ac_cv_func_vprintf" != yes; then +-echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +-echo "configure:2275: checking for _doprnt" >&5 +-if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:3797: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:3800: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:3803: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3806: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "$as_ac_var=no" ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:3816: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <&5 ++echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 ++if test "${ac_cv_func__doprnt+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3829 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char _doprnt(); below. */ ++ which can conflict with char _doprnt (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char _doprnt(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char _doprnt (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub__doprnt) || defined (__stub____doprnt) + choke me + #else +-_doprnt(); ++f = _doprnt; + #endif + +-; return 0; } +-EOF +-if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_func__doprnt=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func__doprnt=no" +-fi +-rm -f conftest* +-fi ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:3860: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:3863: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:3866: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3869: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_func__doprnt=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_func__doprnt=no ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:3879: result: $ac_cv_func__doprnt" >&5 ++echo "${ECHO_T}$ac_cv_func__doprnt" >&6 ++if test $ac_cv_func__doprnt = yes; then + +-if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- cat >> confdefs.h <<\EOF ++cat >>confdefs.h <<\EOF + #define HAVE_DOPRNT 1 + EOF + +-else +- echo "$ac_t""no" 1>&6 + fi + + fi ++done + + vfprintf= + doprint= +@@ -2332,18 +3898,16 @@ + fi + fi + +- +- +-echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 +-echo "configure:2339: checking whether the printf functions support %p" >&5 +-if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:3901: checking whether the printf functions support %p" >&5 ++echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6 ++if test "${gcc_cv_func_printf_ptr+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test "$cross_compiling" = yes; then + gcc_cv_func_printf_ptr=no + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 3910 "configure" + #include "confdefs.h" + #include + +@@ -2355,186 +3919,360 @@ + sscanf(buf, "%p", &q); + exit (p != q); + } +-EOF +-if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +-then ++_ACEOF ++rm -f conftest$ac_exeext ++if { (eval echo "$as_me:3924: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:3927: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ { (eval echo "$as_me:3929: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3932: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_func_printf_ptr=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -fr conftest* +- gcc_cv_func_printf_ptr=no ++ echo "$as_me: program exited with status $ac_status" >&5 ++echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++gcc_cv_func_printf_ptr=no + fi +-rm -fr conftest* ++rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi +- + rm -f core core.* *.core + fi +- +-echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 ++echo "$as_me:3945: result: $gcc_cv_func_printf_ptr" >&5 ++echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6 + if test $gcc_cv_func_printf_ptr = yes ; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_PRINTF_PTR 1 + EOF + + fi + +- + case "${host}" in + *-*-uwin*) +- { echo "configure: error: ++ { { echo "$as_me:3956: error: ++*** UWIN may not be used as a host platform because ++*** linking with posix.dll is not allowed by the GNU GPL" >&5 ++echo "$as_me: error: + *** UWIN may not be used as a host platform because +-*** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } ++*** linking with posix.dll is not allowed by the GNU GPL" >&2;} ++ { (exit 1); exit 1; }; } + ;; + esac +-echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +-echo "configure:2392: checking for pid_t" >&5 +-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++# On IRIX 5.3, sys/types and inttypes.h are conflicting. ++ ++for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ ++ inttypes.h stdint.h unistd.h ++do ++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ++echo "$as_me:3971: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++#line 3977 "configure" ++#include "confdefs.h" ++$ac_includes_default ++#include <$ac_header> ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:3983: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:3986: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:3989: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:3992: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_Header=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "$as_ac_Header=no" ++fi ++rm -f conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:4002: result: `eval echo '${'$as_ac_Header'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ cat >>confdefs.h <&5 ++echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 ++if test "${ac_cv_type_pid_t+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 4018 "configure" + #include "confdefs.h" +-#include +-#if STDC_HEADERS +-#include +-#include +-#endif +-EOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then +- rm -rf conftest* ++$ac_includes_default ++int ++main () ++{ ++if ((pid_t *) 0) ++ return 0; ++if (sizeof (pid_t)) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:4033: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:4036: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:4039: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:4042: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_type_pid_t=yes + else +- rm -rf conftest* +- ac_cv_type_pid_t=no +-fi +-rm -f conftest* ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_type_pid_t=no ++fi ++rm -f conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:4052: result: $ac_cv_type_pid_t" >&5 ++echo "${ECHO_T}$ac_cv_type_pid_t" >&6 ++if test $ac_cv_type_pid_t = yes; then ++ : ++else + +-fi +-echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +-if test $ac_cv_type_pid_t = no; then +- cat >> confdefs.h <<\EOF ++cat >>confdefs.h <&6 +-echo "configure:2426: checking for vfork.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:2436: \"$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* +- eval "ac_cv_header_$ac_safe=yes" ++for ac_header in unistd.h vfork.h ++do ++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ++echo "$as_me:4067: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++#line 4073 "configure" ++#include "confdefs.h" ++#include <$ac_header> ++_ACEOF ++if { (eval echo "$as_me:4077: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:4083: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ eval "$as_ac_Header=yes" + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" ++ eval "$as_ac_Header=no" + fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext + fi +-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- cat >> confdefs.h <<\EOF +-#define HAVE_VFORK_H 1 ++echo "$as_me:4102: result: `eval echo '${'$as_ac_Header'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ cat >>confdefs.h <&6 + fi ++done + +-echo $ac_n "checking for working vfork""... $ac_c" 1>&6 +-echo "configure:2461: checking for working vfork" >&5 +-if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 +-else +- if test "$cross_compiling" = yes; then +- echo $ac_n "checking for vfork""... $ac_c" 1>&6 +-echo "configure:2467: checking for vfork" >&5 +-if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++for ac_func in fork vfork ++do ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++echo "$as_me:4115: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 4121 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char vfork(); below. */ ++ which can conflict with char $ac_func (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char vfork(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_vfork) || defined (__stub___vfork) ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else +-vfork(); ++f = $ac_func; + #endif + +-; return 0; } ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:4152: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:4155: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:4158: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:4161: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "$as_ac_var=no" ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:4171: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_func_vfork=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func_vfork=no" +-fi +-rm -f conftest* ++ + fi ++done + +-if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- : ++ac_cv_func_fork_works=$ac_cv_func_fork ++if test "x$ac_cv_func_fork" = xyes; then ++ echo "$as_me:4183: checking for working fork" >&5 ++echo $ECHO_N "checking for working fork... $ECHO_C" >&6 ++if test "${ac_cv_func_fork_works+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- echo "$ac_t""no" 1>&6 ++ if test "$cross_compiling" = yes; then ++ ac_cv_func_fork_works=cross ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* By Rüdiger Kuhlmann. */ ++ #include ++ #if HAVE_UNISTD_H ++ # include ++ #endif ++ /* Some systems only have a dummy stub for fork() */ ++ int main () ++ { ++ if (fork() < 0) ++ exit (1); ++ exit (0); ++ } ++_ACEOF ++rm -f conftest$ac_exeext ++if { (eval echo "$as_me:4206: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:4209: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ { (eval echo "$as_me:4211: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:4214: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_func_fork_works=yes ++else ++ echo "$as_me: program exited with status $ac_status" >&5 ++echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_func_fork_works=no ++fi ++rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++fi ++fi ++echo "$as_me:4226: result: $ac_cv_func_fork_works" >&5 ++echo "${ECHO_T}$ac_cv_func_fork_works" >&6 ++ ++fi ++if test "x$ac_cv_func_fork_works" = xcross; then ++ case $host in ++ *-*-amigaos* | *-*-msdosdjgpp*) ++ # Override, as these systems have only a dummy fork() stub ++ ac_cv_func_fork_works=no ++ ;; ++ *) ++ ac_cv_func_fork_works=yes ++ ;; ++ esac ++ { echo "$as_me:4240: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5 ++echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;} + fi +- + ac_cv_func_vfork_works=$ac_cv_func_vfork ++if test "x$ac_cv_func_vfork" = xyes; then ++ echo "$as_me:4245: checking for working vfork" >&5 ++echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 ++if test "${ac_cv_func_vfork_works+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test "$cross_compiling" = yes; then ++ ac_cv_func_vfork_works=cross + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 4254 "configure" + #include "confdefs.h" + /* Thanks to Paul Eggert for this test. */ + #include + #include + #include +-#ifdef HAVE_UNISTD_H +-#include ++#if HAVE_UNISTD_H ++# include + #endif +-#ifdef HAVE_VFORK_H +-#include ++#if HAVE_VFORK_H ++# include + #endif + /* On some sparc systems, changes by the child to local and incoming +- argument registers are propagated back to the parent. +- The compiler is told about this with #include , +- but some compilers (e.g. gcc -O) don't grok . +- Test for this by using a static variable whose address +- is put into a register that is clobbered by the vfork. */ ++ argument registers are propagated back to the parent. The compiler ++ is told about this with #include , but some compilers ++ (e.g. gcc -O) don't grok . Test for this by using a ++ static variable whose address is put into a register that is ++ clobbered by the vfork. */ + static + #ifdef __cplusplus + sparc_address_test (int arg) +-#else ++# else + sparc_address_test (arg) int arg; + #endif + { +@@ -2552,25 +4290,33 @@ + } + } + } +-main() { ++ ++int ++main () ++{ + pid_t parent = getpid (); + pid_t child; + + sparc_address_test (); + ++#ifdef __amigaos__ ++ /* FIXME: Force this test to succeed for AmigaOS, which has a fairly good ++ vfork() emulation, but doesn't support fork() at all. -fnf */ ++ exit (0); ++#endif ++ + child = vfork (); + + if (child == 0) { +- /* Here is another test for sparc vfork register problems. +- This test uses lots of local variables, at least +- as many local variables as main has allocated so far +- including compiler temporaries. 4 locals are enough for +- gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. +- A buggy compiler should reuse the register of parent +- for one of the local variables, since it will think that +- parent can't possibly be used any more in this routine. +- Assigning to the local variable will thus munge parent +- in the parent process. */ ++ /* Here is another test for sparc vfork register problems. This ++ test uses lots of local variables, at least as many local ++ variables as main has allocated so far including compiler ++ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris ++ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should ++ reuse the register of parent for one of the local variables, ++ since it will think that parent can't possibly be used any more ++ in this routine. Assigning to the local variable will thus ++ munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); +@@ -2580,11 +4326,10 @@ + || p != p5 || p != p6 || p != p7) + _exit(1); + +- /* On some systems (e.g. IRIX 3.3), +- vfork doesn't separate parent from child file descriptors. +- If the child closes a descriptor before it execs or exits, +- this munges the parent's descriptor as well. +- Test for this by closing stdout in the child. */ ++ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent ++ from child file descriptors. If the child closes a descriptor ++ before it execs or exits, this munges the parent's descriptor ++ as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; +@@ -2607,41 +4352,70 @@ + ); + } + } +-EOF +-if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +-then ++_ACEOF ++rm -f conftest$ac_exeext ++if { (eval echo "$as_me:4357: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:4360: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ { (eval echo "$as_me:4362: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:4365: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_func_vfork_works=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -fr conftest* +- ac_cv_func_vfork_works=no ++ echo "$as_me: program exited with status $ac_status" >&5 ++echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_func_vfork_works=no ++fi ++rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi +-rm -fr conftest* + fi ++echo "$as_me:4377: result: $ac_cv_func_vfork_works" >&5 ++echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 + ++fi; ++if test "x$ac_cv_func_fork_works" = xcross; then ++ ac_cv_func_vfork_works=ac_cv_func_vfork ++ { echo "$as_me:4383: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5 ++echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;} + fi + +-echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 +-if test $ac_cv_func_vfork_works = no; then +- cat >> confdefs.h <<\EOF ++if test "x$ac_cv_func_vfork_works" = xyes; then ++ ++cat >>confdefs.h <<\EOF ++#define HAVE_WORKING_VFORK 1 ++EOF ++ ++else ++ ++cat >>confdefs.h <<\EOF + #define vfork fork + EOF + + fi ++if test "x$ac_cv_func_fork_works" = xyes; then ++ ++cat >>confdefs.h <<\EOF ++#define HAVE_WORKING_FORK 1 ++EOF + ++fi + + for ac_func in malloc realloc calloc free bcopy bzero bcmp \ + index rindex getenv atol sbrk abort atof strerror getcwd getwd \ + strsignal putc_unlocked fputs_unlocked strstr + do +-echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6 +-echo "configure:2640: checking whether $ac_func must be declared" >&5 +-if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:4412: checking whether $ac_func must be declared" >&5 ++echo $ECHO_N "checking whether $ac_func must be declared... $ECHO_C" >&6 ++if eval "test \"\${gcc_cv_decl_needed_$ac_func+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 4418 "configure" + #include "confdefs.h" + + #include +@@ -2670,45 +4444,59 @@ + #define index strchr + #endif + +-int main() { ++int ++main () ++{ + char *(*pfn) = (char *(*)) $ac_func +-; return 0; } +-EOF +-if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:4456: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:4459: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:4462: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:4465: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + eval "gcc_cv_decl_needed_$ac_func=no" + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "gcc_cv_decl_needed_$ac_func=yes" ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "gcc_cv_decl_needed_$ac_func=yes" + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi + + if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then +- echo "$ac_t""yes" 1>&6 ++ echo "$as_me:4477: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 + gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +- cat >> confdefs.h <>confdefs.h <&6 ++ echo "$as_me:4485: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + + done + +- + for ac_func in getrlimit setrlimit + do +-echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6 +-echo "configure:2707: checking whether $ac_func must be declared" >&5 +-if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:4493: checking whether $ac_func must be declared" >&5 ++echo $ECHO_N "checking whether $ac_func must be declared... $ECHO_C" >&6 ++if eval "test \"\${gcc_cv_decl_needed_$ac_func+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 4499 "configure" + #include "confdefs.h" + + #include +@@ -2741,83 +4529,111 @@ + #include + #endif + +-int main() { ++int ++main () ++{ + char *(*pfn) = (char *(*)) $ac_func +-; return 0; } +-EOF +-if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:4541: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:4544: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:4547: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:4550: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + eval "gcc_cv_decl_needed_$ac_func=no" + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "gcc_cv_decl_needed_$ac_func=yes" ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "gcc_cv_decl_needed_$ac_func=yes" + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi + + if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then +- echo "$ac_t""yes" 1>&6 ++ echo "$as_me:4562: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 + gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +- cat >> confdefs.h <>confdefs.h <&6 ++ echo "$as_me:4570: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + + done + +- +-echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 +-echo "configure:2776: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +-if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:4576: checking for sys_siglist declaration in signal.h or unistd.h" >&5 ++echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6 ++if test "${ac_cv_decl_sys_siglist+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 4582 "configure" + #include "confdefs.h" + #include + #include + /* NetBSD declares sys_siglist in unistd.h. */ +-#ifdef HAVE_UNISTD_H +-#include ++#if HAVE_UNISTD_H ++# include + #endif +-int main() { ++ ++int ++main () ++{ + char *msg = *(sys_siglist + 1); +-; return 0; } +-EOF +-if { (eval echo configure:2793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:4600: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:4603: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:4606: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:4609: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_decl_sys_siglist=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- ac_cv_decl_sys_siglist=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_decl_sys_siglist=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi +- +-echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6 ++echo "$as_me:4619: result: $ac_cv_decl_sys_siglist" >&5 ++echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6 + if test $ac_cv_decl_sys_siglist = yes; then +- cat >> confdefs.h <<\EOF ++ ++cat >>confdefs.h <<\EOF + #define SYS_SIGLIST_DECLARED 1 + EOF + + fi + +- +-# mkdir takes a single argument on some systems. +-echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 +-echo "configure:2816: checking if mkdir takes one argument" >&5 +-if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++# mkdir takes a single argument on some systems. ++echo "$as_me:4630: checking if mkdir takes one argument" >&5 ++echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 ++if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 4636 "configure" + #include "confdefs.h" + + #include +@@ -2830,37 +4646,47 @@ + #ifdef HAVE_DIRECT_H + # include + #endif +-int main() { ++int ++main () ++{ + mkdir ("foo", 0); +-; return 0; } +-EOF +-if { (eval echo configure:2838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:4658: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:4661: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:4664: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:4667: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_mkdir_takes_one_arg=no + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- gcc_cv_mkdir_takes_one_arg=yes ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++gcc_cv_mkdir_takes_one_arg=yes + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi +- +-echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 ++echo "$as_me:4677: result: $gcc_cv_mkdir_takes_one_arg" >&5 ++echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 + if test $gcc_cv_mkdir_takes_one_arg = yes ; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define MKDIR_TAKES_ONE_ARG 1 + EOF + + fi + +- + # File extensions + manext='.1' + objext='.o' + +- +- + build_xm_file= + build_xm_defines= + build_install_headers_dir=install-headers-tar +@@ -2926,7 +4752,7 @@ + c*-convex-*) + cpu_type=convex + ;; +- i[34567]86-*-*) ++ i[34567]86*-*-*) + cpu_type=i386 + ;; + hppa*-*-*) +@@ -2951,7 +4777,7 @@ + + tm_file=${cpu_type}/${cpu_type}.h + xm_file=${cpu_type}/xm-${cpu_type}.h +- ++ + # Common parts for linux-gnu and openbsd systems + case $machine in + *-*-linux-gnu*) +@@ -2960,7 +4786,7 @@ + *-*-openbsd*) + tm_file=${cpu_type}/openbsd.h + tmake_file="t-libc-ok t-openbsd" +- # avoid surprises, always provide an xm-openbsd file ++ # avoid surprises, always provide an xm-openbsd file + xm_file=${cpu_type}/xm-openbsd.h + # don't depend on processor x-fragments as well + xmake_file=none +@@ -3073,7 +4899,7 @@ + target_cpu_default="MASK_GAS" + tmake_file="alpha/t-ieee" + ;; +- ++ + alpha*-dec-osf*) + if test x$stabs = xyes + then +@@ -3108,7 +4934,7 @@ + alpha*-*-vxworks*) + tm_file="${tm_file} dbx.h alpha/vxworks.h" + tmake_file="alpha/t-ieee" +- if x$gas != xyes ++ if x$gas != xyes + then + extra_passes="mips-tfile mips-tdump" + fi +@@ -3226,7 +5052,7 @@ + arm*-*-ecos-elf) + tm_file=arm/ecos-elf.h + tmake_file=arm/t-elf +- ;; ++ ;; + arm*-*-elf) + tm_file=arm/unknown-elf.h + tmake_file=arm/t-arm-elf +@@ -3252,7 +5078,7 @@ + use_collect2=yes + ;; + c38-convex-*) +- target_cpu_default=16 ++ target_cpu_default=16 + use_collect2=yes + ;; + c4x-*) +@@ -3621,8 +5447,8 @@ + ;; + i[34567]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux + # GNU/Linux C library 5 +- xmake_file=x-linux +- tm_file=i386/linux.h ++ xmake_file=x-linux ++ tm_file=i386/linux.h + tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + gnu_ld=yes +@@ -3631,6 +5457,23 @@ + thread_file='single' + fi + ;; ++ i[34567]86be-*-amithlon*) # Intel 80386's running AMIthlon/AmigaOS ++ out_file=i386/i386.c ++ md_file=i386/i386be.md ++ xm_file=i386/xm-amithlon.h ++ tm_file=i386/amithlon.h ++ tmake_file="i386/t-amithlon i386/t-crtstuff" ++# xmake_file=i386/x-amithlon ++# extra_objs=amigaos.o ++ gnu_ld=yes ++# tmake_file="t-linux i386/t-crtstuff" ++ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" ++ gnu_ld=yes ++ float_format=i386 ++# if test x$enable_threads = xyes; then ++# thread_file='posix' ++# fi ++ ;; + i[34567]86-*-linux-gnu*) # Intel 80386's running GNU/Linux + # aka GNU/Linux C library 6 + xmake_file=x-linux +@@ -4347,6 +6190,14 @@ + extra_headers=math-68881.h + float_format=m68k + ;; ++ m68k-*-amigaos*) ++ xm_file=m68k/xm-amigaos.h ++ tm_file=m68k/amigaos.h ++ tmake_file=m68k/t-amigaos ++ xmake_file=m68k/x-amigaos ++ extra_objs=amigaos.o ++ gnu_ld=yes ++ ;; + m68k-*-coff*) + tmake_file=m68k/t-m68kbare + tm_file="m68k/m68k-coff.h dbx.h libgloss.h" +@@ -5079,6 +6930,16 @@ + tmake_file=rs6000/t-beos + xmake_file=rs6000/x-beos + ;; ++ powerpc-*-morphos*) ++ cpu_type=rs6000 ++ xm_file=rs6000/xm-morphos.h ++ tm_file=rs6000/morphos.h ++ tmake_file=rs6000/t-morphos ++ xmake_file=rs6000/x-morphos ++ extra_objs=morphos.o ++ broken_install=cp ++ install_headers_dir=install-headers-cp ++ ;; + powerpc-*-sysv* | powerpc-*-elf*) + tm_file=rs6000/sysv4.h + xm_file="xm-siglist.h rs6000/xm-sysv4.h" +@@ -5642,10 +7503,10 @@ + # Process --with-cpu= for PowerPC/rs6000 + target_cpu_default2= + case $machine in +- i486-*-*) ++ i486*-*-*) + target_cpu_default2=1 + ;; +- i586-*-*) ++ i586*-*-*) + case $target_alias in + k6-*) + target_cpu_default2=4 +@@ -5655,7 +7516,7 @@ + ;; + esac + ;; +- i686-*-* | i786-*-*) ++ i686*-*-* | i786*-*-*) + target_cpu_default2=3 + ;; + alpha*-*-*) +@@ -5673,7 +7534,7 @@ + target_cpu_default2="MASK_CPU_EV5" + ;; + esac +- ++ + if test x$gas = xyes + then + if test "$target_cpu_default2" = "" +@@ -5941,7 +7802,7 @@ + host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h" + + # If host=build, it is correct to have hconfig include auto-host.h +-# as well. If host!=build, we are in error and need to do more ++# as well. If host!=build, we are in error and need to do more + # work to find out the build config parameters. + if test x$host = x$build + then +@@ -5950,7 +7811,7 @@ + # We create a subdir, then run autoconf in the subdir. + # To prevent recursion we set host and build for the new + # invocation of configure to the build for this invocation +- # of configure. ++ # of configure. + tempdir=build.$$ + rm -rf $tempdir + mkdir $tempdir +@@ -6037,248 +7898,413 @@ + # Internationalization + PACKAGE=gcc + VERSION="$gcc_version" +-cat >> confdefs.h <>confdefs.h <> confdefs.h <>confdefs.h <&6 +-echo "configure:6066: checking for strerror in -lcposix" >&5 +-ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` +-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++ echo "$as_me:7920: checking for strerror in -lcposix" >&5 ++echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 ++if test "${ac_cv_lib_cposix_strerror+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_save_LIBS="$LIBS" ++ ac_check_lib_save_LIBS=$LIBS + LIBS="-lcposix $LIBS" +-cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 7928 "configure" + #include "confdefs.h" ++ + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char strerror(); ++ builtin and then its argument prototype would still apply. */ ++char strerror (); ++int ++main () ++{ ++strerror (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:7947: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:7950: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:7953: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:7956: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_lib_cposix_strerror=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_lib_cposix_strerror=no ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++echo "$as_me:7967: result: $ac_cv_lib_cposix_strerror" >&5 ++echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 ++if test $ac_cv_lib_cposix_strerror = yes; then ++ LIBS="$LIBS -lcposix" ++fi + +-int main() { +-strerror() +-; return 0; } +-EOF +-if { (eval echo configure:6085: \"$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" ++echo "$as_me:7973: checking for $CC option to accept ANSI C" >&5 ++echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 ++if test "${ac_cv_prog_cc_stdc+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_cv_prog_cc_stdc=no ++ac_save_CC=$CC ++cat >conftest.$ac_ext <<_ACEOF ++#line 7981 "configure" ++#include "confdefs.h" ++#include ++#include ++#include ++#include ++/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ ++struct buf { int x; }; ++FILE * (*rcsopen) (struct buf *, struct stat *, int); ++static char *e (p, i) ++ char **p; ++ int i; ++{ ++ return p[i]; ++} ++static char *f (char * (*g) (char **, int), char **p, ...) ++{ ++ char *s; ++ va_list v; ++ va_start (v,p); ++ s = g (p, va_arg (v,int)); ++ va_end (v); ++ return s; ++} ++int test (int i, double x); ++struct s1 {int (*f) (int a);}; ++struct s2 {int (*f) (double a);}; ++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); ++int argc; ++char **argv; ++int ++main () ++{ ++return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ++ ; ++ return 0; ++} ++_ACEOF ++# Don't try gcc -ansi; that turns off useful extensions and ++# breaks some systems' header files. ++# AIX -qlanglvl=ansi ++# Ultrix and OSF/1 -std1 ++# HP-UX 10.20 and later -Ae ++# HP-UX older versions -Aa -D_HPUX_SOURCE ++# SVR4 -Xc -D__EXTENSIONS__ ++for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" ++do ++ CC="$ac_save_CC $ac_arg" ++ rm -f conftest.$ac_objext ++if { (eval echo "$as_me:8030: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:8033: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:8036: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8039: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_prog_cc_stdc=$ac_arg ++break + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_lib_$ac_lib_var=no" ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 + fi +-rm -f conftest* +-LIBS="$ac_save_LIBS" ++rm -f conftest.$ac_objext ++done ++rm -f conftest.$ac_ext conftest.$ac_objext ++CC=$ac_save_CC + + fi +-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- LIBS="$LIBS -lcposix" ++ ++case "x$ac_cv_prog_cc_stdc" in ++ x|xno) ++ echo "$as_me:8056: result: none needed" >&5 ++echo "${ECHO_T}none needed" >&6 ;; ++ *) ++ echo "$as_me:8059: result: $ac_cv_prog_cc_stdc" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 ++ CC="$CC $ac_cv_prog_cc_stdc" ;; ++esac ++ ++echo "$as_me:8064: checking for an ANSI C-conforming const" >&5 ++echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 ++if test "${ac_cv_c_const+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- echo "$ac_t""no" 1>&6 +-fi ++ cat >conftest.$ac_ext <<_ACEOF ++#line 8070 "configure" ++#include "confdefs.h" + +- ++int ++main () ++{ ++/* FIXME: Include the comments suggested by Paul. */ ++#ifndef __cplusplus ++ /* Ultrix mips cc rejects this. */ ++ typedef int charset[2]; ++ const charset x; ++ /* SunOS 4.1.1 cc rejects this. */ ++ char const *const *ccp; ++ char **p; ++ /* NEC SVR4.0.2 mips cc rejects this. */ ++ struct point {int x, y;}; ++ static struct point const zero = {0,0}; ++ /* AIX XL C 1.02.0.0 rejects this. ++ It does not let you subtract one const X* pointer from another in ++ an arm of an if-expression whose if-part is not a constant ++ expression */ ++ const char *g = "string"; ++ ccp = &g + (g ? g-g : 0); ++ /* HPUX 7.0 cc rejects these. */ ++ ++ccp; ++ p = (char**) ccp; ++ ccp = (char const *const *) p; ++ { /* SCO 3.2v4 cc rejects this. */ ++ char *t; ++ char const *s = 0 ? (char *) 0 : (char const *) 0; + +-echo $ac_n "checking for working const""... $ac_c" 1>&6 +-echo "configure:6108: 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 <j = 5; +-} +-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ +- const int foo = 10; +-} ++ *t++ = 0; ++ } ++ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ ++ int x[] = {25, 17}; ++ const int *foo = &x[0]; ++ ++foo; ++ } ++ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ ++ typedef const int *iptr; ++ iptr p = 0; ++ ++p; ++ } ++ { /* AIX XL C 1.02.0.0 rejects this saying ++ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ ++ struct s { int j; const int *ap[3]; }; ++ struct s *b; b->j = 5; ++ } ++ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ ++ const int foo = 10; ++ } ++#endif + +-; return 0; } +-EOF +-if { (eval echo configure:6162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:8128: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:8131: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:8134: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8137: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_c_const=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- ac_cv_c_const=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_c_const=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + fi +- +-echo "$ac_t""$ac_cv_c_const" 1>&6 ++echo "$as_me:8147: result: $ac_cv_c_const" >&5 ++echo "${ECHO_T}$ac_cv_c_const" >&6 + if test $ac_cv_c_const = no; then +- cat >> confdefs.h <<\EOF +-#define const ++ ++cat >>confdefs.h <<\EOF ++#define const + EOF + + fi + +-echo $ac_n "checking for inline""... $ac_c" 1>&6 +-echo "configure:6183: checking for inline" >&5 +-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:8157: checking for inline" >&5 ++echo $ECHO_N "checking for inline... $ECHO_C" >&6 ++if test "${ac_cv_c_inline+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_c_inline=no + for ac_kw in inline __inline__ __inline; do +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8165 "configure" + #include "confdefs.h" ++#ifndef __cplusplus ++static $ac_kw int static_foo () {return 0; } ++$ac_kw int foo () {return 0; } ++#endif + +-int main() { +-} $ac_kw foo() { +-; return 0; } +-EOF +-if { (eval echo configure:6197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:8174: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:8177: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:8180: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8183: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext + done + + fi +- +-echo "$ac_t""$ac_cv_c_inline" 1>&6 +-case "$ac_cv_c_inline" in ++echo "$as_me:8194: result: $ac_cv_c_inline" >&5 ++echo "${ECHO_T}$ac_cv_c_inline" >&6 ++case $ac_cv_c_inline in + inline | yes) ;; +- no) cat >> confdefs.h <<\EOF +-#define inline ++ no) ++cat >>confdefs.h <<\EOF ++#define inline + EOF + ;; +- *) cat >> confdefs.h <>confdefs.h <&6 +-echo "configure:6223: 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 ++echo "$as_me:8209: checking for off_t" >&5 ++echo $ECHO_N "checking for off_t... $ECHO_C" >&6 ++if test "${ac_cv_type_off_t+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8215 "configure" + #include "confdefs.h" +-#include +-#if STDC_HEADERS +-#include +-#include +-#endif +-EOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then +- rm -rf conftest* ++$ac_includes_default ++int ++main () ++{ ++if ((off_t *) 0) ++ return 0; ++if (sizeof (off_t)) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:8230: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:8233: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:8236: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8239: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_type_off_t=yes + else +- rm -rf conftest* +- ac_cv_type_off_t=no +-fi +-rm -f conftest* ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_type_off_t=no ++fi ++rm -f conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:8249: result: $ac_cv_type_off_t" >&5 ++echo "${ECHO_T}$ac_cv_type_off_t" >&6 ++if test $ac_cv_type_off_t = yes; then ++ : ++else + +-fi +-echo "$ac_t""$ac_cv_type_off_t" 1>&6 +-if test $ac_cv_type_off_t = no; then +- cat >> confdefs.h <<\EOF ++cat >>confdefs.h <&6 +-echo "configure:6256: 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 ++echo "$as_me:8261: checking for size_t" >&5 ++echo $ECHO_N "checking for size_t... $ECHO_C" >&6 ++if test "${ac_cv_type_size_t+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8267 "configure" + #include "confdefs.h" +-#include +-#if STDC_HEADERS +-#include +-#include +-#endif +-EOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then +- rm -rf conftest* ++$ac_includes_default ++int ++main () ++{ ++if ((size_t *) 0) ++ return 0; ++if (sizeof (size_t)) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:8282: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:8285: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:8288: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8291: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_type_size_t=yes + else +- rm -rf conftest* +- ac_cv_type_size_t=no +-fi +-rm -f conftest* ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_type_size_t=no ++fi ++rm -f conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:8301: result: $ac_cv_type_size_t" >&5 ++echo "${ECHO_T}$ac_cv_type_size_t" >&6 ++if test $ac_cv_type_size_t = yes; then ++ : ++else + +-fi +-echo "$ac_t""$ac_cv_type_size_t" 1>&6 +-if test $ac_cv_type_size_t = no; then +- cat >> confdefs.h <<\EOF ++cat >>confdefs.h <&6 +-echo "configure:6291: 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 ++echo "$as_me:8315: checking for working alloca.h" >&5 ++echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 ++if test "${ac_cv_working_alloca_h+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8321 "configure" + #include "confdefs.h" + #include +-int main() { +-char *p = alloca(2 * sizeof(int)); +-; return 0; } +-EOF +-if { (eval echo configure:6303: \"$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 +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- ac_cv_header_alloca_h=no +-fi +-rm -f conftest* +-fi ++int ++main () ++{ ++char *p = (char *) alloca (2 * sizeof (int)); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:8333: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:8336: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:8339: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8342: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_working_alloca_h=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_working_alloca_h=no ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:8352: result: $ac_cv_working_alloca_h" >&5 ++echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 ++if test $ac_cv_working_alloca_h = yes; then + +-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 +-if test $ac_cv_header_alloca_h = yes; then +- cat >> confdefs.h <<\EOF ++cat >>confdefs.h <<\EOF + #define HAVE_ALLOCA_H 1 + EOF + + fi + +-echo $ac_n "checking for alloca""... $ac_c" 1>&6 +-echo "configure:6324: checking for alloca" >&5 +-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++# Temporary ugly hack for BeOS. Don't try to run the test for alloca ++# since it will succeed due to finding the version of alloca in the ++# runtime library. We don't want to use that version, so let's pretend ++# we loaded it from the cache (default to 'no') and thus the package will configure ++# itself to use it's private copy of the C alloca replacement. When the ++# horribly small default stack size problem is fixed (exists up through ++# at least DR8.2) then we can build gcc to start using it's builtin ++# alloca, we can allow mwcc to use it's builtin alloca, and this hack ++# can go away. ++if test "`uname`" = "BeOS"; then ++ test -z "$ac_cv_func_alloca_works" && ac_cv_func_alloca_works=no ++fi ++ ++echo "$as_me:8375: checking for alloca" >&5 ++echo $ECHO_N "checking for alloca... $ECHO_C" >&6 ++if test "${ac_cv_func_alloca_works+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8381 "configure" + #include "confdefs.h" + +-#ifdef __GNUC__ ++#if 0 /* Never do this, it's unnecessary. -fnf */ + # define alloca __builtin_alloca + #else + # ifdef _MSC_VER +@@ -6349,48 +8402,62 @@ + # endif + #endif + +-int main() { +-char *p = (char *) alloca(1); +-; return 0; } +-EOF +-if { (eval echo configure:6357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* ++int ++main () ++{ ++char *p = (char *) alloca (1); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:8414: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:8417: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:8420: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8423: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_func_alloca_works=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- ac_cv_func_alloca_works=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_func_alloca_works=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi ++echo "$as_me:8433: result: $ac_cv_func_alloca_works" >&5 ++echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 + +-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 + if test $ac_cv_func_alloca_works = yes; then +- cat >> confdefs.h <<\EOF ++ ++cat >>confdefs.h <<\EOF + #define HAVE_ALLOCA 1 + EOF + +-fi +- +-if test $ac_cv_func_alloca_works = no; then ++else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +- # that cause trouble. Some versions do not even contain alloca or +- # contain a buggy version. If you still want to use their alloca, +- # use ar to extract alloca.o from them instead of compiling alloca.c. +- ALLOCA=alloca.${ac_objext} +- cat >> confdefs.h <<\EOF ++# that cause trouble. Some versions do not even contain alloca or ++# contain a buggy version. If you still want to use their alloca, ++# use ar to extract alloca.o from them instead of compiling alloca.c. ++ ++ALLOCA=alloca.$ac_objext ++ ++cat >>confdefs.h <<\EOF + #define C_ALLOCA 1 + EOF + +- +-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +-echo "configure:6389: 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 ++echo "$as_me:8454: checking whether \`alloca.c' needs Cray hooks" >&5 ++echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 ++if test "${ac_cv_os_cray+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8460 "configure" + #include "confdefs.h" + #if defined(CRAY) && ! defined(CRAY2) + webecray +@@ -6398,88 +8465,103 @@ + wenotbecray + #endif + +-EOF ++_ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "webecray" >/dev/null 2>&1; then +- rm -rf conftest* + ac_cv_os_cray=yes + else +- rm -rf conftest* + ac_cv_os_cray=no + fi + rm -f conftest* + + fi +- +-echo "$ac_t""$ac_cv_os_cray" 1>&6 ++echo "$as_me:8478: result: $ac_cv_os_cray" >&5 ++echo "${ECHO_T}$ac_cv_os_cray" >&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:6419: 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 ++ for ac_func in _getb67 GETB67 getb67; do ++ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++echo "$as_me:8483: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8489 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func(); below. */ ++ which can conflict with char $ac_func (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char $ac_func(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else +-$ac_func(); ++f = $ac_func; + #endif + +-; return 0; } +-EOF +-if { (eval echo configure:6447: \"$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 +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=no" +-fi +-rm -f conftest* +-fi ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:8520: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:8523: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:8526: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8529: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "$as_ac_var=no" ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:8539: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then + +-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- cat >> confdefs.h <>confdefs.h <&6 ++ break + fi + +-done ++ done + fi + +-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +-echo "configure:6474: 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 ++echo "$as_me:8553: checking stack direction for C alloca" >&5 ++echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 ++if test "${ac_cv_c_stack_direction+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8562 "configure" + #include "confdefs.h" ++int + find_stack_direction () + { + static char *addr = 0; +@@ -6492,139 +8574,172 @@ + else + return (&dummy > addr) ? 1 : -1; + } ++ ++int + main () + { +- exit (find_stack_direction() < 0); ++ exit (find_stack_direction () < 0); + } +-EOF +-if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +-then ++_ACEOF ++rm -f conftest$ac_exeext ++if { (eval echo "$as_me:8585: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:8588: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ { (eval echo "$as_me:8590: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8593: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_c_stack_direction=1 + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -fr conftest* +- ac_cv_c_stack_direction=-1 ++ echo "$as_me: program exited with status $ac_status" >&5 ++echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_c_stack_direction=-1 + fi +-rm -fr conftest* ++rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi +- + fi ++echo "$as_me:8605: result: $ac_cv_c_stack_direction" >&5 ++echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 + +-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 +-cat >> confdefs.h <>confdefs.h <&6 +-echo "configure:6526: 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:6536: \"$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* +- eval "ac_cv_header_$ac_safe=yes" ++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ++echo "$as_me:8617: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++#line 8623 "configure" ++#include "confdefs.h" ++#include <$ac_header> ++_ACEOF ++if { (eval echo "$as_me:8627: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:8633: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ eval "$as_ac_Header=yes" + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" ++ eval "$as_ac_Header=no" + fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext + fi +-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +- cat >> confdefs.h <&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ cat >>confdefs.h <&6 ++ + fi + done + + for ac_func in getpagesize + do +-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6565: 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 ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++echo "$as_me:8665: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8671 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func(); below. */ ++ which can conflict with char $ac_func (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char $ac_func(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else +-$ac_func(); ++f = $ac_func; + #endif + +-; return 0; } ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:8702: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:8705: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:8708: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8711: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "$as_ac_var=no" ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:8721: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=no" +-fi +-rm -f conftest* +-fi + +-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +- cat >> confdefs.h <&6 + fi + done + +-echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +-echo "configure:6618: 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 ++echo "$as_me:8731: checking for working mmap" >&5 ++echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 ++if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8740 "configure" + #include "confdefs.h" +- ++$ac_includes_default + /* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed +@@ -6637,7 +8752,7 @@ + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the +- VM page cache was not coherent with the filesystem buffer cache ++ VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propogated back to all the places they're supposed to be. +@@ -6646,25 +8761,25 @@ + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ +-#include ++ + #include + #include + +-/* This mess was copied from the GNU getpagesize.h. */ +-#ifndef HAVE_GETPAGESIZE +-# ifdef HAVE_UNISTD_H +-# include +-# endif ++#if !STDC_HEADERS && !HAVE_STDLIB_H ++char *malloc (); ++#endif + ++/* This mess was copied from the GNU getpagesize.h. */ ++#if !HAVE_GETPAGESIZE + /* Assume that all systems that can run configure have sys/param.h. */ +-# ifndef HAVE_SYS_PARAM_H ++# if !HAVE_SYS_PARAM_H + # define HAVE_SYS_PARAM_H 1 + # endif + + # ifdef _SC_PAGESIZE + # define getpagesize() sysconf(_SC_PAGESIZE) + # else /* no _SC_PAGESIZE */ +-# ifdef HAVE_SYS_PARAM_H ++# if HAVE_SYS_PARAM_H + # include + # ifdef EXEC_PAGESIZE + # define getpagesize() EXEC_PAGESIZE +@@ -6691,327 +8806,371 @@ + + #endif /* no HAVE_GETPAGESIZE */ + +-#ifdef __cplusplus +-extern "C" { void *malloc(unsigned); } +-#else +-char *malloc(); +-#endif +- + int +-main() ++main () + { +- char *data, *data2, *data3; +- int i, pagesize; +- int fd; +- +- pagesize = getpagesize(); +- +- /* +- * First, make a file with some known garbage in it. +- */ +- data = malloc(pagesize); +- if (!data) +- exit(1); +- for (i = 0; i < pagesize; ++i) +- *(data + i) = rand(); +- umask(0); +- fd = creat("conftestmmap", 0600); +- if (fd < 0) +- exit(1); +- if (write(fd, data, pagesize) != pagesize) +- exit(1); +- close(fd); +- +- /* +- * Next, try to mmap the file at a fixed address which +- * already has something else allocated at it. If we can, +- * also make sure that we see the same garbage. +- */ +- fd = open("conftestmmap", O_RDWR); +- if (fd < 0) +- exit(1); +- data2 = malloc(2 * pagesize); +- if (!data2) +- exit(1); +- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); +- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, +- MAP_PRIVATE | MAP_FIXED, fd, 0L)) +- exit(1); +- for (i = 0; i < pagesize; ++i) +- if (*(data + i) != *(data2 + i)) +- exit(1); +- +- /* +- * Finally, make sure that changes to the mapped area +- * do not percolate back to the file as seen by read(). +- * (This is a bug on some variants of i386 svr4.0.) +- */ +- for (i = 0; i < pagesize; ++i) +- *(data2 + i) = *(data2 + i) + 1; +- data3 = malloc(pagesize); +- if (!data3) +- exit(1); +- if (read(fd, data3, pagesize) != pagesize) +- exit(1); +- for (i = 0; i < pagesize; ++i) +- if (*(data + i) != *(data3 + i)) +- exit(1); +- close(fd); +- unlink("conftestmmap"); +- exit(0); ++ char *data, *data2, *data3; ++ int i, pagesize; ++ int fd; ++ ++ pagesize = getpagesize (); ++ ++ /* First, make a file with some known garbage in it. */ ++ data = (char *) malloc (pagesize); ++ if (!data) ++ exit (1); ++ for (i = 0; i < pagesize; ++i) ++ *(data + i) = rand (); ++ umask (0); ++ fd = creat ("conftest.mmap", 0600); ++ if (fd < 0) ++ exit (1); ++ if (write (fd, data, pagesize) != pagesize) ++ exit (1); ++ close (fd); ++ ++ /* Next, try to mmap the file at a fixed address which already has ++ something else allocated at it. If we can, also make sure that ++ we see the same garbage. */ ++ fd = open ("conftest.mmap", O_RDWR); ++ if (fd < 0) ++ exit (1); ++ data2 = (char *) malloc (2 * pagesize); ++ if (!data2) ++ exit (1); ++ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); ++ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, ++ MAP_PRIVATE | MAP_FIXED, fd, 0L)) ++ exit (1); ++ for (i = 0; i < pagesize; ++i) ++ if (*(data + i) != *(data2 + i)) ++ exit (1); ++ ++ /* Finally, make sure that changes to the mapped area do not ++ percolate back to the file as seen by read(). (This is a bug on ++ some variants of i386 svr4.0.) */ ++ for (i = 0; i < pagesize; ++i) ++ *(data2 + i) = *(data2 + i) + 1; ++ data3 = (char *) malloc (pagesize); ++ if (!data3) ++ exit (1); ++ if (read (fd, data3, pagesize) != pagesize) ++ exit (1); ++ for (i = 0; i < pagesize; ++i) ++ if (*(data + i) != *(data3 + i)) ++ exit (1); ++ close (fd); ++ exit (0); + } +- +-EOF +-if { (eval echo configure:6766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +-then ++_ACEOF ++rm -f conftest$ac_exeext ++if { (eval echo "$as_me:8867: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:8870: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ { (eval echo "$as_me:8872: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8875: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + ac_cv_func_mmap_fixed_mapped=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -fr conftest* +- ac_cv_func_mmap_fixed_mapped=no ++ echo "$as_me: program exited with status $ac_status" >&5 ++echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_func_mmap_fixed_mapped=no + fi +-rm -fr conftest* ++rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi +- + fi +- +-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 ++echo "$as_me:8887: result: $ac_cv_func_mmap_fixed_mapped" >&5 ++echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 + if test $ac_cv_func_mmap_fixed_mapped = yes; then +- cat >> confdefs.h <<\EOF ++ ++cat >>confdefs.h <<\EOF + #define HAVE_MMAP 1 + EOF + + fi ++rm -f conftest.mmap + +- +- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ ++for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \ + unistd.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:6794: 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:6804: \"$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* +- eval "ac_cv_header_$ac_safe=yes" ++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ++echo "$as_me:8902: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++#line 8908 "configure" ++#include "confdefs.h" ++#include <$ac_header> ++_ACEOF ++if { (eval echo "$as_me:8912: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:8918: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ eval "$as_ac_Header=yes" + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" ++ eval "$as_ac_Header=no" + fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext + fi +-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +- cat >> confdefs.h <&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ cat >>confdefs.h <&6 ++ + fi + done + +- for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ ++for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ + strdup __argz_count __argz_stringify __argz_next + do +-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6834: 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 ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++echo "$as_me:8951: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 8957 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func(); below. */ ++ which can conflict with char $ac_func (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char $ac_func(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else +-$ac_func(); ++f = $ac_func; + #endif + +-; return 0; } ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:8988: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:8991: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:8994: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:8997: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "$as_ac_var=no" ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:9007: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=no" +-fi +-rm -f conftest* +-fi + +-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +- cat >> confdefs.h <&6 + fi + done + +- + if test "${ac_cv_func_stpcpy+set}" != "set"; then +- for ac_func in stpcpy ++ ++for ac_func in stpcpy + do +-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:6891: 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 ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++echo "$as_me:9022: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9028 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func(); below. */ ++ which can conflict with char $ac_func (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char $ac_func(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else +-$ac_func(); +-#endif +- +-; return 0; } +-EOF +-if { (eval echo configure:6919: \"$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 +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=no" +-fi +-rm -f conftest* +-fi ++f = $ac_func; ++#endif + +-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +- cat >> confdefs.h <&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:9062: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:9065: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:9068: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "$as_ac_var=no" ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:9078: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <&6 ++ + fi + done + + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_STPCPY 1 + EOF + + fi + + if test $ac_cv_header_locale_h = yes; then +- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +-echo "configure:6953: 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 ++ echo "$as_me:9097: checking for LC_MESSAGES" >&5 ++echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 ++if test "${am_cv_val_LC_MESSAGES+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9103 "configure" + #include "confdefs.h" + #include +-int main() { ++int ++main () ++{ + return LC_MESSAGES +-; return 0; } +-EOF +-if { (eval echo configure:6965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:9115: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:9118: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:9121: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:9124: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + am_cv_val_LC_MESSAGES=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- am_cv_val_LC_MESSAGES=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++am_cv_val_LC_MESSAGES=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi +- +-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 ++echo "$as_me:9134: result: $am_cv_val_LC_MESSAGES" >&5 ++echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 + if test $am_cv_val_LC_MESSAGES = yes; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_LC_MESSAGES 1 + EOF + + fi + fi +- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 +-echo "configure:6986: checking whether NLS is requested" >&5 ++ echo "$as_me:9143: checking whether NLS is requested" >&5 ++echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 + # Check whether --enable-nls or --disable-nls was given. + if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + USE_NLS=$enableval + else + USE_NLS=yes +-fi +- +- echo "$ac_t""$USE_NLS" 1>&6 +- ++fi; ++ echo "$as_me:9152: result: $USE_NLS" >&5 ++echo "${ECHO_T}$USE_NLS" >&6 + + USE_INCLUDED_LIBINTL=no + + if test "$USE_NLS" = "yes"; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define ENABLE_NLS 1 + EOF + +- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 +-echo "configure:7006: checking whether included gettext is requested" >&5 +- # Check whether --with-included-gettext or --without-included-gettext was given. ++ echo "$as_me:9162: checking whether included gettext is requested" >&5 ++echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6 ++ ++# Check whether --with-included-gettext or --without-included-gettext was given. + if test "${with_included_gettext+set}" = set; then + withval="$with_included_gettext" + nls_cv_force_use_gnu_gettext=$withval + else + nls_cv_force_use_gnu_gettext=no +-fi +- +- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 ++fi; ++ echo "$as_me:9172: result: $nls_cv_force_use_gnu_gettext" >&5 ++echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6 + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then +@@ -7019,164 +9178,214 @@ + nls_cv_header_libgt= + CATOBJEXT=NONE + +- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` +-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 +-echo "configure:7025: 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 ++ echo "$as_me:9181: checking for libintl.h" >&5 ++echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6 ++if test "${ac_cv_header_libintl_h+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9187 "configure" + #include "confdefs.h" + #include +-EOF +-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:7035: \"$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* +- eval "ac_cv_header_$ac_safe=yes" ++_ACEOF ++if { (eval echo "$as_me:9191: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:9197: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ ac_cv_header_libintl_h=yes ++else ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" ++ ac_cv_header_libintl_h=no + fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext + 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:7052: 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 ++echo "$as_me:9216: result: $ac_cv_header_libintl_h" >&5 ++echo "${ECHO_T}$ac_cv_header_libintl_h" >&6 ++if test $ac_cv_header_libintl_h = yes; then ++ echo "$as_me:9219: checking for gettext in libc" >&5 ++echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6 ++if test "${gt_cv_func_gettext_libc+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9225 "configure" + #include "confdefs.h" + #include +-int main() { ++int ++main () ++{ + return (int) gettext ("") +-; return 0; } +-EOF +-if { (eval echo configure:7064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:9237: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:9240: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:9243: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:9246: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gt_cv_func_gettext_libc=yes + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- gt_cv_func_gettext_libc=no ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++gt_cv_func_gettext_libc=no + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi +- +-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 ++echo "$as_me:9256: result: $gt_cv_func_gettext_libc" >&5 ++echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6 + + if test "$gt_cv_func_gettext_libc" != "yes"; then +- echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +-echo "configure:7080: 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 ++ echo "$as_me:9260: checking for bindtextdomain in -lintl" >&5 ++echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6 ++if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_save_LIBS="$LIBS" ++ ac_check_lib_save_LIBS=$LIBS + LIBS="-lintl $LIBS" +-cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9268 "configure" + #include "confdefs.h" ++ + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char bindtextdomain(); +- +-int main() { +-bindtextdomain() +-; return 0; } +-EOF +-if { (eval echo configure:7099: \"$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 +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_lib_$ac_lib_var=no" +-fi +-rm -f conftest* +-LIBS="$ac_save_LIBS" +- +-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:7115: 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 +- echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 +-echo "configure:7120: checking for gettext in -lintl" >&5 +-ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` +-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++ builtin and then its argument prototype would still apply. */ ++char bindtextdomain (); ++int ++main () ++{ ++bindtextdomain (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:9287: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:9290: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:9293: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:9296: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_lib_intl_bindtextdomain=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_lib_intl_bindtextdomain=no ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++echo "$as_me:9307: result: $ac_cv_lib_intl_bindtextdomain" >&5 ++echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6 ++if test $ac_cv_lib_intl_bindtextdomain = yes; then ++ echo "$as_me:9310: checking for gettext in libintl" >&5 ++echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6 ++if test "${gt_cv_func_gettext_libintl+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ echo "$as_me:9315: checking for gettext in -lintl" >&5 ++echo $ECHO_N "checking for gettext in -lintl... $ECHO_C" >&6 ++if test "${ac_cv_lib_intl_gettext+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_save_LIBS="$LIBS" ++ ac_check_lib_save_LIBS=$LIBS + LIBS="-lintl $LIBS" +-cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9323 "configure" + #include "confdefs.h" ++ + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char gettext(); +- +-int main() { +-gettext() +-; return 0; } +-EOF +-if { (eval echo configure:7139: \"$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 +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_lib_$ac_lib_var=no" +-fi +-rm -f conftest* +-LIBS="$ac_save_LIBS" +- +-fi +-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +- echo "$ac_t""yes" 1>&6 ++ builtin and then its argument prototype would still apply. */ ++char gettext (); ++int ++main () ++{ ++gettext (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:9342: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:9345: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:9348: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:9351: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_lib_intl_gettext=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_lib_intl_gettext=no ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++echo "$as_me:9362: result: $ac_cv_lib_intl_gettext" >&5 ++echo "${ECHO_T}$ac_cv_lib_intl_gettext" >&6 ++if test $ac_cv_lib_intl_gettext = yes; then + gt_cv_func_gettext_libintl=yes + else +- echo "$ac_t""no" 1>&6 +-gt_cv_func_gettext_libintl=no ++ gt_cv_func_gettext_libintl=no + fi + + fi +- +-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 +-else +- echo "$ac_t""no" 1>&6 ++echo "$as_me:9371: result: $gt_cv_func_gettext_libintl" >&5 ++echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6 + fi + + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_GETTEXT 1 + 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:7178: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9385: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_MSGFMT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case "$MSGFMT" in + /*) +@@ -7200,108 +9409,127 @@ + fi + MSGFMT="$ac_cv_path_MSGFMT" + if test -n "$MSGFMT"; then +- echo "$ac_t""$MSGFMT" 1>&6 ++ echo "$as_me:9412: result: $MSGFMT" >&5 ++echo "${ECHO_T}$MSGFMT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:9415: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + if test "$MSGFMT" != "no"; then +- for ac_func in dcgettext ++ ++for ac_func in dcgettext + do +-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:7212: 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 ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++echo "$as_me:9423: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9429 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func(); below. */ ++ which can conflict with char $ac_func (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char $ac_func(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else +-$ac_func(); ++f = $ac_func; + #endif + +-; return 0; } ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:9460: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:9463: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:9466: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:9469: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++eval "$as_ac_var=no" ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:9479: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func_$ac_func=no" +-fi +-rm -f conftest* +-fi + +-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +- cat >> confdefs.h <&6 + fi + 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:7267: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9491: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_GMSGFMT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- case "$GMSGFMT" in +- /*) ++ case $GMSGFMT in ++ [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; +- ?:/*) +- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. +- ;; + *) +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_path_GMSGFMT="$ac_dir/$ac_word" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ if $as_executable_p "$ac_dir/$ac_word"; then ++ ac_cv_path_GMSGFMT="$ac_dir/$ac_word" ++ echo "$as_me:9508: found $ac_dir/$ac_word" >&5 ++ break ++fi ++done ++ + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; + esac + fi +-GMSGFMT="$ac_cv_path_GMSGFMT" ++GMSGFMT=$ac_cv_path_GMSGFMT ++ + if test -n "$GMSGFMT"; then +- echo "$ac_t""$GMSGFMT" 1>&6 ++ echo "$as_me:9520: result: $GMSGFMT" >&5 ++echo "${ECHO_T}$GMSGFMT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:9523: result: no" >&5 ++echo "${ECHO_T}no" >&6 + 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:7303: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9529: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_XGETTEXT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case "$XGETTEXT" in + /*) +@@ -7325,225 +9553,267 @@ + fi + XGETTEXT="$ac_cv_path_XGETTEXT" + if test -n "$XGETTEXT"; then +- echo "$ac_t""$XGETTEXT" 1>&6 ++ echo "$as_me:9556: result: $XGETTEXT" >&5 ++echo "${ECHO_T}$XGETTEXT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:9559: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9564 "configure" + #include "confdefs.h" + +-int main() { ++int ++main () ++{ + extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr +-; return 0; } +-EOF +-if { (eval echo configure:7343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:9577: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:9580: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:9583: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:9586: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + CATOBJEXT=.gmo + DATADIRNAME=share + else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- CATOBJEXT=.mo ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++CATOBJEXT=.mo + DATADIRNAME=lib + fi +-rm -f conftest* ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + INSTOBJEXT=.mo + fi + fi +- +-else +- echo "$ac_t""no" 1>&6 +-fi + ++fi + + if test "$CATOBJEXT" = "NONE"; then +- echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 +-echo "configure:7366: checking whether catgets can be used" >&5 +- # Check whether --with-catgets or --without-catgets was given. ++ echo "$as_me:9604: checking whether catgets can be used" >&5 ++echo $ECHO_N "checking whether catgets can be used... $ECHO_C" >&6 ++ ++# Check whether --with-catgets or --without-catgets was given. + if test "${with_catgets+set}" = set; then + withval="$with_catgets" + nls_cv_use_catgets=$withval + else + nls_cv_use_catgets=no +-fi +- +- echo "$ac_t""$nls_cv_use_catgets" 1>&6 ++fi; ++ echo "$as_me:9614: result: $nls_cv_use_catgets" >&5 ++echo "${ECHO_T}$nls_cv_use_catgets" >&6 + + if test "$nls_cv_use_catgets" = "yes"; then +- echo $ac_n "checking for main in -li""... $ac_c" 1>&6 +-echo "configure:7379: checking for main in -li" >&5 +-ac_lib_var=`echo i'_'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 ++ ++echo "$as_me:9619: checking for main in -li" >&5 ++echo $ECHO_N "checking for main in -li... $ECHO_C" >&6 ++if test "${ac_cv_lib_i_main+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_save_LIBS="$LIBS" ++ ac_check_lib_save_LIBS=$LIBS + LIBS="-li $LIBS" +-cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9627 "configure" + #include "confdefs.h" + +-int main() { +-main() +-; return 0; } +-EOF +-if { (eval echo configure:7394: \"$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 +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_lib_$ac_lib_var=no" +-fi +-rm -f conftest* +-LIBS="$ac_save_LIBS" +- +-fi +-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \ +- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +- cat >> confdefs.h <&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:9642: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:9645: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:9648: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_lib_i_main=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_lib_i_main=no ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++echo "$as_me:9659: result: $ac_cv_lib_i_main" >&5 ++echo "${ECHO_T}$ac_cv_lib_i_main" >&6 ++if test $ac_cv_lib_i_main = yes; then ++ cat >>confdefs.h <&6 + fi + +- echo $ac_n "checking for catgets""... $ac_c" 1>&6 +-echo "configure:7422: checking for catgets" >&5 +-if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++ echo "$as_me:9670: checking for catgets" >&5 ++echo $ECHO_N "checking for catgets... $ECHO_C" >&6 ++if test "${ac_cv_func_catgets+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 9676 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char catgets(); below. */ ++ which can conflict with char catgets (); below. */ + #include + /* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif + /* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ +-char catgets(); +- +-int main() { ++ builtin and then its argument prototype would still apply. */ ++char catgets (); ++char (*f) (); + ++int ++main () ++{ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_catgets) || defined (__stub___catgets) + choke me + #else +-catgets(); ++f = catgets; + #endif + +-; return 0; } +-EOF +-if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_func_catgets=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_func_catgets=no" +-fi +-rm -f conftest* +-fi +- +-if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- cat >> confdefs.h <<\EOF ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:9707: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:9710: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:9713: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:9716: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_func_catgets=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++ac_cv_func_catgets=no ++fi ++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:9726: result: $ac_cv_func_catgets" >&5 ++echo "${ECHO_T}$ac_cv_func_catgets" >&6 ++if test $ac_cv_func_catgets = yes; then ++ cat >>confdefs.h <<\EOF + #define HAVE_CATGETS 1 + EOF + + INTLOBJS="\$(CATOBJS)" + # Extract the first word of "gencat", so it can be a program name with args. + set dummy gencat; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:7472: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9736: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_GENCAT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- case "$GENCAT" in +- /*) ++ case $GENCAT in ++ [\\/]* | ?:[\\/]*) + ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. + ;; +- ?:/*) +- ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path. +- ;; + *) +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_path_GENCAT="$ac_dir/$ac_word" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ if $as_executable_p "$ac_dir/$ac_word"; then ++ ac_cv_path_GENCAT="$ac_dir/$ac_word" ++ echo "$as_me:9753: found $ac_dir/$ac_word" >&5 ++ break ++fi ++done ++ + test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no" + ;; + esac + fi +-GENCAT="$ac_cv_path_GENCAT" ++GENCAT=$ac_cv_path_GENCAT ++ + if test -n "$GENCAT"; then +- echo "$ac_t""$GENCAT" 1>&6 ++ echo "$as_me:9765: result: $GENCAT" >&5 ++echo "${ECHO_T}$GENCAT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:9768: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + if test "$GENCAT" != "no"; then + # 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:7508: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9774: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_GMSGFMT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- case "$GMSGFMT" in +- /*) ++ case $GMSGFMT in ++ [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; +- ?:/*) +- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. +- ;; + *) +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_path_GMSGFMT="$ac_dir/$ac_word" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ if $as_executable_p "$ac_dir/$ac_word"; then ++ ac_cv_path_GMSGFMT="$ac_dir/$ac_word" ++ echo "$as_me:9791: found $ac_dir/$ac_word" >&5 ++ break ++fi ++done ++ + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" + ;; + esac + fi +-GMSGFMT="$ac_cv_path_GMSGFMT" ++GMSGFMT=$ac_cv_path_GMSGFMT ++ + if test -n "$GMSGFMT"; then +- echo "$ac_t""$GMSGFMT" 1>&6 ++ echo "$as_me:9803: result: $GMSGFMT" >&5 ++echo "${ECHO_T}$GMSGFMT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:9806: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + + if test "$GMSGFMT" = "no"; then + # 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:7545: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9813: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_GMSGFMT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case "$GMSGFMT" in + /*) +@@ -7567,18 +9837,20 @@ + fi + GMSGFMT="$ac_cv_path_GMSGFMT" + if test -n "$GMSGFMT"; then +- echo "$ac_t""$GMSGFMT" 1>&6 ++ echo "$as_me:9840: result: $GMSGFMT" >&5 ++echo "${ECHO_T}$GMSGFMT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:9843: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + + 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:7580: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9850: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_XGETTEXT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case "$XGETTEXT" in + /*) +@@ -7602,9 +9874,11 @@ + fi + XGETTEXT="$ac_cv_path_XGETTEXT" + if test -n "$XGETTEXT"; then +- echo "$ac_t""$XGETTEXT" 1>&6 ++ echo "$as_me:9877: result: $XGETTEXT" >&5 ++echo "${ECHO_T}$XGETTEXT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:9880: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + + USE_INCLUDED_LIBINTL=yes +@@ -7617,8 +9891,6 @@ + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi +-else +- echo "$ac_t""no" 1>&6 + fi + + fi +@@ -7633,10 +9905,10 @@ + INTLOBJS="\$(GETTOBJS)" + # 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:7638: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9908: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_MSGFMT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case "$MSGFMT" in + /*) +@@ -7660,53 +9932,57 @@ + fi + MSGFMT="$ac_cv_path_MSGFMT" + if test -n "$MSGFMT"; then +- echo "$ac_t""$MSGFMT" 1>&6 ++ echo "$as_me:9935: result: $MSGFMT" >&5 ++echo "${ECHO_T}$MSGFMT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:9938: result: no" >&5 ++echo "${ECHO_T}no" >&6 + 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:7672: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9944: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_GMSGFMT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- case "$GMSGFMT" in +- /*) ++ case $GMSGFMT in ++ [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; +- ?:/*) +- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. +- ;; + *) +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" +- for ac_dir in $ac_dummy; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_path_GMSGFMT="$ac_dir/$ac_word" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ ac_save_IFS=$IFS; IFS=$ac_path_separator ++ac_dummy="$PATH" ++for ac_dir in $ac_dummy; do ++ IFS=$ac_save_IFS ++ test -z "$ac_dir" && ac_dir=. ++ if $as_executable_p "$ac_dir/$ac_word"; then ++ ac_cv_path_GMSGFMT="$ac_dir/$ac_word" ++ echo "$as_me:9961: found $ac_dir/$ac_word" >&5 ++ break ++fi ++done ++ + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; + esac + fi +-GMSGFMT="$ac_cv_path_GMSGFMT" ++GMSGFMT=$ac_cv_path_GMSGFMT ++ + if test -n "$GMSGFMT"; then +- echo "$ac_t""$GMSGFMT" 1>&6 ++ echo "$as_me:9973: result: $GMSGFMT" >&5 ++echo "${ECHO_T}$GMSGFMT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:9976: result: no" >&5 ++echo "${ECHO_T}no" >&6 + 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:7708: checking for $ac_word" >&5 +-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:9982: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_XGETTEXT+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case "$XGETTEXT" in + /*) +@@ -7730,12 +10006,13 @@ + fi + XGETTEXT="$ac_cv_path_XGETTEXT" + if test -n "$XGETTEXT"; then +- echo "$ac_t""$XGETTEXT" 1>&6 ++ echo "$as_me:10009: result: $XGETTEXT" >&5 ++echo "${ECHO_T}$XGETTEXT" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:10012: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +- + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo +@@ -7751,7 +10028,8 @@ + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else +- echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 ++ echo "$as_me:10031: result: found xgettext program is not GNU xgettext; ignore it" >&5 ++echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 + XGETTEXT=":" + fi + fi +@@ -7763,9 +10041,16 @@ + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi +- +- ++ ac_sources="$nls_cv_header_libgt" ++ac_dests="$nls_cv_header_intl" ++while test -n "$ac_sources"; do ++ set $ac_dests; ac_dest=$1; shift; ac_dests=$* ++ set $ac_sources; ac_source=$1; shift; ac_sources=$* ++ ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" ++done ++ac_config_links="$ac_config_links $ac_config_links_1" + ++ ac_config_commands="$ac_config_commands default-1" + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. +@@ -7779,25 +10064,12 @@ + POFILES="$POFILES $lang.po" + done + +- +- +- +- +- +- +- +- +- +- +- +- +- + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else +- echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 +-echo "configure:7801: checking for catalogs to be installed" >&5 ++ echo "$as_me:10071: checking for catalogs to be installed" >&5 ++echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in +@@ -7805,7 +10077,8 @@ + esac + done + LINGUAS=$NEW_LINGUAS +- echo "$ac_t""$LINGUAS" 1>&6 ++ echo "$as_me:10080: result: $LINGUAS" >&5 ++echo "${ECHO_T}$LINGUAS" >&6 + fi + + if test -n "$LINGUAS"; then +@@ -7819,45 +10092,52 @@ + INCLUDE_LOCALE_H="\ + /* The system does not provide the header . Take care yourself. */" + fi +- + + test -d intl || mkdir intl + 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:7829: 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 ++ echo "$as_me:10098: checking for linux/version.h" >&5 ++echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6 ++if test "${ac_cv_header_linux_version_h+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF ++#line 10104 "configure" + #include "confdefs.h" + #include +-EOF +-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:7839: \"$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* +- eval "ac_cv_header_$ac_safe=yes" ++_ACEOF ++if { (eval echo "$as_me:10108: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:10114: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes ++fi ++if test -z "$ac_cpp_err"; then ++ ac_cv_header_linux_version_h=yes + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 ++ echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" ++ ac_cv_header_linux_version_h=no + fi +-rm -f conftest* ++rm -f conftest.err conftest.$ac_ext + fi +-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +- echo "$ac_t""yes" 1>&6 ++echo "$as_me:10133: result: $ac_cv_header_linux_version_h" >&5 ++echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6 ++if test $ac_cv_header_linux_version_h = yes; then + msgformat=linux + else +- echo "$ac_t""no" 1>&6 +-msgformat=xopen ++ msgformat=xopen + fi + +- + sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed + fi + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ +@@ -7870,8 +10150,6 @@ + GT_NO= + GT_YES="#YES#" + fi +- +- + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then +@@ -7880,10 +10158,8 @@ + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi +- + + l= +- + + test -d po || mkdir po + if test "x$srcdir" != "x."; then +@@ -7898,7 +10174,7 @@ + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES +- ++ + XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT" + + # Get an absolute path to the GCC top-level source directory +@@ -8068,8 +10344,8 @@ + fi + + # Figure out what assembler alignment features are present. +-echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 +-echo "configure:8073: checking assembler alignment features" >&5 ++echo "$as_me:10347: checking assembler alignment features" >&5 ++echo $ECHO_N "checking assembler alignment features... $ECHO_C" >&6 + gcc_cv_as= + gcc_cv_as_alignment_features= + gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas +@@ -8096,7 +10372,7 @@ + # bytes to skip when using .p2align. + if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2; then + gcc_cv_as_alignment_features=".balign and .p2align" +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 + EOF + +@@ -8105,7 +10381,7 @@ + # bytes to skip when using .p2align. + if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2; then + gcc_cv_as_alignment_features=".p2align including maximum skip" +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 + EOF + +@@ -8169,7 +10445,7 @@ + echo ".p2align 2" >> conftest.s + if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then + gcc_cv_as_alignment_features=".balign and .p2align" +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 + EOF + +@@ -8180,17 +10456,18 @@ + echo ".p2align 4,,7" > conftest.s + if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then + gcc_cv_as_alignment_features=".p2align including maximum skip" +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 + EOF + + fi + rm -f conftest.s conftest.o + fi +-echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 ++echo "$as_me:10466: result: $gcc_cv_as_alignment_features" >&5 ++echo "${ECHO_T}$gcc_cv_as_alignment_features" >&6 + +-echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 +-echo "configure:8194: checking assembler subsection support" >&5 ++echo "$as_me:10469: checking assembler subsection support" >&5 ++echo $ECHO_N "checking assembler subsection support... $ECHO_C" >&6 + gcc_cv_as_subsections= + if test x$gcc_cv_as != x; then + # Check if we have .subsection +@@ -8217,7 +10494,7 @@ + : + else + gcc_cv_as_subsections="working .subsection -1" +- cat >> confdefs.h <<\EOF ++ cat >>confdefs.h <<\EOF + #define HAVE_GAS_SUBSECTION_ORDERING 1 + EOF + +@@ -8227,10 +10504,11 @@ + fi + rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 + fi +-echo "$ac_t""$gcc_cv_as_subsections" 1>&6 ++echo "$as_me:10507: result: $gcc_cv_as_subsections" >&5 ++echo "${ECHO_T}$gcc_cv_as_subsections" >&6 + +-echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 +-echo "configure:8234: checking assembler instructions" >&5 ++echo "$as_me:10510: checking assembler instructions" >&5 ++echo $ECHO_N "checking assembler instructions... $ECHO_C" >&6 + gcc_cv_as_instructions= + if test x$gcc_cv_as != x; then + set "filds fists" "filds mem; fists mem" +@@ -8239,7 +10517,7 @@ + echo "$2" > conftest.s + if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then + gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " +- cat >> confdefs.h <>confdefs.h <&6 ++echo "$as_me:10529: result: $gcc_cv_as_instructions" >&5 ++echo "${ECHO_T}$gcc_cv_as_instructions" >&6 + + # Figure out what language subdirectories are present. + # Look if the user specified --enable-languages="..."; if not, use +@@ -8312,7 +10591,6 @@ + gthread_flags=-DHAVE_GTHR_DEFAULT + fi + +- + # Make empty files to contain the specs and options for each language. + # Then add #include lines to for a compiler that has specs and/or options. + +@@ -8448,9 +10726,6 @@ + target_subdir=${target}/ + fi + +- +- +- + # If this is using newlib, then define inhibit_libc in + # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of + # libgcc.a, but that's OK because newib should have its own version of +@@ -8460,7 +10735,6 @@ + inhibit_libc=-Dinhibit_libc + fi + +- + # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler. + sched_prefix= + sched_cflags= +@@ -8470,7 +10744,6 @@ + sched_cflags=-DHAIFA + fi + +- + if test x$enable_haifa != x; then + # Explicitly remove files that need to be recompiled for the Haifa scheduler. + for x in genattrtab.o toplev.o *sched.o; do +@@ -8514,78 +10787,15 @@ + # + dollar='$$' + gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" +-fi +- +- +- +-# Nothing to do for FLOAT_H, float_format already handled. +-objdir=`pwd` +- +- +-# Process the language and host/target makefile fragments. +-${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" +- +-# Substitute configuration variables +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++fi + ++# Nothing to do for FLOAT_H, float_format already handled. ++objdir=`pwd` + ++# Process the language and host/target makefile fragments. ++${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" + ++# Substitute configuration variables + + # Echo that links are built + if test x$host = x$target +@@ -8623,559 +10833,1055 @@ + + # Create the Makefile + # and configure language subdirectories +-trap '' 1 2 15 +-cat > confcache <<\EOF ++ac_config_files="$ac_config_files $all_outputs" ++ac_config_commands="$ac_config_commands default" ++cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure +-# scripts and configure runs. It is not useful on other systems. +-# If it contains results you don't want to keep, you may remove or edit it. ++# scripts and configure runs, see configure's option --config-cache. ++# It is not useful on other systems. If it contains results you don't ++# want to keep, you may remove or edit it. + # +-# By default, configure uses ./config.cache as the cache file, +-# creating it if it does not exist already. You can give configure +-# the --cache-file=FILE option to use a different cache file; that is +-# what configure does when it calls configure scripts in +-# subdirectories, so they share the cache. +-# Giving --cache-file=/dev/null disables caching, for debugging configure. +-# config.status only pays attention to the cache file if you give it the +-# --recheck option to rerun configure. ++# config.status only pays attention to the cache file if you give it ++# the --recheck option to rerun configure. + # +-EOF ++# `ac_cv_env_foo' variables (set or unset) will be overriden when ++# loading this file, other *unset* `ac_cv_foo' will be assigned the ++# following values. ++ ++_ACEOF ++ + # The following way of writing the cache mishandles newlines in values, + # but we know of no workaround that is simple, portable, and efficient. + # So, don't put newlines in cache variables' values. + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. +-(set) 2>&1 | +- case `(ac_space=' '; set | grep ac_space) 2>&1` in +- *ac_space=\ *) +- # `set' does not quote correctly, so add quotes (double-quote substitution +- # turns \\\\ into \\, and sed turns \\ into \). +- sed -n \ +- -e "s/'/'\\\\''/g" \ +- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" +- ;; +- *) +- # `set' quotes correctly as required by POSIX, so do not add quotes. +- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' +- ;; +- esac >> confcache +-if cmp -s $cache_file confcache; then +- : +-else ++{ ++ (set) 2>&1 | ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in ++ *ac_space=\ *) ++ # `set' does not quote correctly, so add quotes (double-quote ++ # substitution turns \\\\ into \\, and sed turns \\ into \). ++ sed -n \ ++ "s/'/'\\\\''/g; ++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ++ ;; ++ *) ++ # `set' quotes correctly as required by POSIX, so do not add quotes. ++ sed -n \ ++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ ;; ++ esac; ++} | ++ sed ' ++ t clear ++ : clear ++ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ ++ t end ++ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ++ : end' >>confcache ++if cmp -s $cache_file confcache; then :; else + if test -w $cache_file; then +- echo "updating cache $cache_file" +- cat confcache > $cache_file ++ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ++ cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi + fi + rm -f confcache + +-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 +- + test "x$prefix" = xNONE && prefix=$ac_default_prefix + # Let make expand exec_prefix. + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +-# Any assignment to VPATH causes Sun make to only execute +-# the first set of double-colon rules, so remove it if not needed. +-# If there is a colon in the path, we need to keep it. ++# VPATH may cause trouble with some makes, so we remove $(srcdir), ++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ++# trailing colons and then remove the whole line if VPATH becomes empty ++# (actually we leave an empty line to preserve line numbers). + if test "x$srcdir" = x.; then +- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' ++ ac_vpsub='/^[ ]*VPATH[ ]*=/{ ++s/:*\$(srcdir):*/:/; ++s/:*\${srcdir}:*/:/; ++s/:*@srcdir@:*/:/; ++s/^\([^=]*=[ ]*\):*/\1/; ++s/:*$//; ++s/^[^=]*=[ ]*$//; ++}' + fi + +-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 +- + DEFS=-DHAVE_CONFIG_H + +-# Without the "./", some shells look in PATH for config.status. + : ${CONFIG_STATUS=./config.status} +- +-echo creating $CONFIG_STATUS +-rm -f $CONFIG_STATUS +-cat > $CONFIG_STATUS <&5 ++echo "$as_me: creating $CONFIG_STATUS" >&6;} ++cat >$CONFIG_STATUS <<_ACEOF ++#! $SHELL + # Generated automatically by configure. + # Run this file to recreate the current configuration. +-# This directory was configured as follows, +-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +-# +-# $0 $ac_configure_args +-# + # Compiler output produced by configure, useful for debugging +-# configure, is in ./config.log if it exists. ++# configure, is in config.log if it exists. + +-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +-for ac_option ++debug=false ++SHELL=\${CONFIG_SHELL-$SHELL} ++ac_cs_invocation="\$0 \$@" ++ ++_ACEOF ++ ++cat >>$CONFIG_STATUS <<\_ACEOF ++# Be Bourne compatible ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ++ set -o posix ++fi ++ ++# Name of the executable. ++as_me=`echo "$0" |sed 's,.*[\\/],,'` ++ ++if expr a : '\(a\)' >/dev/null 2>&1; then ++ as_expr=expr ++else ++ as_expr=false ++fi ++ ++rm -f conf$$ conf$$.exe conf$$.file ++echo >conf$$.file ++if ln -s conf$$.file conf$$ 2>/dev/null; then ++ # We could just check for DJGPP; but this test a) works b) is more generic ++ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ++ if test -f conf$$.exe; then ++ # Don't use ln at all; we don't have any links ++ as_ln_s='cp -p' ++ else ++ as_ln_s='ln -s' ++ fi ++elif ln conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s=ln ++else ++ as_ln_s='cp -p' ++fi ++rm -f conf$$ conf$$.exe conf$$.file ++ ++as_executable_p="test -f" ++ ++# Support unset when possible. ++if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ++ as_unset=unset ++else ++ as_unset=false ++fi ++ ++# NLS nuisances. ++$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } ++$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } ++$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } ++$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } ++$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } ++$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } ++$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } ++$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } ++ ++# IFS ++# We need space, tab and new line, in precisely that order. ++as_nl=' ++' ++IFS=" $as_nl" ++ ++# CDPATH. ++$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } ++ ++exec 6>&1 ++ ++_ACEOF ++ ++# Files that config.status was made for. ++if test -n "$ac_config_files"; then ++ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS ++fi ++ ++if test -n "$ac_config_headers"; then ++ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS ++fi ++ ++if test -n "$ac_config_links"; then ++ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS ++fi ++ ++if test -n "$ac_config_commands"; then ++ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS ++fi ++ ++cat >>$CONFIG_STATUS <<\EOF ++ ++ac_cs_usage="\ ++\`$as_me' instantiates files from templates according to the ++current configuration. ++ ++Usage: $0 [OPTIONS] [FILE]... ++ ++ -h, --help print this help, then exit ++ -V, --version print version number, then exit ++ -d, --debug don't remove temporary files ++ --recheck update $as_me by reconfiguring in the same conditions ++ --file=FILE[:TEMPLATE] ++ instantiate the configuration file FILE ++ --header=FILE[:TEMPLATE] ++ instantiate the configuration header FILE ++ ++Configuration files: ++$config_files ++ ++Configuration headers: ++$config_headers ++ ++Configuration links: ++$config_links ++ ++Configuration commands: ++$config_commands ++ ++Report bugs to ." ++EOF ++ ++cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF ++# If no file are specified by the user, then we need to provide default ++# value. By we need to know if files were specified by the user. ++ac_need_defaults=: ++while test $# != 0 + do +- case "\$ac_option" in ++ case $1 in ++ --*=*) ++ ac_option=`expr "x$1" : 'x\([^=]*\)='` ++ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ++ shift ++ set dummy "$ac_option" "$ac_optarg" ${1+"$@"} ++ shift ++ ;; ++ -*);; ++ *) # This is not an option, so the user has probably given explicit ++ # arguments. ++ ac_need_defaults=false;; ++ esac ++ ++ case $1 in ++ # Handling of the options. ++EOF ++cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF ++ --version | --vers* | -V ) ++ echo "$ac_cs_version"; exit 0 ;; ++ --he | --h) ++ # Conflict between --help and --header ++ { { echo "$as_me:11095: error: ambiguous option: $1 ++Try \`$0 --help' for more information." >&5 ++echo "$as_me: error: ambiguous option: $1 ++Try \`$0 --help' for more information." >&2;} ++ { (exit 1); exit 1; }; };; ++ --help | --hel | -h ) ++ echo "$ac_cs_usage"; exit 0 ;; ++ --debug | --d* | -d ) ++ debug=: ;; ++ --file | --fil | --fi | --f ) ++ shift ++ CONFIG_FILES="$CONFIG_FILES $1" ++ ac_need_defaults=false;; ++ --header | --heade | --head | --hea ) ++ shift ++ CONFIG_HEADERS="$CONFIG_HEADERS $1" ++ ac_need_defaults=false;; ++ ++ # This is an error. ++ -*) { { echo "$as_me:11114: error: unrecognized option: $1 ++Try \`$0 --help' for more information." >&5 ++echo "$as_me: error: unrecognized option: $1 ++Try \`$0 --help' for more information." >&2;} ++ { (exit 1); exit 1; }; } ;; ++ ++ *) ac_config_targets="$ac_config_targets $1" ;; ++ + esac ++ shift + done + +-ac_given_srcdir=$srcdir ++exec 5>>config.log ++cat >&5 << _ACEOF ++ ++## ----------------------- ## ++## Running config.status. ## ++## ----------------------- ## ++ ++This file was extended by $as_me 2.52, executed with ++ CONFIG_FILES = $CONFIG_FILES ++ CONFIG_HEADERS = $CONFIG_HEADERS ++ CONFIG_LINKS = $CONFIG_LINKS ++ CONFIG_COMMANDS = $CONFIG_COMMANDS ++ > $ac_cs_invocation ++on `(hostname || uname -n) 2>/dev/null | sed 1q` + +-trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 ++_ACEOF + EOF +-cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +-$ac_vpsub +-$extrasub +-s%@SHELL@%$SHELL%g +-s%@CFLAGS@%$CFLAGS%g +-s%@CPPFLAGS@%$CPPFLAGS%g +-s%@CXXFLAGS@%$CXXFLAGS%g +-s%@FFLAGS@%$FFLAGS%g +-s%@DEFS@%$DEFS%g +-s%@LDFLAGS@%$LDFLAGS%g +-s%@LIBS@%$LIBS%g +-s%@exec_prefix@%$exec_prefix%g +-s%@prefix@%$prefix%g +-s%@program_transform_name@%$program_transform_name%g +-s%@bindir@%$bindir%g +-s%@sbindir@%$sbindir%g +-s%@libexecdir@%$libexecdir%g +-s%@datadir@%$datadir%g +-s%@sysconfdir@%$sysconfdir%g +-s%@sharedstatedir@%$sharedstatedir%g +-s%@localstatedir@%$localstatedir%g +-s%@libdir@%$libdir%g +-s%@includedir@%$includedir%g +-s%@oldincludedir@%$oldincludedir%g +-s%@infodir@%$infodir%g +-s%@mandir@%$mandir%g +-s%@host@%$host%g +-s%@host_alias@%$host_alias%g +-s%@host_cpu@%$host_cpu%g +-s%@host_vendor@%$host_vendor%g +-s%@host_os@%$host_os%g +-s%@target@%$target%g +-s%@target_alias@%$target_alias%g +-s%@target_cpu@%$target_cpu%g +-s%@target_vendor@%$target_vendor%g +-s%@target_os@%$target_os%g +-s%@build@%$build%g +-s%@build_alias@%$build_alias%g +-s%@build_cpu@%$build_cpu%g +-s%@build_vendor@%$build_vendor%g +-s%@build_os@%$build_os%g +-s%@CC@%$CC%g +-s%@stage1_warn_cflags@%$stage1_warn_cflags%g +-s%@SET_MAKE@%$SET_MAKE%g +-s%@AWK@%$AWK%g +-s%@LEX@%$LEX%g +-s%@LEXLIB@%$LEXLIB%g +-s%@LN@%$LN%g +-s%@LN_S@%$LN_S%g +-s%@RANLIB@%$RANLIB%g +-s%@YACC@%$YACC%g +-s%@INSTALL@%$INSTALL%g +-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +-s%@INSTALL_DATA@%$INSTALL_DATA%g +-s%@CPP@%$CPP%g +-s%@gnat@%$gnat%g +-s%@vfprintf@%$vfprintf%g +-s%@doprint@%$doprint%g +-s%@manext@%$manext%g +-s%@objext@%$objext%g +-s%@PACKAGE@%$PACKAGE%g +-s%@VERSION@%$VERSION%g +-s%@ALLOCA@%$ALLOCA%g +-s%@USE_NLS@%$USE_NLS%g +-s%@MSGFMT@%$MSGFMT%g +-s%@GMSGFMT@%$GMSGFMT%g +-s%@XGETTEXT@%$XGETTEXT%g +-s%@GENCAT@%$GENCAT%g +-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g +-s%@CATALOGS@%$CATALOGS%g +-s%@CATOBJEXT@%$CATOBJEXT%g +-s%@DATADIRNAME@%$DATADIRNAME%g +-s%@GMOFILES@%$GMOFILES%g +-s%@INSTOBJEXT@%$INSTOBJEXT%g +-s%@INTLDEPS@%$INTLDEPS%g +-s%@INTLLIBS@%$INTLLIBS%g +-s%@INTLOBJS@%$INTLOBJS%g +-s%@POFILES@%$POFILES%g +-s%@POSUB@%$POSUB%g +-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g +-s%@GT_NO@%$GT_NO%g +-s%@GT_YES@%$GT_YES%g +-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g +-s%@l@%$l%g +-s%@gthread_flags@%$gthread_flags%g +-s%@build_canonical@%$build_canonical%g +-s%@host_canonical@%$host_canonical%g +-s%@target_subdir@%$target_subdir%g +-s%@inhibit_libc@%$inhibit_libc%g +-s%@sched_prefix@%$sched_prefix%g +-s%@sched_cflags@%$sched_cflags%g +-s%@gcc_tooldir@%$gcc_tooldir%g +-s%@dollar@%$dollar%g +-s%@objdir@%$objdir%g +-s%@subdirs@%$subdirs%g +-s%@all_boot_languages@%$all_boot_languages%g +-s%@all_compilers@%$all_compilers%g +-s%@all_diff_excludes@%$all_diff_excludes%g +-s%@all_headers@%$all_headers%g +-s%@all_lang_makefiles@%$all_lang_makefiles%g +-s%@all_languages@%$all_languages%g +-s%@all_lib2funcs@%$all_lib2funcs%g +-s%@all_stagestuff@%$all_stagestuff%g +-s%@build_exeext@%$build_exeext%g +-s%@build_install_headers_dir@%$build_install_headers_dir%g +-s%@build_xm_file_list@%$build_xm_file_list%g +-s%@cc_set_by_configure@%$cc_set_by_configure%g +-s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g +-s%@cpp_install_dir@%$cpp_install_dir%g +-s%@cpp_main@%$cpp_main%g +-s%@dep_host_xmake_file@%$dep_host_xmake_file%g +-s%@dep_tmake_file@%$dep_tmake_file%g +-s%@extra_c_flags@%$extra_c_flags%g +-s%@extra_c_objs@%$extra_c_objs%g +-s%@extra_cpp_objs@%$extra_cpp_objs%g +-s%@extra_cxx_objs@%$extra_cxx_objs%g +-s%@extra_headers_list@%$extra_headers_list%g +-s%@extra_objs@%$extra_objs%g +-s%@extra_parts@%$extra_parts%g +-s%@extra_passes@%$extra_passes%g +-s%@extra_programs@%$extra_programs%g +-s%@fixinc_defs@%$fixinc_defs%g +-s%@float_h_file@%$float_h_file%g +-s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g +-s%@gcc_version@%$gcc_version%g +-s%@gcc_version_trigger@%$gcc_version_trigger%g +-s%@host_exeext@%$host_exeext%g +-s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g +-s%@host_xm_file_list@%$host_xm_file_list%g +-s%@install@%$install%g +-s%@JAVAGC@%$JAVAGC%g +-s%@lang_options_files@%$lang_options_files%g +-s%@lang_specs_files@%$lang_specs_files%g +-s%@lang_tree_files@%$lang_tree_files%g +-s%@local_prefix@%$local_prefix%g +-s%@maybe_use_collect2@%$maybe_use_collect2%g +-s%@md_file@%$md_file%g +-s%@objc_boehm_gc@%$objc_boehm_gc%g +-s%@out_file@%$out_file%g +-s%@out_object_file@%$out_object_file%g +-s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g +-s%@symbolic_link@%$symbolic_link%g +-s%@thread_file@%$thread_file%g +-s%@tm_file_list@%$tm_file_list%g +-s%@will_use_collect2@%$will_use_collect2%g ++cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF ++for ac_config_target in $ac_config_targets ++do ++ case "$ac_config_target" in ++ # Handling of arguments. ++ "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; ++ "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; ++ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; ++ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; ++ "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; ++ *) { { echo "$as_me:11193: error: invalid argument: $ac_config_target" >&5 ++echo "$as_me: error: invalid argument: $ac_config_target" >&2;} ++ { (exit 1); exit 1; }; };; ++ esac ++done ++ ++# If the user did not use the arguments to specify the items to instantiate, ++# then the envvar interface is used. Set only those that are not. ++# We use the long form for the default assignment because of an extremely ++# bizarre bug on SunOS 4.1.3. ++if $ac_need_defaults; then ++ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files ++ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers ++ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links ++ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands ++fi ++ ++# Create a temporary directory, and hook for its removal unless debugging. ++$debug || ++{ ++ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ++ trap '{ (exit 1); exit 1; }' 1 2 13 15 ++} ++ ++# Create a (secure) tmp directory for tmp files. ++: ${TMPDIR=/tmp} ++{ ++ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && ++ test -n "$tmp" && test -d "$tmp" ++} || ++{ ++ tmp=$TMPDIR/cs$$-$RANDOM ++ (umask 077 && mkdir $tmp) ++} || ++{ ++ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ++ { (exit 1); exit 1; } ++} ++ ++EOF ++ ++cat >>$CONFIG_STATUS <\$tmp/subs.sed <<\\CEOF ++s,@SHELL@,$SHELL,;t t ++s,@exec_prefix@,$exec_prefix,;t t ++s,@prefix@,$prefix,;t t ++s,@program_transform_name@,$program_transform_name,;t t ++s,@bindir@,$bindir,;t t ++s,@sbindir@,$sbindir,;t t ++s,@libexecdir@,$libexecdir,;t t ++s,@datadir@,$datadir,;t t ++s,@sysconfdir@,$sysconfdir,;t t ++s,@sharedstatedir@,$sharedstatedir,;t t ++s,@localstatedir@,$localstatedir,;t t ++s,@libdir@,$libdir,;t t ++s,@includedir@,$includedir,;t t ++s,@oldincludedir@,$oldincludedir,;t t ++s,@infodir@,$infodir,;t t ++s,@guidedir@,$guidedir,;t t ++s,@htmldir@,$htmldir,;t t ++s,@psdir@,$psdir,;t t ++s,@dvidir@,$dvidir,;t t ++s,@mandir@,$mandir,;t t ++s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t ++s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t ++s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t ++s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t ++s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t ++s,@build_alias@,$build_alias,;t t ++s,@host_alias@,$host_alias,;t t ++s,@target_alias@,$target_alias,;t t ++s,@ECHO_C@,$ECHO_C,;t t ++s,@ECHO_N@,$ECHO_N,;t t ++s,@ECHO_T@,$ECHO_T,;t t ++s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t ++s,@DEFS@,$DEFS,;t t ++s,@LIBS@,$LIBS,;t t ++s,@build@,$build,;t t ++s,@build_cpu@,$build_cpu,;t t ++s,@build_vendor@,$build_vendor,;t t ++s,@build_os@,$build_os,;t t ++s,@host@,$host,;t t ++s,@host_cpu@,$host_cpu,;t t ++s,@host_vendor@,$host_vendor,;t t ++s,@host_os@,$host_os,;t t ++s,@target@,$target,;t t ++s,@target_cpu@,$target_cpu,;t t ++s,@target_vendor@,$target_vendor,;t t ++s,@target_os@,$target_os,;t t ++s,@CC@,$CC,;t t ++s,@CFLAGS@,$CFLAGS,;t t ++s,@LDFLAGS@,$LDFLAGS,;t t ++s,@CPPFLAGS@,$CPPFLAGS,;t t ++s,@ac_ct_CC@,$ac_ct_CC,;t t ++s,@EXEEXT@,$EXEEXT,;t t ++s,@OBJEXT@,$OBJEXT,;t t ++s,@AR@,$AR,;t t ++s,@RANLIB@,$RANLIB,;t t ++s,@stage1_warn_cflags@,$stage1_warn_cflags,;t t ++s,@SET_MAKE@,$SET_MAKE,;t t ++s,@AWK@,$AWK,;t t ++s,@LEX@,$LEX,;t t ++s,@LEXLIB@,$LEXLIB,;t t ++s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t ++s,@LN@,$LN,;t t ++s,@LN_S@,$LN_S,;t t ++s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t ++s,@YACC@,$YACC,;t t ++s,@INSTALL@,$INSTALL,;t t ++s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t ++s,@INSTALL_DATA@,$INSTALL_DATA,;t t ++s,@CPP@,$CPP,;t t ++s,@gnat@,$gnat,;t t ++s,@vfprintf@,$vfprintf,;t t ++s,@doprint@,$doprint,;t t ++s,@manext@,$manext,;t t ++s,@objext@,$objext,;t t ++s,@PACKAGE@,$PACKAGE,;t t ++s,@VERSION@,$VERSION,;t t ++s,@ALLOCA@,$ALLOCA,;t t ++s,@USE_NLS@,$USE_NLS,;t t ++s,@MSGFMT@,$MSGFMT,;t t ++s,@GMSGFMT@,$GMSGFMT,;t t ++s,@XGETTEXT@,$XGETTEXT,;t t ++s,@GENCAT@,$GENCAT,;t t ++s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t ++s,@CATALOGS@,$CATALOGS,;t t ++s,@CATOBJEXT@,$CATOBJEXT,;t t ++s,@DATADIRNAME@,$DATADIRNAME,;t t ++s,@GMOFILES@,$GMOFILES,;t t ++s,@INSTOBJEXT@,$INSTOBJEXT,;t t ++s,@INTLDEPS@,$INTLDEPS,;t t ++s,@INTLLIBS@,$INTLLIBS,;t t ++s,@INTLOBJS@,$INTLOBJS,;t t ++s,@POFILES@,$POFILES,;t t ++s,@POSUB@,$POSUB,;t t ++s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t ++s,@GT_NO@,$GT_NO,;t t ++s,@GT_YES@,$GT_YES,;t t ++s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t ++s,@l@,$l,;t t ++s,@gthread_flags@,$gthread_flags,;t t ++s,@build_canonical@,$build_canonical,;t t ++s,@host_canonical@,$host_canonical,;t t ++s,@target_subdir@,$target_subdir,;t t ++s,@inhibit_libc@,$inhibit_libc,;t t ++s,@sched_prefix@,$sched_prefix,;t t ++s,@sched_cflags@,$sched_cflags,;t t ++s,@gcc_tooldir@,$gcc_tooldir,;t t ++s,@dollar@,$dollar,;t t ++s,@objdir@,$objdir,;t t ++s,@subdirs@,$subdirs,;t t ++s,@all_boot_languages@,$all_boot_languages,;t t ++s,@all_compilers@,$all_compilers,;t t ++s,@all_diff_excludes@,$all_diff_excludes,;t t ++s,@all_headers@,$all_headers,;t t ++s,@all_lang_makefiles@,$all_lang_makefiles,;t t ++s,@all_languages@,$all_languages,;t t ++s,@all_lib2funcs@,$all_lib2funcs,;t t ++s,@all_stagestuff@,$all_stagestuff,;t t ++s,@build_exeext@,$build_exeext,;t t ++s,@build_install_headers_dir@,$build_install_headers_dir,;t t ++s,@build_xm_file_list@,$build_xm_file_list,;t t ++s,@cc_set_by_configure@,$cc_set_by_configure,;t t ++s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t ++s,@cpp_install_dir@,$cpp_install_dir,;t t ++s,@cpp_main@,$cpp_main,;t t ++s,@dep_host_xmake_file@,$dep_host_xmake_file,;t t ++s,@dep_tmake_file@,$dep_tmake_file,;t t ++s,@extra_c_flags@,$extra_c_flags,;t t ++s,@extra_c_objs@,$extra_c_objs,;t t ++s,@extra_cpp_objs@,$extra_cpp_objs,;t t ++s,@extra_cxx_objs@,$extra_cxx_objs,;t t ++s,@extra_headers_list@,$extra_headers_list,;t t ++s,@extra_objs@,$extra_objs,;t t ++s,@extra_parts@,$extra_parts,;t t ++s,@extra_passes@,$extra_passes,;t t ++s,@extra_programs@,$extra_programs,;t t ++s,@fixinc_defs@,$fixinc_defs,;t t ++s,@float_h_file@,$float_h_file,;t t ++s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t ++s,@gcc_version@,$gcc_version,;t t ++s,@gcc_version_trigger@,$gcc_version_trigger,;t t ++s,@host_exeext@,$host_exeext,;t t ++s,@host_extra_gcc_objs@,$host_extra_gcc_objs,;t t ++s,@host_xm_file_list@,$host_xm_file_list,;t t ++s,@install@,$install,;t t ++s,@JAVAGC@,$JAVAGC,;t t ++s,@lang_options_files@,$lang_options_files,;t t ++s,@lang_specs_files@,$lang_specs_files,;t t ++s,@lang_tree_files@,$lang_tree_files,;t t ++s,@local_prefix@,$local_prefix,;t t ++s,@maybe_use_collect2@,$maybe_use_collect2,;t t ++s,@md_file@,$md_file,;t t ++s,@objc_boehm_gc@,$objc_boehm_gc,;t t ++s,@out_file@,$out_file,;t t ++s,@out_object_file@,$out_object_file,;t t ++s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t ++s,@symbolic_link@,$symbolic_link,;t t ++s,@thread_file@,$thread_file,;t t ++s,@tm_file_list@,$tm_file_list,;t t ++s,@will_use_collect2@,$will_use_collect2,;t t + /@target_overrides@/r $target_overrides +-s%@target_overrides@%%g ++s,@target_overrides@,,;t t + /@host_overrides@/r $host_overrides +-s%@host_overrides@%%g +-s%@cross_defines@%$cross_defines%g ++s,@host_overrides@,,;t t ++s,@cross_defines@,$cross_defines,;t t + /@cross_overrides@/r $cross_overrides +-s%@cross_overrides@%%g ++s,@cross_overrides@,,;t t + /@build_overrides@/r $build_overrides +-s%@build_overrides@%%g ++s,@build_overrides@,,;t t + /@language_fragments@/r $language_fragments +-s%@language_fragments@%%g ++s,@language_fragments@,,;t t + /@language_hooks@/r $language_hooks +-s%@language_hooks@%%g +- ++s,@language_hooks@,,;t t + CEOF +-EOF + +-cat >> $CONFIG_STATUS <<\EOF ++EOF + +-# Split the substitutions into bite-sized pieces for seds with +-# small command number limits, like on Digital OSF/1 and HP-UX. +-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +-ac_file=1 # Number of current file. +-ac_beg=1 # First line for current file. +-ac_end=$ac_max_sed_cmds # Line after last line for current file. +-ac_more_lines=: +-ac_sed_cmds="" +-while $ac_more_lines; do +- if test $ac_beg -gt 1; then +- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file +- else +- sed "${ac_end}q" conftest.subs > conftest.s$ac_file +- fi +- if test ! -s conftest.s$ac_file; then +- ac_more_lines=false +- rm -f conftest.s$ac_file +- else +- if test -z "$ac_sed_cmds"; then +- ac_sed_cmds="sed -f conftest.s$ac_file" ++ cat >>$CONFIG_STATUS <<\EOF ++ # Split the substitutions into bite-sized pieces for seds with ++ # small command number limits, like on Digital OSF/1 and HP-UX. ++ ac_max_sed_lines=48 ++ ac_sed_frag=1 # Number of current file. ++ ac_beg=1 # First line for current file. ++ ac_end=$ac_max_sed_lines # Line after last line for current file. ++ ac_more_lines=: ++ ac_sed_cmds= ++ while $ac_more_lines; do ++ if test $ac_beg -gt 1; then ++ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else +- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" ++ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi +- ac_file=`expr $ac_file + 1` +- ac_beg=$ac_end +- ac_end=`expr $ac_end + $ac_max_sed_cmds` ++ if test ! -s $tmp/subs.frag; then ++ ac_more_lines=false ++ else ++ # The purpose of the label and of the branching condition is to ++ # speed up the sed processing (if there are no `@' at all, there ++ # is no need to browse any of the substitutions). ++ # These are the two extra sed commands mentioned above. ++ (echo ':t ++ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed ++ if test -z "$ac_sed_cmds"; then ++ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" ++ else ++ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" ++ fi ++ ac_sed_frag=`expr $ac_sed_frag + 1` ++ ac_beg=$ac_end ++ ac_end=`expr $ac_end + $ac_max_sed_lines` ++ fi ++ done ++ if test -z "$ac_sed_cmds"; then ++ ac_sed_cmds=cat + fi +-done +-if test -z "$ac_sed_cmds"; then +- ac_sed_cmds=cat +-fi +-EOF +- +-cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then ++cat >>$CONFIG_STATUS <<\EOF ++for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". +- case "$ac_file" in +- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` +- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; +- *) ac_file_in="${ac_file}.in" ;; ++ case $ac_file in ++ - | *:- | *:-:* ) # input from stdin ++ cat >$tmp/stdin ++ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ++ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ++ * ) ac_file_in=$ac_file.in ;; + esac + +- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. +- +- # Remove last slash and all that follows it. Not all systems have dirname. +- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` ++ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ++ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$ac_file" : 'X\(//\)[^/]' \| \ ++ X"$ac_file" : 'X\(//\)$' \| \ ++ X"$ac_file" : 'X\(/\)' \| \ ++ . : '\(.\)' 2>/dev/null || ++echo X"$ac_file" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ++ /^X\(\/\/\)[^/].*/{ s//\1/; q; } ++ /^X\(\/\/\)$/{ s//\1/; q; } ++ /^X\(\/\).*/{ s//\1/; q; } ++ s/.*/./; q'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then +- # The file is in a subdirectory. +- test ! -d "$ac_dir" && mkdir "$ac_dir" +- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" ++ { case "$ac_dir" in ++ [\\/]* | ?:[\\/]* ) as_incr_dir=;; ++ *) as_incr_dir=.;; ++esac ++as_dummy="$ac_dir" ++for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ++ case $as_mkdir_dir in ++ # Skip DOS drivespec ++ ?:) as_incr_dir=$as_mkdir_dir ;; ++ *) ++ as_incr_dir=$as_incr_dir/$as_mkdir_dir ++ test -d "$as_incr_dir" || mkdir "$as_incr_dir" ++ ;; ++ esac ++done; } ++ ++ ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" + # A "../" for each directory in $ac_dir_suffix. +- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` ++ ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` + else + ac_dir_suffix= ac_dots= + fi + +- case "$ac_given_srcdir" in +- .) srcdir=. +- if test -z "$ac_dots"; then top_srcdir=. +- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; +- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; ++ case $srcdir in ++ .) ac_srcdir=. ++ if test -z "$ac_dots"; then ++ ac_top_srcdir=. ++ else ++ ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` ++ fi ;; ++ [\\/]* | ?:[\\/]* ) ++ ac_srcdir=$srcdir$ac_dir_suffix; ++ ac_top_srcdir=$srcdir ;; + *) # Relative path. +- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" +- top_srcdir="$ac_dots$ac_given_srcdir" ;; ++ ac_srcdir=$ac_dots$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_dots$srcdir ;; + esac + ++ if test x"$ac_file" != x-; then ++ { echo "$as_me:11527: creating $ac_file" >&5 ++echo "$as_me: creating $ac_file" >&6;} ++ rm -f "$ac_file" ++ fi ++ # Let's still pretend it is `configure' which instantiates (i.e., don't ++ # use $as_me), people would be surprised to read: ++ # /* config.h. Generated automatically by config.status. */ ++ configure_input="Generated automatically from `echo $ac_file_in | ++ sed 's,.*/,,'` by configure." ++ ++ # First look for the input files in the build tree, otherwise in the ++ # src tree. ++ ac_file_inputs=`IFS=: ++ for f in $ac_file_in; do ++ case $f in ++ -) echo $tmp/stdin ;; ++ [\\/$]*) ++ # Absolute (can't be DOS-style, as IFS=:) ++ test -f "$f" || { { echo "$as_me:11545: error: cannot find input file: $f" >&5 ++echo "$as_me: error: cannot find input file: $f" >&2;} ++ { (exit 1); exit 1; }; } ++ echo $f;; ++ *) # Relative ++ if test -f "$f"; then ++ # Build tree ++ echo $f ++ elif test -f "$srcdir/$f"; then ++ # Source tree ++ echo $srcdir/$f ++ else ++ # /dev/null tree ++ { { echo "$as_me:11558: error: cannot find input file: $f" >&5 ++echo "$as_me: error: cannot find input file: $f" >&2;} ++ { (exit 1); exit 1; }; } ++ fi;; ++ esac ++ done` || { (exit 1); exit 1; } ++EOF ++cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF ++:t ++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b ++s,@configure_input@,$configure_input,;t t ++s,@srcdir@,$ac_srcdir,;t t ++s,@top_srcdir@,$ac_top_srcdir,;t t ++" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out ++ rm -f $tmp/stdin ++ if test x"$ac_file" != x-; then ++ mv $tmp/out $ac_file ++ else ++ cat $tmp/out ++ rm -f $tmp/out ++ fi + +- echo creating "$ac_file" +- rm -f "$ac_file" +- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." +- case "$ac_file" in +- *Makefile*) ac_comsub="1i\\ +-# $configure_input" ;; +- *) ac_comsub= ;; +- esac ++done ++EOF ++cat >>$CONFIG_STATUS <<\EOF + +- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` +- sed -e "$ac_comsub +-s%@configure_input@%$configure_input%g +-s%@srcdir@%$srcdir%g +-s%@top_srcdir@%$top_srcdir%g +-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +-fi; done +-rm -f conftest.s* ++# ++# CONFIG_HEADER section. ++# + + # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where + # NAME is the cpp macro being defined and VALUE is the value it is being given. + # + # ac_d sets the value in "#define NAME VALUE" lines. +-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +-ac_dC='\3' +-ac_dD='%g' +-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +-ac_uB='\([ ]\)%\1#\2define\3' ++ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ++ac_dB='[ ].*$,\1#\2' ++ac_dC=' ' ++ac_dD=',;t' ++# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ++ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ++ac_uB='$,\1#\2define\3' + ac_uC=' ' +-ac_uD='\4%g' +-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +-ac_eB='$%\1#\2define\3' +-ac_eC=' ' +-ac_eD='%g' ++ac_uD=',;t' + +-if test "${CONFIG_HEADERS+set}" != set; then +-EOF +-cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +-fi +-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then ++for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". +- case "$ac_file" in +- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` +- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; +- *) ac_file_in="${ac_file}.in" ;; ++ case $ac_file in ++ - | *:- | *:-:* ) # input from stdin ++ cat >$tmp/stdin ++ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ++ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ++ * ) ac_file_in=$ac_file.in ;; + esac + +- echo creating $ac_file ++ test x"$ac_file" != x- && { echo "$as_me:11618: creating $ac_file" >&5 ++echo "$as_me: creating $ac_file" >&6;} + +- rm -f conftest.frag conftest.in conftest.out +- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` +- cat $ac_file_inputs > conftest.in ++ # First look for the input files in the build tree, otherwise in the ++ # src tree. ++ ac_file_inputs=`IFS=: ++ for f in $ac_file_in; do ++ case $f in ++ -) echo $tmp/stdin ;; ++ [\\/$]*) ++ # Absolute (can't be DOS-style, as IFS=:) ++ test -f "$f" || { { echo "$as_me:11629: error: cannot find input file: $f" >&5 ++echo "$as_me: error: cannot find input file: $f" >&2;} ++ { (exit 1); exit 1; }; } ++ echo $f;; ++ *) # Relative ++ if test -f "$f"; then ++ # Build tree ++ echo $f ++ elif test -f "$srcdir/$f"; then ++ # Source tree ++ echo $srcdir/$f ++ else ++ # /dev/null tree ++ { { echo "$as_me:11642: error: cannot find input file: $f" >&5 ++echo "$as_me: error: cannot find input file: $f" >&2;} ++ { (exit 1); exit 1; }; } ++ fi;; ++ esac ++ done` || { (exit 1); exit 1; } ++ # Remove the trailing spaces. ++ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + + EOF + +-# Transform confdefs.h into a sed script conftest.vals that substitutes +-# the proper values into config.h.in to produce config.h. And first: +-# Protect against being on the right side of a sed subst in config.status. +-# Protect against being in an unquoted here document in config.status. +-rm -f conftest.vals +-cat > conftest.hdr <<\EOF +-s/[\\&%]/\\&/g +-s%[\\$`]%\\&%g +-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +-s%ac_d%ac_u%gp +-s%ac_u%ac_e%gp +-EOF +-sed -n -f conftest.hdr confdefs.h > conftest.vals +-rm -f conftest.hdr ++# Transform confdefs.h into two sed scripts, `conftest.defines' and ++# `conftest.undefs', that substitutes the proper values into ++# config.h.in to produce config.h. The first handles `#define' ++# templates, and the second `#undef' templates. ++# And first: Protect against being on the right side of a sed subst in ++# config.status. Protect against being in an unquoted here document ++# in config.status. ++rm -f conftest.defines conftest.undefs ++# Using a here document instead of a string reduces the quoting nightmare. ++# Putting comments in sed scripts is not portable. ++# ++# `end' is used to avoid that the second main sed command (meant for ++# 0-ary CPP macros) applies to n-ary macro definitions. ++# See the Autoconf documentation for `clear'. ++cat >confdef2sed.sed <<\EOF ++s/[\\&,]/\\&/g ++s,[\\$`],\\&,g ++t clear ++: clear ++s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp ++t end ++s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp ++: end ++EOF ++# If some macros were called several times there might be several times ++# the same #defines, which is useless. Nevertheless, we may not want to ++# sort them, since we want the *last* AC-DEFINE to be honored. ++uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines ++sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs ++rm -f confdef2sed.sed + + # This sed command replaces #undef with comments. This is necessary, for + # example, in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. +-cat >> conftest.vals <<\EOF +-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% ++cat >>conftest.undefs <<\EOF ++s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, + EOF + +-# Break up conftest.vals because some shells have a limit on +-# the size of here documents, and old seds have small limits too. +- ++# Break up conftest.defines because some shells have a limit on the size ++# of here documents, and old seds have small limits too (100 cmds). ++echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS ++echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS ++echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS ++echo ' :' >>$CONFIG_STATUS ++rm -f conftest.tail ++while grep . conftest.defines >/dev/null ++do ++ # Write a limited-size here document to $tmp/defines.sed. ++ echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS ++ # Speed up: don't consider the non `#define' lines. ++ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS ++ # Work around the forget-to-reset-the-flag bug. ++ echo 't clr' >>$CONFIG_STATUS ++ echo ': clr' >>$CONFIG_STATUS ++ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS ++ echo 'CEOF ++ sed -f $tmp/defines.sed $tmp/in >$tmp/out ++ rm -f $tmp/in ++ mv $tmp/out $tmp/in ++' >>$CONFIG_STATUS ++ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail ++ rm -f conftest.defines ++ mv conftest.tail conftest.defines ++done ++rm -f conftest.defines ++echo ' fi # egrep' >>$CONFIG_STATUS ++echo >>$CONFIG_STATUS ++ ++# Break up conftest.undefs because some shells have a limit on the size ++# of here documents, and old seds have small limits too (100 cmds). ++echo ' # Handle all the #undef templates' >>$CONFIG_STATUS + rm -f conftest.tail +-while : ++while grep . conftest.undefs >/dev/null + do +- ac_lines=`grep -c . conftest.vals` +- # grep -c gives empty output for an empty file on some AIX systems. +- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi +- # Write a limited-size here document to conftest.frag. +- echo ' cat > conftest.frag <> $CONFIG_STATUS +- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS ++ # Write a limited-size here document to $tmp/undefs.sed. ++ echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS ++ # Speed up: don't consider the non `#undef' ++ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS ++ # Work around the forget-to-reset-the-flag bug. ++ echo 't clr' >>$CONFIG_STATUS ++ echo ': clr' >>$CONFIG_STATUS ++ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF +- sed -f conftest.frag conftest.in > conftest.out +- rm -f conftest.in +- mv conftest.out conftest.in +-' >> $CONFIG_STATUS +- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail +- rm -f conftest.vals +- mv conftest.tail conftest.vals +-done +-rm -f conftest.vals +- +-cat >> $CONFIG_STATUS <<\EOF +- rm -f conftest.frag conftest.h +- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h +- cat conftest.in >> conftest.h +- rm -f conftest.in +- if cmp -s $ac_file conftest.h 2>/dev/null; then +- echo "$ac_file is unchanged" +- rm -f conftest.h ++ sed -f $tmp/undefs.sed $tmp/in >$tmp/out ++ rm -f $tmp/in ++ mv $tmp/out $tmp/in ++' >>$CONFIG_STATUS ++ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail ++ rm -f conftest.undefs ++ mv conftest.tail conftest.undefs ++done ++rm -f conftest.undefs ++ ++cat >>$CONFIG_STATUS <<\EOF ++ # Let's still pretend it is `configure' which instantiates (i.e., don't ++ # use $as_me), people would be surprised to read: ++ # /* config.h. Generated automatically by config.status. */ ++ if test x"$ac_file" = x-; then ++ echo "/* Generated automatically by configure. */" >$tmp/config.h + else +- # Remove last slash and all that follows it. Not all systems have dirname. +- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` ++ echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h ++ fi ++ cat $tmp/in >>$tmp/config.h ++ rm -f $tmp/in ++ if test x"$ac_file" != x-; then ++ if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ++ { echo "$as_me:11759: $ac_file is unchanged" >&5 ++echo "$as_me: $ac_file is unchanged" >&6;} ++ else ++ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$ac_file" : 'X\(//\)[^/]' \| \ ++ X"$ac_file" : 'X\(//\)$' \| \ ++ X"$ac_file" : 'X\(/\)' \| \ ++ . : '\(.\)' 2>/dev/null || ++echo X"$ac_file" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ++ /^X\(\/\/\)[^/].*/{ s//\1/; q; } ++ /^X\(\/\/\)$/{ s//\1/; q; } ++ /^X\(\/\).*/{ s//\1/; q; } ++ s/.*/./; q'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then +- # The file is in a subdirectory. +- test ! -d "$ac_dir" && mkdir "$ac_dir" ++ { case "$ac_dir" in ++ [\\/]* | ?:[\\/]* ) as_incr_dir=;; ++ *) as_incr_dir=.;; ++esac ++as_dummy="$ac_dir" ++for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ++ case $as_mkdir_dir in ++ # Skip DOS drivespec ++ ?:) as_incr_dir=$as_mkdir_dir ;; ++ *) ++ as_incr_dir=$as_incr_dir/$as_mkdir_dir ++ test -d "$as_incr_dir" || mkdir "$as_incr_dir" ++ ;; ++ esac ++done; } ++ ++ fi ++ rm -f $ac_file ++ mv $tmp/config.h $ac_file + fi +- rm -f $ac_file +- mv conftest.h $ac_file ++ else ++ cat $tmp/config.h ++ rm -f $tmp/config.h + fi +-fi; done +- ++done + EOF ++cat >>$CONFIG_STATUS <<\EOF + +-cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +-srcdir=$ac_given_srcdir +-while test -n "$ac_sources"; do +- set $ac_dests; ac_dest=$1; shift; ac_dests=$* +- set $ac_sources; ac_source=$1; shift; ac_sources=$* ++for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue ++ ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ++ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + +- echo "linking $srcdir/$ac_source to $ac_dest" ++ { echo "$as_me:11810: linking $srcdir/$ac_source to $ac_dest" >&5 ++echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;} + + if test ! -r $srcdir/$ac_source; then +- { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } ++ { { echo "$as_me:11814: error: $srcdir/$ac_source: File not found" >&5 ++echo "$as_me: error: $srcdir/$ac_source: File not found" >&2;} ++ { (exit 1); exit 1; }; } + fi + rm -f $ac_dest + + # Make relative symlinks. +- # Remove last slash and all that follows it. Not all systems have dirname. +- ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` ++ ac_dest_dir=`$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$ac_dest" : 'X\(//\)[^/]' \| \ ++ X"$ac_dest" : 'X\(//\)$' \| \ ++ X"$ac_dest" : 'X\(/\)' \| \ ++ . : '\(.\)' 2>/dev/null || ++echo X"$ac_dest" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ++ /^X\(\/\/\)[^/].*/{ s//\1/; q; } ++ /^X\(\/\/\)$/{ s//\1/; q; } ++ /^X\(\/\).*/{ s//\1/; q; } ++ s/.*/./; q'` + if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then +- # The dest file is in a subdirectory. +- test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" +- ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" ++ { case "$ac_dest_dir" in ++ [\\/]* | ?:[\\/]* ) as_incr_dir=;; ++ *) as_incr_dir=.;; ++esac ++as_dummy="$ac_dest_dir" ++for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ++ case $as_mkdir_dir in ++ # Skip DOS drivespec ++ ?:) as_incr_dir=$as_mkdir_dir ;; ++ *) ++ as_incr_dir=$as_incr_dir/$as_mkdir_dir ++ test -d "$as_incr_dir" || mkdir "$as_incr_dir" ++ ;; ++ esac ++done; } ++ ++ ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's,^\./,,'`" + # A "../" for each directory in $ac_dest_dir_suffix. +- ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` ++ ac_dots=`echo $ac_dest_dir_suffix|sed 's,/[^/]*,../,g'` + else + ac_dest_dir_suffix= ac_dots= + fi + +- case "$srcdir" in +- [/$]*) ac_rel_source="$srcdir/$ac_source" ;; +- *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; ++ case $srcdir in ++ [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;; ++ *) ac_rel_source=$ac_dots$srcdir/$ac_source ;; + esac + + # Make a symlink if possible; otherwise try a hard link. +- if ln -s $ac_rel_source $ac_dest 2>/dev/null || +- ln $srcdir/$ac_source $ac_dest; then : +- else +- { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } +- fi ++ # otherwise just copy the file. -gg- ++ ln -s $ac_rel_source $ac_dest 2>/dev/null || ++ ln $srcdir/$ac_source $ac_dest || ++ cp $srcdir/$ac_source $ac_dest 2>/dev/null || ++ { { echo "$as_me:11866: error: cannot link $ac_dest to $srcdir/$ac_source" >&5 ++echo "$as_me: error: cannot link $ac_dest to $srcdir/$ac_source" >&2;} ++ { (exit 1); exit 1; }; } + done + EOF +-cat >> $CONFIG_STATUS <>$CONFIG_STATUS <<\EOF + ++# ++# CONFIG_COMMANDS section. ++# ++for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ++ ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ++ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + +-host='${host}' +-build='${build}' +-target='${target}' +-target_alias='${target_alias}' +-srcdir='${srcdir}' +-subdirs='${subdirs}' +-oldstyle_subdirs='${oldstyle_subdirs}' +-symbolic_link='${symbolic_link}' +-program_transform_set='${program_transform_set}' +-program_transform_name='${program_transform_name}' +-dep_host_xmake_file='${dep_host_xmake_file}' +-host_xmake_file='${host_xmake_file}' +-dep_tmake_file='${dep_tmake_file}' +-tmake_file='${tmake_file}' +-thread_file='${thread_file}' +-gcc_version='${gcc_version}' +-gcc_version_trigger='${gcc_version_trigger}' +-local_prefix='${local_prefix}' +-build_install_headers_dir='${build_install_headers_dir}' +-build_exeext='${build_exeext}' +-host_exeext='${host_exeext}' +-out_file='${out_file}' +-gdb_needs_out_file_path='${gdb_needs_out_file_path}' +-SET_MAKE='${SET_MAKE}' +-target_list='${target_list}' +-target_overrides='${target_overrides}' +-host_overrides='${host_overrides}' +-cross_defines='${cross_defines}' +-cross_overrides='${cross_overrides}' +-build_overrides='${build_overrides}' +-cpp_install_dir='${cpp_install_dir}' +- +-EOF +-cat >> $CONFIG_STATUS <<\EOF +-case "$CONFIG_FILES" in *po/Makefile.in*) ++ case $ac_dest in ++ default-1 ) case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile +- esac +- ++ esac ;; ++ default ) + . $srcdir/configure.lang + case x$CONFIG_HEADERS in + xauto-host.h:config.in) +@@ -9206,10 +11912,33 @@ + echo creating libintl.h + echo '#include "intl/libintl.h"' >libintl.h + fi ++ ;; ++ esac ++done ++EOF ++ ++cat >>$CONFIG_STATUS <<\EOF + +-exit 0 ++{ (exit 0); exit 0; } + EOF + chmod +x $CONFIG_STATUS +-rm -fr confdefs* $ac_clean_files +-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 ++ac_clean_files=$ac_clean_files_save ++ ++# configure is writing to config.log, and then calls config.status. ++# config.status does its own redirection, appending to config.log. ++# Unfortunately, on DOS this fails, as config.log is still kept open ++# by configure, so config.status won't be able to write to it; its ++# output is simply discarded. So we exec the FD to /dev/null, ++# effectively closing config.log, so it can be properly (re)opened and ++# appended to by config.status. When coming back to configure, we ++# need to make the FD available again. ++if test "$no_create" != yes; then ++ ac_cs_success=: ++ exec 5>/dev/null ++ $SHELL $CONFIG_STATUS || ac_cs_success=false ++ exec 5>>config.log ++ # Use ||, not &&, to avoid exiting from the if with $? = 1, which ++ # would make configure fail if this is the last instruction. ++ $ac_cs_success || { (exit 1); exit 1; } ++fi + +diff -ruN --exclude=CVS gcc-2.95.3/gcc/configure.in gcc/gcc/configure.in +--- gcc-2.95.3/gcc/configure.in Thu Jan 25 15:03:02 2001 ++++ gcc/gcc/configure.in Wed Dec 5 23:54:53 2001 +@@ -491,7 +491,7 @@ + cpu_type=convex + ;; + changequote(,)dnl +- i[34567]86-*-*) ++ i[34567]86*-*-*) + changequote([,])dnl + cpu_type=i386 + ;; +@@ -1250,6 +1250,25 @@ + fi + ;; + changequote(,)dnl ++ i[34567]86be-*-amithlon*) # Intel 80386's running AMIthlon/AmigaOS ++changequote([,])dnl # with ELF format in big endian integer data mode ++ out_file=i386/i386.c ++ md_file=i386/i386be.md ++ xm_file=i386/xm-amithlon.h ++ tm_file=i386/amithlon.h ++ tmake_file="i386/t-amithlon i386/t-crtstuff" ++# xmake_file=i386/x-amithlon ++# extra_objs=amigaos.o ++ gnu_ld=yes ++# tmake_file="t-linux i386/t-crtstuff" ++ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" ++ gnu_ld=yes ++ float_format=i386 ++# if test x$enable_threads = xyes; then ++# thread_file='posix' ++# fi ++ ;; ++changequote(,)dnl + i[34567]86-*-linux-gnu*) # Intel 80386's running GNU/Linux + changequote([,])dnl # with ELF format using glibc 2 + # aka GNU/Linux C library 6 +@@ -2019,6 +2038,14 @@ + extra_headers=math-68881.h + float_format=m68k + ;; ++ m68k-*-amigaos*) ++ xm_file=m68k/xm-amigaos.h ++ tm_file=m68k/amigaos.h ++ tmake_file=m68k/t-amigaos ++ xmake_file=m68k/x-amigaos ++ extra_objs=amigaos.o ++ gnu_ld=yes ++ ;; + m68k-*-coff*) + tmake_file=m68k/t-m68kbare + tm_file="m68k/m68k-coff.h dbx.h libgloss.h" +@@ -2763,6 +2790,16 @@ + tmake_file=rs6000/t-beos + xmake_file=rs6000/x-beos + ;; ++ powerpc-*-morphos*) ++ cpu_type=rs6000 ++ xm_file=rs6000/xm-morphos.h ++ tm_file=rs6000/morphos.h ++ tmake_file=rs6000/t-morphos ++ xmake_file=rs6000/x-morphos ++ extra_objs=morphos.o ++ broken_install=cp ++ install_headers_dir=install-headers-cp ++ ;; + powerpc-*-sysv* | powerpc-*-elf*) + tm_file=rs6000/sysv4.h + xm_file="xm-siglist.h rs6000/xm-sysv4.h" +@@ -3338,10 +3375,10 @@ + # Process --with-cpu= for PowerPC/rs6000 + target_cpu_default2= + case $machine in +- i486-*-*) ++ i486*-*-*) + target_cpu_default2=1 + ;; +- i586-*-*) ++ i586*-*-*) + case $target_alias in + k6-*) + target_cpu_default2=4 +@@ -3351,7 +3388,7 @@ + ;; + esac + ;; +- i686-*-* | i786-*-*) ++ i686*-*-* | i786*-*-*) + target_cpu_default2=3 + ;; + alpha*-*-*) +diff -ruN --exclude=CVS gcc-2.95.3/gcc/cp/tinfo.s gcc/gcc/cp/tinfo.s +--- gcc-2.95.3/gcc/cp/tinfo.s Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/cp/tinfo.s Sun Jun 30 11:49:04 2002 +@@ -0,0 +1,14 @@ ++ .file "tinfo.cc" ++gcc2_compiled.: ++ .globl os ++ .section ".sbss","aw",@nobits ++ .align 2 ++os: ++ .space 4 ++ .size os,4 ++ .globl ns ++ .align 2 ++ns: ++ .space 4 ++ .size ns,4 ++ .ident "GCC: (GNU) 2.95.3 20010315 (release/lcs-2002-04-12)" +diff -ruN --exclude=CVS gcc-2.95.3/gcc/cppfiles.c gcc/gcc/cppfiles.c +--- gcc-2.95.3/gcc/cppfiles.c Mon May 10 17:24:33 1999 ++++ gcc/gcc/cppfiles.c Thu Sep 27 19:35:54 2001 +@@ -56,13 +56,18 @@ + VMS has non-numeric inodes. */ + #ifdef VMS + #define INO_T_EQ(a, b) (!bcmp((char *) &(a), (char *) &(b), sizeof (a))) +-#elif (defined _WIN32 && !defined CYGWIN && ! defined (_UWIN)) \ +- || defined __MSDOS__ ++#elif (defined (_WIN32) && !defined (CYGWIN) && ! defined (_UWIN)) \ ++ || defined (__MSDOS__) || defined (__amigaos__) || defined (__morphos__) + #define INO_T_EQ(a, b) 0 + #else + #define INO_T_EQ(a, b) ((a) == (b)) + #endif + ++#ifndef OPEN_CASE_SENSITIVE ++/* Default is standard open() */ ++#define OPEN_CASE_SENSITIVE open ++#endif ++ + /* Merge the four include chains together in the order quote, bracket, + system, after. Remove duplicate dirs (as determined by + INO_T_EQ()). The system_include and after_include chains are never +@@ -318,7 +323,12 @@ + + ih = include_hash (pfile, fname, 1); + jh = redundant_include_p (pfile, ih, +- fname[0] == '/' ? ABSOLUTE_PATH : search_start); ++#ifdef FILE_NAME_ABSOLUTE_P ++ FILE_NAME_ABSOLUTE_P (fname) ++#else ++ fname[0] == '/' ++#endif ++ ? ABSOLUTE_PATH : search_start); + + if (jh != 0) + { +@@ -328,7 +338,7 @@ + if (jh == (struct include_hash *)-1) + return -2; + else +- return open (jh->name, O_RDONLY, 0666); ++ return OPEN_CASE_SENSITIVE (jh->name, O_RDONLY, 0666); + } + + if (ih->foundhere) +@@ -354,11 +364,15 @@ + ih->control_macro = NULL; + + /* If the pathname is absolute, just open it. */ ++#ifdef FILE_NAME_ABSOLUTE_P ++ if (FILE_NAME_ABSOLUTE_P (fname)) ++#else + if (fname[0] == '/') ++#endif + { + ih->foundhere = ABSOLUTE_PATH; + ih->name = ih->nshort; +- return open (ih->name, O_RDONLY, 0666); ++ return OPEN_CASE_SENSITIVE (ih->name, O_RDONLY, 0666); + } + + /* Search directory path, trying to open the file. */ +@@ -369,13 +383,20 @@ + for (l = search_start; l; l = l->next) + { + bcopy (l->name, name, l->nlen); ++#ifdef VOL_SEPARATOR ++ if (name[l->nlen - 1] == VOL_SEPARATOR) ++ strcpy (&name[l->nlen], fname); ++ else ++#endif ++ { + name[l->nlen] = '/'; + strcpy (&name[l->nlen+1], fname); ++ } + simplify_pathname (name); + if (CPP_OPTIONS (pfile)->remap) + name = remap_filename (pfile, name, l); + +- f = open (name, O_RDONLY|O_NONBLOCK|O_NOCTTY, 0666); ++ f = OPEN_CASE_SENSITIVE (name, O_RDONLY|O_NONBLOCK|O_NOCTTY, 0666); + #ifdef EACCES + if (f == -1 && errno == EACCES) + { +@@ -723,6 +744,18 @@ + + dir = xstrdup (fname); + last_slash = rindex (dir, '/'); ++ ++#ifdef VOL_SEPARATOR ++ { ++ char *last_sep; ++ last_sep = rindex (dir, VOL_SEPARATOR); ++ if (last_sep) ++ last_sep++; /* Keep VOL_SEPARATOR. */ ++ if (last_sep > last_slash) ++ last_slash = last_sep; ++ } ++#endif ++ + if (last_slash) + { + if (last_slash == dir) +diff -ruN --exclude=CVS gcc-2.95.3/gcc/expmed.c gcc/gcc/expmed.c +--- gcc-2.95.3/gcc/expmed.c Thu Jan 25 15:03:06 2001 ++++ gcc/gcc/expmed.c Thu Sep 27 19:35:54 2001 +@@ -59,6 +59,10 @@ + #define SLOW_UNALIGNED_ACCESS STRICT_ALIGNMENT + #endif + ++#ifndef GET_MIN_MODE_ALIGNMENT ++#define GET_MIN_MODE_ALIGNMENT(mode) BITS_PER_UNIT ++#endif ++ + /* For compilers that support multiple targets with different word sizes, + MAX_BITS_PER_WORD contains the biggest value of BITS_PER_WORD. An example + is the H8/300(H) compiler. */ +@@ -295,9 +299,13 @@ + BITPOS is 0 in a REG bigger than a word. */ + if (GET_MODE_SIZE (fieldmode) >= UNITS_PER_WORD + && (GET_CODE (op0) != MEM +- || ! SLOW_UNALIGNED_ACCESS +- || (offset * BITS_PER_UNIT % bitsize == 0 +- && align % GET_MODE_SIZE (fieldmode) == 0)) ++ || !((SLOW_UNALIGNED_ACCESS ++ && (offset * BITS_PER_UNIT % bitsize != 0 ++ || align % GET_MODE_SIZE (fieldmode) != 0)) ++ || (! SLOW_UNALIGNED_ACCESS ++ && GET_MIN_MODE_ALIGNMENT (fieldmode) > 1 ++ && (offset * BITS_PER_UNIT % bitsize != 0 ++ || align * BITS_PER_UNIT % GET_MIN_MODE_ALIGNMENT (fieldmode) != 0)))) + && bitpos == 0 && bitsize == GET_MODE_BITSIZE (fieldmode)) + { + /* Storing in a full-word or multi-word field in a register +@@ -509,7 +517,8 @@ + bestmode = GET_MODE (op0); + + if (bestmode == VOIDmode +- || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align)) ++ || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align) ++ || (!SLOW_UNALIGNED_ACCESS && GET_MIN_MODE_ALIGNMENT (bestmode) > align * BITS_PER_UNIT)) + goto insv_loses; + + /* Adjust address to point to the containing unit of that mode. */ +@@ -1050,9 +1059,12 @@ + && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), + GET_MODE_BITSIZE (GET_MODE (op0)))) + || (GET_CODE (op0) == MEM +- && (! SLOW_UNALIGNED_ACCESS +- || (offset * BITS_PER_UNIT % bitsize == 0 +- && align * BITS_PER_UNIT % bitsize == 0)))) ++ && !((SLOW_UNALIGNED_ACCESS ++ && (offset * BITS_PER_UNIT % bitsize != 0 ++ || align * BITS_PER_UNIT % bitsize != 0)) ++ || (!SLOW_UNALIGNED_ACCESS ++ && (offset * BITS_PER_UNIT % GET_MIN_MODE_ALIGNMENT (mode) != 0 ++ || align * BITS_PER_UNIT % GET_MIN_MODE_ALIGNMENT (mode) != 0))))) + && ((bitsize >= BITS_PER_WORD && bitsize == GET_MODE_BITSIZE (mode) + && bitpos % BITS_PER_WORD == 0) + || (mode_for_size (bitsize, GET_MODE_CLASS (tmode), 0) != BLKmode +@@ -1242,7 +1254,8 @@ + bestmode = GET_MODE (xop0); + + if (bestmode == VOIDmode +- || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align)) ++ || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align) ++ || (!SLOW_UNALIGNED_ACCESS && GET_MIN_MODE_ALIGNMENT (bestmode) > align * BITS_PER_UNIT)) + goto extzv_loses; + + /* Compute offset as multiple of this unit, +@@ -1379,7 +1392,8 @@ + bestmode = GET_MODE (xop0); + + if (bestmode == VOIDmode +- || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align)) ++ || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align) ++ || (!SLOW_UNALIGNED_ACCESS && GET_MIN_MODE_ALIGNMENT (bestmode) > align * BITS_PER_UNIT)) + goto extv_loses; + + /* Compute offset as multiple of this unit, +diff -ruN --exclude=CVS gcc-2.95.3/gcc/expr.c gcc/gcc/expr.c +--- gcc-2.95.3/gcc/expr.c Mon Feb 19 15:02:00 2001 ++++ gcc/gcc/expr.c Thu Sep 27 19:35:54 2001 +@@ -241,6 +241,10 @@ + #define SLOW_UNALIGNED_ACCESS STRICT_ALIGNMENT + #endif + ++#ifndef GET_MIN_MODE_ALIGNMENT ++#define GET_MIN_MODE_ALIGNMENT(x) BITS_PER_UNIT ++#endif ++ + /* Register mappings for target machines without register windows. */ + #ifndef INCOMING_REGNO + #define INCOMING_REGNO(OUT) (OUT) +@@ -4749,7 +4753,10 @@ + store it as a bit field. */ + || (SLOW_UNALIGNED_ACCESS + && align * BITS_PER_UNIT < GET_MODE_ALIGNMENT (mode)) +- || (SLOW_UNALIGNED_ACCESS && bitpos % GET_MODE_ALIGNMENT (mode) != 0)) ++ || (!SLOW_UNALIGNED_ACCESS ++ && align * BITS_PER_UNIT < GET_MIN_MODE_ALIGNMENT(mode)) ++ || (SLOW_UNALIGNED_ACCESS && bitpos % GET_MODE_ALIGNMENT (mode) != 0) ++ || (!SLOW_UNALIGNED_ACCESS && bitpos % GET_MIN_MODE_ALIGNMENT (mode) != 0)) + { + rtx temp = expand_expr (exp, NULL_RTX, VOIDmode, 0); + +@@ -6645,7 +6652,10 @@ + fetch it as a bit field. */ + || (SLOW_UNALIGNED_ACCESS + && ((TYPE_ALIGN (TREE_TYPE (tem)) < (unsigned int) GET_MODE_ALIGNMENT (mode)) +- || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))))) ++ || (bitpos % GET_MODE_ALIGNMENT (mode) != 0))) ++ || (!SLOW_UNALIGNED_ACCESS ++ && ((TYPE_ALIGN (TREE_TYPE (tem)) < (unsigned int) GET_MIN_MODE_ALIGNMENT(mode)) ++ || (bitpos % GET_MIN_MODE_ALIGNMENT (mode) != 0)))))) + { + enum machine_mode ext_mode = mode; + +diff -ruN --exclude=CVS gcc-2.95.3/gcc/flow.c gcc/gcc/flow.c +--- gcc-2.95.3/gcc/flow.c Thu Jan 25 15:03:08 2001 ++++ gcc/gcc/flow.c Thu Sep 27 19:36:09 2001 +@@ -3157,11 +3157,11 @@ + if (n_basic_blocks == 0 + || (regno < FIRST_PSEUDO_REGISTER + && (global_regs[regno] +- || fixed_regs[regno] +- || FUNCTION_ARG_REGNO_P (regno)))) ++ || fixed_regs[regno]))) + return 0; + +- return REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, regno); ++ return (REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, regno) ++ && (regno >= FIRST_PSEUDO_REGISTER || ! function_arg_regno_p (regno))); + } + + /* 1 if register REGNO was alive at a place where `setjmp' was called +diff -ruN --exclude=CVS gcc-2.95.3/gcc/function.c gcc/gcc/function.c +--- gcc-2.95.3/gcc/function.c Thu Jan 25 15:03:15 2001 ++++ gcc/gcc/function.c Thu Sep 27 19:36:09 2001 +@@ -7027,3 +7027,29 @@ + } + #endif /* HAVE_prologue or HAVE_epilogue */ + } ++ ++/* begin-GG-local: explicit register specification for parameters */ ++/* Return 1 if an argument for the current function was passed in ++ register REGNO. */ ++ ++int ++function_arg_regno_p (regno) ++ int regno; ++{ ++ tree parm = DECL_ARGUMENTS (current_function_decl); ++ for (; parm; parm = TREE_CHAIN (parm)) ++ { ++ rtx incoming = DECL_INCOMING_RTL (parm); ++ if (GET_CODE (incoming) == REG) ++ { ++ int incoming_reg; ++ incoming_reg = REGNO (incoming); ++ if (regno >= incoming_reg && ++ regno < incoming_reg + HARD_REGNO_NREGS (incoming_reg, ++ GET_MODE (incoming))) ++ return 1; ++ } ++ } ++ return 0; ++} ++/* end-GG-local */ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/gcc.c gcc/gcc/gcc.c +--- gcc-2.95.3/gcc/gcc.c Thu Jan 25 15:03:16 2001 ++++ gcc/gcc/gcc.c Thu Sep 27 19:36:09 2001 +@@ -1372,9 +1372,12 @@ + #ifndef STANDARD_EXEC_PREFIX + #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/" + #endif /* !defined STANDARD_EXEC_PREFIX */ ++#ifndef STANDARD_EXEC_PREFIX_1 ++#define STANDARD_EXEC_PREFIX_1 "/usr/lib/gcc/" ++#endif /* !defined STANDARD_EXEC_PREFIX_1 */ + + static const char *standard_exec_prefix = STANDARD_EXEC_PREFIX; +-static const char *standard_exec_prefix_1 = "/usr/lib/gcc/"; ++static const char *standard_exec_prefix_1 = STANDARD_EXEC_PREFIX_1; + #ifdef MD_EXEC_PREFIX + static const char *md_exec_prefix = MD_EXEC_PREFIX; + #endif +@@ -1382,6 +1385,12 @@ + #ifndef STANDARD_STARTFILE_PREFIX + #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/" + #endif /* !defined STANDARD_STARTFILE_PREFIX */ ++#ifndef STANDARD_STARTFILE_PREFIX_1 ++#define STANDARD_STARTFILE_PREFIX_1 "/lib/" ++#endif /* !defined STANDARD_STARTFILE_PREFIX_1 */ ++#ifndef STANDARD_STARTFILE_PREFIX_2 ++#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" ++#endif /* !defined STANDARD_STARTFILE_PREFIX_2 */ + + #ifdef MD_STARTFILE_PREFIX + static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; +@@ -1390,8 +1399,8 @@ + static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; + #endif + static const char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; +-static const char *standard_startfile_prefix_1 = "/lib/"; +-static const char *standard_startfile_prefix_2 = "/usr/lib/"; ++static const char *standard_startfile_prefix_1 = STANDARD_STARTFILE_PREFIX_1; ++static const char *standard_startfile_prefix_2 = STANDARD_STARTFILE_PREFIX_2; + + #ifndef TOOLDIR_BASE_PREFIX + #define TOOLDIR_BASE_PREFIX "/usr/local/" +@@ -1997,7 +2006,11 @@ + + /* Determine the filename to execute (special case for absolute paths). */ + ++#ifdef FILE_NAME_ABSOLUTE_P ++ if (FILE_NAME_ABSOLUTE_P (name) ++#else + if (IS_DIR_SEPARATOR (*name) ++#endif + #ifdef HAVE_DOS_BASED_FILESYSTEM + /* Check for disk name on MS-DOS-based systems. */ + || (name[0] && name[1] == ':' && IS_DIR_SEPARATOR (name[2])) +@@ -3530,9 +3543,13 @@ + /* Relative directories always come from -B, + and it is better not to use them for searching + at run time. In particular, stage1 loses */ ++#ifndef FILE_NAME_ABSOLUTE_P + if (!IS_DIR_SEPARATOR (pl->prefix[0])) + continue; +-#endif ++#else ++ if (! FILE_NAME_ABSOLUTE_P (pl->prefix)) ++#endif /* FILE_NAME_ABSOLUTE_P */ ++#endif /* RELATIVE_PREFIX_NOT_LINKDIR */ + /* Try subdirectory if there is one. */ + if (multilib_dir != NULL) + { +@@ -4609,12 +4626,11 @@ + /* Exclude directories that the linker is known to search. */ + if (linker + && ((cp - path == 6 +- && strcmp (path, concat (dir_separator_str, "lib", +- dir_separator_str, ".", NULL_PTR)) == 0) ++ && strcmp (path, concat (STANDARD_STARTFILE_PREFIX_1, ++ ".", NULL_PTR)) == 0) + || (cp - path == 10 +- && strcmp (path, concat (dir_separator_str, "usr", +- dir_separator_str, "lib", +- dir_separator_str, ".", NULL_PTR)) == 0))) ++ && strcmp (path, concat (STANDARD_STARTFILE_PREFIX_2, ++ ".", NULL_PTR)) == 0))) + return 0; + + return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode)); +diff -ruN --exclude=CVS gcc-2.95.3/gcc/genconfig.c gcc/gcc/genconfig.c +--- gcc-2.95.3/gcc/genconfig.c Fri Apr 16 21:52:24 1999 ++++ gcc/gcc/genconfig.c Thu Sep 27 19:36:09 2001 +@@ -327,8 +327,8 @@ + printf ("/* Generated automatically by the program `genconfig'\n\ + from the machine description file `md'. */\n\n"); + +- /* Allow at least 10 operands for the sake of asm constructs. */ +- max_recog_operands = 9; /* We will add 1 later. */ ++ /* Allow at least 15 operands for the sake of asm constructs. */ ++ max_recog_operands = 14; /* We will add 1 later. */ + max_dup_operands = 1; + + /* Read the machine description. */ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/ginclude/stdarg.h gcc/gcc/ginclude/stdarg.h +--- gcc-2.95.3/gcc/ginclude/stdarg.h Sat May 8 03:52:35 1999 ++++ gcc/gcc/ginclude/stdarg.h Fri Dec 7 23:06:10 2001 +@@ -102,7 +102,7 @@ + /* We cast to void * and then to TYPE * because this avoids + a warning about increasing the alignment requirement. */ + +-#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) ++#if (defined (__arm__) && ! defined (__ARMEB__)) || (defined (__i386__) && ! defined(__BIG_ENDIAN__) ) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) + /* This is for little-endian machines; small args are padded upward. */ + #define va_arg(AP, TYPE) \ + (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/ginclude/varargs.h gcc/gcc/ginclude/varargs.h +--- gcc-2.95.3/gcc/ginclude/varargs.h Wed Jul 7 02:19:05 1999 ++++ gcc/gcc/ginclude/varargs.h Fri Dec 7 23:00:30 2001 +@@ -123,7 +123,7 @@ + (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) + #endif + +-#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) ++#if (defined (__arm__) && ! defined (__ARMEB__)) || (defined (__i386__) && ! defined(__BIG_ENDIAN__) ) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) + /* This is for little-endian machines; small args are padded upward. */ + #define va_arg(AP, TYPE) \ + (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/longlong.h gcc/gcc/longlong.h +--- gcc-2.95.3/gcc/longlong.h Wed Jan 6 21:44:39 1999 ++++ gcc/gcc/longlong.h Sat Jan 5 16:41:39 2002 +@@ -353,6 +353,22 @@ + "g" ((USItype) (bh)), \ + "1" ((USItype) (al)), \ + "g" ((USItype) (bl))) ++#if defined (__BIG_ENDIAN__) ++ /* Accept no memory operands for ix86/big endian target */ ++#define umul_ppmm(w1, w0, u, v) \ ++ __asm__ ("mull %3" \ ++ : "=a" ((USItype) (w0)), \ ++ "=d" ((USItype) (w1)) \ ++ : "%0" ((USItype) (u)), \ ++ "r" ((USItype) (v))) ++#define udiv_qrnnd(q, r, n1, n0, d) \ ++ __asm__ ("divl %4" \ ++ : "=a" ((USItype) (q)), \ ++ "=d" ((USItype) (r)) \ ++ : "0" ((USItype) (n0)), \ ++ "1" ((USItype) (n1)), \ ++ "r" ((USItype) (d))) ++#else + #define umul_ppmm(w1, w0, u, v) \ + __asm__ ("mull %3" \ + : "=a" ((USItype) (w0)), \ +@@ -366,6 +382,7 @@ + : "0" ((USItype) (n0)), \ + "1" ((USItype) (n1)), \ + "rm" ((USItype) (d))) ++#endif + #define count_leading_zeros(count, x) \ + do { \ + USItype __cbtmp; \ +diff -ruN --exclude=CVS gcc-2.95.3/gcc/morphoscollect2.c gcc/gcc/morphoscollect2.c +--- gcc-2.95.3/gcc/morphoscollect2.c Thu Jan 1 01:00:00 1970 ++++ gcc/gcc/morphoscollect2.c Thu Sep 27 19:36:09 2001 +@@ -0,0 +1,344 @@ ++/* GG-local whole file: dynamic libraries */ ++/* Supplimentary functions that get compiled and linked to collect2 for ++ MorphOS target. ++ Copyright (C) 1996 Free Software Foundation, Inc. ++ ++This file is part of GNU CC. ++ ++GNU CC is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU CC is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++GNU General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++#include ++#include ++#include ++#include ++ ++/* From collect2.c: */ ++ ++void maybe_unlink(char *); ++char* xmalloc(unsigned); ++void fatal_perror(char *, ...); ++void fork_execute(char *, char **); ++void fatal(char*, ...); ++ ++extern char *c_file_name; ++extern int debug; ++ ++ /* Names of temporary files we create. */ ++#define XLIBS_C_NAME "xlibs.c" ++#define XLIBS_O_NAME "xlibs.o" ++#define SHARED_X_NAME "shared.x" ++ ++/* Suffix which is prepended to "-l" options for dynamic libraries. */ ++#define DYNAMIC_LIB_SUFFIX "_ixlibrary" ++ ++/* Structure that holds library names. */ ++struct liblist ++{ ++ struct liblist *next; ++ char *name; ++ char *cname; ++}; ++ ++/* Not zero if "-static" was specified on GCC command line or if all the ++ libraries are static. */ ++static int flag_static=0; ++ ++/* Not zero if linking a base relative executable. This is recognized by ++ presence of "-m amiga_bss" on the linker's commandline. */ ++static int flag_baserel=0; ++ ++/* Not zero if some of the specified libraries are dynamic. */ ++static int found_dynamic_libs=0; ++ ++/* List of linker libraries. */ ++struct liblist *head = NULL; ++ ++ /* Return 1 if collect2 should do something more apart from tlink. We want it ++ to call "postlink" and "strip" if linking with dynamic libraries. */ ++ ++int ++morphos_do_collecting(void) ++{ ++ return !flag_static; ++} ++ ++/* Check for presence of "-static" on the GCC command line. We should not do ++ collecting if this flag was specified. */ ++ ++void ++morphos_gccopts_hook(char* arg) ++{ ++ if (strncmp(arg, "-static", strlen("-static"))==0) ++ flag_static=1; ++} ++ ++/* Replace unprintable characters with underscores. Used by "add_lib()". */ ++ ++static void ++safename(char *p) ++{ ++ if (!isalpha(*p)) ++ *p = '_'; ++ p++; ++ while (*p) ++ { ++ if (!isalnum(*p)) ++ *p = '_'; ++ p++; ++ } ++} ++ ++/* Add a library to the list of dynamic libraries. First make sure that the ++ library is actually dynamic. Used by "amigaos_libname_hook()". */ ++ ++static void ++add_lib(char *name) ++{ ++ struct liblist *lib; ++ static char buf[256]; ++ ++ for (lib = head; lib; lib = lib->next) ++ if (!strcmp(lib->name, name)) ++ return; ++ ++ /* A2IXDIR_PREFIX is passed by "make". */ ++ sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", name); ++ if (access(buf, R_OK)) ++ return; ++ ++ lib = (struct liblist*)xmalloc(sizeof(struct liblist)); ++ lib->name = strdup(name); ++ lib->cname = strdup(name); ++ safename(lib->cname); ++ lib->next = head; ++ head = lib; ++ ++ if (debug) ++ fprintf(stderr, "found dynamic library, name: %s, cname: %s\n", lib->name, ++ lib->cname); ++ ++ found_dynamic_libs=1; ++} ++ ++/* Check if the argument is a linker library. Call "add_lib()" if yes. */ ++ ++void ++morphos_libname_hook(char* arg) ++{ ++ int len = strlen(arg); ++ if (flag_static) ++ return; ++ ++ if (len > 2 && !memcmp(arg, "-l", 2)) ++ add_lib(arg + 2); ++ else if (len > 2 && !strcmp(arg + len - 2, ".a")) ++ { ++ char *lib; ++ ++ arg[len - 2] = '\0'; ++ lib = strrchr(arg, '/'); ++ if (lib == NULL) ++ lib = strrchr(arg, ':'); ++ if (lib == NULL) ++ lib = arg - 1; ++ if (!strncmp(lib + 1, "lib", 3)) ++ add_lib(lib + 4); ++ arg[len - 2] = '.'; ++ } ++} ++ ++/* Delete temporary files. */ ++ ++void ++morphos_collect2_cleanup(void) ++{ ++ if (flag_static) ++ return; ++ maybe_unlink(XLIBS_C_NAME); ++ maybe_unlink(XLIBS_O_NAME); ++ maybe_unlink(SHARED_X_NAME); ++} ++ ++/* Copy file named by FNAME to X. */ ++ ++static void ++cat(char *fname, FILE *x) ++{ ++#define BUFSIZE 16384 ++ FILE *in; ++ static char buf[BUFSIZE]; ++ int bytes; ++ ++ in = fopen(fname, "r"); ++ if (in == NULL) ++ fatal_perror("%s", fname); ++ while (!feof(in) && (bytes = fread(buf, 1, BUFSIZE, in))) ++ fwrite(buf, 1, bytes, x); ++ fclose(in); ++} ++ ++/* If no dynamic libraries were found, perform like "-static". Otherwise, ++ create "xlibs.c", "shared.x" and invoke "gcc" to create "xlibs.o". We also ++ have to adjust the linker commandline. */ ++ ++void ++morphos_prelink_hook(char** ld1_argv, int* strip_flag) ++{ ++ if (flag_static) ++ return; ++ ++ if (!found_dynamic_libs) ++ { ++ flag_static=1; ++ /* If the user has not requested "-static", but has requested "-s", ++ collect2 removes "-s" from the "ld1_argv", and calls "strip" after ++ linking. However, this would not be efficient if we linked the ++ executable without any dynamic library. In this case, we put "-s" ++ back. */ ++ if (*strip_flag) ++ { ++ /* Add "-s" as the last argument on the command line. */ ++ while (*ld1_argv) ++ ld1_argv++; ++ *ld1_argv++="-s"; ++ *ld1_argv=0; ++ *strip_flag=0; ++ } ++ } ++ else ++ { ++ FILE *x, *out; ++ struct liblist *lib; ++ static char* argv[]={0, "-c", XLIBS_C_NAME, 0}; ++ char **ld1_end, **ld1; ++ ++ /* Prepend suffixes to dynamic lib names. In addition, check if we are ++ linking a base relative executable. */ ++ for (ld1=ld1_argv; *ld1; ld1++) ++ { ++ int len=strlen(*ld1); ++ if (strncmp(*ld1, "-l", strlen("-l"))==0) ++ { ++ for (lib=head; lib; lib=lib->next) ++ if (strcmp(*ld1+strlen("-l"), lib->name)==0) ++ { ++ char *newname= ++ xmalloc(strlen(*ld1)+strlen(DYNAMIC_LIB_SUFFIX)+1); ++ strcpy(newname, *ld1); ++ strcat(newname, DYNAMIC_LIB_SUFFIX); ++ *ld1=newname; ++ break; ++ } ++ } ++ else if (len > 2 && !strcmp(*ld1 + len - 2, ".a")) ++ { ++ char *libname; ++ int substituted=0; ++ ++ (*ld1)[len - 2] = '\0'; ++ libname = strrchr(*ld1, '/'); ++ if (libname == NULL) ++ libname = strrchr(*ld1, ':'); ++ if (libname == NULL) ++ libname = *ld1 - 1; ++ if (!strncmp(libname + 1, "lib", 3)) ++ for (lib=head; lib; lib=lib->next) ++ if (strcmp(libname+4, lib->name)==0) ++ { ++ char *newname=xmalloc(strlen(*ld1)+ ++ strlen(DYNAMIC_LIB_SUFFIX)+3); ++ strcpy(newname, *ld1); ++ strcat(newname, DYNAMIC_LIB_SUFFIX); ++ strcat(newname, ".a"); ++ *ld1=newname; ++ substituted=1; ++ break; ++ } ++ if (!substituted) ++ (*ld1)[len - 2] = '.'; ++ } ++ else if (strcmp(ld1[0], "-m")==0 && ld1[1] ++ && strcmp(ld1[1], "morphos_baserel")==0) ++ { ++ flag_baserel=1; ++ break; ++ } ++ } ++ ++ out = fopen(XLIBS_C_NAME, "w"); ++ if (out == NULL) ++ fatal_perror("%s", XLIBS_C_NAME); ++ x = fopen(SHARED_X_NAME, "w"); ++ if (x == NULL) ++ fatal_perror("%s", SHARED_X_NAME); ++ ++ cat((flag_baserel ? A2IXDIR_PREFIX "/morphos_exe_baserel_script.x" ++ : A2IXDIR_PREFIX "/morphos_exe_script.x"), x); ++ for (lib = head; lib; lib = lib->next) ++ { ++ static char buf[256]; ++ sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", lib->name); ++ fprintf(out, "extern long %sBase; long *__p%sBase = &%sBase;\n", ++ lib->cname, lib->cname, lib->cname); ++ cat(buf, x); ++ } /* {{ */ ++ fprintf(x, "}}\n"); ++ fclose(out); ++ fclose(x); ++ argv[0]=c_file_name; ++ fork_execute("gcc", argv); ++ ++ /* Unfortunately, unlike "-s", "-T" cannot be specified as the last ++ argument. We put it after "-L" args. */ ++ ld1_end=ld1_argv; ++ while (*ld1_end) ++ ld1_end++; ++ ld1_end++; ++ /* "ld1_end" now points after the terminating 0 of "ld1_argv". */ ++ ++ ld1=ld1_end-2; ++ while (ld1>ld1_argv && strncmp(*ld1, "-L", strlen("-L"))) ++ ld1--; ++ if (ld1==ld1_argv) ++ fatal("no -L arguments"); ++ ld1++; ++ /* "ld1" now points after "-L". */ ++ ++ /* Shift all the arguments after "-L" one position right. */ ++ memmove(ld1+1, ld1, (ld1_end-ld1)*sizeof(*ld1)); ++ /* Put -Tshared.x in the now empty space. */ ++ *ld1="-T" SHARED_X_NAME; ++ } ++} ++ ++/* Be lazy and just call "postlink". */ ++ ++void ++morphos_postlink_hook(char* output_file) ++{ ++ static char* argv[]={"postlink", 0, 0, 0}; ++ if (flag_static) ++ return; ++ ++ if (flag_baserel) ++ { ++ argv[1]="-mbaserel"; ++ argv[2]=output_file; ++ } ++ else ++ argv[1]=output_file; ++ fork_execute("postlink", argv); ++} +diff -ruN --exclude=CVS gcc-2.95.3/gcc/prefix.c gcc/gcc/prefix.c +--- gcc-2.95.3/gcc/prefix.c Sat Apr 10 06:27:09 1999 ++++ gcc/gcc/prefix.c Thu Sep 27 19:36:10 2001 +@@ -275,7 +275,11 @@ + prefix = PREFIX; + + /* Remove any trailing directory separator from what we got. */ ++#if defined (__amigaos__) || defined (__morphos__) /* Don't kill ':' on Amiga! */ ++ if (prefix[strlen (prefix) - 1] == DIR_SEPARATOR) ++#else + if (IS_DIR_SEPARATOR (prefix[strlen (prefix) - 1])) ++#endif + { + char * temp = save_string (prefix, strlen (prefix)); + temp[strlen (temp) - 1] = 0; +@@ -303,6 +307,7 @@ + path = translate_name (path); + } + ++#if !defined (__amigaos__) && !defined (__morphos__) /* Don't convert ':' on Amiga! */ + #ifdef DIR_SEPARATOR_2 + /* Convert DIR_SEPARATOR_2 to DIR_SEPARATOR. */ + if (DIR_SEPARATOR != DIR_SEPARATOR_2) +@@ -316,6 +321,7 @@ + path = new_path; + } + #endif ++#endif + + #if defined (DIR_SEPARATOR) && !defined (DIR_SEPARATOR_2) + if (DIR_SEPARATOR != '/') +diff -ruN --exclude=CVS gcc-2.95.3/gcc/reload.c gcc/gcc/reload.c +--- gcc-2.95.3/gcc/reload.c Thu Jan 25 15:03:20 2001 ++++ gcc/gcc/reload.c Fri Sep 28 13:21:57 2001 +@@ -2125,13 +2125,17 @@ + /* On a WORDS_BIG_ENDIAN machine, point to the last register of a + multiple hard register group, so that for example (reg:DI 0) and + (reg:SI 1) will be considered the same register. */ +- if (WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD ++ ++ if (((!FLOAT_MODE_P (GET_MODE (x)) && WORDS_BIG_ENDIAN) || ++ ( FLOAT_MODE_P (GET_MODE (x)) && FLOAT_WORDS_BIG_ENDIAN)) ++ && GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD + && i < FIRST_PSEUDO_REGISTER) + i += (GET_MODE_SIZE (GET_MODE (x)) / UNITS_PER_WORD) - 1; +- if (WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (y)) > UNITS_PER_WORD ++ if (((!FLOAT_MODE_P (GET_MODE (y)) && WORDS_BIG_ENDIAN) || ++ ( FLOAT_MODE_P (GET_MODE (y)) && FLOAT_WORDS_BIG_ENDIAN)) ++ && GET_MODE_SIZE (GET_MODE (y)) > UNITS_PER_WORD + && j < FIRST_PSEUDO_REGISTER) + j += (GET_MODE_SIZE (GET_MODE (y)) / UNITS_PER_WORD) - 1; +- + return i == j; + } + /* If two operands must match, because they are really a single +diff -ruN --exclude=CVS gcc-2.95.3/gcc/toplev.c gcc/gcc/toplev.c +--- gcc-2.95.3/gcc/toplev.c Thu Jan 25 15:03:23 2001 ++++ gcc/gcc/toplev.c Thu Sep 27 19:36:10 2001 +@@ -924,6 +924,10 @@ + {"pic", &flag_pic, 1, + "Generate position independent code, if possible"}, + {"PIC", &flag_pic, 2, ""}, ++ {"baserel", &flag_pic, 3, ++ "Generate base relative code"}, ++ {"baserel32", &flag_pic, 4, ++ "Generate base relative code with no data limits"}, + {"exceptions", &flag_exceptions, 1, + "Enable exception handling" }, + {"new-exceptions", &flag_new_exceptions, 1, +@@ -2569,7 +2573,11 @@ + /* NA gets INPUT_NAME sans directory names. */ + while (na > input_name) + { +- if (na[-1] == '/') ++ if (na[-1] == '/' ++#ifdef VOL_SEPARATOR ++ || na[-1] == VOL_SEPARATOR ++#endif ++ ) + break; + #ifdef DIR_SEPARATOR + if (na[-1] == DIR_SEPARATOR) +@@ -4776,6 +4784,9 @@ + #ifdef DIR_SEPARATOR + && p[-1] != DIR_SEPARATOR + #endif ++#ifdef VOL_SEPARATOR ++ && p[-1] != VOL_SEPARATOR ++#endif + ) + --p; + progname = p; +@@ -5449,7 +5460,7 @@ + + compile_file (filename); + +-#if !defined(OS2) && !defined(VMS) && (!defined(_WIN32) || defined (__CYGWIN__)) && !defined(__INTERIX) ++#if !defined(OS2) && !defined(VMS) && (!defined(_WIN32) || defined (__CYGWIN__)) && !defined(__INTERIX) && !defined (__amigaos__) && !defined (__morphos__) + if (flag_print_mem) + { + char *lim = (char *) sbrk (0); +@@ -5465,7 +5476,7 @@ + #endif /* not USG */ + #endif + } +-#endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN) && ! __INTERIX */ ++#endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN) && ! __INTERIX && ! __amigaos__ && ! __morphos__ */ + + if (errorcount) + exit (FATAL_EXIT_CODE); +diff -ruN --exclude=CVS gcc-2.95.3/gcc/version.c gcc/gcc/version.c +--- gcc-2.95.3/gcc/version.c Fri Mar 16 13:52:12 2001 ++++ gcc/gcc/version.c Sun Jun 23 20:19:51 2002 +@@ -1 +1 @@ +-char *version_string = "2.95.3 20010315 (release)"; ++char *version_string = "2.95.3 20010315 (release/lcs-2002-04-12)"; +diff -ruN --exclude=CVS gcc-2.95.3/libiberty/choose-temp.c gcc/libiberty/choose-temp.c +--- gcc-2.95.3/libiberty/choose-temp.c Sun Apr 25 02:23:06 1999 ++++ gcc/libiberty/choose-temp.c Thu Sep 27 19:36:10 2001 +@@ -51,6 +51,9 @@ + #if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN)) + #define DIR_SEPARATOR '\\' + #endif ++#if defined(__amigaos__) || defined(__morphos__) ++#define VOL_SEPARATOR ':' ++#endif + #endif + + #ifndef DIR_SEPARATOR +@@ -131,7 +134,11 @@ + + if (len != 0 + && temp_filename[len-1] != '/' +- && temp_filename[len-1] != DIR_SEPARATOR) ++ && temp_filename[len-1] != DIR_SEPARATOR ++#ifdef VOL_SEPARATOR ++ && temp_filename[len-1] != VOL_SEPARATOR ++#endif ++ ) + temp_filename[len++] = DIR_SEPARATOR; + strcpy (temp_filename + len, TEMP_FILE); + +@@ -184,7 +191,11 @@ + + if (base_len != 0 + && temp_filename[base_len-1] != '/' +- && temp_filename[base_len-1] != DIR_SEPARATOR) ++ && temp_filename[base_len-1] != DIR_SEPARATOR ++#ifdef VOL_SEPARATOR ++ && temp_filename[base_len-1] != VOL_SEPARATOR ++#endif ++ ) + temp_filename[base_len++] = DIR_SEPARATOR; + strcpy (temp_filename + base_len, TEMP_FILE); + +diff -ruN --exclude=CVS gcc-2.95.3/libio/fileops.c gcc/libio/fileops.c +--- gcc-2.95.3/libio/fileops.c Mon Apr 12 20:27:49 1999 ++++ gcc/libio/fileops.c Sun Jun 30 16:09:44 2002 +@@ -419,7 +419,10 @@ + return retval; + } + +-_IO_pos_t ++// Changed 2001-04-05 Andreas Wolff ++// Avoid conflicting types with libioP.h ++// This may be obsolete for future versions of libio ++_IO_off_t + _IO_file_seekoff (fp, offset, dir, mode) + _IO_FILE *fp; + _IO_off_t offset; +@@ -587,7 +590,10 @@ + return read (fp->_fileno, buf, size); + } + +-_IO_pos_t ++// Changed 2001-04-05 Andreas Wolff ++// Avoid conflicting types with libioP.h ++// This may be obsolete for future versions of libio ++_IO_off_t + _IO_file_seek (fp, offset, dir) + _IO_FILE *fp; + _IO_off_t offset; +diff -ruN --exclude=CVS gcc-2.95.3/libio/genops.c gcc/libio/genops.c +--- gcc-2.95.3/libio/genops.c Fri Mar 5 01:19:08 1999 ++++ gcc/libio/genops.c Sun Jun 30 16:09:44 2002 +@@ -467,10 +467,13 @@ + return fp; + } + +-_IO_pos_t ++// Changed 2001-04-05 Andreas Wolff ++// Avoid conflicting types with libioP.h ++// This may be obsolete for future versions of libio ++_IO_off_t + _IO_default_seekpos (fp, pos, mode) + _IO_FILE *fp; +- _IO_pos_t pos; ++ _IO_off_t pos; + int mode; + { + return _IO_SEEKOFF (fp, _IO_pos_as_off (pos), 0, mode); +@@ -551,7 +554,10 @@ + _IO_un_link (fp); + } + +-_IO_pos_t ++// Changed 2001-04-05 Andreas Wolff ++// Avoid conflicting types with libioP.h ++// This may be obsolete for future versions of libio ++_IO_off_t + _IO_default_seekoff (fp, offset, dir, mode) + _IO_FILE *fp; + _IO_off_t offset; +@@ -882,7 +888,10 @@ + return (unsigned char) *fp->_IO_read_ptr; + } + +-_IO_pos_t ++// Changed 2001-04-05 Andreas Wolff ++// Avoid conflicting types with libioP.h ++// This may be obsolete for future versions of libio ++_IO_off_t + _IO_default_seek (fp, offset, dir) + _IO_FILE *fp; + _IO_off_t offset; +diff -ruN --exclude=CVS gcc-2.95.3/libio/ioseekoff.c gcc/libio/ioseekoff.c +--- gcc-2.95.3/libio/ioseekoff.c Tue Sep 16 18:00:21 1997 ++++ gcc/libio/ioseekoff.c Sun Jun 30 16:09:44 2002 +@@ -25,7 +25,10 @@ + + #include + +-_IO_pos_t ++// Changed 2001-04-05 Andreas Wolff ++// Avoid conflicting types with libioP.h ++// This may be obsolete for future versions of libio ++_IO_off_t + _IO_seekoff (fp, offset, dir, mode) + _IO_FILE *fp; + _IO_off_t offset; +diff -ruN --exclude=CVS gcc-2.95.3/libio/ioseekpos.c gcc/libio/ioseekpos.c +--- gcc-2.95.3/libio/ioseekpos.c Tue Sep 16 18:00:23 1997 ++++ gcc/libio/ioseekpos.c Sun Jun 30 16:09:44 2002 +@@ -25,10 +25,13 @@ + + #include + +-_IO_pos_t ++// Changed 2001-04-05 Andreas Wolff ++// Avoid conflicting types with libioP.h ++// This may be obsolete for future versions of libio ++_IO_off_t + _IO_seekpos (fp, pos, mode) + _IO_FILE *fp; +- _IO_pos_t pos; ++ _IO_off_t pos; + int mode; + { + _IO_pos_t retval; +diff -ruN --exclude=CVS gcc-2.95.3/libio/strops.c gcc/libio/strops.c +--- gcc-2.95.3/libio/strops.c Fri May 22 22:40:02 1998 ++++ gcc/libio/strops.c Sun Jun 30 16:09:44 2002 +@@ -205,7 +205,10 @@ + - fp->_IO_read_base); + } + +-_IO_pos_t ++// Changed 2001-04-05 Andreas Wolff ++// Avoid conflicting types with libioP.h ++// This may be obsolete for future versions of libio ++_IO_off_t + _IO_str_seekoff (fp, offset, dir, mode) + _IO_FILE *fp; + _IO_off_t offset; +diff -ruN --exclude=CVS gcc-2.95.3/texinfo/ChangeLog gcc/texinfo/ChangeLog +--- gcc-2.95.3/texinfo/ChangeLog Fri Mar 16 13:52:21 2001 ++++ gcc/texinfo/ChangeLog Sun Jun 30 16:09:44 2002 +@@ -256,6 +256,12 @@ + From: Andreas Schwab + Date: 22 Dec 1997 10:32:53 +0100 + ++Sun Feb 22 01:19:57 1998 Fred Fish ++ ++ * info/tilde.c: Only use gcc's builtin alloca if C_ALLOCA is defined. ++ Only include if C_ALLOCA is defined. ++ * makeinfo/makeinfo.c: Ditto. ++ + Sat Feb 21 17:41:26 1998 Karl Berry + + * makeinfo/makeinfo.c (find_and_load): Malloc enough room for the +diff -ruN --exclude=CVS gcc-2.95.3/texinfo/info/tilde.c gcc/texinfo/info/tilde.c +--- gcc-2.95.3/texinfo/info/tilde.c Tue Mar 24 20:40:56 1998 ++++ gcc/texinfo/info/tilde.c Sun Jun 30 16:09:44 2002 +@@ -31,11 +31,11 @@ + /* Include config.h before doing alloca. */ + #include "info.h" + +-#ifdef __GNUC__ ++#if defined (__GNUC__) && !defined (C_ALLOCA) + # undef alloca + # define alloca __builtin_alloca + #else +-# ifdef HAVE_ALLOCA_H ++# if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA) + # include + # else + # ifndef _AIX +diff -ruN --exclude=CVS gcc-2.95.3/texinfo/makeinfo/makeinfo.c gcc/texinfo/makeinfo/makeinfo.c +--- gcc-2.95.3/texinfo/makeinfo/makeinfo.c Fri May 28 04:10:10 1999 ++++ gcc/texinfo/makeinfo/makeinfo.c Sun Jun 30 16:09:44 2002 +@@ -37,11 +37,11 @@ + #include + #endif /* !TM_IN_SYS_TIME */ + +-#ifdef __GNUC__ ++#if defined (__GNUC__) && !defined (C_ALLOCA) + # undef alloca + # define alloca __builtin_alloca + #else +-# ifdef HAVE_ALLOCA_H ++# if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA) + # include + # else + # ifndef _AIX